Development

/branches/1.2/lib/plugin/sfPearRest.class.php

You must first sign up to be able to contribute.

root/branches/1.2/lib/plugin/sfPearRest.class.php

Revision 10677, 0.8 kB (checked in by fabien, 6 years ago)

[1.2] added a custom HTTP header when getting information for a plugin

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 require_once 'PEAR/REST.php';
12
13 /**
14  * sfPearRest interacts with a PEAR channel.
15  *
16  * @package    symfony
17  * @subpackage plugin
18  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
19  * @version    SVN: $Id$
20  */
21 class sfPearRest extends PEAR_REST
22 {
23   /**
24    * @see PEAR_REST::downloadHttp()
25    */
26   public function downloadHttp($url, $lastmodified = null, $accept = false)
27   {
28     return parent::downloadHttp($url, $lastmodified, array_merge(false !== $accept ? $accept : array(), array("\r\nX-SYMFONY-VERSION: ".SYMFONY_VERSION)));
29   }
30 }
31
Note: See TracBrowser for help on using the browser.