PHP Classes
Icontem

File: DATA/AssociativeIndexingStrategy.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Martin Alterisio  >  DATA  >  DATA/AssociativeIndexingStrategy.php  
File: DATA/AssociativeIndexingStrategy.php
Role: Class source
Content type: text/plain
Description: An interface to algorithmic solutions for mapping an associative array index to rows in a database table.
Class: DATA
Access data stored in MySQL tables like arrays
 

Contents

Class file image Download
<?php
/**
 * @package DATA
 */

/**
 * An interface to algorithmic solutions for mapping an
 * associative array index to rows in a database table.
 */
interface DATA_AssociativeIndexingStrategy {
    
/**
     * Indicates if this indexing strategy matches single rows.
     * 
     * Throws {@link DATA_IndexingStrategyException}.
     * 
     * @return boolean True if indexing strategy matches single rows.
     */
    
public function isSingleRowIndexing();
    
/**
     * Returns inboxed version of the row offset provided.
     * 
     * Throws {@link DATA_IndexingStrategyException}.
     * 
     * @param string|DATA_SQLType $row The row offset.
     * @return DATA_SQLType Inboxed row offset.
     */
    
public function inboxRowOffset($row);
    
/**
     * Builds where conditions to select rows by the index used for array access.
     * 
     * Throws {@link DATA_IndexingStrategyException}.
     * 
     * @param DATA_SQLType $row The row offset.
     * @return string SQL where conditions to select the requested row.
     */
    
public function buildWhereConditions($row);
    
/**
     * Returns extra fields and values to be added on the insert of a row object.
     * 
     * Throws {@link DATA_IndexingStrategyException}.
     * 
     * @param DATA_SQLType $row The row offset.
     * @return array Additional fields to be added on insert.
     */
    
public function getAdditionalInsertFields($row);

?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products