3.1.28. registerResource()

void registerResource ( string $name, string $callback )

Registers the new OPT resource function with the name $callback (without the optResource prefix!). The $name is the name of the handle, under which we want to access to this resource. $name is a reserved handle. In order to call the template located in your new resource, write the resourceHandle:template_name instead of the template file name. For example, db:sample will load the template "sample" located in the "db" resource. The "file" handle is a default handler; the names "template_file.tpl" and "file:template_file.tpl" are synonyms.

Note: this method is not available, if the Register method family or Custom resources was removed from the source with OPT Configurator.