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

Source for file PMO_Parser.php

Documentation is available at PMO_Parser.php

  1. <?php
  2. /**
  3.  * This file contains the PMO_Parser 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.  * Copyright (c) 2007-2008 Nicolas Boiteux
  13.  *
  14.  * LICENSE
  15.  *
  16.  * PhpMyObject is free software: you can redistribute it and/or modify
  17.  * it under the terms of the GNU General Public License as published by
  18.  * the Free Software Foundation, either version 3 of the License, or
  19.  * (at your option) any later version.
  20.  *
  21.  * This program is distributed in the hope that it will be useful,
  22.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
  24.  * GNU General Public License for more details.
  25.  *
  26.  * You should have received a copy of the GNU General Public License
  27.  * along with this program.  If not, see {@link http://www.gnu.org/licenses/}.
  28.  *
  29.  * @package        PhpMyObject
  30.  * @subpackage PMO_Core
  31.  * @author        Nicolas Boiteux <nicolas_boiteux@yahoo.fr>
  32.  * @link            http://pmo.developpez.com/
  33.  * @since        PhpMyObject v0.1x
  34.  * @version        $Revision: $
  35.  * @copyright    Copyright (C) 2007-2008 Nicolas Boiteux
  36.  * @license        GPLv3 {@link http://www.gnu.org/licenses/gpl}
  37.  * @filesource
  38.  *
  39.  */ 
  40.  
  41. /**
  42.  * This interface defines the methods a class must implement
  43.  * to provide a working parser class capable of parsing
  44.  * a SQL query.
  45.  * 
  46.  * @package        PhpMyObject
  47.  * @subpackage PMO_Core
  48.  * @see            PMO_MyParser
  49.  */ 
  50. interface PMO_Parser{
  51.  
  52.     /**
  53.      * Add a field viewed by parser
  54.      * 
  55.      * @throws Exception
  56.      * @return void 
  57.      */
  58.     public function addField($field);
  59.     
  60.     /**
  61.      * Add a table viewed by parser
  62.      * 
  63.      * @throws Exception
  64.      * @return void 
  65.      */
  66.     public function addTable($table);
  67.  
  68.     /**
  69.      * add an sql function
  70.      * into function array
  71.      * 
  72.      * @return void 
  73.      */    
  74.     public function addFunction($fonction);
  75.     
  76.     /**
  77.      * count the number of fields seen by parser
  78.      * 
  79.      * @return int 
  80.      */
  81.     public function countFields();
  82.     
  83.     /**
  84.      * extract the name of the tables and fields
  85.      * from an SQL query and put them
  86.      * into fields & tables variables
  87.      * 
  88.      * @throws Exception
  89.      * @return TRUE 
  90.      */
  91.     public function parseRequest($string);
  92.  
  93.     /**
  94.      * fetch the fieldname
  95.      * stocked in fields PMO_MyArray.
  96.      * 
  97.      * @return string 
  98.      */
  99.     public function fetchField();
  100.  
  101.     /**
  102.      * fetch tablename stocked
  103.      * in the fields PMO_MyArray
  104.      * 
  105.      * @return string 
  106.      */    
  107.     public function fetchTable();
  108.  
  109.     /**
  110.      * fetch sql function stocked
  111.      * in the functions PMO_MyArray
  112.      * 
  113.      * @return string 
  114.      */    
  115.     public function fetchFunction();
  116. }
  117. ?>

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