本文整理汇总了PHP中Options::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Options::__construct方法的具体用法?PHP Options::__construct怎么用?PHP Options::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Options
的用法示例。
在下文中一共展示了Options::__construct方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* 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: __construct
/**
* Конструктор
* @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: __construct
/**
* Конструктор
*
* @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: __construct
/**
* Constructor
*
* @param string $text
* @param array $options
*/
public function __construct($text, $options = [])
{
parent::__construct($options);
$this->setText($text);
}
示例5: __construct
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: __construct
/**
* 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: __construct
/**
* Конструктор
*
* @param array $options
*/
public function __construct($options = array())
{
parent::__construct($options);
$this->render && hook($this->render, array($this, 'show'));
}
示例8: __construct
/**
* Конструктор
*
* @param array $options
*/
public function __construct($options = array(), $place = 0)
{
parent::__construct($options, $place);
}
示例9: __construct
/**
* Constructor
*
* @param array $data
*/
public function __construct($options = NULL, $place = NULL)
{
$options && parent::__construct($options, $place);
$this->object = new Core_ArrayObject();
}
示例10: __construct
public function __construct($label, array $attributes = array())
{
parent::__construct($label, $attributes);
}
示例11: __construct
/**
* Конструктор
*
* @param string $name
* @param array $options
*/
public function __construct($name, $options = array())
{
$options['name'] = $name;
parent::__construct($options);
}
示例12: __construct
public function __construct(&$xpdo)
{
parent::__construct($xpdo);
}
示例13: __construct
/**
* Constructor
*
* @param string $token
* @param array $options
*/
public function __construct($token, array $options = [])
{
parent::__construct($options);
$this->setToken($token);
}