streams/Zotlabs/Module
redmatrix b593c3a9b9 1. provide automatic relocation of important links in items that are imported or synced to clones
2. provide framework for custom curl request bodies using custom/non-standard request methods. This was a real nightmare because curl doesn't actually let you specify a string to send as the request body (except when doing POST). You have to treat it as a file upload using a custom file handler function which provides the actual content in chunks as if it were buffered I/O.
3. item_store and item_store_update now return the item that was stored
2016-06-21 18:24:36 -07:00
..
Achievements.php module updates 2016-04-18 20:38:38 -07:00
Acl.php foreach: invalid argument 2016-06-09 22:07:27 -07:00
Admin.php foreach: invalid argument 2016-06-09 22:07:27 -07:00
Api.php more removal of reserved words from DB schemas 2016-05-31 17:50:47 -07:00
Appman.php move apps to zlib 2016-05-22 19:25:27 -07:00
Apps.php Can't use "use x as y" aliases in callback function declarations 2016-05-22 22:08:01 -07:00
Attach.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Authtest.php module updates 2016-04-18 20:38:38 -07:00
Block.php deprecate the item_id table - replace with iconfig. A possibly useful function in the iconfig class would be a search which takes a service id and type and uid, matches against an item and returns the iid. That could save a bit of code duplication. 2016-06-13 19:58:24 -07:00
Blocks.php deprecate the item_id table - replace with iconfig. A possibly useful function in the iconfig class would be a search which takes a service id and type and uid, matches against an item and returns the iid. That could save a bit of code duplication. 2016-06-13 19:58:24 -07:00
Bookmarks.php module updates 2016-04-18 20:38:38 -07:00
Branchtopic.php module updates 2016-04-18 20:38:38 -07:00
Cal.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Channel.php turn the oft-repeated block_public ... check into a function observer_prohibited() 2016-05-22 17:52:30 -07:00
Chanview.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Chat.php more db column renames 2016-05-31 21:45:33 -07:00
Chatsvc.php move chatroom stuff to zlib 2016-05-22 20:54:52 -07:00
Cloud.php another try on #385 - replace sabres restrictive CSP with what we do in boot.php 2016-05-25 14:18:41 +02:00
Common.php module updates 2016-04-18 20:38:38 -07:00
Connect.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Connections.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Connedit.php readme for the module directory, also provide an undocumented way to reset the timestamp on connection photos to force a refresh without messing with the database directly. 2016-06-14 17:04:29 -07:00
Contactgroup.php more db column renames 2016-05-31 21:45:33 -07:00
Cover_photo.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Dav.php rework the conversation object stuff at a high level - still needs a bit of refactoring 2016-05-20 22:52:47 -07:00
Directory.php turn the oft-repeated block_public ... check into a function observer_prohibited() 2016-05-22 17:52:30 -07:00
Dirsearch.php module updates 2016-04-18 20:38:38 -07:00
Display.php deprecate the item_id table - replace with iconfig. A possibly useful function in the iconfig class would be a search which takes a service id and type and uid, matches against an item and returns the iid. That could save a bit of code duplication. 2016-06-13 19:58:24 -07:00
Dreport.php module updates 2016-04-18 20:38:38 -07:00
Editblock.php deprecate the item_id table - replace with iconfig. A possibly useful function in the iconfig class would be a search which takes a service id and type and uid, matches against an item and returns the iid. That could save a bit of code duplication. 2016-06-13 19:58:24 -07:00
Editlayout.php deprecate the item_id table - replace with iconfig. A possibly useful function in the iconfig class would be a search which takes a service id and type and uid, matches against an item and returns the iid. That could save a bit of code duplication. 2016-06-13 19:58:24 -07:00
Editpost.php issue #391 - htmlspecialchars_decode before firing up jot, which re-encodes 2016-05-19 00:56:51 -07:00
Editwebpage.php deprecate the item_id table - replace with iconfig. A possibly useful function in the iconfig class would be a search which takes a service id and type and uid, matches against an item and returns the iid. That could save a bit of code duplication. 2016-06-13 19:58:24 -07:00
Embedphotos.php Photo embed button with album browser works in new post editor. 2016-06-12 19:41:37 -04:00
Events.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Fbrowser.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Feed.php turn the oft-repeated block_public ... check into a function observer_prohibited() 2016-05-22 17:52:30 -07:00
Ffsapi.php module updates 2016-04-18 20:38:38 -07:00
Fhublocs.php module updates 2016-04-18 20:38:38 -07:00
Filer.php more db column renames 2016-05-31 21:45:33 -07:00
Filerm.php more db column renames 2016-05-31 21:45:33 -07:00
Filestorage.php Update some modules to use new ACL dialog feature 2016-05-08 21:27:52 +10:00
Follow.php daemon conversion continued... 2016-05-19 22:26:37 -07:00
Getfile.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Group.php more db column renames 2016-05-31 21:45:33 -07:00
Hcard.php module updates 2016-04-18 20:38:38 -07:00
Help.php rework the conversation object stuff at a high level - still needs a bit of refactoring 2016-05-20 22:52:47 -07:00
Home.php module updates 2016-04-18 20:38:38 -07:00
Hostxrd.php convert all the _well_known service controllers which are a bit touchy when it comes to the router 2016-04-18 01:35:09 -07:00
Id.php module updates 2016-04-18 20:38:38 -07:00
Impel.php deprecate the item_id table - replace with iconfig. A possibly useful function in the iconfig class would be a search which takes a service id and type and uid, matches against an item and returns the iid. That could save a bit of code duplication. 2016-06-13 19:58:24 -07:00
Import.php 1. provide automatic relocation of important links in items that are imported or synced to clones 2016-06-21 18:24:36 -07:00
Import_items.php 1. provide automatic relocation of important links in items that are imported or synced to clones 2016-06-21 18:24:36 -07:00
Invite.php module updates 2016-04-18 20:38:38 -07:00
Item.php 1. provide automatic relocation of important links in items that are imported or synced to clones 2016-06-21 18:24:36 -07:00
Lang.php module updates 2016-04-18 20:38:38 -07:00
Layouts.php deprecate the item_id table - replace with iconfig. A possibly useful function in the iconfig class would be a search which takes a service id and type and uid, matches against an item and returns the iid. That could save a bit of code duplication. 2016-06-13 19:58:24 -07:00
Like.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Linkinfo.php rework the conversation object stuff at a high level - still needs a bit of refactoring 2016-05-20 22:52:47 -07:00
Lockview.php more db column renames 2016-05-31 21:45:33 -07:00
Locs.php daemon conversion continued... 2016-05-19 22:26:37 -07:00
Login.php module updates 2016-04-18 20:38:38 -07:00
Lostpass.php module updates 2016-04-18 20:38:38 -07:00
Magic.php finish updating zot_finger instances 2016-05-21 18:18:33 -07:00
Mail.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Manage.php missed table rename in event query in mod_manage 2016-06-03 18:39:11 -07:00
Match.php module updates 2016-04-18 20:38:38 -07:00
Menu.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Message.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Mitem.php module updates 2016-04-18 20:38:38 -07:00
Mood.php daemon conversion continued... 2016-05-19 22:26:37 -07:00
Msearch.php module updates 2016-04-18 20:38:38 -07:00
Network.php more db column renames 2016-05-31 21:45:33 -07:00
New_channel.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Nojs.php revert the reversal of checkjs logic, but still restrict the behaviour scope to just those urls that require it 2016-04-20 22:10:00 -07:00
Notes.php module updates 2016-04-18 20:38:38 -07:00
Notifications.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Notify.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Oembed.php module updates 2016-04-18 20:38:38 -07:00
Oep.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Oexchange.php module updates 2016-04-18 20:38:38 -07:00
Online.php module updates 2016-04-18 20:38:38 -07:00
Openid.php a bit more namespace wrangling 2016-04-18 20:47:11 -07:00
Opensearch.php module updates 2016-04-18 20:38:38 -07:00
Page.php deprecate the item_id table - replace with iconfig. A possibly useful function in the iconfig class would be a search which takes a service id and type and uid, matches against an item and returns the iid. That could save a bit of code duplication. 2016-06-13 19:58:24 -07:00
Pconfig.php missing class instance pointer in Pconfig module upgrade 2016-04-19 19:09:35 -07:00
Pdledit.php module updates 2016-04-18 20:38:38 -07:00
Photo.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Photos.php 'recent photos' query was buggered, also fix issue #163 by adding configurable sort order to the album widget - default is album name ascending 2016-06-07 16:23:14 -07:00
Ping.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Poco.php module updates 2016-04-18 20:38:38 -07:00
Poke.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Post.php module updates 2016-04-18 20:38:38 -07:00
Prate.php daemon conversion continued... 2016-05-19 22:26:37 -07:00
Pretheme.php module updates 2016-04-18 20:38:38 -07:00
Probe.php first cut at zot-finger request signatures 2016-05-21 18:02:14 -07:00
Profile.php turn the oft-repeated block_public ... check into a function observer_prohibited() 2016-05-22 17:52:30 -07:00
Profile_photo.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Profiles.php more db column renames 2016-05-31 21:45:33 -07:00
Profperm.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Pubsites.php link to hubchart site for site detail on pubsites page 2016-05-26 19:40:16 -07:00
Pubstream.php turn the oft-repeated block_public ... check into a function observer_prohibited() 2016-05-22 17:52:30 -07:00
Randprof.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Rate.php daemon conversion continued... 2016-05-19 22:26:37 -07:00
Ratings.php turn the oft-repeated block_public ... check into a function observer_prohibited() 2016-05-22 17:52:30 -07:00
Ratingsearch.php module updates 2016-04-18 20:38:38 -07:00
Rbmark.php module updates 2016-04-18 20:38:38 -07:00
React.php short-term solution to emoji size issue - make them 32px from the sender 2016-06-04 15:53:30 -07:00
README.md readme for the module directory, also provide an undocumented way to reset the timestamp on connection photos to force a refresh without messing with the database directly. 2016-06-14 17:04:29 -07:00
Regdir.php finish updating zot_finger instances 2016-05-21 18:18:33 -07:00
Register.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Regmod.php module updates 2016-04-18 20:38:38 -07:00
Regver.php module updates 2016-04-18 20:38:38 -07:00
Removeaccount.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Removeme.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Rmagic.php namespace issue with openid reverse auth 2016-06-09 16:20:16 -07:00
Rpost.php Update some modules to use new ACL dialog feature 2016-05-08 21:27:52 +10:00
Rsd_xml.php rework the conversation object stuff at a high level - still needs a bit of refactoring 2016-05-20 22:52:47 -07:00
Search.php more db column renames 2016-05-31 21:45:33 -07:00
Search_ac.php more db column renames 2016-05-31 21:45:33 -07:00
Service_limits.php module updates 2016-04-18 20:38:38 -07:00
Settings.php more db column renames 2016-05-31 21:45:33 -07:00
Setup.php fix remote_channel(), update php minversion requirement 2016-05-29 18:38:24 -07:00
Share.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Sharedwithme.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Siteinfo.php code optimisation 2016-06-20 20:34:19 -07:00
Siteinfo_json.php module updates 2016-04-18 20:38:38 -07:00
Sitelist.php module updates 2016-04-18 20:38:38 -07:00
Smilies.php module updates 2016-04-18 20:38:38 -07:00
Sources.php sort out the rest of the source categories 2016-05-02 01:18:18 -07:00
Sslify.php module updates 2016-04-18 20:38:38 -07:00
Starred.php module updates 2016-04-18 20:38:38 -07:00
Subthread.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Suggest.php module updates 2016-04-18 20:38:38 -07:00
Tagger.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Tagrm.php more db column renames 2016-05-31 21:45:33 -07:00
Tasks.php the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. 2016-06-01 21:48:54 -07:00
Thing.php "thing" always showing default url, not that supplied by the thing. 2016-06-17 16:28:36 -07:00
Toggle_mobile.php module updates 2016-04-18 20:38:38 -07:00
Toggle_safesearch.php module updates 2016-04-18 20:38:38 -07:00
Uexport.php 1. provide automatic relocation of important links in items that are imported or synced to clones 2016-06-21 18:24:36 -07:00
Update_channel.php Convert Channel to new module 2016-04-15 22:36:07 -07:00
Update_display.php module updates 2016-04-18 20:38:38 -07:00
Update_home.php module updates 2016-04-18 20:38:38 -07:00
Update_network.php module updates 2016-04-18 20:38:38 -07:00
Update_pubstream.php try again with shutdown handler, fix issue #373 (live-pubstream div wasn't present 2016-05-10 01:30:22 -07:00
Update_search.php module updates 2016-04-18 20:38:38 -07:00
View.php module updates 2016-04-18 20:38:38 -07:00
Viewconnections.php turn the oft-repeated block_public ... check into a function observer_prohibited() 2016-05-22 17:52:30 -07:00
Viewsrc.php update icon names in Zotlabs/ 2016-05-01 04:13:30 +10:00
Wall_attach.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Wall_upload.php renamed include files identity.php (channel.php) and Contact.php (connections.php) 2016-05-22 16:54:30 -07:00
Webfinger.php module updates 2016-04-18 20:38:38 -07:00
Webpages.php deprecate the item_id table - replace with iconfig. A possibly useful function in the iconfig class would be a search which takes a service id and type and uid, matches against an item and returns the iid. That could save a bit of code duplication. 2016-06-13 19:58:24 -07:00
Well_known.php convert all the _well_known service controllers which are a bit touchy when it comes to the router 2016-04-18 01:35:09 -07:00
Wfinger.php convert all the _well_known service controllers which are a bit touchy when it comes to the router 2016-04-18 01:35:09 -07:00
Wiki.php Add formatted heading for revision comparison viewer 2016-06-20 13:27:05 -04:00
Xchan.php module updates 2016-04-18 20:38:38 -07:00
Xpoco.php module updates 2016-04-18 20:38:38 -07:00
Xrd.php module updates 2016-04-18 20:38:38 -07:00
Xref.php module updates 2016-04-18 20:38:38 -07:00
Zfinger.php convert all the _well_known service controllers which are a bit touchy when it comes to the router 2016-04-18 01:35:09 -07:00
Zotfeed.php turn the oft-repeated block_public ... check into a function observer_prohibited() 2016-05-22 17:52:30 -07:00
Zping.php module updates 2016-04-18 20:38:38 -07:00

