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: * @author Jakub Vrana
17: * @author Jan Skrasek
18: */
19: class SqlLiteral extends Nette\Object
20: {
21: /** @var string */
22: private $value;
23:
24: /** @var array */
25: private $parameters;
26:
27:
28: public function __construct($value, array $parameters = array())
29: {
30: $this->value = (string) $value;
31: $this->parameters = $parameters;
32: }
33:
34:
35: /**
36: * @return array
37: */
38: public function getParameters()
39: {
40: return $this->parameters;
41: }
42:
43:
44: /**
45: * @return string
46: */
47: public function __toString()
48: {
49: return $this->value;
50: }
51:
52: }
53: