public function getRecordGateway() { if ($this->_gateway === null) { $this->_gateway = $this->createRecordGateway(); } return $this->_gateway; }