public function bind(InputInterface $input)
    {
        $this->validateInput($input);

        if (!$pattern = $input->getOption('grep')) {
            $this->filter = false;

            return;
        }

        if (!$this->stringIsRegex($pattern)) {
            $pattern = '/' . \preg_quote($pattern, '/') . '/';
        }

        if ($insensitive = $input->getOption('insensitive')) {
            $pattern .= 'i';
        }

        $this->validateRegex($pattern);

        $this->filter      = true;
        $this->pattern     = $pattern;
        $this->insensitive = $insensitive;
        $this->invert      = $input->getOption('invert');
    }
public function bind(InputInterface $input)
    {
        $this->validateInput($input);

        if (!$pattern = $input->getOption('grep')) {
            $this->filter = false;

            return;
        }

        if (!$this->stringIsRegex($pattern)) {
            $pattern = '/' . \preg_quote($pattern, '/') . '/';
        }

        if ($insensitive = $input->getOption('insensitive')) {
            $pattern .= 'i';
        }

        $this->validateRegex($pattern);

        $this->filter      = true;
        $this->pattern     = $pattern;
        $this->insensitive = $insensitive;
        $this->invert      = $input->getOption('invert');
    }
public function bind ( InputInterface $ input ) { $ this -> validateInput ( $ input ) ; if ( ! $ pattern = $ input -> getOption ( 'grep' ) ) { $ this -> filter = false ; return ; } if ( ! $ this -> stringIsRegex ( $ pattern ) ) { $ pattern = '/' . \ preg_quote ( $ pattern , '/' ) . '/' ; } if ( $ insensitive = $ input -> getOption ( 'insensitive' ) ) { $ pattern .= 'i' ; } $ this -> validateRegex ( $ pattern ) ; $ this -> filter = true ; $ this -> pattern = $ pattern ; $ this -> insensitive = $ insensitive ; $ this -> invert = $ input -> getOption ( 'invert' ) ; }
Bind input and prepare filter.

@param InputInterface $input
Bind input and prepare filter .