CodeIgniter v4.6 API

TableName
in package

Represents a table name in SQL.

Tags
interal
see
TableNameTest

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

$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
self

fromActualName()

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
self

fromFullName()

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
self

getActualTableName()

Returns the actual single segment table name w/z DB prefix.

public getActualTableName() : string
Return values
string

getAlias()

public getAlias() : string
Return values
string

getDatabase()

public getDatabase() : string
Return values
string

getSchema()

public getSchema() : string
Return values
string

getTableName()

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


        
On this page

Search results