New version submitted by TomB
[carbonphp.git] / Documentation / general / autoloading.html
blob8ce06ae9b42cc5e939ff05fa653716dd96f17773
1 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
2 <head>
3 <title>CarbonPHP Documentation</title>
4 <style type="text/css">
5 * {
6 margin: 0;
7 padding: 0;
10 html {
11 font-family: "Lucida Sans Unicode", "Lucida Grande";
12 font-size: 14px;
15 body {
16 background: #fff;
17 color: #666;
20 h1 {
21 font-size: 15px;
22 font-weight: bold;
23 margin-bottom: 5px;
26 ol, ul {
27 margin: 10px 0 10px 0;
28 list-style-position: inside;
31 p {
32 margin: 5px 0 5px 0;
35 .content {
36 border: 1px dotted #444;
37 margin: 10px;
38 padding: 10px;
39 text-align: justify;
40 width: 700px;
43 .example {
44 border: 1px solid #ccc;
45 background: #eee;
46 margin: 10px;
47 padding: 10px;
49 </style>
50 </head>
52 <body>
53 <div class="content">
54 <h1>Autoloading CarbonPHP Resources</h1>
56 <p>CarbonPHP has a feature that allows you to <b>autoload</b> libraries, utilities, and other files everytime
57 it runs. If you find yourself loading resources a lot throughout your application you should consider
58 autoloading them. The following items can be autoloaded in CarbonPHP.</p>
60 <ul>
61 <li>Core libraries found in the <b>libaries/</b> directory.</li>
62 <li>Utility files found in the <b>utilities/</b> directory.</li>
63 <li>Custom configuration files found in the <b>application/config/</b> directory.</li>
64 <li>Language files found in the <b>languages/</b> directory.</li>
65 </ul>
67 <p>To autoload the items edit the <b>application/config/autoload.php</b> file and add the item you want
68 to autoload into the array. <i>Note</i>: you do not include the file extension when adding the item to the
69 autoload array.</p>
70 </div>
71 </body>
73 </html>