本文整理汇总了PHP中ArrayList::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayList::__construct方法的具体用法?PHP ArrayList::__construct怎么用?PHP ArrayList::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArrayList
的用法示例。
在下文中一共展示了ArrayList::__construct方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* 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();
}
示例2: __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);
}
示例3: __construct
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);
}
示例4: __construct
/**
*
* @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());
}
示例5: __construct
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);
}
}
示例6: __construct
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));
}
}
}
示例7: __construct
/**
* 架构函数
* @access public
* @param array $values 初始化数组元素
*/
public function __construct($values = array())
{
parent::__construct($values);
}
示例8: __construct
/**
* @param \DNProject $project
* @param \DNData $data
*/
public function __construct(\DNProject $project, \DNData $data)
{
$this->project = $project;
$this->data = $data;
parent::__construct(array());
}
示例9: __construct
public function __construct()
{
parent::__construct(NULL, 'IRouter');
}
示例10: __construct
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();
}