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


PHP Service::init方法代码示例

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


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

示例1: init

 /**
  * @return Flickr
  */
 public function init()
 {
     parent::init();
     if ($this->getgeodata) {
         $this->buildPhotoGeoCache(false);
     }
     return $this;
 }
开发者ID:xurble,项目名称:pubwich,代码行数:11,代码来源:Flickr.php

示例2: testRunPluginActionNotFound

 /**
  * @covers            \Plugin\Service::run
  * @uses              \Plugin\Request
  * @expectedException BadMethodCallException
  * @depends           testInitPlugin
  */
 public function testRunPluginActionNotFound()
 {
     $config = array('routes' => array('/test' => array('controller' => 'Plugin\\Controller', 'action' => 'fooAction')));
     $application = Service::init($config);
     $request = new \Request\Service();
     $request->setPath('/test');
     $result = $application->run($request);
     $this->assertTrue(is_string($result) && strlen($result));
 }
开发者ID:evgenykireev,项目名称:wp-facebook-import,代码行数:15,代码来源:ServiceTest.php

示例3: init

 public function init()
 {
     parent::init();
 }
开发者ID:pcdinh,项目名称:pubwich,代码行数:4,代码来源:Readernaut.php

示例4:

<?php

require_once 'autoload.php';
$logger = new \Logger\MainLogger();
$logger->addLoggers(new \Logger\EmailLogger());
\App::mode('raw');
DI::addInstance($logger);
\Service::init();
\Service::add("Cron\\Crontab");
\Service::add('GlobalEvents');
\Raw::go();
开发者ID:jankal,项目名称:mvc,代码行数:11,代码来源:cron.php

示例5: setState

    {
        return new ConcreteMemento($this->url, $this->currentLine);
    }
    public function setState(ConcreteMemento $state)
    {
        if (!$state instanceof Memento) {
            throw new Exception('Memento object was not recognize');
        }
        $this->url = $state->getUrl();
        $this->currentLine = $state->getCurrentLine();
        $this->init();
    }
    public static function getLine()
    {
        $line = Service::$content++;
        return $line . PHP_EOL;
    }
}
$service = new Service('http://rambler.ru');
$service->init();
echo $service->getLine();
echo $service->getLine();
echo $service->getLine();
$memento = $service->getState();
//storing Memento in session, or smth else
$mementoString = serialize($memento);
$newService = new Service();
$newService->setState(unserialize($mementoString));
echo $newService->getLine();
echo $newService->getLine();
echo $newService->getLine();
开发者ID:adollar,项目名称:patterns,代码行数:31,代码来源:memento.php

示例6: __construct

 public function __construct($version = Service::VERSION_3)
 {
     $companyId = 0;
     parent::init($version);
     $this->url = sprintf("%s/%s/company/%d/invoice", self::BASE_URL, $version, $companyId);
 }
开发者ID:aj0y,项目名称:phpqbo,代码行数:6,代码来源:InvoiceService.php

示例7: createTestQueue

 private function createTestQueue()
 {
     $config = array('queue' => array('host' => '192.169.255.126', 'port' => 5672, 'user' => 'testTask', 'password' => 'fbrtgBne78G'));
     $plugin = Service::init($config);
     return new Queue($plugin);
 }
开发者ID:evgenykireev,项目名称:wp-facebook-import,代码行数:6,代码来源:QueueTest.php

示例8:

<?php

/**
 * bootstrap the framework
 */
Session::start();
$logger = new \Logger\MainLogger();
$logger->addLoggers(new \Logger\EmailLogger());
DI::addInstance($logger);
Service::init('stack');
Service::add(App::get('startupClass'));
Service::add('\\Cron\\HTTP');
Service::add('GlobalEvents');
Service::go();
App::mode('server');
开发者ID:jankal,项目名称:mvc,代码行数:15,代码来源:bootstrap.php


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