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


PHP Service::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($uri, $mode = SWOOLE_BASE)
 {
     parent::__construct();
     $url = $this->parseUrl($uri);
     $this->type = $url->type;
     $this->server = new swoole_server($url->host, $url->port, $mode, $url->type);
 }
开发者ID:qieangel2013,项目名称:zys,代码行数:7,代码来源:Server.php

示例2: __construct

 /**
  * @constructor
  */
 public function __construct($config)
 {
     $this->config = $config;
     $this->setURLTemplate(sprintf('http://readitlaterlist.com/users/%s/feed/', $config['username']));
     $this->setItemTemplate('<li class="clearfix state{%state%}"><span class="date">{%time_updated%}</span> <p><a target="_blank" href="{%url%}">{%title%}</a></p></li>');
     parent::__construct($config);
 }
开发者ID:msqueeg,项目名称:PubwichFork,代码行数:10,代码来源:Readitlater.php

示例3: __construct

 public function __construct($config)
 {
     // Include SimplePie
     include_once 'SimplePie' . DIRECTORY_SEPARATOR . 'SimplePieAutoloader.php';
     include_once 'SimplePie' . DIRECTORY_SEPARATOR . 'idn' . DIRECTORY_SEPARATOR . 'idna_convert.class.php';
     if (!isset($config['contenttype'])) {
         $config['contenttype'] = 'application/xml';
     }
     $this->setHeaderLink(array('url' => $config['url'], 'type' => $config['contenttype']));
     $this->total = $config['total'];
     if (isset($config['date_format']) && $config['date_format']) {
         $this->dateFormat = $config['date_format'];
     }
     $this->callback_function = array($this, 'loadStringIntoSimplePieObject');
     $this->setURL($config['url']);
     $this->setItemTemplate('<li>
             {{#media_thumbnail_url}}
                 <img src="{{{media_thumbnail_url}}}" class="item-media-thumbnail" alt="{{{media_caption}}}" height="75" />
             {{/media_thumbnail_url}}
             <a href="{{link}}">{{{title}}}</a>
             {{#summary}}
                 <br/>{{{summary}}}
             {{/summary}}
             ({{{date}}})
          </li>' . "\n");
     $this->setURLTemplate($config['link']);
     parent::__construct($config);
 }
开发者ID:msqueeg,项目名称:PubwichFork,代码行数:28,代码来源:Feed.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->scriptPath = dirname(__FILE__) . '/../scripts/';
     $this->pluginname = _('Kernelmodules U3');
     if ($this->checkLicense(true) == false) {
         return true;
     }
     if ($_GET['ajax'] == 1 && $_GET['action'] == 'buildHifaceWithKernel') {
         //Function to get Progress of Installation
         $this->_buildHifaceWithKernel(1);
         ob_end_clean();
         echo implode('<br />', $this->view->message);
         ob_flush();
         die;
     }
     if (isset($_GET['action'])) {
         if ($_GET['action'] == 'enableHifaceUSB') {
             $this->_enableHifaceUSB(true);
         }
         if ($_GET['action'] == 'disableHifaceUSB') {
             $this->_enableHifaceUSB(false);
         }
         if ($_GET['action'] == 'buildHifaceWithKernel') {
             $this->_buildHifaceWithKernel();
         }
     }
     $this->getHifaceUSBEnabled();
     //Get Debug Info
     $this->_getAllLogs();
 }
开发者ID:Mabahe,项目名称:webinterface,代码行数:31,代码来源:Setup.php

示例5: __construct

 /**
  * Constructs the internal representation of the Cloudsearch service.
  *
  * @param Client $client
  */
 public function __construct(Client $client)
 {
     parent::__construct($client);
     $this->servicePath = '';
     $this->version = 'v1';
     $this->serviceName = 'cloudsearch';
 }
开发者ID:vip9008,项目名称:yii2-googleapisclient,代码行数:12,代码来源:Cloudsearch.php

示例6: __construct

 public function __construct($config)
 {
     Config::$configPath = $config['configDir'];
     View::$directory[] = $config['themes'];
     $this->autoLoader = $config['autoLoader'];
     parent::__construct(Config::get('service'));
 }
开发者ID:jackxiaoxiaoxun,项目名称:emmvc,代码行数:7,代码来源:Em.php

示例7: __construct

 /**
  * @constructor
  */
 public function __construct($config)
 {
     $this->setURL(sprintf('http://github.com/api/v2/xml/repos/show/%s', $config['username']));
     $this->setURLTemplate('http://github.com/' . $config['username'] . '/');
     $this->setItemTemplate('<li class="clearfix"><div class="metadata"><a href="{%url%}"><strong>{%name%}</strong></a></div><div class="infos">{%description%}</div></li>' . "\n");
     parent::__construct($config);
 }
开发者ID:pcdinh,项目名称:pubwich,代码行数:10,代码来源:Github.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     //Only Available for Debian - Ubuntu 14.04 has no gmediarenderer
     $version = $this->getLinuxVersion();
     if ($version[0] != 'Debian') {
         $this->view->isAvailable = false;
     } else {
         $this->view->isAvailable = true;
     }
     if ($this->checkInstalled()) {
         if (isset($_GET['action'])) {
             if ($_GET['action'] == 'startgm') {
                 $this->view->message[] = $this->start($this->pname);
             }
             if ($_GET['action'] == 'stopgm') {
                 $this->view->message[] = $this->stop($this->pname);
             }
             if ($_GET['action'] == 'killgm') {
                 $this->view->message[] = $this->kill($this->pname);
             }
             if ($_GET['action'] == 'save') {
                 $this->selectAutostart(isset($_GET['autostartgm']) ? 1 : 0);
                 $this->saveAudioDevice();
             }
         }
         $this->view->pid = $this->status($this->pname);
         $this->view->autostart = $this->checkAutostart($this->pname, true);
         $this->getAudioDevice();
     } else {
         if (isset($_GET['action']) && $_GET['action'] == 'installgm') {
             $this->installGmediarender();
         }
     }
 }
开发者ID:Mabahe,项目名称:webinterface,代码行数:35,代码来源:Gmediarender.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->pluginname = _('Advanced Setup Odroid U3');
     if ($_GET['ajax'] == 1 && $_GET['action'] == 'upgradeSystem') {
         //Function to get Progress of Installation
         $this->_upgradeSystem(true);
         ob_end_clean();
         echo implode('<br />', $this->view->message);
         ob_flush();
         die;
     }
     if (isset($_GET['action'])) {
         if ($_GET['action'] == 'disableLEDBlink') {
             $this->_setLEDBlink();
         }
         if ($_GET['action'] == 'configurePowerButton') {
             $this->_configurePowerButton();
         }
         if ($_GET['action'] == 'upgradeSystem') {
             $this->_upgradeSystem();
         }
         if ($_GET['action'] == 'checkUpgrade') {
             $this->_checkUpgrade();
         }
         if ($_GET['action'] == 'installFlash') {
             $this->_installFlash();
         }
         if ($_GET['action'] == 'installFan') {
             $this->_installFanXU4();
         }
     }
     $this->_getPowerButton();
     $this->_getDebug();
 }
开发者ID:Mabahe,项目名称:webinterface,代码行数:35,代码来源:AdvancedSetup.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $this->scriptPath = dirname(__FILE__) . '/../scripts/';
     $this->pluginname = _('Accesspoint Setup');
     $this->registerLocale(dirname(__FILE__) . '/../locale', 'accesspoint');
     if ($this->checkLicense(true) == false) {
         return true;
     }
     if (isset($_GET['action'])) {
         if ($_GET['action'] == 'install') {
             $this->_install();
         }
         if ($_GET['action'] == 'uninstall') {
             $this->_uninstall();
         }
         if ($_GET['action'] == 'saveSettings') {
             $this->_saveSettings();
         }
     }
     if ($this->_checkInstall()) {
         $this->_getSettings();
     }
     //Get Debug Info
     $this->_getAllLogs();
 }
开发者ID:Mabahe,项目名称:webinterface,代码行数:26,代码来源:Setup.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     // Setup DB connection
     $this->db = new PDO('sqlite:highscore.sqlite');
     $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
     $this->db->exec("CREATE TABLE IF NOT EXISTS highscore (\n\t\t\tgame_id TEXT,\n\t\t\tscore INTEGER,\n\t\t\tname TEXT)");
 }
