Ejemplo n.º 1
0
 /**
  * 
  * @param Service $service
  * @return \Cloud\LdapBundle\Entity\Password
  */
 public function setService($service)
 {
     if ($this->service !== null && in_array($this, $this->service->getPasswords())) {
         $this->service->removePassword($this);
     }
     $this->service = $service;
     if (!in_array($this, $this->service->getPasswords())) {
         $this->service->addPassword($this);
     }
     return $this;
 }
Ejemplo n.º 2
0
 /**
  *
  * @param Service $service
  */
 public function removeService(AbstractService $service)
 {
     if (!isset($this->services[$service->getName()])) {
         throw InvalidArgumentException("service not in the list");
     }
     unset($this->services[$service->getName()]);
     if ($service->getUser() === $this) {
         $service->setUser(null);
     }
     return $this;
 }
 protected function serviceEnabled()
 {
     parent::serviceEnabled();
     $this->getObject(Schemas\SambaSamAccount::class)->setSambaSID($this->getUser()->getUsername());
 }
Ejemplo n.º 4
0
 public function getObjectClasses()
 {
     $classes = parent::getObjectClasses();
     $classes['shadowaccount'] = Schemas\ShadowAccount::class;
     return $classes;
 }