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

Source for file PMO_Controller.php

Documentation is available at PMO_Controller.php

  1. <?php
  2. /**
  3.  * This file contains the PMO_Controller interface.
  4.  *
  5.  * This file is part of the PhpMyObject project,
  6.  * an Object-Relational Mapping (ORM) system.
  7.  * 
  8.  * For questions, help, comments, discussion, etc., please join our
  9.  * forum at {@link http://www.developpez.net/forums/forumdisplay.php?f=770}
  10.  * or our mailing list at {@link http://groups.google.com/group/pmo-dev}.
  11.  *
  12.  * PhpMyObject is free software: you can redistribute it and/or modify
  13.  * it under the terms of the GNU General Public License as published by
  14.  * the Free Software Foundation, either version 3 of the License, or
  15.  * (at your option) any later version.
  16.  *
  17.  * This program is distributed in the hope that it will be useful,
  18.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
  20.  * GNU General Public License for more details.
  21.  *
  22.  * You should have received a copy of the GNU General Public License
  23.  * along with this program.  If not, see {@link http://www.gnu.org/licenses/}.
  24.  *
  25.  * @package            PhpMyObject
  26.  * @subpackage     PMO_Core
  27.  * @author            Nicolas Boiteux <nicolas_boiteux@yahoo.fr>
  28.  * @link                http://pmo.developpez.com/
  29.  * @since            PhpMyObject v0.1
  30.  * @version            $Revision: $
  31.  * @copyright        Copyright (C) 2007-2008 Nicolas Boiteux
  32.  * @license            GPLv3 {@link http://www.gnu.org/licenses/gpl}
  33.  * @filesource
  34.  *
  35.  */ 
  36.  
  37.  
  38. /**
  39.  * This interface defines the methods a class must implement
  40.  * to provide a working controller class that will be able
  41.  * to query the data and return a {@link PMO_MyMap} map
  42.  * of objects.
  43.  * 
  44.  * @package        PhpMyObject
  45.  * @subpackage PMO_Core
  46.  * @see            PMO_MyController
  47.  */ 
  48. interface PMO_Controller {
  49.  
  50.     /**
  51.      * Return map of objects already loaded through {@link query()}
  52.      * 
  53.      * @return PMO_Map 
  54.      * @throws Exception
  55.      */
  56.     public function getMapObjects();
  57.     
  58.     /**
  59.      * Execute an sql query without treatment
  60.      *
  61.      * @param string $query            the query to execute
  62.      * @return object|resource       the method must return either a PDO object
  63.      *                                         or a DBMS resource link, depending on the
  64.      *                                         selected driver
  65.      */
  66.     public function rawquery($query);
  67.     
  68.     /**
  69.      * Execute a PMO_Request query
  70.      *
  71.      * @param object $request        a {@link PMO_Request} object
  72.      */
  73.     public function objectquery(PMO_Request $request);
  74.  
  75.     /**
  76.      * Execute an sql query and
  77.      * return the corresponding PMO_Map fill with PMO_Object
  78.      *
  79.      * @param string $query        the query to execute
  80.      * @return PMO_Map 
  81.      * @throws Exception
  82.      */
  83.     public function query($query);
  84.     
  85.     /**
  86.      * Should not be use
  87.      * return all tuples of one table
  88.      * equivalent : SELECT    * table;
  89.      * 
  90.      * @param object $table            a {@link PMO_Table} object
  91.      * @return PMO_Map 
  92.      * @throws Exception
  93.      */
  94.     public function queryAll(PMO_Table $table);
  95.     
  96. }
  97. ?>

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