PHP2Go Javascript Framework

Class Collection

Object
   |
   +--Collection
Direct Known Subclasses:
Array, Hash

class Collection

Defined in structures.js


 
Method Summary
 Array accept(<Function> filter, <Object> scope)
           Applies a filter function on all the elements of the collection.
 Boolean contains(<Object> obj)
           Verify if the collection contains a given object
 Boolean every(<Function> filter, <Object> scope)
           Applies a filter function on all elements of the collection.
 Array extract(<String> property)
           Reads the value of the property 'property' in each element of the collection, and return the results in an Array object
 Array grep(<RegExp> pattern)
           Collect the collection members that satisfy a given regexp pattern.
 Object inject(<Object> memo, <Function> iterator, <Object> scope)
           Injects the results of an iterator over all collection elements.
 void invoke(<String> method)
           Call a given method of the collection items, using the provided arguments.
 Array map(<Function> iterator, <Object> scope)
           Returns a new copy of the collection applying a given iterator to every element
 Array reject(<Function> filter, <Object> scope)
           Applies a filter function on the collection's elements, returning back an array of elements that DON'T satisfy the filter
 Boolean some(<Function> filter, <Object> scope)
           Applies a filter function on all elements of the collection.
 Array valid(<Function> filter, <Object> scope)
           Applies a filter function on the collection's element, pushing the not null return values to a resulting array
 void walk(<Function> iterator)
           Applies an iterator function to all the members of the collection.


Method Detail

accept

Array accept(<Function> filter, <Object> scope)

contains

Boolean contains(<Object> obj)

every

Boolean every(<Function> filter, <Object> scope)

extract

Array extract(<String> property)

grep

Array grep(<RegExp> pattern)

inject

Object inject(<Object> memo, <Function> iterator, <Object> scope)

invoke

void invoke(<String> method)

map

Array map(<Function> iterator, <Object> scope)

reject

Array reject(<Function> filter, <Object> scope)

some

Boolean some(<Function> filter, <Object> scope)

valid

Array valid(<Function> filter, <Object> scope)

walk

void walk(<Function> iterator)

PHP2Go Javascript Framework

Copyright © 2002-2006 by Marcos Pont
Documentation generated by JSDoc on Sun Oct 7 19:52:10 2007