Webroot folder
API >> webroot
This folder and subfolders are publicly viewable from a browser. This is the location to place your image folders and favicons. Also, the robots.txt file already exists and defines the typical search engine settings.
Other default files are:
The debug-mode flag is set the very beginning of the vork file, aside from that nothing in here should ever need to be modified.
The vork file contains classes:
Other default files are:
- .htaccess - defines the Apache directives necessary for the operation of the framework
- vork - the main Vork system file that acts as the brain for the whole framework. This file is the switchboard for every instance.
The debug-mode flag is set the very beginning of the vork file, aside from that nothing in here should ever need to be modified.
The vork file contains classes:
configDefaults
- sets the default configuration and allows the system to operate even with the .config file missing - do not modify these, make your settings in the .config file instead.mvc
- the main system MVC logic. Public interface properties are:
mvc::$controller
- read to get name, write to switch controllers after the current controller-instance completesmvc::$action
- read to get name, write to switch actions after the current action-instance completesmvc::$layout
- use a different layout than the default - setting to null will skip usage of the layout (and load only the view alone)mvc::$view
- override default view filename - first default view file attempted is /mvc/views/controllerName/actionName, if not found it will try /mvc/views/controllerName
- get - loads and returns the object of:
get::model('modelName')
- modelName is optional, controllerName will be used if omittedget::component('componentName')
get::helper('helperName')
get::element('elementName')
get::htmlentities()
- Direct replacement for the PHP-functionhtmlentities()
- this overloads the php function and changes the default charset to UTF-8 and the default value for the fourth parameter$doubleEncode
to falseget::xhtmlentities()
- Operates likeget::htmlentities()
converting special characters in a string to XHTML-valid ASCII but this method allows the use of HTML tags within your string. Signature is the same asget::htmlentities()
except that the only character sets available (third argument) are UTF-8 (default) and ISO-8859-1 (Latin-1).
load
- loads the element, responses go straight toSTDOUT
load::element('elementName')
load::redirect('yourUrl')
- send redirect header and halts MVC operation