public function isMet(array $trigger, array $data)
    {
        $result = null;
        $this->hook->attach('condition.met.before', $trigger, $data, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        if (empty($trigger['data']['conditions'])) {
            return false;
        }

        $result = true;
        $this->processed = array();

        foreach ($trigger['data']['conditions'] as $condition) {

            if ($this->callHandler($condition, $data) !== true) {
                $result = false;
                break;
            }

            $this->processed[] = $condition['id'];
        }

        $this->hook->attach('condition.met.after', $trigger, $data, $result, $this);
        return (bool) $result;
    }
public function isMet(array $trigger, array $data)
    {
        $result = null;
        $this->hook->attach('condition.met.before', $trigger, $data, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        if (empty($trigger['data']['conditions'])) {
            return false;
        }

        $result = true;
        $this->processed = array();

        foreach ($trigger['data']['conditions'] as $condition) {

            if ($this->callHandler($condition, $data) !== true) {
                $result = false;
                break;
            }

            $this->processed[] = $condition['id'];
        }

        $this->hook->attach('condition.met.after', $trigger, $data, $result, $this);
        return (bool) $result;
    }
public function isMet ( array $ trigger , array $ data ) { $ result = null ; $ this -> hook -> attach ( 'condition.met.before' , $ trigger , $ data , $ result , $ this ) ; if ( isset ( $ result ) ) { return ( bool ) $ result ; } if ( empty ( $ trigger [ 'data' ] [ 'conditions' ] ) ) { return false ; } $ result = true ; $ this -> processed = array ( ) ; foreach ( $ trigger [ 'data' ] [ 'conditions' ] as $ condition ) { if ( $ this -> callHandler ( $ condition , $ data ) !== true ) { $ result = false ; break ; } $ this -> processed [ ] = $ condition [ 'id' ] ; } $ this -> hook -> attach ( 'condition.met.after' , $ trigger , $ data , $ result , $ this ) ; return ( bool ) $ result ; }
Whether all conditions are met
@param array $trigger
@param array $data
@return boolean
Whether all conditions are met