/** * Constructor. * * @param ModuleContainer $container * @param $config */ public function __construct(ModuleContainer $container, $config = null) { $this->config = array_merge(['bootstrap' => 'bootstrap.php', 'application_dir' => 'application', 'modules_dir' => 'modules', 'system_dir' => 'system', 'custom_config_reader' => null], (array) $config); $projectDir = \Codeception\Configuration::projectDir(); if (!defined('EXT')) { define('EXT', '.php'); } if (!defined('DOCROOT')) { define('DOCROOT', realpath($projectDir) . DIRECTORY_SEPARATOR); } if (!defined('APPPATH')) { define('APPPATH', realpath(DOCROOT . $this->config['application_dir']) . DIRECTORY_SEPARATOR); } if (!defined('MODPATH')) { define('MODPATH', realpath(DOCROOT . $this->config['modules_dir']) . DIRECTORY_SEPARATOR); } if (!defined('SYSPATH')) { define('SYSPATH', realpath(DOCROOT . $this->config['system_dir']) . DIRECTORY_SEPARATOR); } if (!defined('KOHANA_START_TIME')) { define('KOHANA_START_TIME', microtime(TRUE)); } if (!defined('KOHANA_START_MEMORY')) { define('KOHANA_START_MEMORY', memory_get_usage()); } if (!defined('API_MODE')) { define('API_MODE', true); } $this->config['bootstrap_file'] = APPPATH . $this->config['bootstrap']; parent::__construct($container); }
/** * WordPress constructor. * @param ModuleContainer $moduleContainer * @param array $config */ public function __construct(ModuleContainer $moduleContainer, $config = [], WordPressConnector $client = null) { parent::__construct($moduleContainer, $config); $this->ensureWpRoot(); $this->adminPath = $this->config['adminPath']; $this->client = $client; }
/** * Constructor. * * @param ModuleContainer $container * @param null $config */ public function __construct(ModuleContainer $container, $config = null) { $this->config = array_merge(['cleanup' => true, 'unit' => true, 'environment' => 'testing', 'start' => 'bootstrap' . DIRECTORY_SEPARATOR . 'start.php', 'root' => '', 'filters' => false], (array) $config); $projectDir = explode('workbench', Configuration::projectDir())[0]; $projectDir .= $this->config['root']; $this->config['project_dir'] = $projectDir; $this->config['start_file'] = $projectDir . $this->config['start']; parent::__construct($container, null); }
/** * Constructor. * * @param $config */ public function __construct($config = null) { $this->config = array_merge(array('cleanup' => true, 'environment_file' => '.env', 'bootstrap' => 'bootstrap' . DIRECTORY_SEPARATOR . 'app.php', 'root' => '', 'packages' => 'workbench'), (array) $config); $projectDir = explode($this->config['packages'], \Codeception\Configuration::projectDir())[0]; $projectDir .= $this->config['root']; $this->config['project_dir'] = $projectDir; $this->config['bootstrap_file'] = $projectDir . $this->config['bootstrap']; parent::__construct(); }
/** * Constructor. * * @param ModuleContainer $container * @param array|null $config */ public function __construct(ModuleContainer $container, $config = null) { $this->config = array_merge(['cleanup' => true, 'environment_file' => '.env', 'bootstrap' => 'bootstrap' . DIRECTORY_SEPARATOR . 'app.php', 'root' => '', 'packages' => 'workbench', 'disable_middleware' => false, 'disable_events' => false], (array) $config); $projectDir = explode($this->config['packages'], \Codeception\Configuration::projectDir())[0]; $projectDir .= $this->config['root']; $this->config['project_dir'] = $projectDir; $this->config['bootstrap_file'] = $projectDir . $this->config['bootstrap']; parent::__construct($container); }
public function __construct($config = null) { $this->config = array_merge( array( 'cleanup' => true, 'start' => 'bootstrap' . DIRECTORY_SEPARATOR . 'start.php' ), (array) $config ); parent::__construct(); }
/** * Constructor. * * @param ModuleContainer $container * @param $config */ public function __construct(ModuleContainer $container, $config = null) { $this->config = array_merge(array('cleanup' => true, 'bootstrap' => 'bootstrap' . DIRECTORY_SEPARATOR . 'app.php', 'root' => '', 'packages' => 'workbench'), (array) $config); parent::__construct($container); }
public function __construct($config = null) { $this->config = array_merge(array('cleanup' => true, 'unit' => true, 'environment' => 'testing', 'start' => 'bootstrap' . DIRECTORY_SEPARATOR . 'start.php', 'root' => '', 'filters' => false), (array) $config); parent::__construct(); }
/** * Constructor. * * @param $config */ public function __construct($config = null) { $this->config = array_merge(array('cleanup' => true, 'environment_file' => '.env', 'bootstrap' => 'bootstrap' . DIRECTORY_SEPARATOR . 'app.php', 'root' => ''), (array) $config); parent::__construct(); }