Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

model_querry.php

Go to the documentation of this file.
00001 
00002 /** @file model_querry.php
00003 * Definition of class model_querry.
00004 */
00005 #include "model_abstract.php"
00006 /**
00007 * Provides querry requests for basic information about model.
00008 * @todo Rewrite by scratch.
00009 */
00010 class model_querry : public  model_abstract
00011 {
00012 public:
00013   /** Name of model. */
00014   var name = '';
00015   /** Relations of model.
00016   * That it depends on and that it gives.
00017   */
00018   var relations = array(
00019     'depends' => array(),
00020     'gives' => array()
00021     );
00022   /** Brief information about model. */
00023   var info = '';
00024 
00025   function &produce( data )
00026   {
00027     return this;
00028   }
00029 
00030   function get( data )
00031   {
00032     switch( data )
00033     {
00034       case MODEL_NAME:
00035         return this->name;
00036       case MODEL_RELATIONS:
00037         return this->relations;
00038       case MODEL_DEPENDS:
00039         return this->relations[ 'depends' ];
00040       case MODEL_GIVES:
00041         return this->relations[ 'gives' ];
00042       case MODEL_INFO:
00043         return this->info;
00044       default:
00045         return this->err( "Usupported querry subject: ".data, 'get' );
00046     }
00047   }
00048 
00049   function xep_open_model_name( attributes )
00050   {
00051     this->name = attributes[ 'the' ];
00052   }
00053 
00054   function xep_open_model_relations_depends( attributes )
00055   {
00056     this->relations[ 'depends' ][] = attributes[ 'on' ];
00057   }
00058 
00059   function xep_open_model_relations_gives( attributes )
00060   {
00061     this->relations[ 'gives' ][] = attributes[ 'a' ];
00062   }
00063   
00064   function xep_cdata_model_info( cdata )
00065   {
00066     this->info .= ' '.trim( cdata );
00067   }
00068 }
00069 X-Powered-By: PHP/4.0.8-dev
00070 Content-type: text/html
00071 
00072 

Generated on Tue Mar 11 08:35:13 2003 for SES by doxygen1.2.16