View
extends AbstractAsset
in package
Representation of a Database View.
Table of Contents
Properties
- $_name : string
- $_namespace : string|null
- Namespace of the asset. If none isset the default namespace is assumed.
- $_quoted : bool
- $sql : string
Methods
- __construct() : mixed
- getFullQualifiedName() : string
- The normalized name is full-qualified and lower-cased. Lower-casing is actually wrong, but we have to do it to keep our sanity. If you are using database objects that only differentiate in the casing (FOO vs Foo) then you will NOT be able to use Doctrine Schema abstraction.
- getName() : string
- Returns the name of this schema asset.
- getNamespaceName() : string|null
- Gets the namespace name of this asset.
- getQuotedName() : string
- Gets the quoted representation of this asset but only if it was defined with one. Otherwise return the plain unquoted value as inserted.
- getShortestName() : string
- The shortest name is stripped of the default namespace. All other namespaced elements are returned as full-qualified names.
- getSql() : string
- isInDefaultNamespace() : bool
- Is this asset in the default namespace?
- isQuoted() : bool
- Checks if this asset's name is quoted.
- _generateIdentifierName() : string
- Generates an identifier from a list of column names obeying a certain string length.
- _setName() : void
- Sets the name of this asset.
- isIdentifierQuoted() : bool
- Checks if this identifier is quoted.
- trimQuotes() : string
- Trim quotes from the identifier.
Properties
$_name
protected
string
$_name
= ''
$_namespace
Namespace of the asset. If none isset the default namespace is assumed.
protected
string|null
$_namespace
$_quoted
protected
bool
$_quoted
= false
$sql
private
string
$sql
Methods
__construct()
public
__construct(string $name, string $sql) : mixed
Parameters
- $name : string
- $sql : string
getFullQualifiedName()
The normalized name is full-qualified and lower-cased. Lower-casing is actually wrong, but we have to do it to keep our sanity. If you are using database objects that only differentiate in the casing (FOO vs Foo) then you will NOT be able to use Doctrine Schema abstraction.
public
getFullQualifiedName(string $defaultNamespaceName) : string
Every non-namespaced element is prefixed with the default namespace name which is passed as argument to this method.
Parameters
- $defaultNamespaceName : string
Tags
Return values
stringgetName()
Returns the name of this schema asset.
public
getName() : string
Return values
stringgetNamespaceName()
Gets the namespace name of this asset.
public
getNamespaceName() : string|null
If NULL is returned this means the default namespace is used.
Return values
string|nullgetQuotedName()
Gets the quoted representation of this asset but only if it was defined with one. Otherwise return the plain unquoted value as inserted.
public
getQuotedName(AbstractPlatform $platform) : string
Parameters
- $platform : AbstractPlatform
Return values
stringgetShortestName()
The shortest name is stripped of the default namespace. All other namespaced elements are returned as full-qualified names.
public
getShortestName(string|null $defaultNamespaceName) : string
Parameters
- $defaultNamespaceName : string|null
Return values
stringgetSql()
public
getSql() : string
Return values
stringisInDefaultNamespace()
Is this asset in the default namespace?
public
isInDefaultNamespace(string $defaultNamespaceName) : bool
Parameters
- $defaultNamespaceName : string
Return values
boolisQuoted()
Checks if this asset's name is quoted.
public
isQuoted() : bool
Return values
bool_generateIdentifierName()
Generates an identifier from a list of column names obeying a certain string length.
protected
_generateIdentifierName(array<string|int, string> $columnNames[, string $prefix = '' ][, int $maxSize = 30 ]) : string
This is especially important for Oracle, since it does not allow identifiers larger than 30 chars, however building idents automatically for foreign keys, composite keys or such can easily create very long names.
Parameters
- $columnNames : array<string|int, string>
- $prefix : string = ''
- $maxSize : int = 30
Return values
string_setName()
Sets the name of this asset.
protected
_setName(string $name) : void
Parameters
- $name : string
isIdentifierQuoted()
Checks if this identifier is quoted.
protected
isIdentifierQuoted(string $identifier) : bool
Parameters
- $identifier : string
Return values
booltrimQuotes()
Trim quotes from the identifier.
protected
trimQuotes(string $identifier) : string
Parameters
- $identifier : string