开发者ID:veloek,项目名称:gfapi,代码行数:8,代码来源:highscore.php

示例12: __construct

 /**
  * Constructs the internal representation of the Audit service.
  *
  * @param Client $client
  */
 public function __construct(Client $client)
 {
     parent::__construct($client);
     $this->servicePath = 'apps/reporting/audit/v1/';
     $this->version = 'v1';
     $this->serviceName = 'audit';
     $this->activities = new Audit_Activities_Resource($this, $this->serviceName, 'activities', array('methods' => array('list' => array('path' => '{customerId}/{applicationId}', 'httpMethod' => 'GET', 'parameters' => array('customerId' => array('location' => 'path', 'type' => 'string', 'required' => true), 'applicationId' => array('location' => 'path', 'type' => 'string', 'required' => true), 'actorEmail' => array('location' => 'query', 'type' => 'string'), 'actorApplicationId' => array('location' => 'query', 'type' => 'string'), 'actorIpAddress' => array('location' => 'query', 'type' => 'string'), 'caller' => array('location' => 'query', 'type' => 'string'), 'maxResults' => array('location' => 'query', 'type' => 'integer'), 'eventName' => array('location' => 'query', 'type' => 'string'), 'startTime' => array('location' => 'query', 'type' => 'string'), 'endTime' => array('location' => 'query', 'type' => 'string'), 'continuationToken' => array('location' => 'query', 'type' => 'string'))))));
 }
