/** * @param Address $address * * @return AddressService */ private function createServiceElement(Address $address) { $addressService = new self(); $addressService->setServiceLocator($this->getServiceLocator()); $addressService->setAddress($address); return $addressService; }
public function createService(\Zend\ServiceManager\ServiceLocatorInterface $sm) { $auth = new self(); $auth->setServiceLocator($sm); return $auth; }
/** * Get a subDirectory of $this (existing or not) * * @param $path * @return Directory */ public function getDirectory($path) { $subDirectory = new self($this->getFileSystemId(), $this->getFullPath($path)); $subDirectory->setServiceLocator($this->getServiceLocator()); return $subDirectory; }