本文整理汇总了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);
}
示例2: unserialize
function unserialize($serialized)
{
parent::__construct();
foreach (unserialize($serialized) as $name => $value) {
$this->{$name} = $value;
}
}
示例3: array
function __construct($controls = array(), $properties = array())
{
parent::__construct($properties);
foreach ($controls as $key => $control) {
$control = $this->buildControl($control, $key);
$this->addElement($control);
}
}
示例4: __construct
public function __construct($template = null)
{
parent::__construct();
MultiElements::$numForms++;
$this->index = MultiElements::$numForms;
if ($template !== null) {
$this->setTemplate($template);
}
}
示例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');
}
示例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));
}
}
示例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');
}
示例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());
}
}
}
示例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);
}
}
示例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);
}
}
示例11: __construct
public function __construct($label = "", $description = "")
{
parent::__construct();
$this->setLabel($label);
$this->setDescription($description);
}
示例12: __construct
public function __construct()
{
parent::__construct();
MultiElements::$numForms++;
$this->index = MultiElements::$numForms;
}
示例13: __construct
/**
* @param Menu $parent Pointer to parent menu container
*/
public function __construct(Menu &$parent)
{
parent::__construct($parent->renderer, $parent);
}
示例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);
}
示例15:
function __construct($table, \Kinesis\Task $parent)
{
parent::__construct(array('Table' => $table), $parent);
}