|Info||View files (15)||Download .zip||Reputation||Support forum (5)||Blog|
|Last Updated||Ratings||Unique User Downloads||Download Rankings|
|2007-08-01 (6 years ago)||74%||Total: 1,654 This week: 1||All time: 2,168 This week: 1,420|
|nsim 0.5.0||GNU Lesser General Publ...||5.1||PHP 5, Language, Code Generation|
It parses PHP code to extract namespace definition statements. The code is rewritten to emulate the namespace support in a way similar to the Java language namespace support.
This package implements new commands named package and import. The package command defines the package that a class belongs. The package name is prepended to the class names using PEAR class naming and directory conventions.
The import command indicates that the package should be imported for use in the PHP script on which the import command is used. Classes that are not found in the current script are looked in the imported namespaces.
Error mapping has been added since 0.4.0, which requires that caching is enabled. This features makes php errors in rewritten files point to the right place in the original file.
As of version 0.5.0 nsim supports namespaces in:
* class definition (w/inheritance & interfaces implementation)
* interface definition (w/inheritance)
* static class vars & functions
* class constants
* instanceof operator
* type hinting
|ClassConstantFacade.php||Class||a facade to access a class constants|
|ErrorMap.php||Class||nsim source file error mapping|
|Executer.php||Class||nsim source file executer|
|FindClassFacade.php||Class||a facade to find a real class name when using instanceof operator|
|Parser.php||Class||nsim source file parser|
|Rewriter.php||Class||nsim source file rewriter|
|StaticAccessFacade.php||Class||a facade to access a class static vars|
|UnexpectedToken.php||Class||parser unexpected token exception|
|TestClass3.php||Example||access to nonsim'ed from nsim'ed example class|
Prize: One downloadable copy of Komodo Pro
|Namespaces is one of the features that was left out of PHP 5. It can help developers mix classes that have the same name but are from different packages.
Fortunately, namespaces are finally being introduced in PHP 6. However, PHP 5 users will not be able to benefit from that feature.
This package provides an alternative implementation that works on PHP 5. It parses the code of each class script and rewrite it to implement namespaces as prefixes of the class names.
|Version Control||Unique User Downloads||Download Rankings|
|This week:||1||This week:||1,420|