/**
  * @param \Emris\Cli\Scaler\Domain\ServerCollection $servers
  * @return \Emris\Cli\Scaler\Domain\ContainerCollection
  */
 public function buildFromCollection(ServerCollection $servers)
 {
     $containers = new ContainerCollection();
     foreach ($servers as $server) {
         $containers->add($this->buildFrom($server));
     }
     return $containers;
 }
Exemplo n.º 2
0
 /**
  * Short description of method setDomain
  *
  * @access public
  * @author Cédric Alfonsi, <*****@*****.**>
  * @param  Class class
  * @return boolean
  */
 public function setDomain(core_kernel_classes_Class $class)
 {
     $returnValue = (bool) false;
     if (!is_null($class)) {
         foreach ($this->getDomain()->getIterator() as $domainClass) {
             if ($class->equals($domainClass)) {
                 $returnValue = true;
                 break;
             }
         }
         if (!$returnValue) {
             $this->setPropertyValue(new core_kernel_classes_Property(RDFS_DOMAIN), $class->getUri());
             if (!is_null($this->domain)) {
                 $this->domain->add($class);
             }
             $returnValue = true;
         }
     }
     return (bool) $returnValue;
 }