Bob\Application::task PHP Method

task() public method

public task ( $name, $prerequisites = null, $action = null )
    function task($name, $prerequisites = null, $action = null)
    {
        return $this['task_factory']($name, $prerequisites, $action);
    }

Usage Example

Example #1
0
 function boot(Application $app)
 {
     $app->task('pipe:precompile', function () use($app) {
         $targetDirectory = $app['pipe.precompile_directory'];
         $assets = (array) $app['pipe.precompile'];
         $manifest = new Manifest($app['pipe.environment'], "{$targetDirectory}/manifest.json", $targetDirectory);
         $manifest->setLogger($app['log']);
         $manifest->compile($assets);
     })->description = "Precompile assets";
 }
All Usage Examples Of Bob\Application::task