scripts/namespacer.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Namespacer" default="namespace" basedir=".">
<target name="namespace">
<reflexive>
<fileset dir="." id="phpfiles">
<include name="**/*.php" />
<include name="**/*.phtml" />
<exclude name="**/*inc.php" />
<exclude name="**/lib/**" />
</fileset>
<filterchain>
<replaceregexp>
<regexp pattern="([^\\'"_])(MUtil|Zend|ZendX|Gems|Booth|Desk|Pulse|Depar|Zsd|PHPUnit)_" replace="\1\\\2_" />
<regexp pattern="class \\(MUtil|Zend|ZendX|Gems|Booth|Desk|Pulse|Depar|Zsd|PHPUnit)_" replace="class \1_" />
<regexp pattern="interface \\(MUtil|Zend|ZendX|Gems|Booth|Desk|Pulse|Depar|Zsd)_" replace="interface \1_" />
<regexp pattern="([^\\'"])(GemsEscort::)" replace="\1\\\2" />
<regexp pattern="\(GemsEscort " replace="(\\GemsEscort " />
<regexp
pattern="(\s|\()(ArrayAccess|ArrayIterator|ArrayObject|Closure|Countable|Exception|DirectoryIterator|FilesystemIterator|FilterIterator|Generator|Iterator|LimitIterator|OuterIterator|RecursiveDirectoryIterator|RecursiveIterator|SeekableIterator|Serializable|SplFileInfo|SplFileObject|Throwable|Traversable)"
replace="\1\\\2" />
<regexp pattern="@subpackage \\Exception" replace="@subpackage Exception" />
<regexp pattern="\$Id: \\Exception" replace="\$Id: Exception" />
</replaceregexp>
</filterchain>
</reflexive>
</target>
</project>