datarecordcollection_class
                Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| datarecordcollection_class [2019/10/09 21:05] – created sahl | datarecordcollection_class [2020/02/17 09:58] (current) – removed sahl | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== DatarecordCollection class ====== | ||
| - | The primary purpose of this class is to keep a number of Datarecords bundled together. In addition to convenience, | ||
| - | |||
| - | ===== Basic usage ===== | ||
| - | |||
| - | Usually the DatarecordCollection is the result of using the [[class_filter|Filter]] object, but it can be spawned on its own, passing a Datarecord or an array of Datarecords into the constructor, | ||
| - | |||
| - | <code php> | ||
| - | $collection = new DatarecordCollection($user); | ||
| - | $collection-> | ||
| - | </ | ||
| - | |||
| - | A datarecord can only contain objects of the same type and will adapt to the first object it receives. | ||
| - | |||
| - | The datarecord can be sorted by a specific field using '' | ||
| - | |||
| - | <code php> | ||
| - | foreach ($collection-> | ||
| - | echo $user-> | ||
| - | } | ||
| - | |||
| - | foreach ($collection-> | ||
| - | echo $value; | ||
| - | } | ||
| - | </ | ||
datarecordcollection_class.1570655137.txt.gz · Last modified: 2019/10/09 21:05 by sahl
                
                