當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。