Skip to content

Commit

Permalink
working on injector
Browse files Browse the repository at this point in the history
  • Loading branch information
dvnc0 committed Sep 12, 2023
1 parent f40e656 commit 8c7f873
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/App/Actions/Test_Action.php

This file was deleted.

17 changes: 17 additions & 0 deletions src/App/Tasks/Task_Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Clyde\Core\Event_Dispatcher;
use Clyde\Tasks\Task_Response;
use Clyde\Tools\Printer;
use Exception;

abstract class Task_Base
{
Expand Down Expand Up @@ -53,4 +54,20 @@ public function __construct(Application $Application) {
* @return Task_Response
*/
abstract public function execute(): Task_Response;

/**
* Call a method on the Application
*
* @param string $name Method name
* @param array $arguments Method arguments
* @return mixed
*/
public function __get(string $name) {

Check failure on line 65 in src/App/Tasks/Task_Base.php

View workflow job for this annotation

GitHub Actions / build

PHPDoc tag @param references unknown parameter: $arguments
$method = "get{$name}";
if (method_exists($this->Application, $method)) {
return $this->Application->$method();
}

throw new Exception("Method {$method} does not exist");
}
}

0 comments on commit 8c7f873

Please sign in to comment.