xplo.re Medusa Core Framework 3.2
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Event
  • Todo
  • Download

Namespaces

  • Core
    • Authentication
      • Auto
        • Driver
      • Driver
    • Cache
      • Driver
    • Charset
      • Driver
    • Configuration
      • Driver
    • Controller
    • Converter
      • Driver
    • Decoder
      • Driver
    • Encoder
      • Driver
    • Env
      • Authentication
      • Locale
      • Proxy
      • Server
        • HTTP
        • Redirect
        • X
    • Exception
    • Exchange
      • Driver
    • Fault
      • Formatter
        • Driver
      • Incident
        • Exception
      • Reporter
        • Driver
    • Field
    • Filter
      • Driver
    • Formatter
      • Driver
        • coreuimarkup
          • Token
    • Hash
    • Loader
    • Locale
    • Log
      • Driver
    • Module
      • Dependency
        • Requirement
          • Core
          • PHP
      • Linkage
        • Driver
    • PDF
    • Plugin
    • Query
      • Driver
    • Server
      • Driver
    • Session
      • Driver
    • Set
    • Storage
      • Driver
      • Field
        • Element
    • Stream
      • Driver
    • String
    • Translation
      • Driver
      • Language
        • Driver
    • Type
    • URI
      • Driver
    • Version
    • View
      • Driver
        • coreui
          • Control
            • Button
            • Table
          • Element
        • htmlbuilder
          • Tags
        • yui
          • Modules
  • None
  • PHP

Classes

  • Authentication
  • Authentication_Token
  • AutoLoader
  • Cache
  • Charset
  • ClassDescriptor
  • Closure
  • Configuration
  • Controller
  • Converter
  • Date
  • Decoder
  • Delegate
  • Dispatcher
  • Encoder
  • Env
  • Env_Field
  • Env_File
  • Env_FileList
  • Env_Request
  • Env_SERVER
  • Exchange
  • Fault
  • Field
  • Filter
  • Filter_Value
  • Formatter
  • Hash
  • IP
  • Loader
  • Locale
  • Locale_Node
  • Log
  • Module
  • Module_Iterator
  • Nothing
  • Object
  • OS
  • Plugin
  • Profiler
  • Query
  • Registry
  • Resource
  • Server
  • Session
  • Session_Token
  • Set
  • Storage
  • Storage_Result
  • Storage_Statement
  • Stream
  • Translation
  • URI
  • URI_Parameters
  • UUID
  • Value
  • Version
  • View

Interfaces

  • Accessor
  • Chainable
  • Comparable
  • Configurable
  • Equality
  • Identity
  • Inquiry
  • Masquerade
  • Mutator
  • SeekableStream
  • Storable
  • Variator

Exceptions

  • Exception

Constants

  • Copyright
  • ProductName
  • Version

Class Storage

Base class for storage driver implementations and driver factory interface.

Core\Object implements Core\Chainable
Extended by Core\Set implements Core\Accessor
Extended by Core\Storage

Direct known subclasses

Core\Storage\Driver\mysql, Core\Storage\Driver\odbc, Core\Storage\Driver\sqlite2, Core\Storage\Driver\sqlite3

Abstract
Namespace: Core
Package: Core\Storage
Since: 3.0
Requires: PHP 5.3
Version: 1.1
Located at Storage.inc.php

Methods summary

public static Core\Storage
# autocreate( Core\URI $uri )

Storage driver factory.

Storage driver factory.

Parameters

$uri
Driver configuration URI.

Returns

Core\Storage

New specific storage driver instance on success, otherwise an exception is thrown.

Throws

Core\Exception\InvalidDriver
The storage engine described by the given URI is not available.

Since

3.0
abstract public string
# backendVersion( )

Returns the back-end version string. Some drivers use different layers for their backend storage (e.g. an interface library and a server) with different versions for each layer. The most basic layer, available and significant version is returned (e.g. the database server version).

Returns the back-end version string. Some drivers use different layers for their backend storage (e.g. an interface library and a server) with different versions for each layer. The most basic layer, available and significant version is returned (e.g. the database server version).

Returns

string
Back-end system version string.

See

Core\Storage::clientVersion()

Since

3.0
abstract public string|false
# begin( )

Begins a new (nested) transaction.

Begins a new (nested) transaction.

Returns

string|false

A transaction ID on success or false, if the transaction could not be started due to a non-fatal error (e.g. the storage engine does not support transactions). Otherwise an exception is thrown.

A non-zero return value does not guarantee that the storage system actually fully supports transaction but merely understands the syntax.

See

