本文整理匯總了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;
}