Пример #1
0
 /**
  * Constructor
  *
  * @param AttributeType $type Attribute type
  * @param AttributeValue ...$values Attribute values
  */
 public function __construct(AttributeType $type, AttributeValue ...$values)
 {
     // check that attribute values have correct oid
     array_walk($values, function (AttributeValue $value) use($type) {
         if ($value->oid() != $type->oid()) {
             throw new \LogicException("Attribute OID mismatch.");
         }
     });
     $this->_type = $type;
     $this->_values = $values;
 }
Пример #2
0
 /**
  * Get OID of the attribute.
  *
  * @return string
  */
 public function oid()
 {
     return $this->_type->oid();
 }