예제 #1
0
 /**
  * @param	MvcDispatcherInterface $dispatcher
  * @param	InterceptChainInterface $preChain
  * @param	InterceptChainInterface $postChain
  * @return	MvcFront
  */
 public function createFront(MvcDispatcherInterface $dispatcher = null, InterceptChainInterface $preChain = null, InterceptChainInterface $postChain = null)
 {
     $preList = KernelRegistry::getParam('pre-filters', array());
     if (null === $preChain) {
         $preChain = new InterceptChain();
     }
     if (is_array($preList) && !empty($preList)) {
         $preChain->loadFilters($preList);
     }
     $postList = KernelRegistry::getParam('post-filters', array());
     if (null === $postChain) {
         $postChain = new InterceptChain();
     }
     if (is_array($postList) && !empty($postList)) {
         $postChain->loadFilters($postList);
     }
     if (null === $dispatcher) {
         $dispatcher = new MvcDispatcher();
     }
     return new MvcFront($dispatcher, $preChain, $postChain);
 }
예제 #2
0
 /**
  * @return null
  */
 public function runDbStartupTask()
 {
     $task = new DbStartupTask();
     $keys = $task->getRegistryKeys();
     $params = array();
     foreach ($keys as $key => $default) {
         $params[$key] = KernelRegistry::getParam($key, $default);
     }
     $task->execute($params);
 }
예제 #3
0
 /**
  * @return	array
  */
 public function getTasksFromRegistry()
 {
     return KernelRegistry::getParam('startup-tasks', array());
 }