コード例 #1
0
 private function validateTarget()
 {
     AppKitLogger::verbose("Template uses view %s for data retrieval", $this->view);
     if (!isset($this->dqlViews[$this->view])) {
         $target = $this->view;
         AppKitLogger::fatal("Target %s not found in views, check your template or create a view %s in views.xml", $target, $target);
         throw new AgaviException("Target {$target} not found in views, check your template or create a view {$target} in views.xml");
     }
     $this->view = $this->dqlViews[$this->view];
 }
コード例 #2
0
 private function readDataSourceDefinition()
 {
     $tpl = $this->getTemplate();
     AppKitLogger::verbose("Reading data definition from template (data : %s)", $tpl->getTemplateData());
     $source = $tpl->getSection("datasource");
     if (!isset($source["target"])) {
         AppKitLogger::fatal("Invalid template: Can't find datasource target!");
         throw new AgaviException("Invalid template, no datasource target given");
     }
     $target = $source["target"];
     return $target;
 }