本文整理汇总了PHP中Illuminate\Database\Connection::getSchemaGrammar方法的典型用法代码示例。如果您正苦于以下问题:PHP Connection::getSchemaGrammar方法的具体用法?PHP Connection::getSchemaGrammar怎么用?PHP Connection::getSchemaGrammar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Database\Connection
的用法示例。
在下文中一共展示了Connection::getSchemaGrammar方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(\Illuminate\Database\Connection $connection)
{
if (!$connection->getSchemaGrammar()) {
$connection->useDefaultGrammar();
}
parent::__construct($connection);
}
示例2: __construct
/**
* @param Connection $connection
*/
public function __construct(Connection $connection)
{
$this->connection = $connection;
$this->grammar = $connection->getSchemaGrammar();
$this->helper = new OracleAutoIncrementHelper($connection);
$this->comment = new Comment($connection);
}
示例3: __construct
/**
* Create a new database Schema manager.
*
* @param \Illuminate\Database\Connection $connection
* @return void
*/
public function __construct(Connection $connection)
{
$this->connection = $connection;
$this->grammar = $connection->getSchemaGrammar();
}
示例4: __construct
public function __construct(Connection $connection, ParameterBag $param)
{
$this->param = $param;
$this->connection = $connection;
$this->schema = $connection->getSchemaGrammar();
}
示例5: __construct
/**
* Preparar Migration.
*/
public function __construct()
{
$this->con = app('db')->connection($this->getConnection());
$this->builder = $this->con->getSchemaBuilder();
$this->grammar = $this->con->getSchemaGrammar();
}
示例6: getSchemaGrammar
/**
* Get the schema grammar out of a migration connection.
*
* @param \Illuminate\Database\Connection $connection
* @return \Illuminate\Database\Schema\Grammars\Grammar
*/
protected function getSchemaGrammar($connection)
{
if (is_null($grammar = $connection->getSchemaGrammar())) {
$connection->useDefaultSchemaGrammar();
$grammar = $connection->getSchemaGrammar();
}
return $grammar;
}