Last change
on this file since 209 was
186,
checked in by jkraaijeveld, 13 years ago
|
Implemented lazy evaluation.
- Initially, references to other database objects are now given as an ID rather than an object.
- Every model class now has an evaluate() function, which gets all the objects that object has references to. Returns true if it got all the values correctly, false if there are invalid references.
- Every connector now first evaluates an object before storing, to make sure only objects with valid references get stored.
|
File size:
555 bytes
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | /** |
---|
4 | * Description of master |
---|
5 | * |
---|
6 | * For autoloading of classes for example. |
---|
7 | * |
---|
8 | * @author fpvanagthoven |
---|
9 | */ |
---|
10 | // Determine our absolute document root |
---|
11 | define('DOC_ROOT', realpath(dirname(__FILE__) . '/../')); |
---|
12 | |
---|
13 | /* Session */ |
---|
14 | session_name("cpsft"); // Set a session name |
---|
15 | session_start(); // Start the session |
---|
16 | |
---|
17 | function __autoload($class_name) { |
---|
18 | require 'classes/' . $class_name . '.php'; |
---|
19 | } |
---|
20 | |
---|
21 | |
---|
22 | // Redirects user to $url |
---|
23 | function redirect($url = null) |
---|
24 | { |
---|
25 | if (is_null($url)) |
---|
26 | $url = $_SERVER['PHP_SELF']; |
---|
27 | |
---|
28 | header("Location: $url"); |
---|
29 | exit(); |
---|
30 | } |
---|
31 | |
---|
32 | |
---|
33 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.