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
  • PHP

Classes

  • ConventionalReflection
  • DiscoveredReflection
  • Overview
  • Package
  • Class
  • Tree

Class DiscoveredReflection

Reflection metadata class with discovery for a database.

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

Create autodiscovery structure.

Create autodiscovery structure.

Parameters

$storage
ICacheStorage
public
# setConnection( Connection $connection )

Injects database connection.

Injects database connection.

Parameters

$connection
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)

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)

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( 'primary' => array(), 'hasMany' => array(), 'belongsTo' => array(), )
#
Nette Framework 2.0.0 (for PHP 5.2, un-prefixed) API API documentation generated by ApiGen 2.7.0