Core\Storage::commit()
Core\Storage::rollback()

Since

3.0
abstract public string
# clientVersion( )

Returns the client version string. Some drivers use different layers for their back-end storage (e.g. an interface library and a server) with different versions for each layer. The highest layer, available and significant version is returned (e.g. the database client version).

Returns the client version string. Some drivers use different layers for their back-end storage (e.g. an interface library and a server) with different versions for each layer. The highest layer, available and significant version is returned (e.g. the database client version).

Returns

string
Client system version string.

See

Core\Storage::backendVersion()

Since

3.0
abstract public
# commit( )

Commits the currently active transaction.

Commits the currently active transaction.

See

Core\Storage::begin()
Core\Storage::rollback()

Since

3.0
abstract public string
# escape( string $value, boolean $addDelimiters = false )

Escapes a binary string specific to the storage back-end for direct usage. When performing direct commands on the back-end engine, most storage systems require the user to escaped data sequences (e.g. SQL). Each data sequence used for direct commands should therefore be preprocessed by this method prior to sending the command.

Escapes a binary string specific to the storage back-end for direct usage. When performing direct commands on the back-end engine, most storage systems require the user to escaped data sequences (e.g. SQL). Each data sequence used for direct commands should therefore be preprocessed by this method prior to sending the command.

Parameters

$value
Binary string to escape.
$addDelimiters

Optional. Controls whether the escaped data sequence should be packed into data sequence delimiters (e.g. string markers).

Returns

string
Escaped input string.

Since

3.0
abstract public Core\Storage_Result
# execute( mixed $statement, array $parameters = null )

Executes an accessor node, prepared storage statement or direct back-end query.

Executes an accessor node, prepared storage statement or direct back-end query.

Parameters

$statement

Prepared storage statement, raw storage accessor node or binary back-end specific query string for execution.

$parameters
Associative array of parameter values (including bindings).

Returns

Core\Storage_Result
Driver-specific result object on success, otherwise an exception is thrown.

Since

3.0
abstract public Core\Storage_Statement
# prepare( Core\Storage\Accessor_Node $query )

Prepares a query for optimised repeated execution.

Prepares a query for optimised repeated execution.

Parameters

$query
Storage accessor node to prepare for execution.

Returns

Core\Storage_Statement

Prepared driver-specific storage statement on success, otherwise an exception is thrown.

Since

3.0
abstract public
# reset( )

Resets the storage interface. To be used after environmental changes, e.g. a character set change.

Resets the storage interface. To be used after environmental changes, e.g. a character set change.

Since

3.0
abstract public
# rollback( )

Cancels the currently active transaction.

Cancels the currently active transaction.

See

Core\Storage::begin()
Core\Storage::commit()

Since

3.0

Methods inherited from Core\Set

__get(), __isset()

Methods inherited from Core\Object

__autocreateFactory(), __call(), __processParameters(), __toString(), attachMethod(), chain(), getValueForKey(), getValueForKeyPath(), getValueForUndefinedKey(), hash(), issetValueForKey(), setValueForKey(), setValueForKeyPath(), setValueForUndefinedKey(), uuid()

Constants summary

string ContextArgument

Execution argument for context.

Execution argument for context.

Since

3.0
# 'context-argument'
string Parameters

Execution argument for bound parameters.

Execution argument for bound parameters.

Since

3.0
# 'parameters'
string RowClass

Execution argument for auto-embedding result rows in the given class name.

Execution argument for auto-embedding result rows in the given class name.

Since

3.0
# 'row-class'
integer DuplicateKeyError

Unified error code for a duplicate key.

Unified error code for a duplicate key.

Since

3.0
# 0x23000

Constants inherited from Core\Object

AnyParameterType, AutochainParameterType, AutocreateParameterType, BooleanParameterType, CharParameterType, EnumParameterType, IntegerParameterType, RealParameterType, StringParameterType, UserParameterType

Properties summary

protected integer $_v_affectedRows

Cached number of affected rows by latest executed update query.

Cached number of affected rows by latest executed update query.

Since

3.0
# 0
protected integer $_v_insertID

Cached insert ID of latest backend query. Only valid for executed insert statements.

Cached insert ID of latest backend query. Only valid for executed insert statements.

Since

3.0
# 0

Magic properties

public read-only integer $affectedRows

Cached numer of rows affected by last back-end query.

public read-only integer $insertID

Cached ID of last back-end insertion query.

Magic properties inherited from Core\Object

$hash, $uuid

xplo.re Medusa Core Framework 3.2 API documentation generated by ApiGen