Created
September 9, 2010 05:59
-
-
Save co3k/571455 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$pathToNewZend = '/usr/local/lib/php/Zend'; | |
$pathToOldZend = '/home/co3k/www/sf/op3-ebihara/lib/vendor/Zend'; | |
//--- | |
require_once $pathToNewZend.'/Version.php'; | |
$pathToHostNameValidator = '/Validate/Hostname'; | |
$files = glob($pathToNewZend.$pathToHostNameValidator.'/*.php'); | |
foreach ($files as $file) | |
{ | |
$list = include $file; | |
$result = ''; | |
foreach ($list as $item) | |
{ | |
$open = strpos($item, '[') + 1; | |
$close = strrpos($item, ']') - 3; | |
$result .= substr($item, $open, $close); | |
} | |
file_put_contents($pathToOldZend.$pathToHostNameValidator.'/'.basename($file), "<?php | |
/** | |
* Zend Framework | |
* | |
* LICENSE | |
* | |
* This source file is subject to the new BSD license that is bundled | |
* with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://framework.zend.com/license/new-bsd | |
* If you did not receive a copy of the license and are unable to | |
* obtain it through the world-wide-web, please send an email | |
* to [email protected] so we can send you a copy immediately. | |
* | |
* @category Zend | |
* @package Zend_Validate | |
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) | |
* @license http://framework.zend.com/license/new-bsd New BSD License | |
*/ | |
require_once 'Zend/Validate/Hostname/Interface.php'; | |
/** | |
* Zend_Validate_Hostname_".basename($file, '.php')." | |
* | |
* This class file is generated by basing ZendFramework-".Zend_Version::VERSION." to avoid | |
* http://redmine.openpne.jp/issues/205 bug in before OpenPNE 3.7.0. | |
* | |
* @category Zend | |
* @package Zend_Validate | |
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) | |
* @license http://framework.zend.com/license/new-bsd New BSD License | |
*/ | |
class Zend_Validate_Hostname_".basename($file, '.php')." implements Zend_Validate_Hostname_Interface | |
{ | |
static function getCharacters() | |
{ | |
return '".$result."'; | |
} | |
}"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment