Ubiquity
2.5.2
php rapid development framework
Loading...
Searching...
No Matches
Route.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ubiquity\attributes\items\router
;
4
5
use Attribute;
6
use
Ubiquity\annotations\BaseAnnotationTrait
;
7
use
Ubiquity\attributes\items\BaseAttribute
;
8
23
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
24
class
Route
extends
BaseAttribute
,
BaseAnnotationTrait
{
25
26
public
string
$path
;
27
public
?array
$methods
;
28
public
?
string
$name
;
29
public
bool
$cache
;
30
public
int
$duration
;
31
public
bool
$inherited
;
32
public
bool
$automated
;
33
public
array
$requirements
;
34
public
int
$priority
;
35
36
public
function
__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) {
37
$this->path =
$path
??
''
;
38
$this->methods =
$methods
;
39
$this->name =
$name
;
40
$this->cache =
$cache
;
41
$this->duration =
$duration
;
42
$this->inherited =
$inherited
;
43
$this->automated =
$automated
;
44
$this->requirements =
$requirements
;
45
$this->priority =
$priority
;
46
}
47
48
public
function
getPropertiesAndValues
($props =
null
) {
49
$r = parent::getPropertiesAndValues($props);
50
if
(\is_subclass_of($this, Route::class)) {
51
unset($r[
'methods'
]);
52
}
53
return
$r;
54
}
55
}
56
Ubiquity\annotations\BaseAnnotationTrait
Ubiquity\annotations$BaseAnnotationTrait This class is part of Ubiquity.
Definition
BaseAnnotationTrait.php:13
Ubiquity\attributes\items\BaseAttribute
Ubiquity\attributes$BaseAttribute This class is part of Ubiquity.
Definition
BaseAttribute.php:15
Ubiquity\attributes\items\router\Route
Defines a route.
Definition
Route.php:24
Ubiquity\attributes\items\router\Route\$cache
bool $cache
Definition
Route.php:29
Ubiquity\attributes\items\router\Route\$priority
int $priority
Definition
Route.php:34
Ubiquity\attributes\items\router\Route\$duration
int $duration
Definition
Route.php:30
Ubiquity\attributes\items\router\Route\getPropertiesAndValues
getPropertiesAndValues($props=null)
Definition
Route.php:48
Ubiquity\attributes\items\router\Route\$name
string $name
Definition
Route.php:28
Ubiquity\attributes\items\router\Route\$methods
array $methods
Definition
Route.php:27
Ubiquity\attributes\items\router\Route\$requirements
array $requirements
Definition
Route.php:33
Ubiquity\attributes\items\router\Route\__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
Route.php:36
Ubiquity\attributes\items\router\Route\$automated
bool $automated
Definition
Route.php:32
Ubiquity\attributes\items\router\Route\$path
string $path
Definition
Route.php:26
Ubiquity\attributes\items\router\Route\$inherited
bool $inherited
Definition
Route.php:31
Ubiquity\attributes\items\router
Router annotations.
Definition
Delete.php:3
C:
Users
myadd
Documents
GitHub
ubiquity-doc-api
vendor
phpmv
ubiquity-attributes
src
Ubiquity
attributes
items
router
Route.php
Generated on Sun Dec 10 2023 15:04:05 for
Ubiquity
by
doxygen
1.9.8