1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (https://nette.org)
5: * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
6: */
7:
8: namespace Nette\Database;
9:
10: use Nette;
11:
12:
13: /**
14: * SQL literal value.
15: */
16: class SqlLiteral
17: {
18: use Nette\SmartObject;
19:
20: /** @var string */
21: private $value;
22:
23: /** @var array */
24: private $parameters;
25:
26:
27: public function __construct($value, array $parameters = [])
28: {
29: $this->value = (string) $value;
30: $this->parameters = $parameters;
31: }
32:
33:
34: /**
35: * @return array
36: */
37: public function getParameters()
38: {
39: return $this->parameters;
40: }
41:
42:
43: /**
44: * @return string
45: */
46: public function __toString()
47: {
48: return $this->value;
49: }
50: }
51: