本文整理匯總了PHP中Illuminate\Database\Grammar類的典型用法代碼示例。如果您正苦於以下問題:PHP Grammar類的具體用法?PHP Grammar怎麽用?PHP Grammar使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Grammar類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: withTablePrefix
/**
* Set the table prefix and return the grammar.
*
* @param \Illuminate\Database\Grammar $grammar
* @return \Illuminate\Database\Grammar
*/
public function withTablePrefix(Grammar $grammar)
{
$grammar->setTablePrefix($this->tablePrefix);
return $grammar;
}
示例2: withSchemaPrefix
/**
* Set the schema prefix and return the grammar.
*
* @param \Illuminate\Database\Grammar|\Yajra\Oci8\Query\Grammars\OracleGrammar|\Yajra\Oci8\Schema\Grammars\OracleGrammar $grammar
* @return \Illuminate\Database\Grammar
*/
public function withSchemaPrefix(Grammar $grammar)
{
$grammar->setSchemaPrefix($this->getConfigSchemaPrefix());
return $grammar;
}
示例3: wrap
/**
* Wrap a value in keyword identifiers.
*
* @param string $value
* @return string
*/
public function wrap($value)
{
if ($value instanceof Fluent) {
$value = $value->name;
}
return parent::wrap($value);
}
示例4: wrap
/**
* {@inheritdoc}
*/
public function wrap($value, $prefixAlias = false)
{
if ($value instanceof Fluent) {
$value = $value->name;
}
return parent::wrap($value, $prefixAlias);
}
示例5: getWrapped
/**
* Get qualified name wrapped by the grammar.
*
* @return string
*/
public function getWrapped()
{
return $this->grammar->wrap($this->getQualifiedName());
}