本文整理汇总了PHP中Builder::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Builder::__construct方法的具体用法?PHP Builder::__construct怎么用?PHP Builder::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Builder
的用法示例。
在下文中一共展示了Builder::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(array $config = array())
{
parent::__construct($config);
if (static::$modelStorage === null) {
static::$modelStorage = new \SplObjectStorage();
}
$this->table(static::tableName());
}
示例2: __construct
/**
* Menu_Builder constructor.
*
* @param string $title Title menu.
* @param integer|float $position Position menu.
*/
public function __construct($title, $position)
{
parent::__construct($title);
if (!$this->position_is_valid($position)) {
$this->position_exception();
}
$this->position = $position;
$this->settings['position'] = $position;
}
示例3: __construct
/**
* @param WidgetTC $wtc A widget testcase object
* @param Zend_Config $config Takes configuration for building the widget
*/
public function __construct($wtc)
{
$this->testcase = $wtc;
// Fetch the configuration
if (class_exists('ZEND_REGISTRY')) {
$reg = Zend_Registry::getInstance();
$this->appConfig = $reg->configuration;
} else {
// If Zend_Registry is not defined, use defaults so the
// class can work without having defined a registry
$this->appConfig = new stdClass();
/// @todo: wouldn't dirname(__FILE__) work better instead of getcwd?
$this->appConfig->testcase->cache_dir = getcwd() . '/' . self::DEFAULT_CACHEDIR;
$this->appConfig->testcase->include_dir = getcwd() . '/' . self::DEFAULT_INCLUDEDIR;
$this->appConfig->testcase->dir = getcwd() . '/' . self::DEFAULT_TESTCASEDIR;
}
$filename = tempnam($this->appConfig->cacheDir, date('Ymd') . '-');
// filename example: 20081231-...
parent::__construct($filename, ZIPARCHIVE::OVERWRITE);
//echo $this->appConfig->testcaseDir.'/'.$this->testcase->path;
//echo isset($this->appConfig->testcaseDir)?'yes':'no';
$this->build();
}
示例4: array
/**
* Constructor.
*/
function __construct($content, $settings)
{
parent::__construct($content, $settings);
$this->styles = array();
}
示例5: __construct
public function __construct(array $config = array())
{
parent::__construct($config);
static::$modelStorage = new \SplObjectStorage();
}
示例6: __construct
public function __construct($sourceFolder, $targetFolder, $host)
{
parent::__construct($sourceFolder, $targetFolder);
$this->_host = $host;
}
示例7: __construct
/**
* Use the Builder __construct to gather the config variables
*/
public function __construct($config = array())
{
// construct the parent
parent::__construct($config);
}
示例8: __construct
/**
* Submenu_Builder constructor.
*
* @param string $title Sub-menu title.
* @param Builder $parent Parent menu.
*/
public function __construct($title, Builder $parent)
{
parent::__construct($title);
$this->parent = $parent;
}