tangra logo
   
[ class tree: tangra_lib ] [ index: tangra_lib ] [ all elements ]
 

Source for file i_db_storable.class.php

Documentation is available at i_db_storable.class.php

  1. <?php
  2. // *** Tangra (Application Framework and Tools for PHP)
  3. //  $Id$
  4. //
  5.  
  6. /**
  7.  * Contains interface I_DB_Storable
  8.  *
  9.  * @package tangra_lib
  10.  * @subpackage interfaces
  11.  *
  12.  */
  13.  
  14. /**
  15.  * Interface that show that classes/objects that implements it can be saved in DB
  16.  *
  17.  * @package tangra_lib
  18.  * @subpackage interfaces
  19.  */
  20. interface I_DB_Storable {
  21.     /**
  22.      * Save the object in DB
  23.      *
  24.      * @param DB_Connection $dbc 
  25.      */
  26.     public function save(DB_Connection $dbc);
  27.  
  28.  
  29.     /**
  30.      * Loads the object from DB
  31.      *
  32.      * Returns $id on success or false on failure;
  33.      *
  34.      * @param DB_Connection $dbc 
  35.      * @param integer $id 
  36.      */
  37.     public function load_by_id(DB_Connection $dbc$id);
  38. }