friendica/src/Module
2021-11-27 12:40:57 +01:00
..
ActivityPub
Admin Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Api Inherit ApiResponse from Response 2021-11-27 12:40:54 +01:00
Contact Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Conversation
Debug Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
DFRN
Diaspora Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Events
Filer Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
HTTPException Replace IRespondToRequests with PSR-7 ResponseInterface 2021-11-27 12:40:57 +01:00
Item
Notifications Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
OAuth
Profile Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Search Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Security Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Settings Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Special
Update
WellKnown
AccountManagementControlDocument.php
Acctlink.php
Apps.php Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Attach.php
BaseAdmin.php
BaseApi.php Inherit ApiResponse from Response 2021-11-27 12:40:54 +01:00
BaseNotifications.php Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
BaseProfile.php
BaseSearch.php
BaseSettings.php Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Bookmarklet.php
Contact.php
Credits.php
Delegation.php
Directory.php
Feed.php
FollowConfirm.php
Friendica.php
FriendSuggest.php Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Group.php
Hashtag.php
HCard.php
Help.php
Home.php
Install.php Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Invite.php
Magic.php Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Maintenance.php
Manifest.php
NodeInfo110.php Replace IRespondToRequests with PSR-7 ResponseInterface 2021-11-27 12:40:57 +01:00
NodeInfo120.php Replace IRespondToRequests with PSR-7 ResponseInterface 2021-11-27 12:40:57 +01:00
NodeInfo210.php Replace IRespondToRequests with PSR-7 ResponseInterface 2021-11-27 12:40:57 +01:00
NoScrape.php
Oembed.php
OpenSearch.php
Owa.php
ParseUrl.php
PermissionTooltip.php
Photo.php
Proxy.php
PublicRSAKey.php
RandomProfile.php
README.md
ReallySimpleDiscovery.php
Register.php Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
RemoteFollow.php Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Response.php Replace IRespondToRequests with PSR-7 ResponseInterface 2021-11-27 12:40:57 +01:00
RobotsTxt.php
Smilies.php
Statistics.php Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Theme.php
ThemeDetails.php
ToggleMobile.php
Tos.php Introduce Response for Modules to create a testable way for module responses 2021-11-27 12:40:38 +01:00
Welcome.php
Xrd.php

Friendica\Module

The Module namespace contains the different modules of Friendica. Each module is loaded through the App.

There are mainly two types of modules:

  • frontend modules to interact with users
  • backend modules to interact with machine requests

Frontend modules

This type of modules mainly needs a template, which are generally located at view/templates/.

A frontend module should extend the BaseModule, especially the content() method.

Backend modules

This type of modules mainly responds either with encoded XML or with JSON output. It isn't intended to respond with human readable text.

A frontend module should extend the BaseModule, especially the rawContent() method.

Routing

Every module needs to be accessed within a route. The routes are defined inside Router->collectRoutes().

Use the given routes as a pattern for further routes.

The routing library and further documentation can be found here.