There are several recommended practices for writing custom code to work with Phork. Some are required while others are just suggestions.
Even though PHP is a loosely typed language, Phork does its best to designate each variable type by using a type of Hungarian notation. The only time this should be ignored is with temporary iterator variables. Example variable names are:
All Phork classes should be named like MyClassName.class.php using UpperCamelCase for both the file name and the class name.
All Phork interfaces should be named like MyInterfaceName.interface.php using UpperCamelCase for both the file name and the interface name.
All methods within a class should be named like myClassMethod() using lowerCamelCase.
Class properties should not be accessed directly (eg. $objClass->intMyInteger = 5;). Instead you should use get and set method (eg. $objClass->setMyInteger(5);).
All templates should be named like mytemplate.phtml using lowercase with a .phtml extension.
Because models interact with a data source that usually contains lowercase property names the models' properties are usually also lowercase. Their formatting matches that of the data source unless explicitly overridden. When accessing a model record the preferred format is $objRecord->get('lowercase_underscore_property')
Opening parenthesis should always be on the same line, and closing parenthesis should always be on a new line.
Phork has been commented using PHPdoc syntax. It is highly recommended that you comment any custom code using this same syntax.
Phork has been written using long PHP tags (<?php) for optimal compatability. It's recommended that this practice be continued in your custom files, however if your server allows it you can still use short tags (<? and <?=$foo?>).