PHP Класс mtv\models\Collection

Наследование: implements Iterato\Iterator, implements ArrayAcces\ArrayAccess, implements Countabl\Countable
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$default_filter
$model
$models

Открытые методы

Метод Описание
__construct ( $array = [] )
add ( $model ) Add a model instance to this collection
all ( ) Return a collection containing all model instances
clear ( ) Remove all model instances from this collection
count ( ) Countable interface Makes count($collection) work
current ( ) Makes a collection iterable like an array
filter ( $args ) Return a collection containing model instances matching certian criteria
get ( $args ) Create, fetch and return a single model instance with primary keys
get_by ( $args ) Create, fetch and return a single model instances based on some unique keys
key ( )
next ( )
offsetExists ( $offset ) ArrayAccess interface Makes a collection object addressable like an array
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
rewind ( )
to_json ( ) Return the results of calling to_json on all the model instances in this collection
valid ( )
values ( ) Return specific values from all the model instances in this collection TODO: Return all values if no params are given

Описание методов

__construct() публичный Метод

public __construct ( $array = [] )

add() публичный Метод

Add a model instance to this collection
public add ( $model )

all() публичный статический Метод

Return a collection containing all model instances
public static all ( )

clear() публичный Метод

Remove all model instances from this collection
public clear ( )

count() публичный Метод

Countable interface Makes count($collection) work
public count ( )

current() публичный Метод

Makes a collection iterable like an array
public current ( )

filter() публичный статический Метод

Return a collection containing model instances matching certian criteria
public static filter ( $args )

get() публичный статический Метод

Create, fetch and return a single model instance with primary keys
public static get ( $args )

get_by() публичный статический Метод

Create, fetch and return a single model instances based on some unique keys
public static get_by ( $args )

key() публичный Метод

public key ( )

next() публичный Метод

public next ( )

offsetExists() публичный Метод

ArrayAccess interface Makes a collection object addressable like an array
public offsetExists ( $offset )

offsetGet() публичный Метод

public offsetGet ( $offset )

offsetSet() публичный Метод

public offsetSet ( $offset, $value )

offsetUnset() публичный Метод

public offsetUnset ( $offset )

rewind() публичный Метод

public rewind ( )

to_json() публичный Метод

Return the results of calling to_json on all the model instances in this collection
public to_json ( )

valid() публичный Метод

public valid ( )

values() публичный Метод

Return specific values from all the model instances in this collection TODO: Return all values if no params are given
public values ( )

Описание свойств

$default_filter публичное статическое свойство

public static $default_filter

$model публичное статическое свойство

public static $model

$models публичное свойство

public $models