Frequently Asked Questions
API >> faq
How can I re-route incoming traffic? (aka. setting "routes")
We recommend re-routing with your web server, Apache mod_rewrite is made for this. If you must re-route from Vork you may do so by creating anAPP_CONSTRUCT
file that either changes the controller and view or issues a load::redirect()
How can I use Vork with file extensions like .php?
This is unsupported and we recommend against it but you can set in theconfig
class of your .config file a new property with the extension including preceding dot:public $fileExtension = '.php';
Note: this is a global setting, so you will need to change all the files in Vork to include the extension.
How can I move the Vork MVC folders somewhere else?
This is unsupported and we recommend against it but you can set in theconfig
class of your .config file new properties for:$pathToMvc
- this is the parent mvc folder containing:$modelsFolder, $viewsFolder, $controllersFolder, $layoutsFolder, $elementsFolder, $componentsFolder, $helpersFolder
How can I move the Vork "packages" folders somewhere else?
Packages are completely external and can be moved freely, the only Vork reference to the packages folder is at the top of the /webroot/vork file, you will need to update thePACKAGES_PATH
constant in order for the debug functions to work in Firefox equipped with the FireBug and FirePHP extensions (an incorrect path will not have any effect on other browsers or in Firefox if FirePHP is not installed or if the debug feature is not enabled.)Troubleshooting
I get a 404 not found error when viewing a page that exists
If you are a superuser or have debugging mode enabled then you should also see additional info leading to the cause of the issue and relevant to one of the points below. If debug is disabled and you are not a superuser then you will have to try each of the following until one works.controllerNotDefined
In most cases there is a controller file with the correct filename, but the controller class is either missing or inaccessible due to a typeo in the class name or improper naming convention - the class name must be the same name as the file, but with "Controller" appended to it (case-sensitive) eg. in a file named cheese you would have aclass cheeseController {...}
missingAction
Every action needs a method in your controller by the same name as the action being requested (unless you have theoptionalAction
directive set in which case the only way that you could get this error is if the index()
method was missing). In most cases there is a typeo in the method name for the action.