Compare commits

...

2 Commits

Author SHA1 Message Date
Dave M. 43e13476b6 - Removing annotations 2023-11-03 19:46:05 -04:00
Dave M. 16a6e351a1 - Fixed the attribute target method of Cronard's attribute 2023-07-09 12:30:28 -04:00
3 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@
"authors": [
{
"name": "Dave Mc Nicoll",
"email": "mcndave@gmail.com"
"email": "info@mcnd.ca"
}
],
"require": {

View File

@ -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,

View File

@ -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 ];
}