當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Container::__construct方法代碼示例

本文整理匯總了PHP中Container::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Container::__construct方法的具體用法?PHP Container::__construct怎麽用?PHP Container::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Container的用法示例。


在下文中一共展示了Container::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testConstructList

 /**
  * Running testcase testRepresent().
  *
  * @return void
  */
 public function testConstructList()
 {
     $test_array = array(new Integer(3), new Integer(4));
     $this->object->expects($this->at(0))->method('contain')->with($this->equalTo($test_array[0]));
     $this->object->expects($this->at(1))->method('contain')->with($this->equalTo($test_array[1]));
     $this->object->__construct($test_array);
 }
開發者ID:StealThisShow,項目名稱:StealThisTracker,代碼行數:12,代碼來源:ContainerTest.php

示例2: unserialize

 function unserialize($serialized)
 {
     parent::__construct();
     foreach (unserialize($serialized) as $name => $value) {
         $this->{$name} = $value;
     }
 }
開發者ID:z7,項目名稱:hydra,代碼行數:7,代碼來源:User.php

示例3: array

 function __construct($controls = array(), $properties = array())
 {
     parent::__construct($properties);
     foreach ($controls as $key => $control) {
         $control = $this->buildControl($control, $key);
         $this->addElement($control);
     }
 }
開發者ID:qix,項目名稱:phorms,代碼行數:8,代碼來源:Form.php

示例4: __construct

 public function __construct($template = null)
 {
     parent::__construct();
     MultiElements::$numForms++;
     $this->index = MultiElements::$numForms;
     if ($template !== null) {
         $this->setTemplate($template);
     }
 }
開發者ID:ekowabaka,項目名稱:cfx,代碼行數:9,代碼來源:MultiElements.php

示例5: array

 function __construct(App $app, $path, $method = 'GET', array $query = array(), $data = null)
 {
     $this->app = $app;
     $this->query = $query;
     $this->data = $data;
     $this->method = $method;
     $this->path = $path;
     parent::__construct('request');
 }
開發者ID:z7,項目名稱:hydra,代碼行數:9,代碼來源:Request.php

示例6: __construct

 public function __construct($model, $config)
 {
     parent::__construct($config);
     $files = ScanDir::getFilesOfType($this->config['path'], $model::MIME, !isset($config['reverse']) || $config['reverse']);
     $this->count = count($files);
     $this->limit = isset($config['limit']) ? $config['limit'] : $this->count;
     $static = isset($config['static']) ? $config['static'] : true;
     foreach ($files as $f) {
         $this->models[] = new $model(array('name' => $f, 'path' => $config['path'] . $f, 'type' => $config['type'], 'static' => $static));
     }
 }
開發者ID:Stephan123,項目名稱:markdown_blog,代碼行數:11,代碼來源:Collection.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     // Inject self into the Middleware object
     \Moxy\Middleware::setApplication($this);
     // Fix Observer ID to moxy
     $this->observerUniqid = 'moxy';
     // The router as a service
     $this->createService('router', array('\\Moxy\\Router', 'create'));
     // Emit startup event
     $this->emit('init');
 }
開發者ID:errant,項目名稱:moxy,代碼行數:12,代碼來源:moxy.php

示例8: __construct

 /**
  * Setup the table.
  *
  * @param unknown_type $num_rows
  * @param unknown_type $num_columns
  */
 public function __construct($num_rows = -1, $num_columns = -1, $id = "")
 {
     parent::__construct();
     $this->num_rows = $num_rows;
     $this->num_columns = $num_columns;
     $this->setId($id);
     $this->addCSSClass("fapi-table");
     for ($i = 0; $i < $num_rows; $i++) {
         array_push($this->tableElements, array());
         for ($j = 0; $j < $num_columns; $j++) {
             array_push($this->tableElements[$i], array());
         }
     }
 }
開發者ID:ekowabaka,項目名稱:wyf,代碼行數:20,代碼來源:TableLayout.php

示例9: __construct

 /**
  * Create a new configuration container
  * @param array $array the configuration array
  * @param string $section the section to use (i.e. first level key)
  * @param string $section_sep a separator for section extension
  * @param string $key_sep a separator for key traversal
  */
 public function __construct(array $array = null, $section = null, $section_sep = ":", $key_sep = ".")
 {
     if (isset($section) && strlen($section_sep)) {
         $array = $this->combine($array, $section_sep)[$section];
     }
     if ($array) {
         $config = array();
         if (strlen($key_sep)) {
             foreach ($array as $key => $val) {
                 $this->walk($config, $key, $val, $key_sep);
             }
         }
         parent::__construct($config, false);
     }
 }
開發者ID:m6w6,項目名稱:merry,代碼行數:22,代碼來源:Config.php

示例10: __construct

 public function __construct($message, $type = self::TYPE_SUCCESS, $method = self::METHOD_APPEND)
 {
     parent::__construct();
     $this->registerOption(self::OPTION_TYPE);
     $this->setOption(self::OPTION_TYPE, $type);
     $this->setOption(self::OPTION_TARGET, $this::$container);
     $value = $this::$template;
     $value = str_replace('%type%', $type, $value);
     $value = str_replace('%value%', $message, $value);
     if ($method == self::METHOD_APPEND) {
         $this->append($value);
     } else {
         $this->html($value);
     }
 }
開發者ID:antfuentes87,項目名稱:AjaxCom,代碼行數:15,代碼來源:FlashMessage.php

示例11: __construct

 public function __construct($label = "", $description = "")
 {
     parent::__construct();
     $this->setLabel($label);
     $this->setDescription($description);
 }
開發者ID:rocksyne,項目名稱:wyf,代碼行數:6,代碼來源:FieldSet.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     MultiElements::$numForms++;
     $this->index = MultiElements::$numForms;
 }
開發者ID:rocksyne,項目名稱:wyf,代碼行數:6,代碼來源:MultiElements.php

示例13: __construct

 /**
  * @param Menu $parent Pointer to parent menu container
  */
 public function __construct(Menu &$parent)
 {
     parent::__construct($parent->renderer, $parent);
 }
開發者ID:samsonos,項目名稱:cms_form,代碼行數:7,代碼來源:MenuItem.php

示例14:

 function __construct(IdentifiableOrmEntity $parent, IQueryable $children, OrmProperty $referentialProperty, $readOnly)
 {
     $this->mtm = $referentialProperty->getType();
     Assert::isTrue($this->mtm instanceof ManyToManyContainerPropertyType);
     parent::__construct($parent, $children, $readOnly);
 }
開發者ID:phoebius,項目名稱:phoebius,代碼行數:6,代碼來源:ManyToManyContainer.class.php

示例15:

 function __construct($table, \Kinesis\Task $parent)
 {
     parent::__construct(array('Table' => $table), $parent);
 }
開發者ID:Kinetical,項目名稱:Kinesis,代碼行數:4,代碼來源:Create.php


注:本文中的Container::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。