phpDocumentor pivotx
[ class tree: pivotx ] [ index: pivotx ] [ all elements ]

Class: oops_iterator

Source Location: /modules/module_oops.php

Class oops_iterator

Class Overview

Implements interfaces:

  • Iterator (internal interface)

A smarty assign array wrapper

The wrapper also works when you assign an iterator to it

This wrappers providers the main array which is being looped with new attributes to find the current index of the looped item, etc.

New attributes:

  • index int, base 0, index of the current item in the looped var
  • first boolean, true if the current item is the first
  • last boolean, true if the current item is the last
  • even boolean, true if the current item has an even index
  • odd boolean, true if the current item has an odd index

Located in /modules/module_oops.php [line 4434]



		
		
		
		

Properties

Methods

[ Top ]
Property Summary
mixed   $active_default  
mixed   $active_field  
mixed   $active_index  
mixed   $active_value  
mixed   $data  
mixed   $it_args  
mixed   $length  
mixed   $pointer  

[ Top ]
Method Summary
oops_iterator   __construct()   Our constructor takes an array or an Iterator
void   addarray()   Add another array to this one
void   as_array()   Return the original indexed array
void   count()  
void   current()  
void   findby()   Return an element specified by key/value
void   index()   Return elements at index
void   key()   Iterator stuff
void   next()  
void   randomize()   Randomize the array
void   rewind()  
void   set_active()   Set the active record
void   valid()  
void   _setup()   Setup an array or an Iterator
void   __get()   Handy stuff!

[ Top ]
Properties
mixed   $active_default = false [line 4446]
API Tags:
Access:  protected


[ Top ]
mixed   $active_field = false [line 4444]
API Tags:
Access:  protected


[ Top ]
mixed   $active_index = false [line 4443]
API Tags:
Access:  protected


[ Top ]
mixed   $active_value = false [line 4445]
API Tags:
Access:  protected


[ Top ]
mixed   $data = false [line 4437]
API Tags:
Access:  protected


[ Top ]
mixed   $it_args = array() [line 4441]
API Tags:
Access:  protected


[ Top ]
mixed   $length = 0 [line 4438]
API Tags:
Access:  protected


[ Top ]
mixed   $pointer = 0 [line 4439]
API Tags:
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 4451]

  oops_iterator __construct( &$data, [ $args = false]  )

Our constructor takes an array or an Iterator

Parameters:
   &$data: 
   $args: 

API Tags:
Access:  public


[ Top ]
addarray  [line 4608]

  void addarray( $data  )

Add another array to this one

Parameters:
   $data: 

API Tags:
Access:  public


[ Top ]
as_array  [line 4658]

  void as_array( )

Return the original indexed array


API Tags:
Access:  public


[ Top ]
count  [line 4651]

  void count( )


API Tags:
Access:  public


[ Top ]
current  [line 4631]

  void current( )


API Tags:
Access:  public


Implementation of:
Iterator::current

[ Top ]
findby  [line 4587]

  void findby( $key, $value  )

Return an element specified by key/value

Parameters:
   $key: 
   $value: 

API Tags:
Access:  public


[ Top ]
index  [line 4577]

  void index( $idx  )

Return elements at index

Parameters:
   $idx: 

API Tags:
Access:  public


[ Top ]
key  [line 4627]

  void key( )

Iterator stuff


API Tags:
Access:  public


Implementation of:
Iterator::key

[ Top ]
next  [line 4635]

  void next( )


API Tags:
Access:  public


Implementation of:
Iterator::next

[ Top ]
randomize  [line 4618]

  void randomize( )

Randomize the array


API Tags:
Access:  public


[ Top ]
rewind  [line 4647]

  void rewind( )


API Tags:
Access:  public


Implementation of:
Iterator::rewind

[ Top ]
set_active  [line 4489]

  void set_active( $field, $value, [ $default = false]  )

Set the active record

Parameters:
   $field: 
   $value: 
   $default: 

API Tags:
Access:  public


[ Top ]
valid  [line 4643]

  void valid( )


API Tags:
Access:  public


Implementation of:
Iterator::valid

[ Top ]
_setup  [line 4463]

  void _setup( $data  )

Setup an array or an Iterator

Parameters:
   $data: 

API Tags:
Access:  protected


[ Top ]
__get  [line 4521]

  void __get( $name  )

Handy stuff!

Parameters:
   $name: 

API Tags:
Access:  public


[ Top ]

Documentation generated on Thu, 17 May 2012 01:07:20 +0200 by phpDocumentor 1.4.3