Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • none

Classes

Exceptions

  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class DiscoveredReflection

Reflection metadata class with discovery for a database.

Object
Extended by DiscoveredReflection implements IReflection
Package: Nette\Database\Reflection
Author: Jan Skrasek
Located at Database/Reflection/DiscoveredReflection.php
Methods summary
public
# __construct( ICacheStorage $storage = NULL )

Create autodiscovery structure.

Create autodiscovery structure.

public
# setConnection( Connection $connection )

Injects database connection.

Injects database connection.

Implementation of

IReflection::setConnection()
public
# __destruct( )
public string
# getPrimary( string $table )

Gets primary key of $table.

Gets primary key of $table.

Parameters

$table
string

Returns

string

Implementation of

IReflection::getPrimary()
public array
# getHasManyReference( string $table, string $key, $refresh = TRUE )

Gets referenced table & referenced column. Example:
author, book returns array(book, author_id)

Gets referenced table & referenced column. Example: author, book returns array(book, author_id)

Parameters

$table
string
source table
$key
string
referencing key
$refresh

Returns

array
array(referenced table, referenced column)

Throws

MissingReferenceException
AmbiguousReferenceKeyException

Implementation of

IReflection::getHasManyReference()
public array
# getBelongsToReference( string $table, string $key, $refresh = TRUE )

Gets referenced table & referencing column. Example
book, author returns array(author, author_id)
book, translator returns array(author, translator_id)

Gets referenced table & referencing column. Example book, author returns array(author, author_id) book, translator returns array(author, translator_id)

Parameters

$table
string
source table
$key
string
referencing key
$refresh

Returns

array
array(referenced table, referencing column)

Throws

MissingReferenceException

Implementation of

IReflection::getBelongsToReference()
protected
# reloadAllForeignKeys( )
protected
# reloadForeignKeys( $table )
Methods inherited from Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants inherited from IReflection
FIELD_BINARY, FIELD_BOOL, FIELD_DATE, FIELD_DATETIME, FIELD_FLOAT, FIELD_INTEGER, FIELD_TEXT, FIELD_TIME
Properties summary
protected Cache $cache
#
protected ICacheStorage $cacheStorage
#
protected Connection $connection
#
protected array $structure array()
#
protected array $loadedStructure
#
Magic properties summary
public write-only Connection $connection
#
Magic properties inherited from Object
$reflection
Nette Framework 2.0.18 (for PHP 5.2, un-prefixed) API documentation generated by ApiGen 2.8.0