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