Exemple #1
0
 /**
  * Initialise and return the SEO object
  *
  * @since version 1.0.0
  *
  * @return self Return the SEO instance
  **/
 public static function init()
 {
     if (null === static::$instance) {
         static::$instance = new static();
         // set the default URL for Meta tags like canonical
         self::setPageURL(Director::AbsoluteBaseURL() . substr(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), 1));
         // Initialise core objects
         self::$tags = new SEO_HeadTags();
         self::$sitemap = new SEO_Sitemap();
         self::$paginaton = new SEO_Pagination();
     }
     return static::$instance;
 }