| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Summary view] [Print] [Text view]
1 <?php // $Id: XMLDBConstants.php,v 1.5 2007/10/10 05:25:14 nicolasconnault Exp $ 2 3 /////////////////////////////////////////////////////////////////////////// 4 // // 5 // NOTICE OF COPYRIGHT // 6 // // 7 // Moodle - Modular Object-Oriented Dynamic Learning Environment // 8 // http://moodle.com // 9 // // 10 // Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com // 11 // (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com // 12 // // 13 // This program is free software; you can redistribute it and/or modify // 14 // it under the terms of the GNU General Public License as published by // 15 // the Free Software Foundation; either version 2 of the License, or // 16 // (at your option) any later version. // 17 // // 18 // This program is distributed in the hope that it will be useful, // 19 // but WITHOUT ANY WARRANTY; without even the implied warranty of // 20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // 21 // GNU General Public License for more details: // 22 // // 23 // http://www.gnu.org/copyleft/gpl.html // 24 // // 25 /////////////////////////////////////////////////////////////////////////// 26 27 /// This file contains all the constants and variables used 28 /// by the XMLDB interface 29 30 /// First, some constants to be used by actions 31 define('ACTION_NONE', 0); //Default flags for class 32 define('ACTION_GENERATE_HTML', 1); //The invoke function will return HTML 33 define('ACTION_GENERATE_XML', 2); //The invoke function will return HTML 34 define('ACTION_HAVE_SUBACTIONS', 1); //The class can have subaction 35 36 /// Now the allowed DB Field Types 37 define ('XMLDB_TYPE_INCORRECT', 0); //Wrong DB Type 38 define ('XMLDB_TYPE_INTEGER', 1); //Integer 39 define ('XMLDB_TYPE_NUMBER', 2); //Decimal number 40 define ('XMLDB_TYPE_FLOAT', 3); //Floating Point number 41 define ('XMLDB_TYPE_CHAR', 4); //String 42 define ('XMLDB_TYPE_TEXT', 5); //Text 43 define ('XMLDB_TYPE_BINARY', 6); //Binary 44 define ('XMLDB_TYPE_DATETIME', 7); //Datetime 45 define ('XMLDB_TYPE_TIMESTAMP', 8); //Timestamp 46 47 /// Now the allowed DB Keys 48 define ('XMLDB_KEY_INCORRECT', 0); //Wrong DB Key 49 define ('XMLDB_KEY_PRIMARY', 1); //Primary Keys 50 define ('XMLDB_KEY_UNIQUE', 2); //Unique Keys 51 define ('XMLDB_KEY_FOREIGN', 3); //Foreign Keys 52 define ('XMLDB_KEY_CHECK', 4); //Check Constraints - NOT USED! 53 define ('XMLDB_KEY_FOREIGN_UNIQUE',5); //Foreign Key + Unique Key 54 55 /// Now the allowed Statement Types 56 define ('XMLDB_STATEMENT_INCORRECT', 0); //Wrong Statement Type 57 define ('XMLDB_STATEMENT_INSERT', 1); //Insert Statements 58 define ('XMLDB_STATEMENT_UPDATE', 2); //Update Statements 59 define ('XMLDB_STATEMENT_DELETE', 3); //Delete Statements 60 define ('XMLDB_STATEMENT_CUSTOM', 4); //Custom Statements 61 62 /// Some other useful Constants 63 define ('XMLDB_UNSIGNED', true); //If the field is going to be unsigned 64 define ('XMLDB_NOTNULL', true); //If the field is going to be not null 65 define ('XMLDB_SEQUENCE', true); //If the field is going to be a sequence 66 define ('XMLDB_ENUM', true); //If the field is going to be a enumeration of possible fields 67 define ('XMLDB_INDEX_UNIQUE', true); //If the index is going to be unique 68 define ('XMLDB_INDEX_NOTUNIQUE',false); //If the index is NOT going to be unique 69 70 /// Some strings used widely 71 define ('XMLDB_LINEFEED', "\n"); 72 define ('XMLDB_PHP_HEADER', ' if ($result && $oldversion < XXXXXXXXXX) {' . XMLDB_LINEFEED); 73 define ('XMLDB_PHP_FOOTER', ' }' . XMLDB_LINEFEED); 74 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |