src/Plugin/Call/Message.php
public function match($call, $withArgs = true)
    {
        if (preg_match('/^::.*/', $call['name'])) {
            $call['static'] = true;
            $call['name'] = substr($call['name'], 2);
        }

        if (isset($call['static'])) {
            if ($call['static'] !== $this->_static) {
                return false;
            }
        }

        if ($call['name'] !== $this->_name) {
            return false;
        }

        if ($withArgs) {
            return $this->matchArgs($call['args']);
        }

        return true;
    }
public function match($call, $withArgs = true)
    {
        if (preg_match('/^::.*/', $call['name'])) {
            $call['static'] = true;
            $call['name'] = substr($call['name'], 2);
        }

        if (isset($call['static'])) {
            if ($call['static'] !== $this->_static) {
                return false;
            }
        }

        if ($call['name'] !== $this->_name) {
            return false;
        }

        if ($withArgs) {
            return $this->matchArgs($call['args']);
        }

        return true;
    }
public function match ( $ call , $ withArgs = true ) { if ( preg_match ( '/^::.*/' , $ call [ 'name' ] ) ) { $ call [ 'static' ] = true ; $ call [ 'name' ] = substr ( $ call [ 'name' ] , 2 ) ; } if ( isset ( $ call [ 'static' ] ) ) { if ( $ call [ 'static' ] !== $ this -> _static ) { return false ; } } if ( $ call [ 'name' ] !== $ this -> _name ) { return false ; } if ( $ withArgs ) { return $ this -> matchArgs ( $ call [ 'args' ] ) ; } return true ; }
Check if this message is compatible with passed call array.

@param  array   $call     A call array.
@param  boolean $withArgs Boolean indicating if matching should take arguments into account.
@return boolean
Check if this message is compatible with passed call array .