cvs: phpdoc /scripts/include FileData.class.php

From: Date: Mon, 09 Feb 2009 16:34:03 +0000
Subject: cvs: phpdoc /scripts/include FileData.class.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-3166@lists.php.net to get a copy of this message
sammywg Mon Feb 9 16:34:03 2009 UTC Modified files: /phpdoc/scripts/include FileData.class.php Log: rewrite search RegEx composition, it is easier to read/extend now http://cvs.php.net/viewvc.cgi/phpdoc/scripts/include/FileData.class.php?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/scripts/include/FileData.class.php diff -u phpdoc/scripts/include/FileData.class.php:1.1 phpdoc/scripts/include/FileData.class.php:1.2 --- phpdoc/scripts/include/FileData.class.php:1.1 Sat Jan 17 22:35:14 2009 +++ phpdoc/scripts/include/FileData.class.php Mon Feb 9 16:34:02 2009 @@ -13,7 +13,7 @@ * * @package TranTools * - * @version $Id: FileData.class.php,v 1.1 2009/01/17 22:35:14 sammywg Exp $ + * @version $Id: FileData.class.php,v 1.2 2009/02/09 16:34:02 sammywg Exp $ * @filesource * * @@ -50,6 +50,12 @@ */ protected $data; + /** + * @var string + * @internal includes concatenated search tags + */ + protected static $tags; + /** @@ -70,6 +76,17 @@ * @return void */ public function __construct($file, $isTrans) { + self::$tags = implode('|', + array( + 'EN-Revision', + 'Revision', + 'Maintainer', + 'Status', + 'Credits', + 'Rev-Revision', + 'Reviewer', + ) + ); $this->isTranslation = (bool) $isTrans; $this->data = array(); @@ -135,7 +152,7 @@ protected function setMetaData($rawData) { $matches = null; if (0 < preg_match_all( - '/(EN-Revision|Revision|Maintainer|Status|Credits|Rev-Revision|Reviewer): (.*)\s+/iU', + '/('.self::$tags.'): (.*)\s+/iU', $rawData, $matches, PREG_PATTERN_ORDER)) { for($i=0, $j=count($matches[0]); $i < $j; ++$i) { $key = strtolower($matches[1][$i]);

« previous php.doc.cvs (#3166) next »