<?
class dimamic()
{
public $namemodel ; //Name the model (User , Office , Category , Seccion....)
function find($findString){
return $this->namemodel::model()->find($findString); // i have problem with the :: static ?
}
}
?>
I am not pretty sure what you want to accomplish but I think you’ll have to write it this way:
<?
class DynamicModel
{
public $name ; //Name of the model (User , Office , Category , Seccion....)
public function find($findString)
{
$class=$this->name;
return $class::model()->find($findString);
}
}
?>