-
Book Overview & Buying
-
Table Of Contents
CakePHP 1.3 Application Development Cookbook
By :
Just as we have components to share functionality amongst controllers, we also have behaviors for models, and helpers for views. What about shells? CakePHP offers the concept of tasks, which are classes that also extend from the Shell class, but can be reused from other shells.
In this recipe, we will learn how to build a task that handles argument and parameter processing for our shell, can auto-generate help messages, and check the definition of mandatory arguments and optional parameters. We will implement this task in the most generic fashion, so we can use it for any future shells we may decide to build.
To go through this recipe we need a shell that accepts parameters and has different commands available. Follow the entire recipe Parsing command line parameters.
app/vendors/shells/user.php file and add the following right below the declaration of the uses property:public $tasks = array('Help');
public static...
Change the font size
Change margin width
Change background colour