In a few different places I call:
$model=NEW MakeCall($form);
I have updated the MakeCall
class with several changes that I want to take affect after a given date. I renamed the original class MakeCallOld
How can I leave my calls to:
$model=NEW MakeCall($form);
intact and within MakeCall
do this:
class MakeCall
{ ...
public function __construct($form)
{
//Use Legacy MakeCallOld for stuff before 2016-10-01
if ($form['date']<'2016-10-01') {
$object=NEW MakeCallOld($form);
return $object;
}
$this->perform several functions and set variables...
This currently just returns an empty object of class MakeCallOld
but it does not appear to run the constructor in MakeCallOld
as all properties are empty. I would just like the entire object of MakeCallOld
dropped into $model
.