-
Notifications
You must be signed in to change notification settings - Fork 1
Home
So, this is the manual. Not much to see here, but that'll change in a bit!
All Encode-controllers are listed here, with information and functions you can call.
- Handle your Assets
- Eat a Cookie
- Gather data from the Database
- Safely Read/Write Documents
- Get user Input
- Load views, models, helpers,...
- Log mistakes, errors, actions,..
- Easily send Mails with Mandrill
- Use Models to handle your data
- Start and administer a Session
- Have a session Storage to ...store things
There a some useful tools that we created, and one of them is the environment variable
.
This variable can be "dev", "test" or "deploy" (or anything else for that matter, but it won't do much then), and helps the system to determine the speed of the application.
Encode will minify your Javascript (and uglify it as well) and CSS with the help of Matthias Mullie's library.
Just add
<!-- inject:(js | css, whatever you want) --><!-- end:(js | css) -->
to the footer and header in your layout, and experience the magic.
Example:
//footer.php
</body>
<!-- inject:js --><!-- end:js -->
</html>
will become (in dev
-mode)
//footer.php
</body>
<!-- inject:js -->
<script type="text/Javascript" src="assets/js/some/lib/js1.js"></script>
<script type="text/Javascript" src="assets/js/another/lib/js2.js"></script>
<!-- end:js -->
or even (in test
- or deploy
-mode)
//footer.php
</body>
<!-- inject:js -->
<script type="text/Javascript" src="assets/js/minified/*timestamp*_scripts.min.js"></script>
<!-- end:js -->
Awesome, right? This also works with css
-files, but will exclude both '.min' and '.php' files!
In dev
-mode, Encode will just print out your mails instead of sending them (while still returning the real response), so you won't spam yourself. To enable, just enter test
or deploy
mode!
You can easily create your own Modules (or import another Module from other devs, or our Module-page. The structure of these modules are very much like the basic application-folder. They both have assets, controllers, models, views, config files, and others. If you are going to write or edit modules, best have a look at these guidelines:
- Use the structure from the application-folder
-
.php
-files in controllers and config-folders are loaded automatically -
.php
-files in models and helpers-folders are loaded as normal, and automatically found inside your module-folder - If you need to install tables, use an
install.php
script in the root of your module Please document everything good enough so any user can use your module properly
No problem, ask away, or have a look at our FAQ.
Found a bug, or just made an awesome improvement? Submit an issue, or create a PR, we'll welcome them all with open arms!
Encode is a Framework by some guy in Belgium. Do expect magic, but not the Facebook-kind of magic, will you?