streams/Zotlabs/Module
2022-02-15 19:52:32 -08:00
..
Admin tweaks 2022-02-15 19:52:32 -08:00
Settings fixes 2022-02-12 12:43:29 -08:00
Acloader.php upgrade acl_selectors (cont.) and js_strings 2022-01-26 08:10:25 +11:00
Activity.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Admin.php fixes 2022-02-12 12:43:29 -08:00
Affinity.php fixes 2022-02-12 12:43:29 -08:00
Album.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Ap_probe.php fixes 2022-02-12 12:43:29 -08:00
Api.php fixes 2022-02-12 12:43:29 -08:00
Appman.php fixes 2022-02-12 12:43:29 -08:00
Apporder.php fixes 2022-02-12 12:43:29 -08:00
Apps.php fixes 2022-02-12 12:43:29 -08:00
Apschema.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Attach.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Authorize.php fixes 2022-02-12 12:43:29 -08:00
Block.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Blocks.php fixes 2022-02-12 12:43:29 -08:00
Ca.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Cal.php fixes 2022-02-12 12:43:29 -08:00
Calendar.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Card_edit.php fixes 2022-02-12 12:43:29 -08:00
Cards.php fixes 2022-02-12 12:43:29 -08:00
Categories.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Cdav.php fixes 2022-02-12 13:54:06 -08:00
Changeaddr.php fixes 2022-02-12 12:43:29 -08:00
Channel.php fixes 2022-02-12 13:54:06 -08:00
Chanview.php fixes 2022-02-12 12:43:29 -08:00
Chat.php fixes 2022-02-12 12:43:29 -08:00
Chatsvc.php This checkin is surely broken, but I need to commit it because it represents a fair bit of work. 2022-02-12 00:50:48 -08:00
Clients.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Cloud.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Cloud_tiles.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Comment_control.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Common.php refactor Socgraph 2022-02-14 11:55:01 -08:00
Connac.php Merge branch 'dev' of /home/macgirvin/roadhouse into dev 2021-12-06 13:19:19 -08:00
Connect.php fixes 2022-02-12 12:43:29 -08:00
Connections.php refactor Socgraph 2022-02-14 11:55:01 -08:00
Connedit.php refactor Socgraph 2022-02-14 11:55:01 -08:00
Contactgroup.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Content_filter.php fixes 2022-02-12 12:43:29 -08:00
Conversation.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Cover_photo.php fixes 2022-02-12 12:43:29 -08:00
Dav.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Defperms.php refactor Socgraph 2022-02-14 11:55:01 -08:00
Dircensor.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Directory.php refactor Socgraph 2022-02-14 11:55:01 -08:00
Dirsearch.php Merge branch 'dev' of /home/macgirvin/roadhouse into dev 2021-12-06 13:19:19 -08:00
Display.php fixes 2022-02-12 13:54:06 -08:00
Drafts.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Dreport.php fixes 2022-02-12 12:43:29 -08:00
Editblock.php fixes 2022-02-12 12:43:29 -08:00
Editlayout.php fixes 2022-02-12 12:43:29 -08:00
Editpost.php fixes 2022-02-12 12:43:29 -08:00
Editwebpage.php fixes 2022-02-12 12:43:29 -08:00
Email_resend.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Email_validation.php fixes 2022-02-12 12:43:29 -08:00
Embed.php psr12 updates 2021-12-03 10:02:31 +11:00
Embedphotos.php fixes 2022-02-12 12:43:29 -08:00
Event.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Events.php fixes 2022-02-12 12:43:29 -08:00
Expire.php fixes 2022-02-12 12:43:29 -08:00
Fastping.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Fbrowser.php fixes 2022-02-12 12:43:29 -08:00
Fedi_id.php fixes 2022-02-12 12:43:29 -08:00
Feed.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
File_upload.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Filer.php fixes 2022-02-12 12:43:29 -08:00
Filerm.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Filestorage.php fixes 2022-02-12 12:43:29 -08:00
Finger.php fixes 2022-02-12 12:43:29 -08:00
Follow.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Followers.php fixes 2022-02-12 12:43:29 -08:00
Following.php fixes 2022-02-12 12:43:29 -08:00
Future.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Getfile.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Hashtags.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Hcard.php fixes 2022-02-12 13:54:06 -08:00
Help.php fixes 2022-02-12 12:43:29 -08:00
Home.php This checkin is surely broken, but I need to commit it because it represents a fair bit of work. 2022-02-12 00:50:48 -08:00
Hostxrd.php fixes 2022-02-12 12:43:29 -08:00
Hq.php fixes 2022-02-12 12:43:29 -08:00
Id.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Impel.php upgrade menus 2022-01-25 21:43:05 -08:00
Import.php fixes 2022-02-12 12:43:29 -08:00
Import_items.php fixes 2022-02-12 12:43:29 -08:00
Inbox.php inbox patch 2022-02-08 23:42:19 -08:00
Inspect.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Invite.php fixes 2022-02-12 12:43:29 -08:00
Item.php updates 2022-02-15 18:35:25 -08:00
Jwks.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Lang.php Merge branch 'dev' of ../unfediverse.com into dev 2022-01-24 20:17:01 -08:00
Layouts.php fixes 2022-02-12 12:43:29 -08:00
Like.php This checkin is surely broken, but I need to commit it because it represents a fair bit of work. 2022-02-12 00:50:48 -08:00
Linkinfo.php This checkin is surely broken, but I need to commit it because it represents a fair bit of work. 2022-02-12 00:50:48 -08:00
Lists.php fixes 2022-02-12 12:43:29 -08:00
Lockview.php more lockview cleanup 2021-12-23 12:09:15 -08:00
Locs.php fixes 2022-02-12 12:43:29 -08:00
Login.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Logout.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Lostpass.php fixes 2022-02-12 12:43:29 -08:00
Magic.php This checkin is surely broken, but I need to commit it because it represents a fair bit of work. 2022-02-12 00:50:48 -08:00
Manage.php fixes 2022-02-12 12:43:29 -08:00
Manifest.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Markup.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Menu.php fixes 2022-02-12 12:43:29 -08:00
Mitem.php fixes 2022-02-12 12:43:29 -08:00
Moderate.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Mood.php fixes 2022-02-12 12:43:29 -08:00
New_channel.php fixes 2022-02-12 12:43:29 -08:00
Notes.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Notifications.php fixes 2022-02-12 12:43:29 -08:00
Notify.php fixes 2022-02-12 12:43:29 -08:00
Nullbox.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Oauthinfo.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Oembed.php upgrade oembed 2022-01-24 19:34:10 -08:00
Oep.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Oexchange.php fixes 2022-02-12 12:43:29 -08:00
Online.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Outbox.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Owa.php Merge branch 'dev' of /home/macgirvin/roadhouse into dev 2021-12-06 13:19:19 -08:00
Page.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Pconfig.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Pdledit.php fixes 2022-02-12 12:43:29 -08:00
Permcat.php upstream intergations 2022-02-05 14:07:10 -08:00
Photo.php This checkin is surely broken, but I need to commit it because it represents a fair bit of work. 2022-02-12 00:50:48 -08:00
Photomap.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Photos.php fixes 2022-02-12 13:54:06 -08:00
Pin.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Ping.php This checkin is surely broken, but I need to commit it because it represents a fair bit of work. 2022-02-12 00:50:48 -08:00
Plike.php This checkin is surely broken, but I need to commit it because it represents a fair bit of work. 2022-02-12 00:50:48 -08:00
Poco.php refactor Socgraph 2022-02-14 11:55:01 -08:00
Poke.php fixes 2022-02-12 12:43:29 -08:00
Poster.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Pretheme.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Profile.php fixes 2022-02-12 13:54:06 -08:00
Profile_photo.php fixes 2022-02-12 12:43:29 -08:00
Profiles.php fixes 2022-02-12 12:43:29 -08:00
Profperm.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Pubstream.php fixes 2022-02-12 12:43:29 -08:00
Q.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Randprof.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
React.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
README.md fix feeds 2019-06-10 23:39:17 -07:00
Register.php tweaks 2022-02-15 19:52:32 -08:00
Regmod.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Regver.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Removeaccount.php fixes 2022-02-12 12:43:29 -08:00
Removeme.php fixes 2022-02-12 12:43:29 -08:00
Rmagic.php fixes 2022-02-12 12:43:29 -08:00
Rpost.php fixes 2022-02-12 12:43:29 -08:00
Safe.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Search.php fixes 2022-02-12 12:43:29 -08:00
Search_ac.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Secrets.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Service_limits.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Settings.php Merge branch 'dev' of ../unfediverse.com into dev 2022-01-24 20:17:01 -08:00
Setup.php fixes 2022-02-12 12:43:29 -08:00
Share.php This checkin is surely broken, but I need to commit it because it represents a fair bit of work. 2022-02-12 00:50:48 -08:00
Sharedwithme.php fixes 2022-02-12 12:43:29 -08:00
Siteinfo.php fixes 2022-02-12 12:43:29 -08:00
Sites.php fixes 2022-02-12 12:43:29 -08:00
Smilies.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Sources.php fixes 2022-02-12 12:43:29 -08:00
Sslify.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Starred.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Stream.php fixes 2022-02-12 12:43:29 -08:00
Subthread.php This checkin is surely broken, but I need to commit it because it represents a fair bit of work. 2022-02-12 00:50:48 -08:00
Suggestions.php refactor Socgraph 2022-02-14 11:55:01 -08:00
Superblock.php fixes 2022-02-12 12:43:29 -08:00
Tagadelic.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Tagger.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Tagrm.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Tasks.php task complete regression 2021-12-23 01:50:41 -08:00
Theme_info.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Thing.php fixes 2022-02-12 12:43:29 -08:00
Toggle_safesearch.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Token.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Uexport.php fixes 2022-02-12 12:43:29 -08:00
Update.php psr12 updates 2021-12-03 10:02:31 +11:00
Userinfo.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
View.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Viewconnections.php fixes 2022-02-12 12:43:29 -08:00
Viewsrc.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Vlists.php psr12 updates 2021-12-03 10:02:31 +11:00
Vote.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Wall_attach.php This checkin is surely broken, but I need to commit it because it represents a fair bit of work. 2022-02-12 00:50:48 -08:00
Wall_upload.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Webfinger.php This checkin is surely broken, but I need to commit it because it represents a fair bit of work. 2022-02-12 00:50:48 -08:00
Webpages.php fixes 2022-02-12 12:43:29 -08:00
Well_known.php This checkin is surely broken, but I need to commit it because it represents a fair bit of work. 2022-02-12 00:50:48 -08:00
Xchan.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Xp.php move account and channel to zlib 2022-01-24 17:26:12 -08:00
Xref.php psr12 rewrites, continued 2021-12-03 14:01:39 +11:00
Zot.php Merge branch 'dev' of /home/macgirvin/roadhouse into dev 2021-12-06 13:19:19 -08:00
Zot_probe.php fixes 2022-02-12 12:43:29 -08:00
Zotfinger.php fixes 2022-02-12 12:43:29 -08: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.