TableName
in package
Represents a table name in SQL.
Tags
Table of Contents
Properties
- $actualTable : string
- $alias : string
- $database : string
- $logicalTable : string
- $schema : string
Methods
- create() : self
- Creates a new instance.
- fromActualName() : self
- Creates a new instance from an actual table name.
- fromFullName() : self
- Creates a new instance from full name.
- getActualTableName() : string
- Returns the actual single segment table name w/z DB prefix.
- getAlias() : string
- getDatabase() : string
- getSchema() : string
- getTableName() : string
- Returns the single segment table name w/o DB prefix.
- __construct() : mixed
Properties
$actualTable read-only
private
string
$actualTable
$alias read-only
private
string
$alias
= ''
$database read-only
private
string
$database
= ''
$logicalTable read-only
private
string
$logicalTable
= ''
$schema read-only
private
string
$schema
= ''
Methods
create()
Creates a new instance.
public
static create(string $dbPrefix, string $table[, string $alias = '' ]) : self
Parameters
- $dbPrefix : string
- $table : string
-
Table name (w/o DB prefix)
- $alias : string = ''
-
Alias name
Return values
selffromActualName()
Creates a new instance from an actual table name.
public
static fromActualName(string $dbPrefix, string $actualTable[, string $alias = '' ]) : self
Parameters
- $dbPrefix : string
- $actualTable : string
-
Actual table name with DB prefix
- $alias : string = ''
-
Alias name
Return values
selffromFullName()
Creates a new instance from full name.
public
static fromFullName(string $dbPrefix, string $table[, string $schema = '' ][, string $database = '' ][, string $alias = '' ]) : self
Parameters
- $dbPrefix : string
- $table : string
-
Table name (w/o DB prefix)
- $schema : string = ''
-
Schema name
- $database : string = ''
-
Database name
- $alias : string = ''
-
Alias name
Return values
selfgetActualTableName()
Returns the actual single segment table name w/z DB prefix.
public
getActualTableName() : string
Return values
stringgetAlias()
public
getAlias() : string
Return values
stringgetDatabase()
public
getDatabase() : string
Return values
stringgetSchema()
public
getSchema() : string
Return values
stringgetTableName()
Returns the single segment table name w/o DB prefix.
public
getTableName() : string
Return values
string__construct()
protected
__construct(string $actualTable[, string $logicalTable = '' ][, string $schema = '' ][, string $database = '' ][, string $alias = '' ]) : mixed
Parameters
- $actualTable : string
-
Actual table name
- $logicalTable : string = ''
-
Logical table name (w/o DB prefix)
- $schema : string = ''
-
Schema name
- $database : string = ''
-
Database name
- $alias : string = ''
-
Alias name