RawValue.php
860 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
<?php 
namespace Phalcon\Db {
	/**
	 * Phalcon\Db\RawValue
	 *
	 * This class allows to insert/update raw data without quoting or formating.
	 *
	 *The next example shows how to use the MySQL now() function as a field value.
	 *
	 *<code>
	 *	$subscriber = new Subscribers();
	 *	$subscriber->email = 'andres@phalconphp.com';
	 *	$subscriber->created_at = new Phalcon\Db\RawValue('now()');
	 *	$subscriber->save();
	 *</code>
	 */
	
	class RawValue {
		protected $_value;
		/**
		 * \Phalcon\Db\RawValue constructor
		 *
		 * @param string $value
		 */
		public function __construct($value){ }
		/**
		 * Returns internal raw value without quoting or formating
		 *
		 * @return string
		 */
		public function getValue(){ }
		/**
		 * Magic method __toString returns raw value without quoting or formating
		 */
		public function __toString(){ }
	}
}