public function validate($interchange)
    {
        $this->interchange = $interchange;
        $this->aliases = array();
        // PHP is a bit lax with integer <=> string conversions in
        // arrays, so we don't use the identical !== comparison
        foreach ($interchange->directives as $i => $directive) {
            $id = $directive->id->toString();
            if ($i != $id) {
                $this->error(false, "Integrity violation: key '$i' does not match internal id '$id'");
            }
            $this->validateDirective($directive);
        }
        return true;
    }
public function validate($interchange)
    {
        $this->interchange = $interchange;
        $this->aliases = array();
        // PHP is a bit lax with integer <=> string conversions in
        // arrays, so we don't use the identical !== comparison
        foreach ($interchange->directives as $i => $directive) {
            $id = $directive->id->toString();
            if ($i != $id) {
                $this->error(false, "Integrity violation: key '$i' does not match internal id '$id'");
            }
            $this->validateDirective($directive);
        }
        return true;
    }
public function validate ( $ interchange ) { $ this -> interchange = $ interchange ; $ this -> aliases = array ( ) ; // PHP is a bit lax with integer <=> string conversions in // arrays, so we don't use the identical !== comparison foreach ( $ interchange -> directives as $ i => $ directive ) { $ id = $ directive -> id -> toString ( ) ; if ( $ i != $ id ) { $ this -> error ( false , "Integrity violation: key '$i' does not match internal id '$id'" ) ; } $ this -> validateDirective ( $ directive ) ; } return true ; }
Validates a fully-formed interchange object.
@param HTMLPurifier_ConfigSchema_Interchange $interchange
@return bool
Validates a fully - formed interchange object .