protected function getResourceInstance() { if ($this->loadedInstance()) { $instanceName = $this->getInstanceName(); if (property_exists($this->controller, $instanceName)) { return get_property($this->controller, $instanceName); } } }