Class Misago\ActiveRecord\Collection

Contains a collection of records. Used by has_many and HABTM relationships.

Inheritence

Extends:
ActiveSupport

Protected instance attributes

Methods

Public instance methods

__construct($parent, $childs, $options)

asort()

build($attributes=array())

Adds a new record to the collection, but doesn't save it.

clear()

Clears the collection. This doesn't delete the associated records.

create($attributes)

Adds a new record to the collection, and saves it.

delete($record)

Removes the given records from the collection by nullifying their association. This does not destroy the objects.

delete_all()

Deletes all records (object callbacks aren't processed). They're removed from the collection too.

destroy($record)

Destroys the given records (callbacks are processed). They're removed from the collection too.

destroy_all()

Destroys all records (object callbacks are processed). They're removed from the collection, too.

find()

getIterator()

ksort()

natcasesort()

natsort()

offsetExists($key)

offsetGet($key)

save()

Saves the collection.

serialize()

size()

uasort($callback)

uksort($callback)