/** * Create a new UnsavedRelationList * * @param string $dataClass The DataObject class used in the relation */ public function __construct($baseClass, $relationName, $dataClass) { $this->baseClass = $baseClass; $this->relationName = $relationName; $this->dataClass = $dataClass; parent::__construct(); }
/** * @deprecated 3.0 */ public function __construct($items = array()) { Deprecation::notice('3.0', 'Use DataList or ArrayList instead'); if ($items) { if (!is_array($items) || func_num_args() > 1) { $items = func_get_args(); } foreach ($items as $i => $item) { if ($item instanceof ViewableData) { continue; } if (is_object($item) || ArrayLib::is_associative($item)) { $items[$i] = new ArrayData($item); } else { user_error( "DataObjectSet::__construct: Passed item #{$i} is not an" . ' and object or associative array, can\'t be properly' . ' iterated on in templates', E_USER_WARNING ); } } } parent::__construct($items); }
public function __construct(array $arr, \Closure $typeCheck) { $this->_TypeCheck = $typeCheck; if (\is_array($arr) && !$this->validArray($arr)) { throw new \InvalidArgumentException('$arr contains an invalid type'); } parent::__construct($arr); }
/** * * @param DNProject $project * @param DNData $data * @param Gitonomy\Git\Reference $reference * @param string $blockBranch * @param bool $getTags */ public function __construct(DNProject $project, DNData $data, Gitonomy\Git\Reference $reference = null, $blockBranch = null, $getTags = false) { $this->project = $project; $this->data = $data; $this->reference = $reference; $this->blockBranch = $blockBranch; $this->getTags = $getTags; parent::__construct(array()); }
public function __construct($items = array()) { if (!is_array($items) || func_num_args() > 1) { $items = func_get_args(); } parent::__construct($items); foreach ($items as $item) { if ($item instanceof FormField) $item->setContainerFieldSet($this); } }
public function __construct($servers = array(), $metricList = null) { parent::__construct(); if ($metricList === null) { $metricList = array("Apache", "Load average", "CPU Usage", "Memory Free", "Physical Memory Used", "Swapping"); } foreach ($servers as $server) { $serverName = substr($server, strrpos($server, '.') + 1); $graphs = getCommonGraphs($metricList, array("server" => $server, 'title_prefix' => $serverName . ' - ')); foreach ($graphs as $graph) { $this->push(new GraphiteGraph($graph)); } } }
/** * 架构函数 * @access public * @param array $values 初始化数组元素 */ public function __construct($values = array()) { parent::__construct($values); }
/** * @param \DNProject $project * @param \DNData $data */ public function __construct(\DNProject $project, \DNData $data) { $this->project = $project; $this->data = $data; parent::__construct(array()); }
public function __construct() { parent::__construct(NULL, 'IRouter'); }
public function __construct($input = null, $flags = 0, $iteratorClass = null) { if ($input !== null) { if ($flags !== 0) { if ($flags & self::STRICT_COMP !== 0) { $this->strict = true; } if ($iteratorClass !== null) { parent::__construct($input, $flags, $iteratorClass); } else { parent::__construct($input, $flags); } } else { parent::__construct($input); } } else { parent::__construct(); } $this->cleanSet(); }