-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExpression.php
More file actions
55 lines (48 loc) · 906 Bytes
/
Expression.php
File metadata and controls
55 lines (48 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
namespace Orchestra\Support;
use Illuminate\Contracts\Support\Htmlable;
class Expression implements Htmlable
{
/**
* The value of the expression.
*
* @var string
*/
protected $value;
/**
* Create a new expression instance.
*
* @param string $value
*/
public function __construct(string $value)
{
$this->value = $value;
}
/**
* Get the string value of the expression.
*
* @return string
*/
public function get(): string
{
return $this->value;
}
/**
* Get content as a string of HTML.
*
* @return string
*/
public function toHtml(): string
{
return $this->get();
}
/**
* Get the string value of the expression.
*
* @return string
*/
public function __toString()
{
return $this->get();
}
}