public function add(PatternInterface $pattern)
    {
        $this->collection[$this->length] = $pattern;
        $this->length++;

        return $this;
    }
public function add(PatternInterface $pattern)
    {
        $this->collection[$this->length] = $pattern;
        $this->length++;

        return $this;
    }
public function add ( PatternInterface $ pattern ) { $ this -> collection [ $ this -> length ] = $ pattern ; $ this -> length ++ ; return $ this ; }
Add pattern object to the collection.

@param  PatternInterface $pattern
@return self
Add pattern object to the collection .