cvs: pear /Services_YouTube ChangeLog YouTube.php makepackage.php package.xml package2.xml /Services_YouTube/examples example.php
| From: | Shin Ohno | Date: | Fri, 20 Oct 2006 05:28:17 +0000 |
| Subject: | cvs: pear /Services_YouTube ChangeLog YouTube.php makepackage.php package.xml package2.xml /Services_YouTube/examples example.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42672@lists.php.net to get a copy of this message | ||
shin Fri Oct 20 05:28:17 2006 UTC
Modified files:
/pear/Services_YouTube ChangeLog YouTube.php makepackage.php
package.xml package2.xml
/pear/Services_YouTube/examples example.php
Log:
Moved set_error_hander, and added restore_error_handler
http://cvs.php.net/viewvc.cgi/pear/Services_YouTube/ChangeLog?r1=1.4&r2=1.5&diff_format=u
Index: pear/Services_YouTube/ChangeLog
diff -u pear/Services_YouTube/ChangeLog:1.4 pear/Services_YouTube/ChangeLog:1.5
--- pear/Services_YouTube/ChangeLog:1.4 Fri Oct 20 03:24:48 2006
+++ pear/Services_YouTube/ChangeLog Fri Oct 20 05:28:17 2006
@@ -1,10 +1,10 @@
-$Id: ChangeLog,v 1.4 2006/10/20 03:24:48 shin Exp $
+$Id: ChangeLog,v 1.5 2006/10/20 05:28:17 shin Exp $
see package.xml for newer changlogs
2006-10-20 Shin Ohno<ganchiku@gmail.com>
* VERSION: version 0.2.0 (alpha) released.
- Added errorHandlerCallback in Services_YouTube_Exception class.
- - Added set_error_hander in constructor of Services_YouTube class.
+ - Added set_error_hander in sendRequest method.
2006-10-01 Shin Ohno<ganchiku@gmail.com>
* VERSION: version 0.1.4 (alpha) released.
http://cvs.php.net/viewvc.cgi/pear/Services_YouTube/YouTube.php?r1=1.3&r2=1.4&diff_format=u
Index: pear/Services_YouTube/YouTube.php
diff -u pear/Services_YouTube/YouTube.php:1.3 pear/Services_YouTube/YouTube.php:1.4
--- pear/Services_YouTube/YouTube.php:1.3 Fri Oct 20 03:24:48 2006
+++ pear/Services_YouTube/YouTube.php Fri Oct 20 05:28:17 2006
@@ -17,7 +17,7 @@
* @package Services_YouTube
* @author Shin Ohno <ganchiku@gmail.com>
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version 0.2.0 $Id: YouTube.php,v 1.3 2006/10/20 03:24:48 shin Exp $
+ * @version 0.2.0 $Id: YouTube.php,v 1.4 2006/10/20 05:28:17 shin Exp $
* @see http://www.youtube.com/dev
* @since 0.1
*/
@@ -109,7 +109,6 @@
*/
public function __construct($developerId, $options = array())
{
- set_error_handler(array('Services_YouTube_Exception',
'errorHandlerCallback'), E_ALL);
$this->developerId = $developerId;
$availableOptions = array('useCache', 'cacheOptions',
'responseFormat', 'driver');
foreach ($options as $key => $value) {
@@ -295,6 +294,7 @@
*/
protected function sendRequest($method, $parameters)
{
+ set_error_handler(array('Services_YouTube_Exception',
'errorHandlerCallback'), E_ALL);
// Use Cache_Lite
if ($this->useCache) {
require_once 'Cache/Lite.php';
@@ -302,7 +302,8 @@
$cache = new Cache_Lite($this->cacheOptions);
if ($response = $cache->get($cacheID)) {
- return $this->parseResponse($response);
+ $data = $this->parseResponse($response);
+ restore_error_handler();
}
}
@@ -320,7 +321,9 @@
throw new Services_YouTube_Exception('Can not write cache');
}
}
- return $this->parseResponse($response);
+ $data = $this->parseResponse($response);
+ restore_error_handler();
+ return $data;
}
/**
http://cvs.php.net/viewvc.cgi/pear/Services_YouTube/makepackage.php?r1=1.5&r2=1.6&diff_format=u
Index: pear/Services_YouTube/makepackage.php
diff -u pear/Services_YouTube/makepackage.php:1.5 pear/Services_YouTube/makepackage.php:1.6
--- pear/Services_YouTube/makepackage.php:1.5 Fri Oct 20 03:24:48 2006
+++ pear/Services_YouTube/makepackage.php Fri Oct 20 05:28:17 2006
@@ -1,5 +1,5 @@
<?php
-/* $Id: makepackage.php,v 1.5 2006/10/20 03:24:48 shin Exp $ */
+/* $Id: makepackage.php,v 1.6 2006/10/20 05:28:17 shin Exp $ */
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
unlink('package.xml');
@@ -8,7 +8,7 @@
$apiVersion = '0.1.0';
$changelog = '
- Added errorHandlerCallback in Services_YouTube_Exception class.
- - Added set_error_hander in constructor of Services_YouTube class.
+ - Added set_error_hander in sendRequest method.
';
$notes = $changelog;
$packagexml = new PEAR_PackageFileManager2();
http://cvs.php.net/viewvc.cgi/pear/Services_YouTube/package.xml?r1=1.5&r2=1.6&diff_format=u
Index: pear/Services_YouTube/package.xml
diff -u pear/Services_YouTube/package.xml:1.5 pear/Services_YouTube/package.xml:1.6
--- pear/Services_YouTube/package.xml:1.5 Fri Oct 20 03:24:48 2006
+++ pear/Services_YouTube/package.xml Fri Oct 20 05:28:17 2006
@@ -19,7 +19,7 @@
<license>PHP License</license>
<state>alpha</state>
<notes>- Added errorHandlerCallback in Services_YouTube_Exception class.
- - Added set_error_hander in constructor of Services_YouTube class.
+ - Added set_error_hander in sendRequest method.
</notes>
<deps>
<dep type="php" rel="ge" version="5.1.0"
optional="no"/>
@@ -491,7 +491,7 @@
<license>PHP License</license>
<state>alpha</state>
<notes>- Added errorHandlerCallback in Services_YouTube_Exception class.
- - Added set_error_hander in constructor of Services_YouTube class.
+ - Added set_error_hander in sendRequest method.
</notes>
</release>
</changelog>
http://cvs.php.net/viewvc.cgi/pear/Services_YouTube/package2.xml?r1=1.5&r2=1.6&diff_format=u
Index: pear/Services_YouTube/package2.xml
diff -u pear/Services_YouTube/package2.xml:1.5 pear/Services_YouTube/package2.xml:1.6
--- pear/Services_YouTube/package2.xml:1.5 Fri Oct 20 03:24:48 2006
+++ pear/Services_YouTube/package2.xml Fri Oct 20 05:28:17 2006
@@ -14,7 +14,7 @@
<active>yes</active>
</lead>
<date>2006-10-20</date>
- <time>12:18:50</time>
+ <time>14:22:26</time>
<version>
<release>0.2.0</release>
<api>0.1.0</api>
@@ -26,7 +26,7 @@
<license uri="http://www.php.net/license">PHP
License</license>
<notes>
- Added errorHandlerCallback in Services_YouTube_Exception class.
- - Added set_error_hander in constructor of Services_YouTube class.
+ - Added set_error_hander in sendRequest method.
</notes>
<contents>
<dir baseinstalldir="Services" name="/">
@@ -549,7 +549,7 @@
<license uri="http://www.php.net/license">PHP
License</license>
<notes>
- Added errorHandlerCallback in Services_YouTube_Exception class.
- - Added set_error_hander in constructor of Services_YouTube class.
+ - Added set_error_hander in sendRequest method.
</notes>
</release>
</changelog>
http://cvs.php.net/viewvc.cgi/pear/Services_YouTube/examples/example.php?r1=1.4&r2=1.5&diff_format=u
Index: pear/Services_YouTube/examples/example.php
diff -u pear/Services_YouTube/examples/example.php:1.4
pear/Services_YouTube/examples/example.php:1.5
--- pear/Services_YouTube/examples/example.php:1.4 Fri Oct 20 03:24:48 2006
+++ pear/Services_YouTube/examples/example.php Fri Oct 20 05:28:17 2006
@@ -1,6 +1,6 @@
<?php
-//error_reporting(E_ALL|E_STRICT);
-require_once 'Services/YouTube.php';
+error_reporting(E_ALL|E_STRICT);
+
define('MAX_COLS', 5);
define('DEV_ID', 'YOUR_DEV_ID');