TaoLer/vendor/topthink/think-migration/phinx/Util/Expression.php

42 lines
731 B
PHP
Raw Normal View History

2024-04-01 10:04:16 +08:00
<?php
/**
* MIT License
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
namespace Phinx\Util;
class Expression
{
/**
* @var string The expression
*/
protected $value;
/**
* @param string $value The expression
*/
public function __construct(string $value)
{
$this->value = $value;
}
/**
* @return string Returns the expression
*/
public function __toString(): string
{
return $this->value;
}
/**
* @param string $value The expression
* @return self
*/
public static function from(string $value): Expression
{
return new self($value);
}
}