class User extends CActiveRecord
{
public function getDevice()
{
return new Device();
}
}
class Device
{
public function getBrandName()
{
return $this->brandName;
}
}
class User {
public $device = 'Device';
}
class Device {
public static function call() {
echo 'hello';
}
}
$user = new User;
$deviceClass = $user->device;
$deviceClass::call();