Lines Matching refs:attribute

30  * Represents an entry attribute and any values.
49 protected $attribute;
67 * @param string $attribute
70 public function __construct(string $attribute, ...$values)
72 $this->attribute = $attribute;
77 * Add a value, or values, to the attribute.
92 * Check if the attribute has a specific value.
103 * Remove a specific value, or values, from an attribute.
132 * Set the values for the attribute.
153 return $this->attribute;
157 * Gets the full AttributeDescription (RFC 4512, 2.5), which contains the attribute type (name) and options.
167 * Gets any values associated with the attribute.
177 * Retrieve the first value of the attribute.
187 * Retrieve the last value of the attribute.
234 * @param Attribute $attribute
238 public function equals(Attribute $attribute, bool $strict = false): bool
241 $attribute->options();
243 $this->lcAttribute = strtolower($this->attribute);
245 if ($attribute->lcAttribute === null) {
246 $attribute->lcAttribute = strtolower($attribute->attribute);
248 $nameMatches = ($this->lcAttribute === $attribute->lcAttribute);
250 # Only the name of the attribute is checked for by default.
251 # If strict is selected, or the attribute to be checked has explicit options, then the opposing attribute must too
252 if ($strict || $attribute->hasOptions()) {
253 return $nameMatches && ($this->getOptions()->toString(true) === $attribute->getOptions()->toString(true));
268 * Escape an attribute value for a filter.
284 * A one time check and load of any attribute options.
291 if (strpos($this->attribute, ';') === false) {
296 $options = explode(';', $this->attribute);
297 $this->attribute = (string) array_shift($options);