Download the PHP package saberyjs/annotation without Composer

On this page you can find all versions of the php package saberyjs/annotation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package annotation

why need this library

if you have used ReflectionClass or ReflectionMethod of php,you will find that there is a method called getDocComment ,it means that we can get comment of specified class (and method of class),so,we can do something with it. do you remember Java web Annotation ?? it is a powerful develop tool,but ,this library do not that,it on parse comment,because we never know what you want to do,right ??

how to use

this library support two function ,as follows:

get doc comment

firstly we assume there is class called Student:

Annotation::getAnnotation() return a raw string

parse comment

before we get into real code,we must understand that there is a concept called parser,each kind of parser must implement interface called Parser, the interface is very simple,i will show you the code:

every parser must implement parse method,it is the only method,this library has two internal parser ,StandardAnnotationParser and PlainAnnotationParser,of course,you can write your own parser(must implement Parser interface) whenever you want . if you use StandardAnnotationParser,code as follows:

if you remember the class called Student,you will find that it has a method called getName,the method has some comment,we paste it here

so after you called Annotation::parseAnnotation method with StandardAnnotationParser ,you will get a array,it`s format as follows:

you can do whatever you want with $ret,if you are interested in it,you can read the composer package called thinkphp5-route-helper

Contact

I am a php developer in ShenZhen of China,if you also like open source ,you can contact me ,My QQ is 1174332406

last but not least,have a nice day!!


All versions of annotation with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
saberyjs/exception Version ^1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package saberyjs/annotation contains the following files

Loading the files please wait ....