/**
  * 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
0
Файл: User.php Проект: z7/hydra
 function unserialize($serialized)
 {
     parent::__construct();
     foreach (unserialize($serialized) as $name => $value) {
         $this->{$name} = $value;
     }
 }
Пример #3
0
 function __construct($controls = array(), $properties = array())
 {
     parent::__construct($properties);
     foreach ($controls as $key => $control) {
         $control = $this->buildControl($control, $key);
         $this->addElement($control);
     }
 }
Пример #4
0
 public function __construct($template = null)
 {
     parent::__construct();
     MultiElements::$numForms++;
     $this->index = MultiElements::$numForms;
     if ($template !== null) {
         $this->setTemplate($template);
     }
 }
Пример #5
0
 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
0
 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
0
 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
0
 /**
  * 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
0
 /**
  * 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
0
 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
0
 public function __construct($label = "", $description = "")
 {
     parent::__construct();
     $this->setLabel($label);
     $this->setDescription($description);
 }
Пример #12
0
 public function __construct()
 {
     parent::__construct();
     MultiElements::$numForms++;
     $this->index = MultiElements::$numForms;
 }
Пример #13
0
 /**
  * @param Menu $parent Pointer to parent menu container
  */
 public function __construct(Menu &$parent)
 {
     parent::__construct($parent->renderer, $parent);
 }
 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
0
 function __construct($table, \Kinesis\Task $parent)
 {
     parent::__construct(array('Table' => $table), $parent);
 }
Пример #16
0
 function __construct($table, $alias = '', \Kinesis\Task $parent)
 {
     $params = array('Table' => $table, 'Alias' => $alias);
     parent::__construct($params, $parent);
 }
Пример #17
0
 public function __construct($title, $inputArray, $project_id)
 {
     $this->project_id = $project_id;
     $this->project_title = $title;
     parent::__construct($title, $inputArray);
 }
Пример #18
0
 function __construct()
 {
     parent::__construct('annotation');
 }
Пример #19
0
 /**
  * Creates a new button bar.
  * @param string $name
  */
 public function __construct($name = null)
 {
     parent::__construct();
     $this->barName = $name;
 }
Пример #20
0
 public function __construct()
 {
     parent::__construct();
 }
Пример #21
0
 /**
  * Constructor
  *
  * @param string $url URL
  * @param string $id  element ID
  */
 public function __construct($url, $id)
 {
     parent::__construct($url);
     $this->id = $id;
 }
Пример #22
0
 function __construct(IdentifiableOrmEntity $parent, IQueryable $children, OrmProperty $referentialProperty, $readOnly)
 {
     $this->referentialProperty = $referentialProperty;
     parent::__construct($parent, $children, $readOnly);
 }
Пример #23
0
 public function __construct($legend = "")
 {
     parent::__construct();
     $this->legend = $legend;
 }
Пример #24
0
 /**
  * @param string $inID
  * 
  * @return void
  */
 public function __construct($inID)
 {
     parent::__construct($inID);
 }
Пример #25
0
 function __construct(array $data = array())
 {
     $this->Data = $data;
     parent::__construct();
 }
Пример #26
0
 /**
  * A constructor for initializing the form. This constructor should always
  * be called even when the form class is being extended.
  * @param $method
  */
 public function __construct($method = "")
 {
     parent::__construct();
     if ($method == "") {
         $method = "POST";
     }
     $this->setMethod($method);
     $this->setSubmitValue("Save");
     $this->addAttribute("class", "fapi-form");
 }
Пример #27
0
 public function __construct($param = [])
 {
     parent::__construct(array_merge(static::$moduleParam, $param));
 }
Пример #28
0
Файл: Form.php Проект: z7/hydra
 function __construct(App $app, array $options = array())
 {
     $this->app = $app;
     $this->constructorOptions = $options;
     parent::__construct('form');
 }
Пример #29
0
 public function __construct(ILeaf $leaf, $config)
 {
     parent::__construct($config);
     $this->leaf = $leaf;
 }