Zotlabs/Module

This directory contains controller modules for handling web requests. The lowercase class name indicates the head of the URL path which this module handles. There are other methods of attaching (routing) URL paths to controllers, but this is the primary method used in this project.

Module controllers MUST reside in this directory and namespace to be autoloaded (unless other specific routing methods are employed). They typically use and extend the class definition in Zotlabs/Web/Controller as a template.

Template:

<?php

namespace Zotlabs\Web;


class Controller {

	function init() {}
	function post() {}
	function get() {}

}

Typical Module declaration for the '/foo' URL route:

<?php
namespace Zotlabs\Module;

class Foo extends \Zotlabs\Web\Controller {

	function init() {
		// init() handler goes here
	}

	function post() {
		// post handler goes here
	}

	function get() {
		return 'Hello world.' . EOL;
	}

}

This model provides callbacks for public functions named init(), post(), and get(). init() is always called. post() is called if $_POST variables are present, and get() is called if none of the prior functions terminated the handler. The get() method typically retuns a string which represents the contents of the content region of the resulting page. Modules which emit json, xml or other machine-readable formats typically emit their contents inside the init() function and call 'killme()' to terminate the Module.

Modules are passed the URL path as argc,argv arguments. For a path such as

https://mysite.something/foo/bar/baz

The app will typically invoke the Module class 'Foo' and pass it

$x = argc(); // $x = 3

$x = argv(0); // $x = 'foo'
$x = argv(1); // $x = 'bar'
$x = argv(2); // $x = 'baz'

These are handled in a similar fashion to their counterparts in the Unix shell or C/C++ languages. Do not confuse the argc(),argv() functions with the global variables $argc,$argv which are passed to command line programs. These are handled separately by command line and Zotlabs/Daemon class functions.