I want to extended, not just create a new instance of a class I have sitting in my vendors directory. I googled and read the docs but I see no support for it.
Can I do an app import of the 3rd party class, then write up the extended class followed by a component that will use my child class?
i.e
/* vendors/yahooapi/yahoo.class.php */
class YahooAPI {
var $key = 'demo';
}
/* controllers/components/yahoo.php */
App::import("Vendor", "YahooAPI", array("file"=>"yahooapi.class.php"));
class Yahoov2 extends YahooAPI {
var $key = 'newKey';
function go() {}
}
YahooComponent extends Object {
function goFaster() {
$a = new Yahoov2;
return $a->go() * 2;
}
}