E.g.
trait ConfigProvider {
private $_configProviderConfig;
public function setConfigProvider($cfg) {
}
<?php | |
// This relates to Matthias Verraes talk on unbreakable domain models | |
// (which is very good). Slides are http://verraes.net/2013/06/unbreakable-domain-models/ | |
// and this is about the end of the talk (about three-quarters through the slide deck). | |
// | |
// I like the whole specification thing, but want to be able to combine them | |
// dynamically (in the language of the talk, the tenant can create their own | |
// specification of what a premium custom is), using building blocks we provide. | |
class CustomerSpecificationSet |
/* Gallery beacon with extra module */ | |
YUI.add('gallery-scroll-beacon', function(Y) { | |
/** | |
* Provides synthetic event to detect beacon element arriving in or leaving the browser viewport. | |
* | |
* @module scroll-beacon | |
*/ | |
/** |
//////////////////////////////////////////////////// | |
//////////////////////////////////////////////////// | |
// Patch | |
// | |
// Was using a non-standard quirk of IE to do | |
// document.createElement('<iframe id="' + frameId + '" name="' + frameId + '" />') | |
// when it should really be just document.createElement('iframe') and then add attributes | |
// IE9 is strict about this and breaks. | |
// | |
// |
var buildParser = Y.cached(function (prefix, suffix, separator, decimal) { | |
var regexBits = [] | |
regex; | |
if (prefix) { | |
regexBits.push('^' + prefix.replace(safeRegExp, '\\$1')); | |
} | |
if (suffix) { | |
regexBits.push(suffix.replace(safeRegExp, '\\$1') + '$'); | |
} |
var util = require('util') | |
http=require('http'), | |
phantom=require('node-phantom'), | |
// simple logging of memory use: | |
memoryCache = [0], | |
logMemory = function (msg) { | |
var mem = process.memoryUsage(); | |
//console.log(msg + " current memory use: ", util.inspect(process.memoryUsage())); | |
console.log(msg + " heapUsed change: " + (mem.heapUsed - memoryCache[memoryCache.length - 1])); |
/** | |
* @class Date | |
* @static | |
*/ | |
/** | |
* @for Date | |
* @method strtotime | |
* | |
* Parses English (or other languages) date-related sentences into |
/** | |
Generates a series of colors from startColor at various offsets | |
@protected | |
@method _getOffsetAndFinish | |
@param {String} startColor Start color | |
@param {Array} arrOffsets Array of colors | |
@param {String} [to] | |
@returns {Array} Of offsetted and finished colors | |
**/ | |
_getOffsetAndFinish: function (startColor, arrOffsets, to) { |
// relates to YUI ticket http://yuilibrary.com/projects/yui3/ticket/2532864 | |
// | |
// | |
YUI.add("graphics-static-chooser", function (Y) { | |
// | |
// | |
// Loading graphics (statically) using the configurator is tricky, | |
// because it feature detects on the browser you're using the configurator |
YUI.add("arraySet-tests", function (Y) { | |
var ASSERT = Y.Assert, | |
ARRAYASSERT = Y.ArrayAssert; | |
var testSimpleIntersects = new Y.Test.Case({ | |
name: "Test of simple arrays of numbers, strings", | |
testNumbers: function () { |