* @author gERD Schaufelberger * @license LGPL, see license.txt for details * @link http://www.php-tools.net */ /** * Main examples prepend file, needed *only* for the examples framework! */ include_once 'patExampleGen/prepend.php'; $exampleGen->displayHead( 'Example' ); // EXAMPLE START ------------------------------------------------------ /** * main patForms class */ require_once $neededFiles['patForms']; /** * patErrorManager class */ require_once $neededFiles['patErrorManager']; /** * localisation stuff */ require_once $neededFiles['patI18n_configure']; // tell patForms where to find custom modules $customDir = dirname( __FILE__ ) . '/customModule'; // Add folder for any module to be loaded patForms::addModuleBaseDir($customDir . '/include'); // Prefere to load rules from this folder patForms::addModuleDir('Rule', $customDir.'/myRule'); // Add more folders - even if those folder don't exist $rulesFolders = array( '/path/to/module/rule', '/pat/extension/patForms/rule', 'more/folders' ); patForms::addModuleDir('Rule',$rulesFolders); $myRule =& patForms::createRule( 'MyRule' ); echo 'My Rule ' . get_class( $myRule ) . '
'; $coolRule =& patForms::createRule( 'CoolRule' ); echo 'Cool Rule ' . get_class( $coolRule ) . '
'; $naught =& patForms::createRule( 'DoesNotExist' ); echo 'Does Not Exist ' . get_class( $naught ) . '
'; // EXAMPLE END ------------------------------------------------------ $exampleGen->displayFooter(); ?>