-
Notifications
You must be signed in to change notification settings - Fork 0
/
load.html
68 lines (59 loc) · 2.38 KB
/
load.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html lang="en">
<head>
<title>Menukaarten-docs</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="assets/css/stylesheet.css" media="screen,print">
<link rel="stylesheet" href="assets/css/print.css" media="print">
<link rel="stylesheet" type="text/css" href="assets/css/shCore.css" media="screen,print">
<link rel="stylesheet" type="text/css" href="assets/css/shThemeDefault.css" media="screen,print">
<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/SyntaxHighlighter.js"></script>
<script type="text/javascript" src="assets/js/build_menu.js"></script>
</head>
<body>
<div id="header-wrapper">
<div id="header">
<h1>Documentation SexyFramework</h1>
<span>Created by Vincent Bremer & Douwe de Haan</span>
</div>
</div>
<div id="container">
<div id="menu-wrapper">
<div id="menu">
<h1>Table of contents</h1>
<ul></ul>
</div>
</div>
<div id="content-wrapper">
<div id="content">
<!-- START CONTENT -->
<h1>Load</h1>
<p>To load certain files and classes we've build an special load class. The load class includes the needed file(s), initializes the instance(s) when needed, and return the object.</p>
<h2>Loading views</h2>
<p>The view classes is automatically loaded in the base_controller. In case you want to you an other template you have to create a new instance of the view class. This can be done with:</p>
<pre class="brush: php">
// Load a view object with the default template
$view = load::view();
// Load a view object with no template
$view = load::view(null)
// Load a view object with the dashboard.php template
$view = load::view('dashboard')
</pre>
<h2>Loading models</h2>
<p>When you need a new instance of a model, you can call load::model.</p>
<pre class="brush: php">
$user = load::model('User'); // Returns a new User model
</pre>
<h2>Initialize the database connection</h2>
<p>The base model uses a MySQLi object for communication with the database. Because this framework uses the singleton design pattern there is a special function for loading the MySQLi object.</p>
<pre class="brush: php">
$mysqli = load::database();
</pre>
<!-- END CONTENT -->
</div>
</div>
</div>
<script type="text/javascript" src="assets/js/SyntaxHighlighter_settings.js"></script>
</body>
</html>