changed git call from https to git readonly
[atutor.git] / mods / phpdoc / PHPDoc / index.php
1 <?php
2 define('AT_INCLUDE_PATH', '../../../include/');
3 require (AT_INCLUDE_PATH.'vitals.inc.php');
4 //$_custom_css = $_base_path . 'mods/hello_world/module.css'; // use a custom stylesheet
5 require (AT_INCLUDE_PATH.'header.inc.php');
6 ?>
7
8                                         <h1>Welcome to PHPDoc!</h1>
9                                 
10                                         <p> By default PHPDoc scans the ATutor include directory, where 99% of the API exists. If you wish to change that, edit the path in the source code of this file, redefining the value of "setSourceDirectory", then reload this page.
11                                         </p>
12                                 <hr>
13                                 <pre>
14                                 <?php
15                                 $start = time();
16                         
17                                 // WARNING: long runtimes! Make modifications 
18                                 // to the php[3].ini if neccessary. A P3-500 
19                                 // needs slightly more than 30 seconds to 
20                                 // document phpdoc itself.
21                                                 
22                                 // Directory with include files
23                                 define("PHPDOC_INCLUDE_DIR", AT_INCLUDE_PATH."../mods/phpdoc/PHPDoc/");
24                                 // Important: set this to the Linebreak sign of your system!
25                                 define("PHPDOC_LINEBREAK", "\r\n");
26                 
27                                 // main PHPDoc Include File
28                                 include(AT_INCLUDE_PATH."../mods/phpdoc/PHPDoc/prepend.php");           
29                 
30                                 $doc = new Phpdoc;
31                                 
32                                 // Sets the name of your application.
33                                 // The name of the application gets used in many default templates.
34                                 $doc->setApplication("ATutor LMS API");
35                                 
36                                 // directory where your source files reside:
37                                 $doc->setSourceDirectory(AT_INCLUDE_PATH);
38                                 
39                                 // save the generated docs here:
40                                 $doc->setTarget(AT_INCLUDE_PATH."../mods/phpdoc/PHPDoc/apidoc/keep/");
41                                 
42                                 // use these templates:
43                                 $doc->setTemplateDirectory(AT_INCLUDE_PATH."../mods/phpdoc/PHPDoc/renderer/html/templates/");
44                                 
45                                 // source files have one of these suffixes:
46                                 $doc->setSourceFileSuffix( array ("php", "inc") );
47                 
48                                 // parse and generate the xml files
49                                 $doc->parse();
50                                 
51                                 // turn xml in to html using templates
52                                 $doc->render();
53                                 
54                                 printf("%d seconds needed\n\n.", time() - $start);
55                                 ?>
56                                 </pre>  
57                                 <hr>
58                                         <h2>Finished!</h2>
59                                         <p>The generated XML and HTML files can be found in
60                                         the directory specified with setTarget() in the source code of this file. By default this location is "installationdir/apidoc/".
61                                         Within this directory is another directory named "keep/". It contains a stylesheet file and 
62                                         a frameset you can use to browse the HTML files. </p>
63
64                                         <p><a href="mods/phpdoc/PHPDoc/apidoc/keep/index2.html" target="atutorapi">View API Documentation</a> (opens a new window)</p>
65
66                                         <p>For assistance with PHPDoc, please contact the developer, at:
67                                         <p>
68                                         <a href="mailto:ulf.wendel@phpdoc.de">ulf.wendel@phpdoc.de</a>
69
70 <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>