Source for file PMO_Object.php
Documentation is available at PMO_Object.php
* This file contains the PMO_Object interface.
* This file is part of the PhpMyObject project,
* an Object-Relational Mapping (ORM) system.
* For questions, help, comments, discussion, etc., please join our
* forum at {@link http://www.developpez.net/forums/forumdisplay.php?f=770}
* or our mailing list at {@link http://groups.google.com/group/pmo-dev}.
* Copyright (c) 2007-2008 Nicolas Boiteux
* PhpMyObject is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see {@link http://www.gnu.org/licenses/}.
* @author Nicolas Boiteux <nicolas_boiteux@yahoo.fr>
* @link http://pmo.developpez.com/
* @since PhpMyObject v0.1x
* @copyright Copyright (C) 2007-2008 Nicolas Boiteux
* @license GPLv3 {@link http://www.gnu.org/licenses/gpl}
* This interface defines the methods a class must implement
* to provide a working PMO_Object table class capable of managing
* Return the reference of the object PMO_Table
* linked to the object PMO_Table describe the
* structure of the table that was used to build
* the object data structure (name of columns,
* return the data structure of the PMO_Object
* return an array wich contains
* all the names of attributes of PMO_Object
* return the value of an attribute
* this function also cleans the escape chars
* with a simple stripslashes
public function get($attribute);
* export the data structure of an object in a xml format stream
* <attributename>attributevalue</attributename>
public function toXml($encoding);
* Set the value of an attribute of the data structure
* this function already escape strange char with
* data structure is an array
* attribute => attributevalue
public function set($attribute, $value);
* define the object as new, not already
* present in the database This flag
* is used to define when we do an insert
public function setNew($flag);
* return the flag used to define if
* objet is present or not in database
* Load data of object from database
* using the value of primary key
* All primary key should be
* set to retrieve the data
* Delete data of object into database
* using the value of primary keys, all
* primary keys should be set to delete
* Save data of object into database
* insert or update dependings the value of
|