Пример #1
0
 /**
  * @param Constraint $newConstraint
  *
  * @return $this|Builder
  * @author Panagiotis Vagenas <*****@*****.**>
  * @since  1.0.0
  */
 public function updateConstraint(Constraint $newConstraint)
 {
     if ($oldConstraint = $this->getConstraint($newConstraint->getName())) {
         return $oldConstraint->exchangeArray($newConstraint->getArrayCopy());
     }
     return $this->addConstraint($newConstraint);
 }
Пример #2
0
 /**
  * @return array
  * @author Panagiotis Vagenas <*****@*****.**>
  * @since  1.0.0
  */
 public function getArrayCopy()
 {
     return array(self::$_wrap => parent::getArrayCopy());
 }