private function loadTilesConfiguration() { $tilesConfigurer = ApplicationContext::getBean('tilesConfigurer'); $arrDefinitionsPath = $tilesConfigurer->getDefinitions(); foreach ($arrDefinitionsPath as $definitionPath) { if (!file_exists(DIR_ROOT . '/' . $definitionPath)) { throw new Exception('Tiles 정의 파일이 지정된 위치에 존재하지 않습니다.'); } $xml = new SimpleXMLElement(DIR_ROOT . '/' . $definitionPath, NULL, TRUE); if (!isset($xml->definition)) { $xml = null; unset($xml); continue; } foreach ($xml->definition as $definition) { $name = (string) $definition['name']; $attributes = array(); if (isset($definition->{'put-attribute'})) { foreach ($definition->{'put-attribute'} as $putAttribute) { $attributes[(string) $putAttribute['name']] = array('type' => isset($putAttribute['type']) ? (string) $putAttribute['type'] : 'template', 'value' => (string) $putAttribute['value']); } } $this->_definitionMap[$name] = array('template' => isset($definition['template']) ? (string) $definition['template'] : null, 'extends' => isset($definition['extends']) ? (string) $definition['extends'] : null, 'attribute' => $attributes); $attributes = null; unset($attributes); } } }
public function &__call($name, $arguments) { $method = $this->_ro->getMethod($name); // NOTE : 서비스 클래스에서만 사용한다고 가정하고. // 트랜잭션을 묶어주는 역할을 합니다. $dataSourceBean = ApplicationContext::getBean('dataSource'); $dataSourceBean->getConnection()->startTrans(); try { $result = $method->invokeArgs($this->_class, $arguments); } catch (Exception $ex) { $dataSourceBean->getConnection()->rollbackTrans(); throw $ex; return; } $dataSourceBean->getConnection()->commitTrans(); return $result; }
/** * <pre> * 컨트롤러 초기화 * </pre> */ function init() { $this->_sysPropService = ApplicationContext::getBean("sysPropService"); $this->_homeService = getClassNewInstance(new HomeServiceImpl()); parent::init(); }