summaryrefslogtreecommitdiff
path: root/ext/spl/examples
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2004-05-10 17:26:03 +0000
committerMarcus Boerger <helly@php.net>2004-05-10 17:26:03 +0000
commit68c22fba723c77c7a8ea6b2d33f580aa26bf88d8 (patch)
tree0d8782468e85bc7e1c9f50a24bd053afe4e9f8ba /ext/spl/examples
parent428e722d882699787234228270601649fddb0bbb (diff)
downloadphp-git-68c22fba723c77c7a8ea6b2d33f580aa26bf88d8.tar.gz
- Documentation update
- Checkin doxygen config file # A patched version of doxygen is needed, hopefully 1.3.8 will contain it
Diffstat (limited to 'ext/spl/examples')
-rwxr-xr-xext/spl/examples/appenditerator.inc11
-rwxr-xr-xext/spl/examples/autoload.inc9
-rwxr-xr-xext/spl/examples/dba_array.php14
-rwxr-xr-xext/spl/examples/dba_dump.php14
-rwxr-xr-xext/spl/examples/dbaarray.inc11
-rwxr-xr-xext/spl/examples/dbareader.inc11
-rwxr-xr-xext/spl/examples/directoryfilterdots.inc11
-rwxr-xr-xext/spl/examples/directorytree.inc11
-rwxr-xr-xext/spl/examples/directorytree.php18
-rw-r--r--ext/spl/examples/directorytreeiterator.inc11
-rwxr-xr-xext/spl/examples/emptyiterator.inc11
-rwxr-xr-xext/spl/examples/findfile.inc11
-rwxr-xr-xext/spl/examples/findfile.php16
-rwxr-xr-xext/spl/examples/findregex.php14
-rwxr-xr-xext/spl/examples/infiniteiterator.inc11
-rwxr-xr-xext/spl/examples/ini_groups.php14
-rwxr-xr-xext/spl/examples/inigroups.inc11
-rwxr-xr-xext/spl/examples/keyfilter.inc11
-rwxr-xr-xext/spl/examples/norewinditerator.inc11
-rwxr-xr-xext/spl/examples/regexfindfile.inc11
-rwxr-xr-xext/spl/examples/searchiterator.inc9
-rwxr-xr-xext/spl/examples/tree.php12
22 files changed, 206 insertions, 57 deletions
diff --git a/ext/spl/examples/appenditerator.inc b/ext/spl/examples/appenditerator.inc
index edc80410df..d2d5c8dd0b 100755
--- a/ext/spl/examples/appenditerator.inc
+++ b/ext/spl/examples/appenditerator.inc
@@ -1,6 +1,15 @@
<?php
-/** \ingroup Examples
+/** @file appenditerator.inc
+ * @ingroup Examples
+ * @brief class AppendIterator
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
+/** @ingroup Examples
* @brief Iterator that iterates over several iterators one after the other
* @author Marcus Boerger
* @version 1.0
diff --git a/ext/spl/examples/autoload.inc b/ext/spl/examples/autoload.inc
index c2c4222f85..af4b931ff4 100755
--- a/ext/spl/examples/autoload.inc
+++ b/ext/spl/examples/autoload.inc
@@ -1,5 +1,14 @@
<?php
+/** @file autoload.inc
+ * @ingroup Examples
+ * @brief function __autoload
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
/** \internal
* Tries to load class $classname from directory $dir.
*/
diff --git a/ext/spl/examples/dba_array.php b/ext/spl/examples/dba_array.php
index 7d7a3816df..dfdaf8fb75 100755
--- a/ext/spl/examples/dba_array.php
+++ b/ext/spl/examples/dba_array.php
@@ -1,15 +1,17 @@
<?php
-/** dba array utility
+/** @file dba_array.php
+ * @brief Program DBA array utility
+ * @ingroup Examples
+ * @author Marcus Boerger
+ * @date 2003 - 2004
*
- * Usage php dba_array.php <file> <handler> <key> [<value>]
+ * Usage php dba_array.php \<file\> \<handler\> \<key\> [\<value\>]
*
- * If <value> is specified then <key> is set to <value> in <file>.
- * Else the value of <key> is printed only.
+ * If \<value\> is specified then \<key\> is set to \<value\> in \<file\>.
+ * Else the value of \<key\> is printed only.
*
* Note: configure with --enable-dba
- *
- * (c) Marcus Boerger, 2003 - 2004
*/
if ($argc < 4) {
diff --git a/ext/spl/examples/dba_dump.php b/ext/spl/examples/dba_dump.php
index 613674fef8..7121babac6 100755
--- a/ext/spl/examples/dba_dump.php
+++ b/ext/spl/examples/dba_dump.php
@@ -1,15 +1,17 @@
<?php
-/** dba dump utility
+/** @file dba_dump.php
+ * @brief Program DBA dump utility
+ * @ingroup Examples
+ * @author Marcus Boerger
+ * @date 2003 - 2004
*
- * Usage: php dba_dump.php <file> <handler> [<regex>]
+ * Usage: php dba_dump.php \<file\> \<handler\> [\<regex\>]
*
- * Show all groups in the ini file specified by <file>.
- * The regular expression <regex> is used to filter the by setting name.
+ * Show all groups in the ini file specified by \<file\>.
+ * The regular expression \<regex\> is used to filter the by setting name.
*
* Note: configure with --enable-dba
- *
- * (c) Marcus Boerger, 2003 - 2004
*/
if ($argc < 3) {
diff --git a/ext/spl/examples/dbaarray.inc b/ext/spl/examples/dbaarray.inc
index 51cd38fadf..1064b581e8 100755
--- a/ext/spl/examples/dbaarray.inc
+++ b/ext/spl/examples/dbaarray.inc
@@ -1,8 +1,17 @@
<?php
+/** @file dbaarray.inc
+ * @ingroup Examples
+ * @brief class DbaArray
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
if (!class_exists("DbaReader")) require_once("dbareader.inc");
-/** \ingroup Examples
+/** @ingroup Examples
* @brief This implements a DBA Array
* @author Marcus Boerger
* @version 1.0
diff --git a/ext/spl/examples/dbareader.inc b/ext/spl/examples/dbareader.inc
index add4df9b1f..02b0840317 100755
--- a/ext/spl/examples/dbareader.inc
+++ b/ext/spl/examples/dbareader.inc
@@ -1,6 +1,15 @@
<?php
-/** \ingroup Examples
+/** @file dbareader.inc
+ * @ingroup Examples
+ * @brief class DbaReader
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
+/** @ingroup Examples
* @brief This implements a DBA Iterator.
* @author Marcus Boerger
* @version 1.0
diff --git a/ext/spl/examples/directoryfilterdots.inc b/ext/spl/examples/directoryfilterdots.inc
index f03b4290f1..899ae6a5d6 100755
--- a/ext/spl/examples/directoryfilterdots.inc
+++ b/ext/spl/examples/directoryfilterdots.inc
@@ -1,6 +1,15 @@
<?php
-/** \ingroup Examples
+/** @file directoryfilterdots.inc
+ * @ingroup Examples
+ * @brief class DirectoryFilterDots
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
+/** @ingroup Examples
* @brief A filtered DirectoryIterator
* @author Marcus Boerger
* @version 1.0
diff --git a/ext/spl/examples/directorytree.inc b/ext/spl/examples/directorytree.inc
index 31c84b4af8..5c19c09931 100755
--- a/ext/spl/examples/directorytree.inc
+++ b/ext/spl/examples/directorytree.inc
@@ -1,6 +1,15 @@
<?php
-/** \ingroup Examples
+/** @file directorytree.inc
+ * @ingroup Examples
+ * @brief class DirectoryTree
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
+/** @ingroup Examples
* @brief A directory iterator that does not show '.' and '..'.
* @author Marcus Boerger
* @version 1.0
diff --git a/ext/spl/examples/directorytree.php b/ext/spl/examples/directorytree.php
index 4f6612a1fd..ecaddbe33d 100755
--- a/ext/spl/examples/directorytree.php
+++ b/ext/spl/examples/directorytree.php
@@ -1,16 +1,14 @@
<?php
-if (!class_exists('DirectoryTreeIterator', false)) {
- require_once(dirname(__FILE__). '/directorytreeiterator.inc');
-}
-
-/** tree view example
+/** @file directorytree.php
+ * @brief Program Directory tree example
+ * @ingroup Examples
+ * @author Marcus Boerger
+ * @date 2003 - 2004
*
- * Usage: php directorytree.php <path> [<start> [<count>]]
+ * Usage: php directorytree.php \<path\> [\<start\> [\<count\>]]
*
- * Simply specify the path to tree with parameter <path>.
- *
- * (c) Marcus Boerger, 2003
+ * Simply specify the path to tree with parameter \<path\>.
*/
if ($argc < 2) {
@@ -26,6 +24,8 @@ EOF;
exit(1);
}
+if (!class_exists("DirectoryTreeIterator")) require_once("directorytreeiterator.inc");
+
$length = $argc > 3 ? $argv[3] : -1;
echo $argv[1]."\n";
diff --git a/ext/spl/examples/directorytreeiterator.inc b/ext/spl/examples/directorytreeiterator.inc
index 4fadd6f71b..38bf240e70 100644
--- a/ext/spl/examples/directorytreeiterator.inc
+++ b/ext/spl/examples/directorytreeiterator.inc
@@ -1,6 +1,15 @@
<?php
-/** \ingroup Examples
+/** @file directorytreeiterator.inc
+ * @ingroup Examples
+ * @brief class DirectoryTreeIterator
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
+/** @ingroup Examples
* @brief DirectoryIterator to generate ASCII graphic directory trees
* @author Marcus Boerger
* @version 1.0
diff --git a/ext/spl/examples/emptyiterator.inc b/ext/spl/examples/emptyiterator.inc
index 1a79173938..2402497b4f 100755
--- a/ext/spl/examples/emptyiterator.inc
+++ b/ext/spl/examples/emptyiterator.inc
@@ -1,6 +1,15 @@
<?php
-/** \ingroup Examples
+/** @file emptyiterator.inc
+ * @ingroup Examples
+ * @brief class EmptyIterator
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
+/** @ingroup Examples
* @brief An empty Iterator
* @author Marcus Boerger
* @version 1.0
diff --git a/ext/spl/examples/findfile.inc b/ext/spl/examples/findfile.inc
index 147a69b34f..56dba97b92 100755
--- a/ext/spl/examples/findfile.inc
+++ b/ext/spl/examples/findfile.inc
@@ -1,9 +1,18 @@
<?php
+/** @file findfile.inc
+ * @ingroup Examples
+ * @brief class FindFile
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
if (!class_exists("FindFile")) require_once("findfile.inc");
if (!class_exists("AppendIterator")) require_once("appenditerator.inc");
-/**
+/** @ingroup Examples
* @brief Base class to find files
* @author Marcus Boerger
* @version 1.1
diff --git a/ext/spl/examples/findfile.php b/ext/spl/examples/findfile.php
index 58f53764cf..03c06eaa46 100755
--- a/ext/spl/examples/findfile.php
+++ b/ext/spl/examples/findfile.php
@@ -1,14 +1,16 @@
<?php
-/** Find a specific file by name.
+/** @file findfile.php
+ * @brief Program Find a specific file by name.
+ * @ingroup Examples
+ * @author Marcus Boerger
+ * @date 2003 - 2004
*
- * Usage: php findfile.php <path> <name>
+ * Usage: php findfile.php \<path\> \<name\>
*
- * <path> Path to search in. You can specify multiple paths by separating
+ * \<path\> Path to search in. You can specify multiple paths by separating
* them with ';'.
- * <name> Filename to look for.
- *
- * (c) Marcus Boerger, 2003 - 2004
+ * \<name\> Filename to look for.
*/
if ($argc < 3) {
@@ -25,5 +27,7 @@ EOF;
exit(1);
}
+if (!class_exists("FindFile")) require_once("findfile.inc");
+
foreach(new FindFile($argv[1], $argv[2]) as $file) echo $file->getPathname()."\n";
?> \ No newline at end of file
diff --git a/ext/spl/examples/findregex.php b/ext/spl/examples/findregex.php
index 55431c0e38..8a7dd8158d 100755
--- a/ext/spl/examples/findregex.php
+++ b/ext/spl/examples/findregex.php
@@ -1,13 +1,15 @@
<?php
-/** Find a specific file by name.
+/** @file findregex.php
+ * @brief Program Find a specific file by name.
+ * @ingroup Examples
+ * @author Marcus Boerger, Adam Trachtenberg
+ * @date 2004
*
- * Usage: php findregex.php <path> <name>
+ * Usage: php findregex.php \<path\> \<name\>
*
- * <path> Path to search in.
- * <name> Filename to look for.
- *
- * (c) Marcus Boerger, Adam Trachtenberg, 2004
+ * \<path\> Path to search in.
+ * \<name\> Filename to look for.
*/
if ($argc < 3) {
diff --git a/ext/spl/examples/infiniteiterator.inc b/ext/spl/examples/infiniteiterator.inc
index 9a3a2eca89..5f27633eb3 100755
--- a/ext/spl/examples/infiniteiterator.inc
+++ b/ext/spl/examples/infiniteiterator.inc
@@ -1,6 +1,15 @@
<?php
-/** \ingroup Examples
+/** @file infiniteiterator.inc
+ * @ingroup Examples
+ * @brief class InfiniteIterator
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
+/** @ingroup Examples
* @brief An infinite Iterator
* @author Marcus Boerger
* @version 1.0
diff --git a/ext/spl/examples/ini_groups.php b/ext/spl/examples/ini_groups.php
index 81cd4012b0..c418eb0cfb 100755
--- a/ext/spl/examples/ini_groups.php
+++ b/ext/spl/examples/ini_groups.php
@@ -1,15 +1,17 @@
<?php
-/** List groups within an ini file
+/** @file ini_groups.php
+ * @brief Program List groups within an ini file
+ * @ingroup Examples
+ * @author Marcus Boerger
+ * @date 2003 - 2004
*
- * Usage: php dba_dump.php <file> [<regex>]
+ * Usage: php dba_dump.php \<file\> [\<regex\>]
*
- * Show all groups in the ini file specified by <file>.
- * The regular expression <regex> is used to filter the result.
+ * Show all groups in the ini file specified by \<file\>.
+ * The regular expression \<regex\> is used to filter the result.
*
* Note: configure with --enable-dba
- *
- * (c) Marcus Boerger, 2003 - 2004
*/
if ($argc < 2) {
diff --git a/ext/spl/examples/inigroups.inc b/ext/spl/examples/inigroups.inc
index 745930643b..519c31631a 100755
--- a/ext/spl/examples/inigroups.inc
+++ b/ext/spl/examples/inigroups.inc
@@ -1,9 +1,18 @@
<?php
+/** @file inigroups.inc
+ * @ingroup Examples
+ * @brief class IniGroups
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
if (!class_exists("KeyFilter")) require_once("keyfilter.inc");
if (!class_exists("DbaReader")) require_once("dbareader.inc");
-/** \ingroup Examples
+/** @ingroup Examples
* @brief Class to iterate all groups within an ini file.
* @author Marcus Boerger
* @version 1.1
diff --git a/ext/spl/examples/keyfilter.inc b/ext/spl/examples/keyfilter.inc
index 0a61783817..b166ef3f7d 100755
--- a/ext/spl/examples/keyfilter.inc
+++ b/ext/spl/examples/keyfilter.inc
@@ -1,6 +1,15 @@
<?php
-/** \ingroup Examples
+/** @file keyfilter.inc
+ * @ingroup Examples
+ * @brief class KeyFilter
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
+/** @ingroup Examples
* @brief Regular expression filter for string iterators
* @author Marcus Boerger
* @version 1.1
diff --git a/ext/spl/examples/norewinditerator.inc b/ext/spl/examples/norewinditerator.inc
index c8d29b96ea..6564e1d53e 100755
--- a/ext/spl/examples/norewinditerator.inc
+++ b/ext/spl/examples/norewinditerator.inc
@@ -1,6 +1,15 @@
<?php
-/**
+/** @file norewinditerator.inc
+ * @ingroup Examples
+ * @brief class NoRewindIterator
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
+/** @ingroup Examples
* @brief An Iterator that doesn't call rewind
* @author Marcus Boerger
* @version 1.0
diff --git a/ext/spl/examples/regexfindfile.inc b/ext/spl/examples/regexfindfile.inc
index 396a8abdfb..af3b293a17 100755
--- a/ext/spl/examples/regexfindfile.inc
+++ b/ext/spl/examples/regexfindfile.inc
@@ -1,6 +1,15 @@
<?php
-/**
+/** @file regexfindfile.inc
+ * @ingroup Examples
+ * @brief class RegexFindFile
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
+/** @ingroup Examples
* @brief Find files by regular expression
* @author Marcus Boerger
* @version 1.1
diff --git a/ext/spl/examples/searchiterator.inc b/ext/spl/examples/searchiterator.inc
index caee0142dd..4d05cec5f1 100755
--- a/ext/spl/examples/searchiterator.inc
+++ b/ext/spl/examples/searchiterator.inc
@@ -1,5 +1,14 @@
<?php
+/** @file searchiterator.inc
+ * @ingroup Examples
+ * @brief abstract class SearchIterator
+ * @author Marcus Boerger
+ * @date 2003 - 2004
+ *
+ * SPL - Standard PHP Library
+ */
+
/** @ingroup Examples
* @brief Iterator to search for a specific element
* @author Marcus Boerger
diff --git a/ext/spl/examples/tree.php b/ext/spl/examples/tree.php
index ce989a2c34..96a6ccde20 100755
--- a/ext/spl/examples/tree.php
+++ b/ext/spl/examples/tree.php
@@ -1,12 +1,14 @@
<?php
-/** tree view example
+/** @file tree.php
+ * @brief Program Tree view example
+ * @ingroup Examples
+ * @author Marcus Boerger
+ * @date 2003 - 2004
*
- * Usage: php tree.php <path>
+ * Usage: php tree.php \<path\>
*
- * Simply specify the path to tree with parameter <path>.
- *
- * (c) Marcus Boerger, 2003 - 2004
+ * Simply specify the path to tree with parameter \<path\>.
*/
// The following line only operates on classes which are converted to c already.