Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
attr.php
1<?php
3
4class Attr extends Node
5{
9 protected $name = null;
10
11 public $value = null;
12
13 public function __construct($name, $value)
14 {
15 parent::__construct();
16
17 $this->nodeType = self::ATTRIBUTE_NODE;
18
19 $this->name = mb_strtolower($name);
20 $this->value = $value;
21 }
22
23 public function toString()
24 {
25 return $this->name . '="' . $this->value . '"';
26 }
27
28 public function getName()
29 {
30 return $this->name;
31 }
32
33 public function setName($name)
34 {
35 $this->name = $name;
36 }
37
38 public function getValue()
39 {
40 return $this->value;
41 }
42
43 public function setValue($value)
44 {
45 $this->value = $value;
46 }
47
48 public function toArray()
49 {
50 return array($this->name => $this->value);
51 }
52}
__construct($name, $value)
Definition attr.php:13