root/trunk/examples/patExampleGen/prepend.php

Revision 120, 1.2 kB (checked in by schst, 4 years ago)

fix include (PEAR::Config could accidentally get included on Win32)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 <?php
2 /**
3  * Main prepend file for the examples framework, sets
4  * error reporting and initializes the patExampleGen
5  * class that manages the whole framework.
6  *
7  * $Id$
8  *
9  * @package        patForms
10  * @subpackage    Examples
11  * @author        Sebastian Mordziol <argh@php-tools.net>
12  */
13  
14     error_reporting( E_ALL );
15
16    /**
17     * The examples needed files list
18     */
19     include_once dirname(__FILE__).'/config.php';
20
21    /**
22     * The examples definitions
23     */
24     include_once 'sections.php';
25     
26    /**
27     * The examples manager class patExampleGen
28     */
29     include_once 'patExampleGen.php';
30     
31    /**
32     * Custom functions for the current examples collection
33     */
34     include_once 'customFunctions.php';
35     
36     // set up the examples generator with the section data
37     $exampleGen =& new patExampleGen;
38     $exampleGen->setAppName( $appName );
39     $exampleGen->setAppDescription( $appDesc );
40     $exampleGen->setAppForumId( $appForumId );
41     $exampleGen->setSections( $sections );
42     $exampleGen->setTabs( $tabs );
43     
44     // turn on error handling if not explicitly turned off
45     if( !isset( $errorHandling ) || $errorHandling != 'off' )
46     {
47            /**
48          * patErrorManager class
49          */
50         require_once $neededFiles['patErrorManager'];
51
52         patErrorManager::setErrorHandling( E_ALL, 'callback', array( $exampleGen, 'displayError' ) );
53     }
54 ?>
Note: See TracBrowser for help on using the browser.