Open-Source PHP Framework - Designed for rapid development of performance-oriented scalable applications

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:

  • .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 completes
  • mvc::$action - read to get name, write to switch actions after the current action-instance completes
  • mvc::$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 omitted
  • get::component('componentName')
  • get::helper('helperName')
  • get::element('elementName')
  • get::htmlentities() - Direct replacement for the PHP-function htmlentities() - this overloads the php function and changes the default charset to UTF-8 and the default value for the fourth parameter $doubleEncode to false
  • get::xhtmlentities() - Operates like get::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 as get::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 to STDOUT

  • load::element('elementName')
  • load::redirect('yourUrl') - send redirect header and halts MVC operation