/** * Provides backwards compatibility access to the deprecated properties */ public function __get($name) { switch ($name) { case 'type': case 'uploadsDir': return $this->Attachment->{$name}; break; default: return parent::__get($name); } }