当前位置: 首页>>代码示例>>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;未经允许,请勿转载。