* @author Louis Lapointe * @link http://pmo.developpez.com/ * @since PhpMyObject v0.1 * @version $Revision: $ * @copyright Copyright (C) 2007-2008 Nicolas Boiteux * @copyright Copyright (C) 2008 Louis Lapointe * @license GPLv3 {@link http://www.gnu.org/licenses/gpl} * @filesource * */ /** * This interface defines the methods a class must implement * to provide a working controller class that will be able * to query the data and return a {@link PMO_MyMap} map * of objects. * * @package PhpMyObject * @subpackage PMO_Core * @see PMO_MyController */ interface PMO_Controller { /** * Return map of objects already loaded through {@link query()} * * @return PMO_Map * @throws Exception */ public function getMapObjects(); /** * Execute an sql query without treatment * * @param string $query the query to execute * @return object|resource the method must return either a PDO object * or a DBMS resource link, depending on the * selected driver */ public function rawquery($query); /** * Execute a PMO_Request query * * @param object $request a {@link PMO_Request} object */ public function objectquery(PMO_Request $request); /** * Execute an sql query and * return the corresponding PMO_Map fill with PMO_Object * * @param string $query the query to execute * @return PMO_Map * @throws Exception */ public function query($query); /** * Should not be use * return all tuples of one table * equivalent : SELECT * table; * * @param object $table a {@link PMO_Table} object * @return PMO_Map * @throws Exception */ public function queryAll(PMO_Table $table); } ?>