public function useNamespace($pattern, array $delimiters = ['.', '\\'])
    {
        $mask =  implode('', $delimiters);
        $consumer =  '(' . implode('|', array_map('preg_quote', $delimiters)) .')';
        $namespace_pattern = '/^' . preg_quote(rtrim($pattern, $mask)) .  $consumer . '/';
        $iterator = new RegexIterator(
            $this->getIterator(), $namespace_pattern, RegexIterator::REPLACE, RegexIterator::USE_KEY);
        $iterator->replacement = '';

        return new static(iterator_to_array($iterator));
    }
public function useNamespace($pattern, array $delimiters = ['.', '\\'])
    {
        $mask =  implode('', $delimiters);
        $consumer =  '(' . implode('|', array_map('preg_quote', $delimiters)) .')';
        $namespace_pattern = '/^' . preg_quote(rtrim($pattern, $mask)) .  $consumer . '/';
        $iterator = new RegexIterator(
            $this->getIterator(), $namespace_pattern, RegexIterator::REPLACE, RegexIterator::USE_KEY);
        $iterator->replacement = '';

        return new static(iterator_to_array($iterator));
    }
public function useNamespace ( $ pattern , array $ delimiters = [ '.' , '\\' ] ) { $ mask = implode ( '' , $ delimiters ) ; $ consumer = '(' . implode ( '|' , array_map ( 'preg_quote' , $ delimiters ) ) . ')' ; $ namespace_pattern = '/^' . preg_quote ( rtrim ( $ pattern , $ mask ) ) . $ consumer . '/' ; $ iterator = new RegexIterator ( $ this -> getIterator ( ) , $ namespace_pattern , RegexIterator :: REPLACE , RegexIterator :: USE_KEY ) ; $ iterator -> replacement = '' ; return new static ( iterator_to_array ( $ iterator ) ) ; }
Isolates a given namespace of annotations.

@param  string                             $pattern    namespace
@param  array                              $delimiters possible namespace delimiters to mask
@return \Minime\Annotations\AnnotationsBag
Isolates a given namespace of annotations .