Skip to content
Snippets Groups Projects
ObjectControlerIF.php 795 B
Newer Older
  • Learn to ignore specific revisions
  • SNA's avatar
    SNA committed
    <?php
    
    try {
    
    SNA's avatar
    SNA committed
        //require_once("modules/moreq/moreq_tables_definition.php");
        require_once("core/class/class_db.php");
    
    SNA's avatar
    SNA committed
    } catch (Exception $e){
    
        echo functions::xssafe($e->getMessage()) . ' // ';
    
    SNA's avatar
    SNA committed
    }
    
    /**
     * Interface for standard object controlers
     * @author boulio
     *
     */
    interface ObjectControlerIF {
    
    SNA's avatar
    SNA committed
        /**
         * Save given object in database.
         * Return true if succeeded.
         * @param unknown_type $object
         * @return boolean
         */
        function save($object);
    
        /**
         * Return object with given id
         * if found.
         * @param $object_id
         */
        function get($object_id);
    
        /**
         * Delete given object from
         * database.
         * Return true if succeeded.
         * @param unknown_type $object
         * @return boolean
         */
        function delete($object);
    
    
    SNA's avatar
    SNA committed
    }