This repository was archived by the owner on Jun 12, 2025. It is now read-only.
With parameter binding, the parameters of task function are automatically pulled from container, options or arguments.
example:
$app->task(function(\PDO $db, array $args) {
// $db will be pulled from container
// equivalent to
// /** @var \PDO $db */
// $db = $this->db;
});For $options and $arguments which is the parameters for task prior to 1.5.0, there must be a special rule for them.
$optionsand$optsare reserved argument forarray $options$argumentsand$argsare reserved argument forarray $arguments$contextare reserved argument forContext $context- It's possible to specify those should be array or Hash or whatever classes accept array to its constructor. The default is
array.