I have an AR class that includes the following virtual attribute getter function that returns a constructed url:
public function getUrl()
{
return $baseUrl . $this->id;
}
When I use CJSON to serialize an instance of my object:
CJSON::encode($myObjectInstance)
The resulting json does not include my url attribute - is there a way to designate this virtual attribute as serializable by CJSON?