Adam Pippin
3 years ago
5 changed files with 179 additions and 2 deletions
@ -0,0 +1,18 @@ |
|||
<?php |
|||
|
|||
declare(strict_types=1); |
|||
|
|||
namespace App\Dom; |
|||
|
|||
/** |
|||
* Node in a document that represents a function call. |
|||
* |
|||
* @author Adam Pippin <hello@adampippin.ca> |
|||
*/ |
|||
class NodeFunction extends Node |
|||
{ |
|||
public function __construct(Node $parent, ?string $name) |
|||
{ |
|||
parent::__construct($parent, $name); |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
<?php |
|||
|
|||
declare(strict_types=1); |
|||
|
|||
namespace App\Dom; |
|||
|
|||
/** |
|||
* Node in a document that represents a function call with a value. |
|||
* |
|||
* @author Adam Pippin <hello@adampippin.ca> |
|||
*/ |
|||
class NodeFunctionValue extends NodeFunction |
|||
{ |
|||
/** @var mixed */ |
|||
protected $value; |
|||
|
|||
public function __construct(Node $parent, ?string $name, $value) |
|||
{ |
|||
parent::__construct($parent, $name); |
|||
$this->value = $value; |
|||
} |
|||
|
|||
public function setValue($value) |
|||
{ |
|||
$this->value = $value; |
|||
} |
|||
|
|||
public function getValue() |
|||
{ |
|||
return $this->value; |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
<?php |
|||
|
|||
declare(strict_types=1); |
|||
|
|||
namespace App\Dom; |
|||
|
|||
/** |
|||
* Node in a document that contains a value. |
|||
* |
|||
* @author Adam Pippin <hello@adampippin.ca> |
|||
*/ |
|||
class NodeValue extends Node |
|||
{ |
|||
/** @var mixed */ |
|||
protected $value; |
|||
|
|||
public function __construct(Node $parent, ?string $name, $value) |
|||
{ |
|||
parent::__construct($parent, $name); |
|||
$this->value = $value; |
|||
} |
|||
|
|||
public function setValue($value) |
|||
{ |
|||
$this->value = $value; |
|||
} |
|||
|
|||
public function getValue() |
|||
{ |
|||
return $this->value; |
|||
} |
|||
} |
Loading…
Reference in new issue