|
Revision 117, 1.4 kB
(checked in by argh, 4 years ago)
|
Massive update of the examples collection; added the patExampleGen examples framework; commented all examples; reworked all the templates...
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
require_once 'prepend.php'; |
|---|
| 21 |
|
|---|
| 22 |
$knownExamples = array(); |
|---|
| 23 |
$notReferenced = array(); |
|---|
| 24 |
$missing = array(); |
|---|
| 25 |
|
|---|
| 26 |
$sections as $sectionID => $sectionDef ) |
|---|
| 27 |
|
|---|
| 28 |
$sectionDef['pages'] as $pageID => $pageDef ) |
|---|
| 29 |
|
|---|
| 30 |
$file = $sectionDef['basename'].$pageID.'.php'; |
|---|
| 31 |
|
|---|
| 32 |
array_push( $knownExamples, $file ); |
|---|
| 33 |
|
|---|
| 34 |
file_exists( '../'.$file ) ) |
|---|
| 35 |
|
|---|
| 36 |
array_push( $missing, $file ); |
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
$d = dir( '../' ); |
|---|
| 42 |
false !== ( $entry = $d->read() ) ) |
|---|
| 43 |
|
|---|
| 44 |
stristr( $entry, 'example_' ) && stristr( $entry, '.php' ) && !in_array( $entry, $knownExamples ) ) |
|---|
| 45 |
|
|---|
| 46 |
array_push( $notReferenced, $entry ); |
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
$d->close(); |
|---|
| 50 |
|
|---|
| 51 |
'<b>The following examples are not referenced to in the sections:</b><br/><br/>'; |
|---|
| 52 |
$notReferenced ) ) |
|---|
| 53 |
|
|---|
| 54 |
'<i>none</i>'; |
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
implode( '<br>', $notReferenced ); |
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 |
'<br/><br/><b>The following examples are missing:</b><br/><br/>'; |
|---|
| 62 |
$missing ) ) |
|---|
| 63 |
|
|---|
| 64 |
'<i>none</i>'; |
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 |
implode( '<br>', $missing ); |
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
?> |
|---|