Jump to content

Does a module really need to end with .module?


---
 Share

Recommended Posts

I'm using PHPdocumentor to generate documentation of my modules, but it fails to scan the .module files. Is there another way of making processwire see a module other than giving it a .module extension?

I'd like to rename my module file to .php but then processwire no longer sees my module.

Link to comment
Share on other sites

1 hour ago, FIA2008 said:

I'd like to rename my module file to .php but then processwire no longer sees my module.

I don't think you need to rename anything, although I haven't used phpDocumentor myself. I use apigen (as seen here). You can tell it in a configuration file what file extensions to parse. I see phpDocumentor has a similar feature as explained in its documentation here (see extensions).  Meaning, something like below should work.

 

<parser>
  <target>output</target>
  <encoding>utf8</encoding>
  <markers>
    <item>TODO</item>
    <item>FIXME</item>
  </markers>
  <extensions>
    <extension>php</extension>
    <extension>module</extension>    
  </extensions>
</parser>

 

Edited by kongondo
Example code
  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...