Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReadMe + Help activated #8

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[submodule "lib/DirectoryScanner"]
path = lib/DirectoryScanner
url = git://github.com/theseer/DirectoryScanner.git
[submodule "lib/docblock"]
path = lib/docblock
url = git://github.com/spriebsch/docblock.git
[submodule "lib/Autoload"]
path = lib/Autoload
url = git://github.com/theseer/Autoload.git
[submodule "lib/fDOMDocument"]
path = lib/fDOMDocument
url = git://github.com/theseer/fDOMDocument.git
[submodule "lib/staticReflection"]
path = lib/staticReflection
url = git://github.com/manuelpichler/staticReflection.git
51 changes: 51 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
phpdox
======

*PHPDox* is an alternative projet to PHPDocumentor.


Requirements
------------
In order to use phpdox, you'll need the ezcConsoleTools from components.ez.no:
sudo pear channel-discover components.ez.no
sudo pear install ezc/ConsoleTools

You also need to make sure you're using PHP 5.3+.

Installation
------------
Get the source code from GIT:
~ $ cd /var/www/
/var/www/ $ git clone --recursive [email protected]:Username/phpdox.git

_Note: If you've forgot the --recursive argument, you'll not have the submodule in lib/. So you might want to use:_
/var/www/ $ git submodule init
/var/www/ $ git submodule update


Usage Examples
--------------
You can run phpdox like this:
/var/www/ $ phpdox/phpdox.php


trouble shooting
----------------

* If you run phpdox.php and get the following error:
PHP Fatal error: require_once(): Failed opening required 'ezc/Base/base.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/phpdox/phpdox.php on line 58

Make sure you've installed ezc/ConsoleTools (see requirements).
Make sure that the ezc/ folder is located in one of the include_path of the error. If not, create a symbolic link.


* If you run phpdox.php and get the following error:
PHP Fatal error: Uncaught exception 'LogicException' with message 'Passed array does not specify an existing static method (class '\ezcBase' not found)' in /var/www/phpdox/phpdox.php:65

Make sure you're using PHP 5.3+.
If your setup is ok, you might want to try to edit the line 65 of the phpdox.php file to remove the \.
Change this line:
spl_autoload_register( array('\ezcBase','autoload'));
To this:
spl_autoload_register( array('ezcBase','autoload'));

1 change: 1 addition & 0 deletions lib/Autoload
Submodule Autoload added at 4afd5d
1 change: 1 addition & 0 deletions lib/DirectoryScanner
Submodule DirectoryScanner added at 87b21d
1 change: 1 addition & 0 deletions lib/docblock
Submodule docblock added at cfc41b
1 change: 1 addition & 0 deletions lib/fDOMDocument
Submodule fDOMDocument added at 960d2e
1 change: 1 addition & 0 deletions lib/staticReflection
Submodule staticReflection added at a2cdac
17 changes: 11 additions & 6 deletions phpdox.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,17 @@
use \TheSeer\phpDox;
use \pdepend\reflection\Autoloader;

require __DIR__ . '/../DirectoryScanner/autoload.php';
require __DIR__ . '/../Autoload/src/phpfilter.php';
require __DIR__ . '/../fDomDocument/autoload.php';
require __DIR__ . '/../ezc/current/Base/src/base.php';
require __DIR__ . '/../staticReflection/source/pdepend/reflection/Autoloader.php';
require __DIR__ . '/../docblock/DocBlock.php';
if (file_exists(__DIR__ . '/.git')) {
require __DIR__ . '/lib/DirectoryScanner/autoload.php';
require __DIR__ . '/lib/Autoload/src/phpfilter.php';
require __DIR__ . '/lib/fDOMDocument/autoload.php';
require __DIR__ . '/lib/staticReflection/source/pdepend/reflection/Autoloader.php';
require __DIR__ . '/lib/docblock/DocBlock.php';
} else {
// ...
}

require_once 'ezc/Base/base.php';

require __DIR__ . '/src/cli.php';
require __DIR__ . '/src/builder.php';
Expand Down
9 changes: 8 additions & 1 deletion src/cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ public function run() {
$input = new \ezcConsoleInput();
$this->registerOptions($input);
$input->process();

//Display Help
if($input->getOption('help')->value) {
echo $input->getHelpText("PHPDox is an alternative to PHPDocumentor. It aim to generate API Documentation of PHP project, based on standard DocBlocks.");
exit(0);
}

$this->outputDir = $input->getOption('output')->value;
$processor = new Processor(
$this->outputDir,
Expand Down Expand Up @@ -188,4 +195,4 @@ protected function saveContainer() {
}
}
}
}
}