From cb1021da880b5200fdfe87e43d96a86de811e482 Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 19 Jun 2006 12:37:59 +0000 Subject: Fixed #244, #245. --- demos/quickstart/protected/pages/Advanced/Collections.page | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'demos/quickstart') diff --git a/demos/quickstart/protected/pages/Advanced/Collections.page b/demos/quickstart/protected/pages/Advanced/Collections.page index 181dc556..7fc3443d 100644 --- a/demos/quickstart/protected/pages/Advanced/Collections.page +++ b/demos/quickstart/protected/pages/Advanced/Collections.page @@ -1,6 +1,6 @@ -

Collections

+

Collections

Collection is a basic data structure in programming. In traditional PHP programming, array is used widely to represent collection data structure. A PHP array is a mix of cardinal-indxed array and hash table.

@@ -8,7 +8,7 @@ Collection is a basic data structure in programming. In traditional PHP programm To enable object-oriented manipulation of collections, PRADO provides a set of powerful collection classes. Among them, the TList and TMap are the most fundamental and usually serve as the base classes for other collection classes. Since many PRADO components have properties that are of collection type, it is very important for developers to master the usage of PRADO collection classes.

-

Using TList

+

Using TList

A TList object represents a cardinal-indexed array, i.e., an array (object) with the index 0, 1, 2, ...

@@ -42,7 +42,7 @@ In addition, TList implements a few commonly used convenient methods fo
  • mergeWith(): appends the list with data from an array or traversable object (including TList).
  • -

    Using TList-based component properties

    +

    Using TList-based component properties

    As aforementioned, many PRADO component properties are based on TList or TList-derived collection classes. These properties all share the above usages.

    @@ -62,7 +62,7 @@ foreach($control->Controls as $childControl) ... Another example is the Items property, available in list controls, TRepeater, TDataList and TDataGrid. In these controls, the ancestor class of Items is TList.

    -

    Extending TList

    +

    Extending TList

    Often, we want to extend TList to perform additional operations for each addition or removal of an item. The only methods that the child class needs to override are insertAt() and removeAt(). For example, to ensure the list only contains items that are of TControl type, we can override insertAt() as follows,

    @@ -77,7 +77,7 @@ public function insertAt($index,$item) -

    Using TMap

    +

    Using TMap

    A TMap object represents a hash table (or we say string-indexed array).

    @@ -107,7 +107,7 @@ The following methods are provided by TMap for convenience,
  • mergeWith(): appends the map with data from an array or traversable object (including TMap).
  • -

    Using of TAttributeCollection

    +

    Using of TAttributeCollection

    TAttributeCollection is a special class extending from TMap. It is mainly used by the Attributes property of TControl.

    -- cgit v1.2.3