19 if(isset($className) && \class_exists($className)){
22 $this->route=
$route[
"path"];
24 $ctrl=
new $className();
25 $this->name=$className;
26 $this->urlsFile=$ctrl->_getUrlsFilename();
27 $this->siteMapTemplate=$ctrl->_getSeoTemplateFilename();
89 $parts=\explode(
"\\", $this->name);
97 public static function init(){
103 if(\file_exists($robotsFile)){
109 }
catch ( \Exception $e ) {
113 foreach ( $files as $file ) {
114 if (is_file($file)) {
116 if (isset($restCtrls[$controllerClass]) ===
false) {
117 if(\class_exists($controllerClass)){
118 $reflect=new \ReflectionClass($controllerClass);
119 if (!$reflect->isAbstract() && $reflect->isSubclassOf(
'Ubiquity\controllers\seo\SeoController')) {
121 $path=$ctrlSeo->getPath();
122 $ctrlSeo->setInRobots(\strpos($robotsContent, $path)!==
false);
__construct($className=null)
setSiteMapTemplate($siteMapTemplate)
static getClassFullNameFromFile($filePathName)
get the full name (name \ namespace) of a class from its file path result example: (string) "I\Am\The...
static getRouteInfoByControllerAction($controller, $action)
static getControllersFiles(&$config, $silent=false)
static getApplicationDir()