lib/Config.php
/**
	 * Synthesize a configuration.
	 *
	 * @param string $name Name of the configuration to synthesize.
	 * @param string|array $synthesizer Callback for the synthesis.
	 * @param null|string $from If the configuration is a derivative $from is the name
	 * of the source configuration.
	 *
	 * @return mixed
	 */
Synthesize a configuration.
@param string $name Name of the configuration to synthesize.
@param string|array $synthesizer Callback for the synthesis.
@param null|string $from If the configuration is a derivative $from is the name
of the source configuration.

@return mixed
Synthesize a configuration . @param string $name Name of the configuration to synthesize . @param string|array $synthesizer Callback for the synthesis . @param null|string $from If the configuration is a derivative $from is the name of the source configuration . @return mixed
public function synthesize($name, $synthesizer, $from = null)
	{
		if (array_key_exists($name, $this->synthesized))
		{
			return $this->synthesized[$name];
		}
		$cache = $this->cache;
		$cache_key = $this->get_cache_key($name);
		if ($cache)
		{
			$config = $cache->retrieve($cache_key);
			if ($config !== null)
			{
				return $this->synthesized[$name] = $config;
			}
		}
		$config = $this->synthesize_for_real($from ?: $name, $synthesizer);
		if ($cache)
		{
			$cache->store($cache_key, $config);
		}
		return $this->synthesized[$name] = $config;
	}
public function synthesize ( $ name , $ synthesizer , $ from = null ) { if ( array_key_exists ( $ name , $ this -> synthesized ) ) { return $ this -> synthesized [ $ name ] ; } $ cache = $ this -> cache ; $ cache_key = $ this -> get_cache_key ( $ name ) ; if ( $ cache ) { $ config = $ cache -> retrieve ( $ cache_key ) ; if ( $ config !== null ) { return $ this -> synthesized [ $ name ] = $ config ; } } $ config = $ this -> synthesize_for_real ( $ from ? : $ name , $ synthesizer ) ; if ( $ cache ) { $ cache -> store ( $ cache_key , $ config ) ; } return $ this -> synthesized [ $ name ] = $ config ; }
Synthesize a configuration.
Synthesize a configuration .