Esempio n. 1
0
 public function beforeConstruct()
 {
     $this->name = preg_match_first(get_class($this), '@^Admin(.+)?Controller@');
     if (empty($this->name)) {
         $this->name = 'App';
     }
     return parent::beforeConstruct();
 }
Esempio n. 2
0
 public function startup()
 {
     $this->data['generator'] = 'harrison ' . AppController::VERSION . ', ephFrame';
     $this->data['contact'] = Registry::get('ContactEmail');
     // iterate over metatags to find @[files] ?
     foreach ($this->data as $key => $value) {
         if (!is_string($value) || !($filename = preg_match_first($value, '/^@(.+)/'))) {
             continue;
         }
         $File = new File($filename);
         if ($File->exists()) {
             $this->data[$key] = $File->toArray();
         } else {
             $this->data[$key] = '';
         }
     }
     return parent::startup();
 }