theseer/phpdox — pull request #180 by remicollet (2014-11-29 14:44:26+00:00)
Title: add PHPDOX_HOME, instead of PHPDOX_PHAR

Everywhere, this constant is used as 'phar://' . PHPDOX_PHAR

Having PHPDOX_HOME will make downstream distribution easier, just having to define its value with the path of static files (outside the library "src" dir) in the launcher (probably '/usr/share/phpdox')

The only remaining usage of PHPDOX_PHAR is

$phpdoxNode->setAttribute('phar', defined('PHPDOX_PHAR') ? 'yes' : 'no');

This could easily be removed

$phpdoxNode->setAttribute('phar',
defined('PHPDOX_HOME') && strpos(PHPDOX_HOME, 'phar:')===0 ? 'yes' : 'no');

But perhaps, if you want to be aware of origin of "phpdox" command used, something more generic can be use instead

$phpdoxNode->setAttribute('distribution', defined('PHPDOX_DIST') ? PHPDOX_DIST : 'src');

And of course, you have to define it as 'phar' in phar/autoload.in, and downstream to 'rpm', 'deb', or whatever else.