Пример #1
0
 private function initTag()
 {
     $class_name = SwatDBClassMap::get('PinholeTag');
     $this->tag = new $class_name();
     $this->tag->setDatabase($this->app->db);
     $this->tag->setInstance($this->app->getInstance());
     if (!$this->tag->load($this->id)) {
         throw new AdminNotFoundException(sprintf(Pinhole::_('Tag with id “%s” not found.'), $this->id));
     }
 }