svn: /pear2/Pyrus/trunk/src/Pyrus/ChannelFile/ v1.php

From: Date: Tue, 29 Dec 2009 16:00:23 +0000
Subject: svn: /pear2/Pyrus/trunk/src/Pyrus/ChannelFile/ v1.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-58403@lists.php.net to get a copy of this message
saltybeagle Tue, 29 Dec 2009 16:00:23 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=292764 Log: simplify, correct phpdoc Changed paths: U pear2/Pyrus/trunk/src/Pyrus/ChannelFile/v1.php Modified: pear2/Pyrus/trunk/src/Pyrus/ChannelFile/v1.php =================================================================== --- pear2/Pyrus/trunk/src/Pyrus/ChannelFile/v1.php 2009-12-29 15:59:56 UTC (rev 292763) +++ pear2/Pyrus/trunk/src/Pyrus/ChannelFile/v1.php 2009-12-29 16:00:23 UTC (rev 292764) @@ -455,9 +455,10 @@ /** * Retrieve the object that can be used for custom validation * @param string|false the name of the package to validate. If the package is - * the channel validation package, PEAR_Validate is returned - * @return \pear2\Pyrus\Validate|false false is returned if the validation package - * cannot be located + * the channel validation package, \pear2\Pyrus\Validate + * is returned + * @return \pear2\Pyrus\Validate|false false is returned if the validation + * package cannot be located */ function getValidationObject($package = false) { @@ -468,9 +469,9 @@ return $val; } - $vclass = str_replace('.', '\\', $this->channelInfo['validatepackage']['_content']); - $vclass = str_replace('PEAR_', 'pear2\Pyrus\\', $vclass); - $vclass = str_replace('_', '\\', $vclass); + $vclass = str_replace(array('.', 'PEAR_', '_'), + array('\\', 'pear2\Pyrus\\', '\\'), + $this->channelInfo['validatepackage']['_content']); if (!class_exists($vclass, true)) { throw new \pear2\Pyrus\ChannelFile\Exception( 'Validation object ' . $this->channelInfo['validatepackage']['_content'] .

« previous php.pear.cvs (#58403) next »