App\Lib\Codeception::getEnvironments PHP 메소드

getEnvironments() 공개 메소드

public getEnvironments ( $type )
    public function getEnvironments($type)
    {
        $env = array();
        if (isset($_GET['env'])) {
            foreach (explode(' ', $_GET['env']) as $value) {
                if ($value) {
                    $value = str_replace($type . '_', '', $value);
                    if (isset($this->config['env'][$type]) && in_array($value, $this->config['env'][$type])) {
                        $env[] = '--env=' . $value;
                    }
                }
            }
        }
        return $env;
    }