setCriteria() public method

Sets search criteria
public setCriteria ( array $criteria )
$criteria array Search criteria
Ejemplo n.º 1
0
Archivo: Farm.php Proyecto: scalr/scalr
 /**
  * Reset farm id on clone
  */
 public function __clone()
 {
     if (empty($this->_settings)) {
         $this->settings->load();
     }
     $unref = null;
     $this->id =& $unref;
     $this->_settings = clone $this->_settings;
     $this->_settings->setCriteria([['farmId' => &$this->id]]);
     $this->_settings->setDefaultProperties(['farmId' => &$this->id]);
 }
Ejemplo n.º 2
0
 /**
  * Reset cloud credentials id on clone
  */
 public function __clone()
 {
     $this->_properties = clone $this->properties;
     $unref = null;
     $this->id =& $unref;
     $this->name = "{$this->envId}-{$this->accountId}-{$this->cloud}-" . \Scalr::GenerateUID(true);
     $this->_properties->setCriteria([['cloudCredentialsId' => &$this->id]]);
     $this->_properties->setDefaultProperties(['cloudCredentialsId' => &$this->id]);
 }
Ejemplo n.º 3
0
 /**
  * Reset cloud credentials id on clone
  */
 public function __clone()
 {
     $unref = null;
     $this->id =& $unref;
     if (isset($this->_properties)) {
         $this->_properties = clone $this->_properties;
         $this->_properties->setCriteria([['cloudCredentialsId' => &$this->id]]);
         $this->_properties->setDefaultProperties(['cloudCredentialsId' => &$this->id]);
     }
 }