NamespaceSim

NamespaceSim project can be used to emulate class namespaces under PHP 5.
Download

NamespaceSim Ranking & Summary

Advertisement

  • Rating:
  • License:
  • LGPL
  • Price:
  • FREE
  • Publisher Name:
  • Martin Alterisio
  • Publisher web site:
  • http://www.phpclasses.org/browse/package/4001.html

NamespaceSim Tags


NamespaceSim Description

NamespaceSim project can be used to emulate class namespaces under PHP 5. NamespaceSim project can be used to emulate class namespaces under PHP 5. 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 hintingRequirements:· PHP 5.1What's New in This Release:· This release supports namespaces in class definitions (with inheritance and interface implementation), interface definitions (with inheritance), static class variables and functions, class constants, the instanceof operator, and type hinting.· Errors trapped in rewritten files are mapped to the right file and line number.


NamespaceSim Related Software