Dotclear 2.24
Loading...
Searching...
No Matches
staticRecord Class Reference

Query Result Static Record Class. More...

Inheritance diagram for staticRecord:
record extStaticRecord

Public Member Functions

 __construct ($result, ?array $info)
 
 field ($n)
 
 exists ($n)
 
 index (?int $row=null)
 
 rows ()
 
 set ($n, $v)
 
 sort ($field, string $order='asc')
 
- Public Member Functions inherited from record
 __construct ($result, array $info)
 
 toStatic ()
 
 __call (string $f, $args)
 
 __get ($n)
 
 f ($n)
 
 field ($n)
 
 exists ($n)
 
 __isset (string $n)
 
 extend (string $class)
 
 extensions ()
 
 index (?int $row=null)
 
 fetch ()
 
 moveStart ()
 
 moveEnd ()
 
 moveNext ()
 
 movePrev ()
 
 isEnd ()
 
 isStart ()
 
 isEmpty ()
 
 count ()
 
 columns ()
 
 rows ()
 
 row ()
 
 current ()
 
 key ()
 
 next ()
 
 rewind ()
 
 valid ()
 

Static Public Member Functions

static newFromArray (?array $data)
 

Data Fields

 $__data = []
 

Additional Inherited Members

- Protected Member Functions inherited from record
 getData ()
 
- Protected Attributes inherited from record
 $__link
 
 $__result
 
 $__info
 
 $__extend = []
 
 $__index = 0
 
 $__row = false
 

Detailed Description

Query Result Static Record Class.

Unlike record class, this one contains all results in an associative array.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $result,
?array  $info 
)

Constructs a new instance.

Parameters
mixed$resultThe result
array$infoThe information

Member Function Documentation

◆ newFromArray()

static newFromArray ( ?array  $data)
static

Static record from array

Returns a new instance of object from an associative array.

Parameters
array$dataData array
Returns
staticRecord

References record\count().

Referenced by dcRecord\newFromArray().

◆ field()

field (   $n)

Get field value

Parameters
string | int$nField name|position
Returns
mixed

Reimplemented from record.

References record\$__index.

◆ exists()

exists (   $n)

Check if a field exists

Parameters
string | int$nField name|position
Returns
bool

Reimplemented from record.

◆ index()

index ( ?int  $row = null)

Get current index

Parameters
int$rowThe row
Returns
bool|int

Reimplemented from record.

References record\$__index.

◆ rows()

rows ( )

Get record rows

Returns
array

Reimplemented from record.

References $__data.

◆ set()

set (   $n,
  $v 
)

Changes value of a given field in the current row.

Parameters
string | int$nField name|position
mixed$vField value
Returns
mixed

References record\$__index.

◆ sort()

sort (   $field,
string  $order = 'asc' 
)

Sorts values by a field in a given order.

Parameters
string | int$fieldField name|position
string$orderSort type (asc or desc)
Returns
mixed

Field Documentation

◆ $__data

$__data = []

Referenced by rows().


The documentation for this class was generated from the following file: