Witam,
od niedawna postanowiłem komentować swój kod.
Poczytałem w necie i jednym z lepszych do tego jest owy Phpdocumentator.
Jednak mam kłopoty ze stworzeniem pierwszej dokumentacji.

Mam plik index.php w tej lokalizacji C:\wamp\www\Dokumentacja\plik\index.php
  1. <?php
  2. /**
  3. * Finds and returns user by ID or username
  4. *
  5. * @param int|string $user Either an ID or a username
  6. * @param PDO $pdo A valid PDO object
  7. * @return User Returns User object or null if not found
  8. */
  9. function getUser($user, PDO $pdo)
  10. {
  11. // ...
  12. if ($isFound) {
  13. return new User(...);
  14. }
  15. return null;
  16. }
  17. ?>


Uruchamiam polecenie w wierszu poleceń.
C:\wamp\www\Dokumentacja>phpdoc -d c:\wamp\www\Dokumentacja\phpdoc\plik -t c:\wa
mp\www\Dokumentacja\dokument -ti 'Documentation Title' -dn 'Default Package' -o
HTML:frames:default

Dostaję komunikat błędu że nie może znaleźć pliku lub katalogu.
CODE
PHP Warning: require_once(Zend/Console/Getopt/Exception.php): failed to open st
ream: No such file or directory in C:\wamp\bin\php\php5.3.8\pear\PhpDocumentor\s
rc\Zend\Console\Getopt.php on line 783
PHP Stack trace:
PHP 1. {main}() C:\wamp\bin\php\php5.3.8\phpdoc.php:0
PHP 2. phpDocumentor_Task_Runner->__construct() C:\wamp\bin\php\php5.3.8\phpdo
c.php:37
PHP 3. phpDocumentor_Task_Abstract->parse() C:\wamp\bin\php\php5.3.8\pear\PhpD
ocumentor\src\phpDocumentor\Task\Runner.php:67
PHP 4. Zend_Console_Getopt->parse() C:\wamp\bin\php\php5.3.8\pear\PhpDocumento
r\src\phpDocumentor\Task\Abstract.php:86
PHP 5. Zend_Console_Getopt->_parseShortOptionCluster() C:\wamp\bin\php\php5.3.
8\pear\PhpDocumentor\src\Zend\Console\Getopt.php:717
PHP 6. Zend_Console_Getopt->_parseSingleOption() C:\wamp\bin\php\php5.3.8\pear
\PhpDocumentor\src\Zend\Console\Getopt.php:765

Warning: require_once(Zend/Console/Getopt/Exception.php): failed to open stream:
No such file or directory in C:\wamp\bin\php\php5.3.8\pear\PhpDocumentor\src\Ze
nd\Console\Getopt.php on line 783

Call Stack:
0.0007 348272 1. {main}() C:\wamp\bin\php\php5.3.8\phpdoc.php:0
0.0065 469352 2. phpDocumentor_Task_Runner->__construct() C:\wamp\bin\
php\php5.3.8\phpdoc.php:37
0.0208 852752 3. phpDocumentor_Task_Abstract->parse() C:\wamp\bin\php\
php5.3.8\pear\PhpDocumentor\src\phpDocumentor\Task\Runner.php:67
0.0208 852752 4. Zend_Console_Getopt->parse() C:\wamp\bin\php\php5.3.8
\pear\PhpDocumentor\src\phpDocumentor\Task\Abstract.php:86
0.0215 853712 5. Zend_Console_Getopt->_parseShortOptionCluster() C:\wa
mp\bin\php\php5.3.8\pear\PhpDocumentor\src\Zend\Console\Getopt.php:717
0.0216 853952 6. Zend_Console_Getopt->_parseSingleOption() C:\wamp\bin
\php\php5.3.8\pear\PhpDocumentor\src\Zend\Console\Getopt.php:765

PHP Fatal error: require_once(): Failed opening required 'Zend/Console/Getopt/E
xception.php' (include_path='.;C:\wamp\bin\php\php5.3.8\pear') in C:\wamp\bin\ph
p\php5.3.8\pear\PhpDocumentor\src\Zend\Console\Getopt.php on line 783
PHP Stack trace:
PHP 1. {main}() C:\wamp\bin\php\php5.3.8\phpdoc.php:0
PHP 2. phpDocumentor_Task_Runner->__construct() C:\wamp\bin\php\php5.3.8\phpdo
c.php:37
PHP 3. phpDocumentor_Task_Abstract->parse() C:\wamp\bin\php\php5.3.8\pear\PhpD
ocumentor\src\phpDocumentor\Task\Runner.php:67
PHP 4. Zend_Console_Getopt->parse() C:\wamp\bin\php\php5.3.8\pear\PhpDocumento
r\src\phpDocumentor\Task\Abstract.php:86
PHP 5. Zend_Console_Getopt->_parseShortOptionCluster() C:\wamp\bin\php\php5.3.
8\pear\PhpDocumentor\src\Zend\Console\Getopt.php:717
PHP 6. Zend_Console_Getopt->_parseSingleOption() C:\wamp\bin\php\php5.3.8\pear
\PhpDocumentor\src\Zend\Console\Getopt.php:765

Fatal error: require_once(): Failed opening required 'Zend/Console/Getopt/Except
ion.php' (include_path='.;C:\wamp\bin\php\php5.3.8\pear') in C:\wamp\bin\php\php
5.3.8\pear\PhpDocumentor\src\Zend\Console\Getopt.php on line 783

Call Stack:
0.0007 348272 1. {main}() C:\wamp\bin\php\php5.3.8\phpdoc.php:0
0.0065 469352 2. phpDocumentor_Task_Runner->__construct() C:\wamp\bin\
php\php5.3.8\phpdoc.php:37
0.0208 852752 3. phpDocumentor_Task_Abstract->parse() C:\wamp\bin\php\
php5.3.8\pear\PhpDocumentor\src\phpDocumentor\Task\Runner.php:67
0.0208 852752 4. Zend_Console_Getopt->parse() C:\wamp\bin\php\php5.3.8
\pear\PhpDocumentor\src\phpDocumentor\Task\Abstract.php:86
0.0215 853712 5. Zend_Console_Getopt->_parseShortOptionCluster() C:\wa
mp\bin\php\php5.3.8\pear\PhpDocumentor\src\Zend\Console\Getopt.php:717
0.0216 853952 6. Zend_Console_Getopt->_parseSingleOption() C:\wamp\bin
\php\php5.3.8\pear\PhpDocumentor\src\Zend\Console\Getopt.php:765


Ok, już sobie radzę! smile.gif