check_access(); $class = str_replace('\\Controllers\\', '\\Views\\', get_called_class()); if (!class_exists($class)) { throw new Exceptions\Controller("Class \"{$class}\" not found"); } $this->_view = new $class; } /** * Default action * @since 2.8.0 */ abstract public function index_action(); /** * Get controller capability * @return string|TRUE - capability name or TRUE for public access */ abstract public function get_capability(); /** * Check access to controller */ protected function check_access() { $access = Access::instance(); if (!$access->check($this->get_capability())) { $access->die_error(); } } }