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_Result

Base class for storage query execution results.

Core\Object implements Core\Chainable
Extended by Core\Set implements Core\Accessor
Extended by Core\Set\Mutable implements Core\Mutator
Extended by Core\Field implements Core\Inquiry
Extended by Core\Storage_Result implements Countable, Iterator

Direct known subclasses

Core\Storage\SQL_Result

Indirect known subclasses

Core\Storage\Driver\mysql_Result, Core\Storage\Driver\mysql_Result_Statement, Core\Storage\Driver\odbc_Result, Core\Storage\Driver\sqlite2_Result, Core\Storage\Driver\sqlite3_Result

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

Methods summary

public integer
# count( )

Adds compatibility for the PHP count() function. Returns the number of rows in the result set. The same restrictions as for the $rows property apply.

Adds compatibility for the PHP count() function. Returns the number of rows in the result set. The same restrictions as for the $rows property apply.

Returns

integer

Implementation of

Countable::count()
public array|object
# current( )

Returns the current result row (used by iterators).

Returns the current result row (used by iterators).

Returns

array|object

Current raw result row or an instance of the assigned data class with embedded data set.

See

$rowClass

Since

3.0

Implementation of

Iterator::current()
abstract public integer|false
# getAsTimestamp( string $key )

Returns a value from the current result row as a UNIX timestamp. This is only valid for date and time values stored natively by the back-end.

Returns a value from the current result row as a UNIX timestamp. This is only valid for date and time values stored natively by the back-end.

Parameters

$key
Current result row column to return UNIX timestamp for.

Returns

integer|false
UNIX timestamp of result row column on success, otherwise false.

Since

3.0
public integer
# key( )

Returns the current result row index (used by iterators).

Returns the current result row index (used by iterators).

Returns

integer
Current result row index.

See

$position

Since

3.0

Implementation of

Iterator::key()
abstract public
# next( )

Fetches the next result set entry (used by iterators).

Fetches the next result set entry (used by iterators).

Since

3.0

Implementation of

Iterator::next()
abstract public
# rewind( )

Resets the result set to the first entry (used by iterators).

Resets the result set to the first entry (used by iterators).

Remark

Depending on the back-end and fetch mode being used, it may not be possible to restart iterating through the result set.


Since

3.0

Implementation of

Iterator::rewind()
public array|object
# row( )

Alias for current result row.

Alias for current result row.

Returns

array|object

Current raw result row or an instance of the assigned data class with embedded data set.

See

Core\Storage_Result::current()

Since

3.0
public object|false
# unpack( string $key, string|string[] $class )

Returns an instance from a packed column of the current result row.

Returns an instance from a packed column of the current result row.

Parameters

$key
Current result row column to recover instance for.
$class

Class to unpack value for. If the value is an array, the value at the same index is used as a class name. Must implement the Core\Storable interface.

Returns

object|false
Instance recovered from result row column on success, otherwise false.

Throws

Core\Exception\InvalidArgument
Key is not defined in class array.
Core\Exception\InvalidClassName
Destination class does not implement the Core\Storable interface.

Since

3.1
public boolean
# valid( )

Tests, whether the current iteration value is valid (used by iterators).

Tests, whether the current iteration value is valid (used by iterators).

Returns

boolean
true, if the current value is valid, otherwise false.

Since

3.0

Implementation of

Iterator::valid()

Methods inherited from Core\Field

getDataForKey(), getDataForKeys(), getDataForUndefinedKey(), issetDataForKey(), offsetExists(), offsetGet(), offsetSet(), offsetUnset()

Methods inherited from Core\Set\Mutable

__set(), __unset()

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

Constants inherited from Core\Object

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

Properties summary

protected integer $_v_affectedRows

Number of rows affected by the backend query this result set derived from.

Number of rows affected by the backend query this result set derived from.

Since

3.0
# 0
protected $_v_contextArgument

Context argument stored with result set (passed verbatim by driver).

Context argument stored with result set (passed verbatim by driver).

Since

3.1
#
protected Core\Storage $_v_driver

Reference to the specific storage driver interface that returned the result.

Reference to the specific storage driver interface that returned the result.

Since

3.1
#
protected integer $_v_insertID

Insert ID of back-end insert query. Only valid if the result set derived from an executed insert statements.

Insert ID of back-end insert query. Only valid if the result set derived from an executed insert statements.

Since

3.0
#
protected integer $_v_position

Current result row index (same as Core\Storage_Result::key()).

Current result row index (same as Core\Storage_Result::key()).

See

Core\Storage_Result::key()

Since

3.0
# -1
protected string $_v_rowClass

Name of class used to embed data sets in (used with Core\Storage_Result::current()). Defaults to null, which will return raw data arrays instead.

Name of class used to embed data sets in (used with Core\Storage_Result::current()). Defaults to null, which will return raw data arrays instead.

See

Core\Storage_Result::current()

Since

3.1
#
protected integer $_v_rows

Number of rows in result set. For some back-end engine types, this value is always zero, even though there are multiple results, e.g. when using fetch mode with mySQL.

Number of rows in result set. For some back-end engine types, this value is always zero, even though there are multiple results, e.g. when using fetch mode with mySQL.

Since

3.0
#

Properties inherited from Core\Field

$_v_data

Magic properties

public read-only integer $affectedRows

Number of rows affected by the operation that lead to this result.

public read-only mixed $contextArgument
public read-only Core\Storage $driver

Reference to storage driver that created this result.

public read-only integer $insertID

ID of inserted row if the result represents the outcome of an insert operation.

public read-only integer $position

Index of current result row.

public read-only array $row

Associative array of all values of the current storage entry.

public read-only string $rowClass

Name of class each result row is automatically embedded into.

public read-only integer $rows

Number of rows represented by this result. Depending on the back-end fetching mechanism, the number of rows is not known and is set to 0.

Magic properties inherited from Core\Field

$data

Magic properties inherited from Core\Object

$hash, $uuid

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