Overview

Namespaces

  • Budovy
  • Kdyby
    • BootstrapFormRenderer
      • DI
      • Latte
  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Diagnostics
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
      • Diagnostics
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • PhpGenerator
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
  • NetteModule
  • Nextras
    • Datagrid
  • None
  • PHP
  • Tester
    • CodeCoverage
    • Runner
      • Output
  • Vodacek
    • Forms
      • Controls
  • WebLoader
    • Filter
    • Nette

Classes

  • ConventionalReflection
  • DiscoveredReflection

Exceptions

  • AmbiguousReferenceKeyException
  • MissingReferenceException
  • Overview
  • Namespace
  • Class
  • Tree

Class DiscoveredReflection

Reflection metadata class with discovery for a database.

Nette\Object
Extended by Nette\Database\Reflection\DiscoveredReflection implements Nette\Database\IReflection
Namespace: Nette\Database\Reflection
Author: Jan Skrasek
Located at vendor/nette/nette/Nette/Database/Reflection/DiscoveredReflection.php
Methods summary
public
# __construct( Nette\Database\Connection $connection, Nette\Caching\IStorage $cacheStorage = NULL )

Create autodiscovery structure.

Create autodiscovery structure.

public
# __destruct( )
public string|array
# getPrimary( string $table )

Gets primary key of $table.

Gets primary key of $table.

Parameters

$table
string

Returns

string|array

Implementation of

Nette\Database\IReflection::getPrimary()
public array
# getHasManyReference( string $table, string $key, mixed $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

Reflection\MissingReferenceException
Reflection\AmbiguousReferenceKeyException

Implementation of

Nette\Database\IReflection::getHasManyReference()
public array
# getBelongsToReference( string $table, string $key, mixed $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

Reflection\MissingReferenceException

Implementation of

Nette\Database\IReflection::getBelongsToReference()
protected
# reloadAllForeignKeys( )
protected
# reloadForeignKeys( mixed $table )
Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants inherited from Nette\Database\IReflection
FIELD_BINARY, FIELD_BOOL, FIELD_DATE, FIELD_DATETIME, FIELD_FLOAT, FIELD_INTEGER, FIELD_TEXT, FIELD_TIME, FIELD_TIME_INTERVAL, FIELD_UNIX_TIMESTAMP
Properties summary
protected Nette\Database\Connection $connection
#
protected Nette\Caching\Cache $cache
#
protected array $structure array()
#
protected array $loadedStructure
#
Magic properties inherited from Nette\Object
$reflection
API documentation generated by ApiGen 2.8.0