当前位置: 首页>>代码示例>>PHP>>正文


PHP ArrayList::__construct方法代码示例

本文整理汇总了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();
 }
开发者ID:congaaids,项目名称:silverstripe-framework,代码行数:12,代码来源:UnsavedRelationList.php

示例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);
	}
开发者ID:redema,项目名称:sapphire,代码行数:30,代码来源:DataObjectSet.php

示例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);
 }
开发者ID:dazarobbo,项目名称:cola,代码行数:8,代码来源:TypedArrayList.php

示例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());
 }
开发者ID:ss23,项目名称:deploynaut,代码行数:17,代码来源:DNReferenceList.php

示例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);
		}
	}
开发者ID:redema,项目名称:sapphire,代码行数:11,代码来源:FieldList.php

示例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));
         }
     }
 }
开发者ID:adrexia,项目名称:deploynaut,代码行数:14,代码来源:GraphiteList.php

示例7: __construct

 /**
  * 架构函数
  * @access public
  * @param array $values  初始化数组元素
  */
 public function __construct($values = array())
 {
     parent::__construct($values);
 }
开发者ID:imbzd,项目名称:sessdw,代码行数:9,代码来源:Stack.class.php

示例8: __construct

 /**
  * @param \DNProject $project
  * @param \DNData $data
  */
 public function __construct(\DNProject $project, \DNData $data)
 {
     $this->project = $project;
     $this->data = $data;
     parent::__construct(array());
 }
开发者ID:silverstripe,项目名称:deploynaut,代码行数:10,代码来源:DNBranchList.php

示例9: __construct

 public function __construct()
 {
     parent::__construct(NULL, 'IRouter');
 }
开发者ID:jaroslavlibal,项目名称:MDW,代码行数:4,代码来源:MultiRouter.php

示例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();
 }
开发者ID:bahrmichael,项目名称:eyeos,代码行数:20,代码来源:collection.php


注:本文中的ArrayList::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。