Hi, title is clear. I can't extend a class in my CLI application. All the following classes are in the lib folder :
class FraudTask extends \Phalcon\CLI\Task {
public function mainAction() {
$liveFraud = new LiveFraud();
$liveFraud->execute();
//$liveMobileFraud = new LiveMobileFraud();
//$liveMobileFraud->execute();
}
}
class LiveFraud extends Fraud {
}
abstract class Fraud {
}
In my config file :
$loader->registerDirs(
array(
APPLICATION_PATH . '/tasks',
APPLICATION_PATH . '/models',
APPLICATION_PATH . '/lib',
));
$loader->register();
When I execute : php cli.php fraud
Fatal error: Class 'Fraud' not found in /Library/WebServer/Documents/tuangocli/app/lib/LiveFraud.php on line 30
I don't understand why the class is not found.