Lines Matching refs:attributes

63     protected $attributes = array();  variable in HTML_Common2
147 $attributes = array();
159 $attributes[strtolower($name)] = strtolower($name);
164 $attributes[strtolower($name)] = $value;
168 return $attributes;
177 protected static function prepareAttributes($attributes) argument
180 if (is_string($attributes)) {
181 return self::parseAttributes($attributes);
183 } elseif (is_array($attributes)) {
184 foreach ($attributes as $key => $value) {
202 protected static function removeAttributeArray(&$attributes, $name) argument
204 unset($attributes[strtolower($name)]);
213 protected static function getAttributesString($attributes) argument
216 if (is_array($attributes)) {
218 foreach ($attributes as $key => $value) {
230 public function __construct($attributes = null) argument
232 $this->mergeAttributes($attributes);
251 $this->attributes[$name] = (string)$value;
265 return isset($this->attributes[$name])? $this->attributes[$name]: null;
274 public function setAttributes($attributes) argument
276 $attributes = self::prepareAttributes($attributes);
279 if (isset($attributes[$watchedKey])) {
280 $this->setAttribute($watchedKey, $attributes[$watchedKey]);
281 unset($attributes[$watchedKey]);
285 if (isset($this->attributes[$watchedKey])) {
286 $watched[$watchedKey] = $this->attributes[$watchedKey];
289 $this->attributes = array_merge($watched, $attributes);
302 return self::getAttributesString($this->attributes);
304 return $this->attributes;
314 public function mergeAttributes($attributes) argument
316 $attributes = self::prepareAttributes($attributes);
318 if (isset($attributes[$watchedKey])) {
319 $this->onAttributeChange($watchedKey, $attributes[$watchedKey]);
320 unset($attributes[$watchedKey]);
323 $this->attributes = array_merge($this->attributes, $attributes);
338 self::removeAttributeArray($this->attributes, $attribute);