예제 #1
0
파일: datum.php 프로젝트: wikimedia/avro
 /**
  * Checks equivalence of the given attributes of the two given schemas.
  *
  * @param AvroSchema $schema_one
  * @param AvroSchema $schema_two
  * @param string[] $attribute_names array of string attribute names to compare
  *
  * @return boolean true if the attributes match and false otherwise.
  */
 static function attributes_match($schema_one, $schema_two, $attribute_names)
 {
     foreach ($attribute_names as $attribute_name) {
         if ($schema_one->attribute($attribute_name) != $schema_two->attribute($attribute_name)) {
             return false;
         }
     }
     return true;
 }