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


PHP Autoload::addVendor方法代码示例

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


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

示例1: init

 static function init()
 {
     $processor = Config::getInstance()->language->processor;
     $classname = nameToClass($processor) . 'LanguageProcessor';
     Autoload::addVendor('language', $processor);
     self::$processor = new $classname();
     self::$processor->init();
 }
开发者ID:point,项目名称:cassea,代码行数:8,代码来源:Language.php

示例2: __construct

 public function __construct()
 {
     $config = Config::getInstance();
     $this->trigger("BeforeInit", $this);
     $this->params2save += array("id", "user_id", "cast", "ip", "remember_me");
     $sessionEngine = Config::getInstance()->session->engine;
     $classname = nameToClass($sessionEngine);
     Autoload::addVendor("session", $sessionEngine);
     $classname .= "Session";
     $this->engine = new $classname();
     if (!$this->engine instanceof SessionEngine) {
         throw new SessionException("Class '{$classname}' is not valid session engine");
     }
     $this->engine->init();
     Controller::getInstance()->onBeforeHeadBodyTail = array($this, "save");
     $this->trigger("AfterInit", $this);
     register_shutdown_function(array($this, "save"));
 }
开发者ID:point,项目名称:cassea,代码行数:18,代码来源:Session.php

示例3:

* THIS SOFTWARE IS PROVIDED BY CASSEA PROJECT ''AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL CASSEA PROJECT BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}}} -*/
//
// $Id:$
//
WidgetLoader::load("WComponent");
Autoload::addVendor("feed");
//{{{ WFeedLink
class WFeedLink extends WComponent
{
    protected $title = null, $href = null, $type = Feed::ATOM;
    // {{{ __construct
    /**
     * Method description
     *
     * More detailed method description
     * @param    void
     */
    function __construct($id = null)
    {
        parent::__construct($id);
    }
开发者ID:point,项目名称:cassea,代码行数:31,代码来源:WFeedLink.php

示例4: init

 /**
  * Initialize storage-subsystem. Class to be used as
  * a storage engine is chosen on the base of config file.
  *
  * So, if in config string <code>storage_engine='foo'</code> 
  * exists, file/class FooStorage will be looked up 
  * int the vendors/storage directory.
  *
  * @param null
  * @return null
  */
 static function init()
 {
     $storageEngine = Config::get('STORAGE_ENGINE');
     self::$classname = nameToClass($storageEngine) . 'Storage';
     Autoload::addVendor('storage', $storageEngine);
 }
开发者ID:point,项目名称:cassea,代码行数:17,代码来源:Storage.php

示例5: write

 /**
  * Send the event's message by E-mail
  * @param  $event 
  * @return null 
  */
 public function write($event)
 {
     try {
         Autoload::addVendor('delayedjob');
         $towrite = $this->formatter->format($event);
         $j = new DelayedJob('sendByDJ', array($towrite, $this->fromname, $this->from, $this->email));
         $j->priority(1)->attempts(2)->queue('logger')->add();
     } catch (Exception $e) {
         throw new LogException($e);
     }
 }
开发者ID:point,项目名称:cassea,代码行数:16,代码来源:WriterMail.php

示例6: array

<?php

Autoload::addVendor("inlinehtml");
Controller::getInstance()->onBeforeBuildWidget = array("InlineHTML", "processDOM");
开发者ID:point,项目名称:cassea,代码行数:4,代码来源:inlinehtml.php

示例7: cmdUpdate

<?php

Console::InitCore();
Autoload::addVendor('packageManager');
class PackageManagerFacade extends Command
{
    // {{{ cmdUpdate
    /**
     * Обновляет информацию о пакетах в известных репозиториях.
     *
     * Прокси метод вызывающий pm repository update
     */
    function cmdUpdate()
    {
        require_once 'commands/repository/RepositoryManager.php';
        $rm = new RepositoryManager('.', array('name' => 'repository', $this->commandsSeq));
        return $rm->cmdUpdate();
    }
    // }}}
    // {{{ cmdUpgrade
    /**
     * Поиск и установка одновлений для всех пакетов
     */
    function cmdUpgrade()
    {
        PackageManager::get()->startup();
        IO::out('~WHITE~Upgrading packages:~~~');
        $upack = array();
        foreach (PackageManager::getPackageSequence() as $p) {
            $upack[$p['name']] = 1;
        }
开发者ID:point,项目名称:cassea,代码行数:31,代码来源:PackageManagerFacade.php

示例8: importUrl

<?php

require_once "FeedData.php";
require_once "RSSFeed.php";
require_once "AtomFeed.php";
Autoload::addVendor("gCurl");
class Grabber
{
    public static function importUrl($url)
    {
        $is_html = false;
        $socket = Config::get('feed_grabber_transport');
        if ($socket == 'gCurl') {
            try {
                $curl = new gCurl($url);
                $r = $curl->exec();
                $h = $r->getHeaderValues('Content-Type');
                if (!(strpos($h, "text/html") === false)) {
                    $is_html = true;
                }
            } catch (gksException $e) {
                $message = $e->getLogMessage();
                echo $e->getHtmlMessage();
            }
        } else {
            $f = fopen($url, 'r');
            $r = stream_get_contents($f);
            $s = stream_get_meta_data($f);
            foreach ($s['wrapper_data'] as $w) {
                if (preg_match('/^Content-Type:\\s*(\\S+);/', $w, $match) && !empty($match) && $match[1] == "text/html") {
                    $is_html = true;
开发者ID:point,项目名称:cassea,代码行数:31,代码来源:Grabber.php

示例9: getProfileClass

 /**
  * Tries to calculate name of the class from config and add to vendor lookup
  * paths list retrieved directory.
  *
  * For performance reasons, obtained classname is memorized in internal private variable.
  *
  * @param null
  * @return string class name of the profile.
  */
 private static function getProfileClass()
 {
     if (self::$profile_classname) {
         return self::$profile_classname;
     }
     try {
         if ($_t = Config::getInstance()->profile->name != "cassea") {
             //for compatibility
             self::$profile_classname = $_t;
         }
     } catch (ConfigException $e) {
         //just normal. Using default profile class
     }
     Autoload::addVendor(self::$profile_classname);
     return self::$profile_classname = nameToClass($profile_classname);
 }
开发者ID:point,项目名称:cassea,代码行数:25,代码来源:Profile.php


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