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

add PHPDOX_HOME, instead of PHPDOX_PHAR #180

Merged
merged 2 commits into from
Nov 29, 2014
Merged
Changes from 1 commit
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
Next Next commit
add PHPDOX_HOME, instead of PHPDOC_PHAR
remicollet committed Nov 29, 2014
commit 97ac5a1a6229fb399447cf29556a726f9973a182
1 change: 1 addition & 0 deletions build/phar/autoload.php.in
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ spl_autoload_register(

Phar::mapPhar('phpdox.phar');
define('PHPDOX_PHAR', 'phpdox.phar');
define('PHPDOX_HOME', 'phar://' . PHPDOX_PHAR);

TheSeer\phpDox\Version::setVersion('___VERSION___');

4 changes: 2 additions & 2 deletions src/config/GlobalConfig.php
Original file line number Diff line number Diff line change
@@ -111,8 +111,8 @@ public function getProjects() {
* @throws ConfigException
*/
protected function runResolver($ctx) {
if (defined('PHPDOX_PHAR')) {
$home = 'phar://' . constant('PHPDOX_PHAR');
if (defined('PHPDOX_HOME')) {
$home = PHPDOX_HOME;
} else {
$home = realpath(__DIR__.'/../../');
}
4 changes: 2 additions & 2 deletions src/config/InheritanceConfig.php
Original file line number Diff line number Diff line change
@@ -55,8 +55,8 @@ public function __construct(CollectorConfig $config, fDOMElement $ctx = NULL) {
*/
public function getDependencyDirectories() {

if (defined('PHPDOX_PHAR')) {
$home = 'phar://' . constant('PHPDOX_PHAR');
if (defined('PHPDOX_HOME')) {
$home = PHPDOX_HOME;
} else {
$home = realpath(__DIR__.'/../../');
}
4 changes: 2 additions & 2 deletions src/generator/engine/html/HtmlConfig.php
Original file line number Diff line number Diff line change
@@ -40,8 +40,8 @@
class HtmlConfig extends \TheSeer\phpDox\BuildConfig {

public function getTemplateDirectory() {
if (defined('PHPDOX_PHAR')) {
$default = sprintf('phar://%s/templates/html', PHPDOX_PHAR);
if (defined('PHPDOX_HOME')) {
$default = PHPDOX_HOME . '/templates/html';
} else {
$default = __DIR__ . '/../../../../templates/html';
}