Compare commits
2 Commits
attributes
...
master
Author | SHA1 | Date |
---|---|---|
Dave M. | 43e13476b6 | |
Dave M. | 16a6e351a1 |
|
@ -6,7 +6,7 @@
|
|||
"authors": [
|
||||
{
|
||||
"name": "Dave Mc Nicoll",
|
||||
"email": "mcndave@gmail.com"
|
||||
"email": "info@mcnd.ca"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Notes\Cronard\Attribute\Object;
|
||||
|
||||
#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_METHOD)]
|
||||
#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS)]
|
||||
class Cronard implements \Notes\Attribute {
|
||||
public function __construct(
|
||||
public string $cron,
|
||||
|
|
|
@ -30,7 +30,7 @@ class TaskFetcher {
|
|||
}
|
||||
else {
|
||||
$this->annotations = [
|
||||
'method' => [ Annotation\Method\Cronard::class, Attribute\Method\Cronard::class ],
|
||||
'method' => [ Attribute\Method\Cronard::class ],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ class TaskFetcher {
|
|||
# Should generate an equivalent of Ulmus's object reflection here !
|
||||
$objectResolver = new ObjectResolver($class, true, true, false, true);
|
||||
|
||||
foreach($objectResolver->getAnnotationListFromClassname( $this->annotations['method'], false ) as $func => $cronard) {
|
||||
foreach($objectResolver->getAttributeListFromClassname( $this->annotations['method'], false ) as $func => $cronard) {
|
||||
foreach($cronard as $task) {
|
||||
$list[] = [ 'class' => $class, 'method' => $func, 'annotation' => $task ];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue