svn: /pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/PackageFile/ Commands.php

From: Date: Tue, 23 Mar 2010 02:17:53 +0000
Subject: svn: /pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/PackageFile/ Commands.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-9315@lists.php.net to get a copy of this message
saltybeagle Tue, 23 Mar 2010 02:17:53 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=296654 Log: simplify the autoload included in skeleton package stub with one str_replace call. Changed paths: U pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/PackageFile/Commands.php Modified: pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/PackageFile/Commands.php =================================================================== --- pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/PackageFile/Commands.php 2010-03-22 23:57:06 UTC (rev 296653) +++ pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/PackageFile/Commands.php 2010-03-23 02:17:53 UTC (rev 296654) @@ -536,9 +536,9 @@ } function " . $info['package'] . "_autoload(\$class) { - \$class = str_replace('_', '\\\', \$class); - if (file_exists('phar://' . __FILE__ . '/" . $info['package'] . "-@PACKAGE_VERSION@/php/' . implode('/', explode('\\\', \$class)) . '.php')) { - include 'phar://' . __FILE__ . '/" . $info['package'] . "-@PACKAGE_VERSION@/php/' . implode('/', explode('\\\', \$class)) . '.php'; + \$class = str_replace(array('_', '\\\'), '/', \$class); + if (file_exists('phar://' . __FILE__ . '/" . $info['package'] . "-@PACKAGE_VERSION@/php/' . \$class . '.php')) { + include 'phar://' . __FILE__ . '/" . $info['package'] . "-@PACKAGE_VERSION@/php/' . \$class . '.php'; } } spl_autoload_register(\"" . $info['package'] . "_autoload\");

« previous php.pear.core (#9315) next »