开发者ID:vip9008,项目名称:yii2-googleapisclient,代码行数:13,代码来源:Audit.php

示例13: __construct

 /**
  * Constructs the internal representation of the Logging service.
  *
  * @param Client $client
  */
 public function __construct(Client $client)
 {
     parent::__construct($client);
     $this->rootUrl = 'https://logging.googleapis.com/';
     $this->servicePath = '';
     $this->version = 'v2beta1';
     $this->serviceName = 'logging';
 }
开发者ID:vip9008,项目名称:yii2-googleapisclient,代码行数:13,代码来源:Logging.php

示例14: __construct

 public function __construct($config)
 {
     $this->setVariables($config);
     $this->setUrl(sprintf('http://www.goodreads.com/review/list_rss/%d', $config['userid']));
     $this->setItemTemplate('<li><a class="clearfix" href="{{{link}}}"><img src="{{{image}}}" width="{{{size}}}" alt="{{{title}}}" /><strong><span>{{{title}}}</span> {{{author}}}</strong></a></li>' . "\n");
     $this->setUrlTemplate(sprintf('http://www.goodreads.com/user/show/%d', $config['userid']));
     parent::__construct($config);
 }
开发者ID:msqueeg,项目名称:PubwichFork,代码行数:8,代码来源:Goodreads.php

示例15: __construct

 /**
  * Constructs the internal representation of the Admin service.
  *
  * @param Client $client
  */
 public function __construct(Client $client)
 {
     parent::__construct($client);
     $this->rootUrl = 'https://www.googleapis.com/';
     $this->servicePath = 'email/v2/users/';
     $this->version = 'email_migration_v2';
     $this->serviceName = 'admin';
     $this->mail = new Admin_Mail_Resource($this, $this->serviceName, 'mail', array('methods' => array('insert' => array('path' => '{userKey}/mail', 'httpMethod' => 'POST', 'parameters' => array('userKey' => array('location' => 'path', 'type' => 'string', 'required' => true))))));
 }
开发者ID:vip9008,项目名称:yii2-googleapisclient,代码行数:14,代码来源:Admin.php


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