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


PHP PEAR_ChannelFile::setBaseURL方法代码示例

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


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

示例1: preExecute

 public function preExecute()
 {
     error_reporting(error_reporting() & ~(E_STRICT | E_DEPRECATED));
     foreach (array('channel_name', 'summary', 'suggestedalias') as $v) {
         $this->{$v} = Doctrine::getTable('SnsConfig')->get(opPluginChannelServerPluginConfiguration::CONFIG_KEY_PREFIX . $v, str_replace(':80', '', $this->getRequest()->getHost()));
     }
     require_once 'PEAR.php';
     require_once 'PEAR/Common.php';
     require_once 'PEAR/ChannelFile.php';
     $baseUrl = 'http://' . $this->channel_name . 'pluginRest/';
     $channel = new PEAR_ChannelFile();
     $channel->setName($this->channel_name);
     $channel->setSummary($this->summary);
     $channel->setAlias($this->suggestedalias);
     $channel->setBaseURL('REST1.0', $baseUrl);
     $channel->setBaseURL('REST1.1', $baseUrl);
     $channel->setBaseURL('REST1.2', $baseUrl);
     $channel->setBaseURL('REST1.3', $baseUrl);
     $registry = new PEAR_Registry(sfConfig::get('sf_cache_dir'), $channel);
     $this->pear = new PEAR_Common();
     $this->pear->config->setRegistry($registry);
     if (!$registry->channelExists($channel->getName())) {
         $registry->addChannel($channel);
     } else {
         $registry->updateChannel($channel);
     }
 }
开发者ID:balibali,项目名称:opPluginChannelServerPlugin,代码行数:27,代码来源:actions.class.php

示例2: generatePearChannelFile

 public static function generatePearChannelFile($channelName, $summary, $alias, $baseUrl)
 {
     error_reporting(error_reporting() & ~(E_STRICT | E_DEPRECATED));
     require_once 'PEAR.php';
     require_once 'PEAR/Common.php';
     require_once 'PEAR/ChannelFile.php';
     $channel = new PEAR_ChannelFile();
     $channel->setName($channelName);
     $channel->setSummary($summary);
     $channel->setAlias($alias);
     $channel->setBaseURL('REST1.0', $baseUrl);
     $channel->setBaseURL('REST1.1', $baseUrl);
     $channel->setBaseURL('REST1.2', $baseUrl);
     $channel->setBaseURL('REST1.3', $baseUrl);
     return $channel;
 }
开发者ID:balibali,项目名称:opPluginChannelServerPlugin,代码行数:16,代码来源:opPluginChannelServerToolkit.class.php

