Пример #1
0
 /**
  * Constructor
  *
  * @param array $options
  */
 public function __construct($options)
 {
     $this->filters = new Core_ArrayObject();
     $this->validators = new Core_ArrayObject();
     parent::__construct($options, Options::SELF);
     $this->attributes = new Core_ArrayObject();
     $this->errors = new Core_ArrayObject();
     if ($this->form->is_ajaxed && Ajax::get('element') == $this->name) {
         $this->is_ajaxed = TRUE;
     }
 }
Пример #2
0
 /**
  * Конструктор
  * @param string|array|Core_ArrayObject $path
  */
 public function __construct($gears = NULL, $options = array())
 {
     parent::__construct($options);
     if (is_array($gears) or $gears instanceof Core_ArrayObject) {
         // На будущее — возможность закешировать обработку шестерёнок
         //            if ($gears = cogear()->system_cache->get('gears')) {
         //                $this->extend($gears->toArray());
         //            } else {
         $this->load($gears);
         //                cogear()->system_cache->set('gears', $this);
         //            }
     } else {
         if (is_string($gears) && is_dir($gears)) {
             $this->loadDir($gears);
         }
     }
     $this->init();
 }
Пример #3
0
 /**
  * Конструктор
  *
  * @param type $file
  * @param type $options
  */
 public function __construct($file, $options = array())
 {
     parent::__construct($options);
     $this->info = new Core_ArrayObject($this->info);
     // Проверяем файл на существование
     if (file_exists($file)) {
         $this->info->file = $file;
         // Получаем параметры изображения
         if ($info = getimagesize($file)) {
             $this->info->width = $info[0];
             $this->info->height = $info[1];
             $this->info->type = $info[2];
             $this->info->mime = $info[3];
             $this->create();
         } else {
             throw new Exception(t('Указанный файл не является изображением: %s', $file));
         }
     } else {
         throw new Exception(t('Изображение не существует: %s', $file));
     }
 }
Пример #4
0
 /**
  * Constructor
  *
  * @param string $text
  * @param array $options
  */
 public function __construct($text, $options = [])
 {
     parent::__construct($options);
     $this->setText($text);
 }
 public function __construct($label, $options, $show_size = false, $required = true, $false_values = array())
 {
     parent::__construct($label, $options, $required, $false_values);
     $this->show_size = $show_size;
 }
Пример #6
0
 /**
  * Constructor
  *
  * @param string $name Name under which all options are stored
  * @param array $defaults Default options
  * @api
  */
 public function __construct($name, array $defaults = array())
 {
     parent::__construct($name, $defaults);
     // Ensure we're working with the right options on a multisite
     add_action('switch_blog', array($this, '_invalidateOptions'), 10, 0);
 }
Пример #7
0
 /**
  * Конструктор
  *
  * @param array $options
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->render && hook($this->render, array($this, 'show'));
 }
Пример #8
0
 /**
  * Конструктор
  *
  * @param array $options
  */
 public function __construct($options = array(), $place = 0)
 {
     parent::__construct($options, $place);
 }
Пример #9
0
 /**
  * Constructor
  * 
  * @param array $data
  */
 public function __construct($options = NULL, $place = NULL)
 {
     $options && parent::__construct($options, $place);
     $this->object = new Core_ArrayObject();
 }
Пример #10
0
 public function __construct($label, array $attributes = array())
 {
     parent::__construct($label, $attributes);
 }
Пример #11
0
 /**
  * Конструктор
  *
  * @param string $name
  * @param array $options
  */
 public function __construct($name, $options = array())
 {
     $options['name'] = $name;
     parent::__construct($options);
 }
Пример #12
0
 public function __construct(&$xpdo)
 {
     parent::__construct($xpdo);
 }
Пример #13
0
 /**
  * Constructor
  *
  * @param string $token
  * @param array $options
  */
 public function __construct($token, array $options = [])
 {
     parent::__construct($options);
     $this->setToken($token);
 }