PHP_Annotation, Attribute Extension is supported to Class,Function,Method and Property. And, the DI library is supported.
-- Function list --
1. Get Annotation Object
- PHP_Annotation::parse(string $class_name);
- PHP_Annotation::parse(string $function_name);
- PHP_Annotation::parseFunction(string $function_name);
- PHP_Annotation::parseMethod(string $class_name, string $method_name);
- PHP_Annotation::parseProperty(string $class_name, string $property_name);
- PHP_Annotation::parse(Reflector $ref);
* Parse Comment by using getDocComment() of Reflector.
2. Getting processing result useing by Annotation Object.
- PHP_Annotation::exec(PHP_Annotation_Factory $factory=null); support java.lang.annotation format.
- PHP_Annotation::exec[Command Name](); ref:PHP_Annotation::__call()
- PHP_Annotation::exec_[Command Full Name](); //ref:PHP_Annotation::__call()
* Support PhpDocumentor and java.lang.annotation format.
Because used Command design pattern, An easily original format can be built in.
3.Use DI library
- PHP_Annotation_ContainerFactory::singleton()
- PHP_Annotation_ContainerFactory::setContainerConfig( PHP_Annotation_ContainerConfig $config=null)
- PHP_Annotation_ContainerFactory::getComponent( string $name )
* Support annotation: @construct, @instance, @property
* Exsample: sample6.php
.
Hereâs an example of HTML code that includes a link to the website 4rabet. By clicking on the link, you can successfully go to the site.
|