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