PhpMyObject
[ class tree: PhpMyObject ] [ index: PhpMyObject ] [ all elements ]

Class: PMO_Map

Source Location: /fichiers/v0.15/PMO_core/PMO_Map.php

Interface Overview


This interface defines the methods a class must implement to provide a working PMO map class.


Author(s):

Methods



Class Details

[line 49]
This interface defines the methods a class must implement to provide a working PMO map class.

PMO_Map is a array of PMO_Objects. Each row of array contains as many PMO_Objects as there is table concerns by the SQL Request




Tags:

see:  PMO_MyMap


[ Top ]


Class Methods


method add [line 57]

void add( $row)

Add an array of PMO_Object to map tablename=>PMO_Object



Tags:

access:  public


Parameters:

array   $row  

[ Top ]

method count [line 137]

void count( )

Return number of rows for this PMO_Map



Tags:

access:  public


[ Top ]

method fetch [line 120]

array fetch( )

return one row of the array structure Null is returned at the end The array is not pop, it's only a cursor that move on index and return the results.



Tags:

access:  public


[ Top ]

method fetchTable [line 132]

PMO_Object fetchTable( $tablename)

returns one PMO_Object of row of the current map array structure

Null is returned at the end and the iterator is reset.

The array is not poped, it's only a cursor that move an index and return the results.




Tags:

access:  public


Parameters:

   $tablename  

[ Top ]

method getMapByObject [line 66]

PMO_Map getMapByObject( PMO_Object $object)

build a new map from an other map this new map only contains row that are relative to the object



Tags:

throws:  Exception
access:  public


Parameters:

PMO_Object   $object  

[ Top ]

method getMapByObjectByValue [line 79]

PMO_Map getMapByObjectByValue( PMO_Object $object)

build a new map from a map that contains row relative to the object. This function use the values of the primary keys to retrieve the lines concerned.

Others value can stay NULL




Tags:

throws:  Exception
access:  public


Parameters:

PMO_Object   $object  

[ Top ]

method getMapByTable [line 110]

PMO_Map getMapByTable( $tablename)

build a new map that only contains objects of type tablename



Tags:

throws:  Exception
access:  public


Parameters:

   $tablename  

[ Top ]

method getMapByValue [line 102]

PMO_Map getMapByValue( $tablename, $attribute, $value)

build a new map that only contains objects of type tablename with attribute=value.

Search is done only on one fields. Faster than getMapByObjectByValue but less powerfull.




Tags:

throws:  Exception
access:  public


Parameters:

   $tablename  
   $attribute  
   $value  

[ Top ]

method getMapLinked [line 84]

void getMapLinked( PMO_Object $object)

Alias of getMapByObject



Tags:

access:  public


Parameters:

PMO_Object   $object  

[ Top ]

method getMapRelated [line 93]

PMO_Map getMapRelated( PMO_Object $object, $tablename)

build a new map that only contains objects of type tablename relative to our object.



Tags:

throws:  Exception
access:  public


Parameters:

PMO_Object   $object  
   $tablename  

[ Top ]

method getObjectByObject [line 156]

PMO_Object getObjectByObject( PMO_Object $object)

retrieve one object in map comparing the value of primary key of object in param All primary keys must be set, it's more powerfull than getObjectByValue but slower too. If object is not find, return an exception



Tags:

throws:  Exception
access:  public


Parameters:

PMO_Object   $object  

[ Top ]

method getObjectByValue [line 146]

PMO_Map getObjectByValue( $tablename, $attribute, $value)

retrieve first object in map matching with tablename, and attribute=>value If object is not find return an exception



Tags:

throws:  Exception
access:  public


Parameters:

   $tablename  
   $attribute  
   $value  

[ Top ]


Documentation generated on Wed, 15 Oct 2008 09:16:37 -0400 by phpDocumentor 1.4.1