@@ -4,15 +4,33 @@ |
||
| 4 | 4 | |
| 5 | 5 | trait FluidAliasesTrait |
| 6 | 6 | { |
| 7 | - public function size() { return $this->length(); } |
|
| 8 | - public function __invoke(...$query) { return $this->query(...$query); } |
|
| 9 | - public function add($child, ...$optionals) { return $this->addChild($child, ...$optionals); } |
|
| 10 | - public function prepend($sibling, ...$optionals) { return $this->prependSibling($sibling, ...$optionals); } |
|
| 11 | - public function append($sibling, ...$optionals) { return $this->appendSibling($sibling, ...$optionals); } |
|
| 12 | - public function attr($name, $value = null) { return $this->setAttribute($name, $value); } |
|
| 13 | - public function text($text) { return $this->setText($text); } |
|
| 14 | - public function cdata($text) { return $this->setCdata($text); } |
|
| 15 | - public function comment($text) { return $this->setComment($text); } |
|
| 7 | + public function size() |
|
| 8 | + { |
|
| 9 | +return $this->length(); } |
|
| 10 | + public function __invoke(...$query) |
|
| 11 | + { |
|
| 12 | +return $this->query(...$query); } |
|
| 13 | + public function add($child, ...$optionals) |
|
| 14 | + { |
|
| 15 | +return $this->addChild($child, ...$optionals); } |
|
| 16 | + public function prepend($sibling, ...$optionals) |
|
| 17 | + { |
|
| 18 | +return $this->prependSibling($sibling, ...$optionals); } |
|
| 19 | + public function append($sibling, ...$optionals) |
|
| 20 | + { |
|
| 21 | +return $this->appendSibling($sibling, ...$optionals); } |
|
| 22 | + public function attr($name, $value = null) |
|
| 23 | + { |
|
| 24 | +return $this->setAttribute($name, $value); } |
|
| 25 | + public function text($text) |
|
| 26 | + { |
|
| 27 | +return $this->setText($text); } |
|
| 28 | + public function cdata($text) |
|
| 29 | + { |
|
| 30 | +return $this->setCdata($text); } |
|
| 31 | + public function comment($text) |
|
| 32 | + { |
|
| 33 | +return $this->setComment($text); } |
|
| 16 | 34 | abstract public function length(); |
| 17 | 35 | abstract public function query(...$query); |
| 18 | 36 | abstract public function addChild($child, ...$optionals); |
@@ -206,19 +206,45 @@ |
||
| 206 | 206 | return $this; |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | - public function query(...$query) { return $this->context()->query(...$query); } |
|
| 210 | - public function times($times, callable $fn = null) { return $this->context()->times($times, $fn); } |
|
| 211 | - public function each(callable $fn) { return $this->context()->each($fn); } |
|
| 212 | - public function map(callable $fn) { return $this->context()->map($fn); } |
|
| 213 | - public function filter(callable $fn) { return $this->context()->filter($fn); } |
|
| 214 | - public function setAttribute($name, $value = null) { $this->context()->setAttribute($name, $value); return $this; } |
|
| 215 | - public function setText($text) { $this->context()->setText($text); return $this; } |
|
| 216 | - public function addText($text) { $this->context()->addText($text); return $this; } |
|
| 217 | - public function setCdata($text) { $this->context()->setCdata($text); return $this; } |
|
| 218 | - public function addCdata($text) { $this->context()->addCdata($text); return $this; } |
|
| 219 | - public function setComment($text) { $this->context()->setComment($text); return $this; } |
|
| 220 | - public function addComment($text) { $this->context()->addComment($text); return $this; } |
|
| 221 | - public function remove(...$query) { $this->context()->remove(...$query); return $this; } |
|
| 209 | + public function query(...$query) |
|
| 210 | + { |
|
| 211 | +return $this->context()->query(...$query); } |
|
| 212 | + public function times($times, callable $fn = null) |
|
| 213 | + { |
|
| 214 | +return $this->context()->times($times, $fn); } |
|
| 215 | + public function each(callable $fn) |
|
| 216 | + { |
|
| 217 | +return $this->context()->each($fn); } |
|
| 218 | + public function map(callable $fn) |
|
| 219 | + { |
|
| 220 | +return $this->context()->map($fn); } |
|
| 221 | + public function filter(callable $fn) |
|
| 222 | + { |
|
| 223 | +return $this->context()->filter($fn); } |
|
| 224 | + public function setAttribute($name, $value = null) |
|
| 225 | + { |
|
| 226 | +$this->context()->setAttribute($name, $value); return $this; } |
|
| 227 | + public function setText($text) |
|
| 228 | + { |
|
| 229 | +$this->context()->setText($text); return $this; } |
|
| 230 | + public function addText($text) |
|
| 231 | + { |
|
| 232 | +$this->context()->addText($text); return $this; } |
|
| 233 | + public function setCdata($text) |
|
| 234 | + { |
|
| 235 | +$this->context()->setCdata($text); return $this; } |
|
| 236 | + public function addCdata($text) |
|
| 237 | + { |
|
| 238 | +$this->context()->addCdata($text); return $this; } |
|
| 239 | + public function setComment($text) |
|
| 240 | + { |
|
| 241 | +$this->context()->setComment($text); return $this; } |
|
| 242 | + public function addComment($text) |
|
| 243 | + { |
|
| 244 | +$this->context()->addComment($text); return $this; } |
|
| 245 | + public function remove(...$query) |
|
| 246 | + { |
|
| 247 | +$this->context()->remove(...$query); return $this; } |
|
| 222 | 248 | |
| 223 | 249 | public function addChild($child, ...$optionals) |
| 224 | 250 | { |