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


PHP Version::warn方法代码示例

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


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

示例1: factory

 public static function factory($config = array())
 {
     Version::warn(__METHOD__ . ' is deprecated');
     if (!is_array($config)) {
         throw new InvalidArgumentException('$config must be an array');
     }
     if (!isset($config['cache.adapter']) && !isset($config['cache.provider'])) {
         $config['cache.adapter'] = 'Guzzle\\Cache\\NullCacheAdapter';
         $config['cache.provider'] = null;
     } else {
         foreach (array('cache.adapter', 'cache.provider') as $required) {
             if (!isset($config[$required])) {
                 throw new InvalidArgumentException("{$required} is a required CacheAdapterFactory option");
             }
             if (is_string($config[$required])) {
                 $config[$required] = str_replace('.', '\\', $config[$required]);
                 if (!class_exists($config[$required])) {
                     throw new InvalidArgumentException("{$config[$required]} is not a valid class for {$required}");
                 }
             }
         }
         if (is_string($config['cache.provider'])) {
             $args = isset($config['cache.provider.args']) ? $config['cache.provider.args'] : null;
             $config['cache.provider'] = self::createObject($config['cache.provider'], $args);
         }
     }
     if (is_string($config['cache.adapter'])) {
         $args = isset($config['cache.adapter.args']) ? $config['cache.adapter.args'] : array();
         array_unshift($args, $config['cache.provider']);
         $config['cache.adapter'] = self::createObject($config['cache.adapter'], $args);
     }
     return $config['cache.adapter'];
 }
开发者ID:Ryu0621,项目名称:SaNaVi,代码行数:33,代码来源:CacheAdapterFactory.php

示例2: __construct

 public function __construct($username, $password, $scheme = CURLAUTH_BASIC)
 {
     Version::warn(__CLASS__ . " is deprecated. Use \$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');");
     $this->username = $username;
     $this->password = $password;
     $this->scheme = $scheme;
 }
开发者ID:Ryu0621,项目名称:SaNaVi,代码行数:7,代码来源:CurlAuthPlugin.php

示例3: parseUrl

 public function parseUrl($url)
 {
     Version::warn(__CLASS__ . ' is deprecated. Just use parse_url()');
     static $defaults = array('scheme' => null, 'host' => null, 'path' => null, 'port' => null, 'query' => null, 'user' => null, 'pass' => null, 'fragment' => null);
     $parts = parse_url($url);
     if ($this->utf8 && isset($parts['query'])) {
         $queryPos = strpos($url, '?');
         if (isset($parts['fragment'])) {
             $parts['query'] = substr($url, $queryPos + 1, strpos($url, '#') - $queryPos - 1);
         } else {
             $parts['query'] = substr($url, $queryPos + 1);
         }
     }
     return $parts + $defaults;
 }
开发者ID:Ryu0621,项目名称:SaNaVi,代码行数:15,代码来源:UrlParser.php

示例4: calculateMd5

 public static function calculateMd5(EntityBodyInterface $body, $rawOutput = false, $base64Encode = false)
 {
     Version::warn(__CLASS__ . ' is deprecated. Use getContentMd5()');
     return $body->getContentMd5($rawOutput, $base64Encode);
 }
开发者ID:Ryu0621,项目名称:SaNaVi,代码行数:5,代码来源:EntityBody.php

示例5: removeCacheControlDirective

 /**
  * @deprecated
  * @codeCoverageIgnore
  */
 public function removeCacheControlDirective($directive)
 {
     Version::warn(__METHOD__ . ' is deprecated. Use $message->getHeader(\'Cache-Control\')->removeDirective()');
     if ($header = $this->getHeader('Cache-Control')) {
         $header->removeDirective($directive);
     }
     return $this;
 }
开发者ID:diandianxiyu,项目名称:Yii2Api,代码行数:12,代码来源:AbstractMessage.php

示例6: getScannedCount

 /**
  * Get the total number of scanned items
  *
  * @return int
  */
 public function getScannedCount()
 {
     Version::warn('This method is deprecated and will be removed in a future version of the SDK. Getting the ' . 'scanned count is possible using event listeners.');
     return $this->scannedCount;
 }
开发者ID:risyasin,项目名称:webpagetest,代码行数:10,代码来源:ScanIterator.php

示例7: __construct

 /**
  * @param \Zend_Cache_Backend $cache Cache object to wrap
  */
 public function __construct(\Zend_Cache_Backend $cache)
 {
     Version::warn(__CLASS__ . ' is deprecated. Upgrade to ZF2 or use PsrCacheAdapter');
     $this->cache = $cache;
 }
开发者ID:jorjoh,项目名称:Varden,代码行数:8,代码来源:Zf1CacheAdapter.php

示例8: __construct

 public function __construct(\Zend_Log $logObject)
 {
     $this->log = $logObject;
     Version::warn(__CLASS__ . ' is deprecated');
 }
开发者ID:Ryu0621,项目名称:SaNaVi,代码行数:5,代码来源:Zf1LogAdapter.php

示例9: inject

 /**
  * Inject configuration settings into an input string
  *
  * @param string $input Input to inject
  *
  * @return string
  * @deprecated
  */
 public function inject($input)
 {
     Version::warn(__METHOD__ . ' is deprecated');
     $replace = array();
     foreach ($this->data as $key => $val) {
         $replace['{' . $key . '}'] = $val;
     }
     return strtr($input, $replace);
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:17,代码来源:Collection.php

示例10: getRequest

 /**
  * @deprecated
  * @codeCoverageIgnore
  */
 public function getRequest()
 {
     Version::warn(__METHOD__ . ' is deprecated');
     return null;
 }
开发者ID:launchdarkly,项目名称:guzzle3,代码行数:9,代码来源:Response.php

示例11: isRedirect

 /**
  * @deprecated Use the history plugin
  * @codeCoverageIgnore
  */
 public function isRedirect()
 {
     Version::warn(__METHOD__ . ' is deprecated. Use the HistoryPlugin to track this.');
     return $this->isRedirect;
 }
开发者ID:adrianoaguiar,项目名称:magento-elasticsearch-module,代码行数:9,代码来源:Request.php

示例12: enableMagicMethods

 /**
  * @deprecated
  * @codeCoverageIgnore
  */
 public function enableMagicMethods($isEnabled)
 {
     Version::warn(__METHOD__ . ' is deprecated');
 }
开发者ID:carlyns,项目名称:RESUSblog,代码行数:8,代码来源:Client.php

示例13: testCanSilenceWarnings

 public function testCanSilenceWarnings()
 {
     Version::$emitWarnings = false;
     Version::warn('testing!');
     Version::$emitWarnings = true;
 }
开发者ID:rahilmomin,项目名称:ci_bootstrap_3,代码行数:6,代码来源:VersionTest.php

示例14: __construct

 /**
  * @param ResourceIteratorInterface $iterator Resource iterator to apply a callback to
  * @param array|callable            $callback Callback method accepting the resource iterator
  *                                            and an array of the iterator's current resources
  */
 public function __construct(ResourceIteratorInterface $iterator, $callback)
 {
     $this->iterator = $iterator;
     $this->callback = $callback;
     Version::warn(__CLASS__ . ' is deprecated');
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:11,代码来源:ResourceIteratorApplyBatched.php

示例15:

<?php

namespace Guzzle\Plugin\Cache;

\Guzzle\Common\Version::warn('Guzzle\\Plugin\\Cache\\CacheKeyProviderInterface is no longer used');
interface CacheKeyProviderInterface
{
}
开发者ID:Ryu0621,项目名称:SaNaVi,代码行数:8,代码来源:CacheKeyProviderInterface.php


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