示例3: foreach

 /**
  * @param string channel name
  * @param bool whether to strictly retrieve channel names
  * @return PEAR_ChannelFile|PEAR_Error
  * @access private
  */
 function &_getChannel($channel, $noaliases = false)
 {
     $ch = false;
     if ($this->_channelExists($channel, $noaliases)) {
         $chinfo = $this->_channelInfo($channel, $noaliases);
         if ($chinfo) {
             if (!class_exists('PEAR_ChannelFile')) {
                 require_once 'PEAR/ChannelFile.php';
             }
             $ch =& PEAR_ChannelFile::fromArrayWithErrors($chinfo);
         }
     }
     if ($ch) {
         if ($ch->validate()) {
             return $ch;
         }
         foreach ($ch->getErrors(true) as $err) {
             $message = $err['message'] . "\n";
         }
         $ch = PEAR::raiseError($message);
         return $ch;
     }
     if ($this->_getChannelFromAlias($channel) == 'pear.php.net') {
         // the registry is not properly set up, so use defaults
         if (!class_exists('PEAR_ChannelFile')) {
             require_once 'PEAR/ChannelFile.php';
         }
         $pear_channel = new PEAR_ChannelFile();
         $pear_channel->setServer('pear.php.net');
         $pear_channel->setAlias('pear');
         $pear_channel->setSummary('PHP Extension and Application Repository');
         $pear_channel->setDefaultPEARProtocols();
         $pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/');
         $pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/');
         $pear_channel->setBaseURL('REST1.3', 'http://pear.php.net/rest/');
         return $pear_channel;
     }
     if ($this->_getChannelFromAlias($channel) == 'pecl.php.net') {
         // the registry is not properly set up, so use defaults
         if (!class_exists('PEAR_ChannelFile')) {
             require_once 'PEAR/ChannelFile.php';
         }
         $pear_channel = new PEAR_ChannelFile();
         $pear_channel->setServer('pecl.php.net');
         $pear_channel->setAlias('pecl');
         $pear_channel->setSummary('PHP Extension Community Library');
         $pear_channel->setDefaultPEARProtocols();
         $pear_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/');
         $pear_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/');
         $pear_channel->setValidationPackage('PEAR_Validator_PECL', '1.0');
         return $pear_channel;
     }
     if ($this->_getChannelFromAlias($channel) == 'doc.php.net') {
         // the registry is not properly set up, so use defaults
         if (!class_exists('PEAR_ChannelFile')) {
             require_once 'PEAR/ChannelFile.php';
         }
         $doc_channel = new PEAR_ChannelFile();
         $doc_channel->setServer('doc.php.net');
         $doc_channel->setAlias('phpdocs');
         $doc_channel->setSummary('PHP Documentation Team');
         $doc_channel->setDefaultPEARProtocols();
         $doc_channel->setBaseURL('REST1.0', 'http://doc.php.net/rest/');
         $doc_channel->setBaseURL('REST1.1', 'http://doc.php.net/rest/');
         $doc_channel->setBaseURL('REST1.3', 'http://doc.php.net/rest/');
         return $doc_channel;
     }
     if ($this->_getChannelFromAlias($channel) == '__uri') {
         // the registry is not properly set up, so use defaults
         if (!class_exists('PEAR_ChannelFile')) {
             require_once 'PEAR/ChannelFile.php';
         }
         $private = new PEAR_ChannelFile();
         $private->setName('__uri');
         $private->setDefaultPEARProtocols();
         $private->setBaseURL('REST1.0', '****');
         $private->setSummary('Pseudo-channel for static packages');
         return $private;
     }
     return $ch;
 }
开发者ID:adisonc,项目名称:MaineLearning,代码行数:87,代码来源:Registry.php

示例4:

 /**
  * @param string channel name
  * @param bool whether to strictly retrieve channel names
  * @return PEAR_ChannelFile|false
  * @access private
  */
 function &_getChannel($channel, $noaliases = false)
 {
     $ch = false;
     if ($this->_channelExists($channel, $noaliases)) {
         if (!class_exists('PEAR_ChannelFile')) {
             require_once 'PEAR/ChannelFile.php';
         }
         $ch =& PEAR_ChannelFile::fromArray($this->_channelInfo($channel, $noaliases));
     }
     if ($ch) {
         return $ch;
     }
     if ($this->_getChannelFromAlias($channel) == 'pear.php.net') {
         // the registry is not properly set up, so use defaults
         if (!class_exists('PEAR_ChannelFile')) {
             require_once 'PEAR/ChannelFile.php';
         }
         $pear_channel = new PEAR_ChannelFile();
         $pear_channel->setName('pear.php.net');
         $pear_channel->setAlias('pear');
         $pear_channel->setSummary('PHP Extension and Application Repository');
         $pear_channel->setDefaultPEARProtocols();
         $pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/');
         $pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/');
         return $pear_channel;
     }
     if ($this->_getChannelFromAlias($channel) == 'pecl.php.net') {
         // the registry is not properly set up, so use defaults
         if (!class_exists('PEAR_ChannelFile')) {
             require_once 'PEAR/ChannelFile.php';
         }
         $pear_channel = new PEAR_ChannelFile();
         $pear_channel->setName('pecl.php.net');
         $pear_channel->setAlias('pecl');
         $pear_channel->setSummary('PHP Extension Community Library');
         $pear_channel->setDefaultPEARProtocols();
         $pear_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/');
         $pear_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/');
         $pear_channel->setValidationPackage('PEAR_Validator_PECL', '1.0');
         return $pear_channel;
     }
     if ($this->_getChannelFromAlias($channel) == '__uri') {
         // the registry is not properly set up, so use defaults
         if (!class_exists('PEAR_ChannelFile')) {
             require_once 'PEAR/ChannelFile.php';
         }
         $private = new PEAR_ChannelFile();
         $private->setName('__uri');
         $private->addFunction('xmlrpc', '1.0', '****');
         $private->setSummary('Pseudo-channel for static packages');
         return $private;
     }
     return $ch;
 }
开发者ID:hugooluisss,项目名称:SAMAP,代码行数:60,代码来源:Registry.php


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