mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
add enhancement
This commit is contained in:
@@ -40,20 +40,38 @@ class Handler
|
||||
* @param ConfigurationSpecification $configSpec
|
||||
* @param Parser\ParserInterface $parser
|
||||
*/
|
||||
public function __construct(Application $configSpec, Parser $parser)
|
||||
public function __construct(Specification $configSpec, Parser $parser)
|
||||
{
|
||||
$this->confSpecification = $configSpec;
|
||||
$this->parser = $parser;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter
|
||||
* @return Specification
|
||||
*/
|
||||
public function getSpecification()
|
||||
{
|
||||
return $this->confSpecification;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter
|
||||
* @return Parser
|
||||
*/
|
||||
public function getParser()
|
||||
{
|
||||
return $this->parser;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stacks all envrironnement in $env that extends the loaded configuration file
|
||||
*
|
||||
* @param SplFileObject $file File of the current loaded config file
|
||||
* @param array $envs A stack of conf environnments
|
||||
* @return array
|
||||
*/
|
||||
private function retrieveExtendedEnvFromFile(\SplFileObject $file, Array $allEnvs = array())
|
||||
public function retrieveExtendedEnvFromFile(\SplFileObject $file, Array $allEnvs = array())
|
||||
{
|
||||
$env = $this->parser->parse($file);
|
||||
|
||||
@@ -119,7 +137,6 @@ class Handler
|
||||
*/
|
||||
public function handle($name)
|
||||
{
|
||||
|
||||
//get the corresepondant file
|
||||
$file = $this->confSpecification->getConfFileFromEnvName($name);
|
||||
|
||||
@@ -171,10 +188,6 @@ class Handler
|
||||
$searchArray[$k] = $value;
|
||||
break; //quit
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user