\PhpApi\AnnotationsApi

The annotation to specify a pattern that triggers a class method.

Summary

Methods
Properties
Constants
No public methods found
$pattern
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$pattern

$pattern : string

The pattern is a portion of URL that will be used to execute some class method. More than one single route can be configured using semicolon to separate them.

*@Api("my/route") // put this in javadoc style
public function myRoute() {
 // code
}
*@Api("route/with/$var") // put this in javadoc style
public function routeWith($var) {
 // code
}
*@Api("another/$id/maybe/$var;otherwise/$var/goes/$id") // put this in javadoc style
public function routeAnother($id, $var) {
 // code
}

Type

string