added support for database expressions.

This commit is contained in:
Taylor Otwell
2011-10-12 19:55:44 -05:00
parent 76400967d9
commit 68455378cc
5 changed files with 123 additions and 21 deletions

View File

@@ -0,0 +1,43 @@
<?php namespace Laravel\Database;
class Expression {
/**
* The value of the database expression.
*
* @var string
*/
protected $value;
/**
* Create a new database expression instance.
*
* @param string $value
* @return void
*/
public function __construct($value)
{
$this->value = $value;
}
/**
* Get the string value of the database expression.
*
* @return string
*/
public function get()
{
return $this->value;
}
/**
* Get the string value of the database expression.
*
* @return string
*/
public function __toString()
{
return $this->get();
}
}