This repository has been archived on 2024-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
core/Zotlabs/Module
2017-12-28 15:12:20 -08:00
..
Admin fix some pubstream on/off weirdness 2017-12-03 12:31:41 +01:00
Settings a different (hopefully better) implementation of affinity presets, but not for 3.0 because strings have changed. 2017-12-28 15:12:20 -08:00
Achievements.php
Acl.php also filter atokens on acl search 2017-11-13 10:08:51 +01:00
Admin.php
Api.php
Appman.php provide ability to pin apps to navbar from /apps. this removes the ability to have per custom navbar pinned apps - this can be added later if desired 2017-11-16 11:11:06 +01:00
Apporder.php fix issues with apporder related to recent pinned apps changes 2017-11-19 22:42:16 +01:00
Apps.php
Article_edit.php article feature 2017-11-22 15:39:06 -08:00
Articles.php article feature 2017-11-22 15:39:06 -08:00
Attach.php
Authorize.php
Authtest.php
Block.php
Blocks.php
Bookmarks.php
Branchtopic.php
Cal.php rename channel app events to calendar and add nav_set_selected() to /cal 2017-11-07 11:22:11 +01:00
Card_edit.php
Cards.php
Cdav.php strip acct: from OWA auth to API endpoints 2017-12-07 18:56:26 -08:00
Changeaddr.php
Channel.php support for netselect query 2017-11-01 02:53:12 -07:00
Chanview.php
Chat.php
Chatsvc.php
Cloud_tiles.php make most recent cloud_tiles setting for local channels persistent across logins 2017-11-07 19:34:00 -08:00
Cloud.php mod_cloud: provide a themed page with an error notification on errors instead of an obtuse XML error structure 2017-12-05 18:20:38 -08:00
Common.php
Connect.php
Connections.php
Connedit.php
Contactgroup.php
Cover_photo.php
Dav.php strip acct: from OWA auth to API endpoints 2017-12-07 18:56:26 -08:00
Defperms.php .htignore update 2017-11-06 21:55:36 -08:00
Directory.php allow a site to block (public) the directory separately from other resources. 2017-11-12 21:43:46 -08:00
Dirsearch.php
Display.php fix mod display and others that require a non-zero profile_uid for updates 2017-12-04 21:18:10 -08:00
Dreport.php
Editblock.php
Editlayout.php
Editpost.php
Editwebpage.php
Embedphotos.php hubzilla #475 continued - show photos in root folder. Part of Andrew's fix for this wasn't in my repository and hopefully won't conflict; as it appears to have been lost somewhere. It also needed a small change to the folder permissions check. 2017-12-12 14:18:34 -08:00
Events.php
Fbrowser.php
Feed.php
Fhublocs.php
File_upload.php remove logging line 2017-11-30 19:11:26 -08:00
Filer.php
Filerm.php
Filestorage.php sync packet not generated when deleting a file using the web browser interface 2017-11-24 00:12:19 -08:00
Follow.php
Getfile.php use the same variable name consistently 2017-11-29 14:08:30 -08:00
Group.php
Hcard.php
Help.php
Home.php
Hostxrd.php
Hq.php only use effective uid if we deal with sys channel content 2017-12-15 08:51:05 +01:00
Impel.php pagetitle lost importing a pdl element from conversation 2017-12-03 19:12:55 -08:00
Import_items.php
Import.php
Invite.php
Item.php fix another PHP7.2 warningg 2017-12-14 22:41:11 +01:00
Lang.php
Layouts.php pagetitle lost importing a pdl element from conversation 2017-12-03 19:12:55 -08:00
Like.php fix mod like after recent changes 2017-11-27 10:07:45 +01:00
Linkinfo.php
Lockview.php
Locs.php
Login.php
Logout.php
Lostpass.php
Magic.php encrypt the owa token 2017-10-26 15:23:04 -07:00
Mail.php fix issues with diaspora xchans 2017-11-02 08:44:46 +01:00
Manage.php
Menu.php
Message.php
Mitem.php
Moderate.php
Mood.php
Network.php a different (hopefully better) implementation of affinity presets, but not for 3.0 because strings have changed. 2017-12-28 15:12:20 -08:00
New_channel.php register workflow was getting over-ridden in include/security 2017-10-19 18:48:11 -07:00
Nojs.php
Notes.php
Notifications.php do not show seen notifys in notifications - show them in mod notifications instead. Update notifications count also on notifications updates 2017-10-22 21:01:58 +02:00
Notify.php some more work on mod hq 2017-11-18 22:16:06 +01:00
Oembed.php
Oep.php article feature 2017-11-22 15:39:06 -08:00
Oexchange.php
Ofeed.php
Online.php
Owa.php encrypt the owa token 2017-10-26 15:23:04 -07:00
Page.php allow plugin class widgets, fix sql error in page module 2017-10-29 19:52:00 -07:00
Pconfig.php
Pdledit.php pdledit - show original/system layout text for comparison 2017-10-31 18:04:01 -07:00
Permcat.php
Photo.php
Photos.php synchronise an attach_move operation to clones 2017-12-06 14:20:17 -08:00
Ping.php notifications: only handle item otype notify_ids 2017-12-18 12:46:37 +01:00
Poco.php
Poke.php
Post.php
Prate.php
Pretheme.php
Probe.php
Profile_photo.php Maria's profile photo issue, please push to master. 2017-11-01 02:15:40 -07:00
Profile.php remove deprecated $a argument from advanced_profile() 2017-11-23 20:35:34 -08:00
Profiles.php
Profperm.php
Pubsites.php comment out statistics link in mod pubsites until we have something functional again 2017-10-24 18:21:19 +02:00
Pubstream.php pubstream comments and a few other bugfixes that were discovered along the way 2017-11-26 18:29:24 -08:00
Randprof.php
Rate.php
Ratings.php
Ratingsearch.php
Rbmark.php
React.php pubstream comments and a few other bugfixes that were discovered along the way 2017-11-26 18:29:24 -08:00
README.md
Regdir.php
Register.php Provide system config option for minimum registration age. 2017-11-24 13:50:29 -05:00
Regmod.php
Regver.php
Removeaccount.php
Removeme.php
Rmagic.php
Rpost.php
Search_ac.php
Search.php more search work 2017-11-03 15:08:56 -07:00
Service_limits.php
Settings.php
Setup.php
Share.php
Sharedwithme.php
Siteinfo.php
Sitelist.php
Smilies.php
Snap.php
Sources.php
Sslify.php
Starred.php fix "unstar" 2017-10-28 15:24:37 -07:00
Subthread.php pubstream comments and a few other bugfixes that were discovered along the way 2017-11-26 18:29:24 -08:00
Suggest.php
Tagger.php pubstream comments and a few other bugfixes that were discovered along the way 2017-11-26 18:29:24 -08:00
Tagrm.php
Tasks.php
Theme_info.php
Thing.php
Toggle_mobile.php
Toggle_safesearch.php
Token.php
Uexport.php
Update.php explain what happened here 2017-12-04 21:39:53 -08:00
View.php
Viewconnections.php
Viewsrc.php
Wall_attach.php change to bbcode calling parameters: important: will require pulling addons; 2017-11-23 15:21:50 -08:00
Wall_upload.php
Webfinger.php
Webpages.php
Well_known.php
Wfinger.php not sure when but the hcard went missing in webfinger 2017-10-23 21:19:40 -07:00
Wiki.php missed a spot while resolving merge conflict 2017-12-06 12:40:27 +01:00
Xchan.php
Xpoco.php
Xrd.php
Xref.php
Zfinger.php
Zotfeed.php
Zping.php

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.