General developer forum

Location of mod_modulename_external class

 
Picture of Jean-Roch Meurisse
Location of mod_modulename_external class
Core developersTesters

Hi there,

Currently developing webservices for an activity module, I'm wondering where is the best place to put "mod_MODULENAME_external" class.

It can either be in moduleroot/externallib.php or in moduleroot/classes/external.php

What is the preferred location?

Thanks in advance

 
Average of ratings: -
Picture of Mark Johnson
Re: Location of mod_modulename_external class
Core developersParticularly helpful MoodlersPlugin developers

Putting things in the classes directory is preferred where possible.  This means the class can be autoloaded as required.

 
Average of ratings: -