コード例 #1
0
ファイル: TypedCollection.php プロジェクト: Rybbow/x-blog
 /**
  * {@inheritdoc}
  */
 public function add($element)
 {
     $this->verifyTypeIntegrity($element);
     if ($this->contains($element)) {
         return false;
     }
     return parent::add($element);
 }
コード例 #2
0
ファイル: FieldCollection.php プロジェクト: Twiebie/bolt
 /**
  * @param mixed $element
  *
  * @return bool
  */
 public function add($element)
 {
     $element->setGrouping($this->grouping);
     return parent::add($element);
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  */
 public function add($element)
 {
     $this->throwIfNotForm($element);
     return parent::add($element);
 }
コード例 #4
0
 /**
  * {@inheritdoc}
  */
 public function set($key, $value)
 {
     if (null === $key) {
         parent::add($value);
     } else {
         parent::set($key, $value);
     }
     $this->changed();
 }