Ejemplo n.º 1
0
 /**
  * Get Attribute object with this as a single value.
  *
  * @return Attribute
  */
 public function toAttribute()
 {
     return Attribute::fromAttributeValues($this);
 }
Ejemplo n.º 2
0
 /**
  * Get self with extension request attribute.
  *
  * @param Extensions $extensions Extensions to request
  * @return self
  */
 public function withExtensionRequest(Extensions $extensions)
 {
     $obj = clone $this;
     if (!isset($obj->_attributes)) {
         $obj->_attributes = new Attributes();
     }
     $obj->_attributes = $obj->_attributes->withUnique(Attribute::fromAttributeValues(new ExtensionRequestValue($extensions)));
     return $obj;
 }