private function shouldExecuteCallback($msg)
    {
        if ($this->pattern) {
            return (bool) preg_match($this->pattern, $msg, $this->matches);
        }

        return true;
    }
private function shouldExecuteCallback($msg)
    {
        if ($this->pattern) {
            return (bool) preg_match($this->pattern, $msg, $this->matches);
        }

        return true;
    }
private function shouldExecuteCallback ( $ msg ) { if ( $ this -> pattern ) { return ( bool ) preg_match ( $ this -> pattern , $ msg , $ this -> matches ) ; } return true ; }
Tests the pattern against the given string.

@param string $msg The string to test.

@return boolean True if the pattern matched anything, false otherwise.
Tests the pattern against the given string .