protected function _loadEnvironment($envFilePath)
    {
        if (file_exists($envFilePath)) {
            include $envFilePath;

            // $configure has to be defined in the included environment file.
            if (isset($configure) && is_array($configure) && !empty($configure)) {
                $config = Hash::merge(Configure::read(), Hash::expand($configure));
                Configure::write($config);
            }

            if (isset($availableEnvironments) && empty($this->_environments)) {
                return $availableEnvironments;
            }
        }

        return [];
    }