本文整理汇总了PHP中Codeception\Module::_initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP Module::_initialize方法的具体用法?PHP Module::_initialize怎么用?PHP Module::_initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Codeception\Module
的用法示例。
在下文中一共展示了Module::_initialize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initialize
public function _initialize()
{
if (!function_exists('xmlrpc_encode_request')) {
throw new ModuleRequireException(__CLASS__, "XMLRPC module requires installed php_xmlrpc extension");
}
parent::_initialize();
}
示例2: _initialize
public function _initialize()
{
$configOk = false;
if (is_array($this->config['connectors'])) {
foreach ($this->config['connectors'] as $connector => $connectorConfig) {
if (is_array($connectorConfig)) {
$fields = array_keys($connectorConfig);
$configOk = array_intersect($this->connectorRequiredFields, $fields) == $this->connectorRequiredFields;
if (!$configOk) {
break;
}
}
}
}
if (!$configOk) {
throw new ModuleConfigException(__CLASS__, "\nOptions: " . implode(', ', $this->connectorRequiredFields) . " are required\n\n Please, update the configuration and set all the required fields\n\n");
}
$this->timezone = $this->config['timezone'];
parent::_initialize();
foreach ($this->config['connectors'] as $connector => $connectorConfig) {
if ($connectorConfig['populate']) {
if ($connectorConfig['cleanup']) {
$this->cleanup($connector);
}
$this->loadDump($connector);
}
}
}
示例3: _initialize
/**
* Initialize module
*
* @return void
*/
public function _initialize()
{
parent::_initialize();
$this->module->_initialize();
}