PHP Developer's Network : Network Member Forums

Class: NamespaceSim



  Search   All class groups   Latest entries   Top 10 charts   Newsletter   Blog   Forums   Help FAQ  
  Login   Register  
Recommend this page to a friend! Trackback URL: http://www.phpclasses.org/trackback/browse/package/4001.html
      Classes of Martin Alterisio  > 
NamespaceSim
 >  Download  >  Support forum Support forum  >  RSS 1.0 feed RSS 2.0 feed Latest changes  >  Stumble It! Stumble It!  >  Bookmark in del.icio.us Bookmark in del.icio.us  
  Supplied by   Group folder image Groups   Detailed description   Freshmeat project  
  Rate classes User ratings   Applications   Files Files  
  • Supplied by:

  • Picture of Martin Alterisio
    Name: Martin Alterisio <e-mail contact>
    Published packages: 5
    Country: Argentina Argentina - PHP professionals from Argentina looking for PHP jobs
    Home page: ???
    Age: 25
    All time rank: 849
    Week rank: 247

    Browse this author's classes

  • Innovation Award:

  • PHP Programming Innovation award nominee
    July 2007
    Number 4
    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.

    Manuel Lemos
  • Groups:

  • Group folder image
    Classes using PHP 5 specific features
    View top rated classes
    Group folder image
    Constructs to assist in the language control
    View top rated classes
    Group folder image
    Compilers and tools that generate code automatically
    View top rated classes
  • Detailed description:

  • This package 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 hinting
  • Freshmeat project:

  • Project record: nsim
    Popularity score: 26.70 (0.04%)
    Popularity rank: 43,613 (PHP Classes: 325)
    Vitality score: 1.00 (0.00%)
    Rating: Not yet rated Please rate this class in Freshmeat
  • User ratings:

  • Ratings
    Utility
    Consistency
    Documentation
    Examples
    Tests
    Videos
    Overall
    Rank
    All time:
    Good (95.0%)
    Good (90.0%)
    Good (87.5%)
    Good (95.0%)
    -
    -
    Sufficient (74.8%)
    48
    Month:
    Not yet rated by the users
  • Applications that use this class:

  • No application links were specified for this class.
    Add link image If you know an application of this package, send a message to the author to add a link here.
  • Files:

  • File Role Description
    Plain text file example.nsim.php Example
    nsim example file
    Files folder image NamespaceSim
      Plain text file ClassConstantFacade.php Class
    a facade to access a class constants
      Plain text file ErrorMap.php Class
    nsim source file error mapping
      Plain text file Executer.php Class
    nsim source file executer
      Plain text file FindClassFacade.php Class
    a facade to find a real class name when using instanceof operator
      Plain text file Parser.php Class
    nsim source file parser
      Plain text file Rewriter.php Class
    nsim source file rewriter
      Plain text file StaticAccessFacade.php Class
    a facade to access a class static vars
      Plain text file UnexpectedToken.php Class
    parser unexpected token exception
    Files folder image NotSimulated
      Plain text file TestClass3.php Example
    access to nonsim'ed from nsim'ed example class
    Plain text file README Doc.
    Readme file
    Plain text file test.php Example
    test script
    Files folder image TestNamespace
      Plain text file TestClass.nsim.php Example
    nsim'ed example class
      Plain text file TestInterface.nsim.php Example
    nsim'ed example interface
    Files folder image TestNamespace2
      Plain text file TestClass2.nsim.php Example
    nsim'ed example class
    Download all files: nsim.tar.gz nsim.zip
    NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.

 
  Advertise on this site   Site map   Statistics   Site tips   Privacy policy   Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2008 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products