Added Canvas 1.1.0, originally not under SCM so no historical development records...
[canvas.git] / library / dependencies.php
blob7c7840240c751c0ccb62057e5ed70f45ab5451b9
1 <?PHP
3 // @title Dependencies
4 // @desc Loads all necessary libraries for a Canvas application (comment out as appropriate, but carefully)
5 // @author Matt Todd
6 // @email <mtodd@clayton.edu>
7 // @created_on 29 Apr 2006
8 // @note Any statement followed by a "// *" comment (possibly followed by commentary) is REQUIRED!
10 { // required libraries and globals
11 // load conventions (for paths et al)
12 include_once $GLOBALS['working_dir'] . "/library/Conventions.php"; // *
14 // set app_dir for conventions
15 Conventions::$app_dir = $GLOBALS['working_dir'] . '/'; // *
17 // super-dependencies (that all of the others use)
18 include_once Conventions::library_path("YAML"); // * // adds YAML file parsing (for config)
20 include_once Conventions::library_path("Config2"); // *
21 include_once Conventions::library_path("AutoLoad"); // * // autoloads models as needed
22 include_once Conventions::library_path("Globals"); // *
24 // settings & config libraries
25 include_once Conventions::library_path("Debug"); // * // handles debugging
26 include_once Conventions::library_path("File"); // *
27 include_once Conventions::library_path("Router2"); // *
29 // primary components and libraries
30 include_once Conventions::library_path("Request"); // *
31 include_once Conventions::library_path("Response"); // *
32 include_once Conventions::library_path("Session"); // *
34 // mvc components
35 // @desc You can exclude any of these, but it makes sense to use at least one, such as Model2,
36 // or Controller. Please read the API for overloading default functionality if you choose
37 // to use just one (so that Controller isn't dependent on View, for instance).
38 include_once Conventions::library_path("Controller"); // @depends_on Config2, Conventions, Debug, View
39 include_once Conventions::library_path("Model2"); // @depends_on Config2, YAML, Conventions, Debug
40 include_once Conventions::library_path("View"); // @depends_on Smarty (unless overridden)
42 // base mvc classes
43 // @desc These are the default classes for the system: any other classes (Controllers, Views, Helpers) should
44 // inheret from these base classes, unless you prefer to have no global functionality (such as exception-handling)
45 include_once Conventions::controller_path('application'); // loads the default controller
46 include_once Conventions::helper_path('application'); // loads the default helper
47 // include_once Conventions::view_class_file_path('application'); // loads the default view // unused as of 1.0.4
49 // Smarty libs
50 include_once Conventions::library_path('smarty/Smarty.class'); // @used_by View
52 // standard extensions
53 include_once Conventions::library_path("ext/Pager"); // handles pagination
54 include_once Conventions::library_path("ext/Pluralize"); // handles pluralization (used in helpers)
55 include_once Conventions::extension_path("RedCloth"); // adds specialized formatting for input/output
58 { // load route mappings
59 include_once Conventions::config_file('routes');