/** * Constructor * * @param string * @param Array */ function ComponentLocator_Maple($name, $args = array()) { parent::ComponentLocator($name); if (isset($args['baseDir'])) { $this->_baseDir = $args['baseDir']; } }
/** * dicon://~ をコンテナ内のコンポーネントに置換 * $value を直接置換することは不可能なので $values[$key] を対象とする * * Constructor Injection および factoryメソッドによる初期化を行う都合上、 * この処理は設定を読み込むたびに実行される * つまり依存するコンポーネントの設定は設定ファイル中”先”にある必要がある * * @access public * @param string * @param Array values * @param string key * @param string value (Don't use this) */ function doValueBeforeParse($sectionName, &$values, &$key, &$value) { if ($sectionName != 'DIContainer') { if (preg_match('|^dicon://|', $value)) { if (($obj =& $this->_locator_dicon->getComponent($value)) !== null) { $values[$key] =& $obj; } else { $values[$key] = null; $this->_handleError('存在しないコンポーネントが指定されました : ' . $value, 'DIContainerInitializer#doValueBeforeParse'); } } } }
/** * Constructor * * @param string * @param Array */ function ComponentLocator_Pear($name) { parent::ComponentLocator($name); }
/** * Constructor * * @param string name * @param array ("DIContainer" => DIContainer) */ function ComponentLocator_Dicon($name, $arg) { parent::ComponentLocator($name); $this->_container =& $arg['DIContainer']; }