I’m wondering if it’s possible to share code (functions and variables) between a Shell and its Tasks. For example, say I have the following:
Class MyShell extends Shell{
var $tasks = array('MyTask');
var $someVariable;
function someFunction(){}
}
and then in my tasks:
class MyTask extends Shell {
//somehow access the someFunction() and $someVariable in here
}
Is this possible? Also, whether it is or isnt, is this not the recommended cake way? Thank you!
Then why not extend the shell class with the task, like this?