apigen/apigen — Issue #115: Remove fixed file extension "~\.php$~i" and make it configurable
Author: Earlchaos
Created: 2012-03-07 15:45:45+00:00
State: open

Hi,

i've just installed apigen and set it up for our project but i found out, that file extension is fixed to "~\.php$~i" in Generator.php. This should be configurable because it's common to use other extensions too (not only phtml, php3, php4, php5 but also others).

I suggest these changes:

apigen/ApiGen/Config.php
Line 76: 'fileextension' => '~\.php$~i'

apigen/ApiGen/Generator.php
Line 204: if (!preg_match( $this->config->fileextension, $entry->getFilename())) {

apigen/apigen.neon.example
# Regular expression to match valid file extensions
fileextension: '~\.(php|php3|php4|php5|phtml)$~i'

Cheers, Frank Schenk