当前位置: 首页>>代码示例>>PHP>>正文


PHP Director::AbsoluteBaseURL方法代码示例

本文整理汇总了PHP中Director::AbsoluteBaseURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Director::AbsoluteBaseURL方法的具体用法?PHP Director::AbsoluteBaseURL怎么用?PHP Director::AbsoluteBaseURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Director的用法示例。


在下文中一共展示了Director::AbsoluteBaseURL方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getCMSFields

 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $fields->removeFieldFromTab("Root", "Content");
     $fields->addFieldToTab("Root.Main", new TextField("BlogURL", "Blog URL Segment (eg. 'blog', 'news', etc.)"));
     if ($this->BlogURL) {
         $fields->addFieldToTab("Root.WordpressLogin", new LiteralField("Desc1", "<div id='wp-login'><h1>WordPress</h1><a href='" . Director::AbsoluteBaseURL() . $this->BlogURL . "/wp-login.php' target='_blank'>Login</a></div>"));
     }
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:iqnection-pages-basepages,代码行数:10,代码来源:BlogPage.php

示例2: _errorCheck

 private function _errorCheck($tweets)
 {
     if (array_key_exists('errors', $tweets)) {
         $message = 'We have encountered ' . count($tweets['errors']) . ' error(s): <br />';
         foreach ($tweets['errors'] as $error) {
             $message .= $error['message'] . ' Code:' . $error['code'] . '<br />';
         }
         if (Director::isDev()) {
             throw new Exception($message, 1);
         } else {
             if (Email::getAdminEmail()) {
                 $from = Email::getAdminEmail();
                 $to = Email::getAdminEmail();
                 $subject = "Twitter Feed Failure - " . Director::AbsoluteBaseURL();
                 $body = $message;
                 $body .= "<br /><br />Reported by " . Director::AbsoluteBaseURL();
                 $email = new Email($from, $to, $subject, $body);
                 $email->send();
             }
         }
         return true;
     }
 }
开发者ID:helpfulrobot,项目名称:purplespider-twitter-feed,代码行数:23,代码来源:TwitterFeed.php

示例3: __construct

 /**
  * Initialise config
  *
  * @since version 1.0.0
  *
  * @return void
  **/
 public function __construct()
 {
     $this->objects = Config::inst()->get('SEO_Sitemap', 'objects');
     $this->url = substr(Director::AbsoluteBaseURL(), 0, -1);
 }
开发者ID:Cyber-Duck,项目名称:Silverstripe-SEO,代码行数:12,代码来源:SEO_Sitemap.php

示例4: init

 /**
  * 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;
 }
开发者ID:Cyber-Duck,项目名称:Silverstripe-SEO,代码行数:20,代码来源:SEO.php


注:本文中的Director::AbsoluteBaseURL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。