Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
Route Class Reference

Defines a route. More...

+ Inheritance diagram for Route:

Public Member Functions

 __construct (string $path='', ?array $methods=null, ?string $name=null, ?bool $cache=false, ?int $duration=0, ?bool $inherited=false, ?bool $automated=false, ?array $requirements=[], int $priority=0)
 
 getPropertiesAndValues ($props=null)
 
- Public Member Functions inherited from BaseAttribute
 __construct ()
 
 asAnnotation ()
 
 getNamespace ()
 
 __toString ()
 
- Public Member Functions inherited from BaseAnnotationTrait
 getProperties ()
 
 isSameAs ($annot)
 

Data Fields

string $path
 
array $methods
 
string $name
 
bool $cache
 
int $duration
 
bool $inherited
 
bool $automated
 
array $requirements
 
int $priority
 

Additional Inherited Members

- Protected Member Functions inherited from BaseAttribute
 getDefaultParameters ()
 

Detailed Description

Defines a route.

usages :

  • #[Route("routePath")] default path: ""
  • #[Route(path: "routePath")]
  • #[Route("routePath",methods:["routeMethods"])]
  • #[Route("routePath",cache: true, duration: intValue)]
  • #[Route("routePath",inherited: true)]
  • #[Route("routePath",automated: true)]
  • #[Route("routePath",requirements: ["member"=>"regExpr"])]
  • #[Route("routePath",priority: intValue)]
  • #[Route("routePath",name: "routeName")] default routeName: controllerName_actionName

Definition at line 24 of file Route.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( string  $path = '',
?array  $methods = null,
?string  $name = null,
?bool  $cache = false,
?int  $duration = 0,
?bool  $inherited = false,
?bool  $automated = false,
?array  $requirements = [],
int  $priority = 0 
)

Definition at line 36 of file Route.php.

Member Function Documentation

◆ getPropertiesAndValues()

getPropertiesAndValues (   $props = null)

Reimplemented from BaseAnnotationTrait.

Definition at line 48 of file Route.php.

Field Documentation

◆ $automated

bool $automated

Definition at line 32 of file Route.php.

◆ $cache

bool $cache

Definition at line 29 of file Route.php.

◆ $duration

int $duration

Definition at line 30 of file Route.php.

◆ $inherited

bool $inherited

Definition at line 31 of file Route.php.

◆ $methods

array $methods

Definition at line 27 of file Route.php.

◆ $name

string $name

Definition at line 28 of file Route.php.

◆ $path

string $path

Definition at line 26 of file Route.php.

◆ $priority

int $priority

Definition at line 34 of file Route.php.

◆ $requirements

array $requirements

Definition at line 33 of file Route.php.


The documentation for this class was generated from the following file: