Phulp\Collection::add PHP Method

add() public method

{@inheritDoc}
public add ( $value )
    public function add($value)
    {
        if (!$this->checkType($value)) {
            throw new \UnexpectedValueException(sprintf(self::$exceptionErrorMessage, 1, __CLASS__, 'add', $this->getType(), $this->getItemType($value)));
        }
        parent::add($value);
        return true;
    }

Usage Example

Beispiel #1
0
 /**
  * @param DistFile $distFile
  */
 public function addDistFile(DistFile $distFile)
 {
     $this->distFiles->add($distFile);
 }