Interface ISingle
-
MvcCore\Ext\Models\Db\Readers\ISingle
implements
MvcCore\Ext\Models\Db\IReader
Methods summary
public
object
|
#
ToInstance( string $fullClassName, integer $readingFlags = 0 )
Read single fetched row into instances by given full class name and reading flags.
Read single fetched row into instances by given full class name and reading flags.
Parameters
- $fullClassName
- $readingFlags
Returns
object
|
public
array
|
#
ToArray( )
Read single fetched row into associative array with keys by SQL query columns.
Read single fetched row into associative array with keys by SQL query columns.
Returns
array
|
public
stdClass
|
#
ToObject( )
Read single fetched row into \stdClass object with item keys by SQL query columns.
Read single fetched row into \stdClass object with item keys by SQL query columns.
Returns
stdClass
|
public
integer|float|string|boolean|null
|
#
ToScalar( string $valueColumnName, string $valueType = NULL )
Read single fetched row into scalar value by first row column.
Read single fetched row into scalar value by first row column.
Parameters
- $valueColumnName
- $valueType
Returns
integer|float|string|boolean|null
|
public
mixed
|
#
ToAny( callable $valueCompleter, string $keyColumnName,…, string $keyType,… )
Read single fetched row into custom item created by given callable completer called for the row.
Callable has to accept one argument - raw row result.
Callable completer has to return created result item instance.
Read single fetched row into custom item created by given callable completer called for the row.
Callable has to accept one argument - raw row result.
Callable completer has to return created result item instance.
Parameters
- $valueCompleter
- $valueColumnName
- $keyColumnName,…
- $keyType,…
Returns
mixed
|