Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,199 of 9,199 pages
About the help in other languages
All help pages

Sources

A source is where apps come from. appstore.ini [Sources] SourceList[] lists them; each [Source_] block names its Type, and [SourceTypes] Types[] the class.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/ext/exp_app_store/SOURCES.md

On this page

Sources

A source is where apps come from. appstore.ini [Sources] SourceList[] lists them; each [Source_<id>] block names its Type, and [SourceTypes] Types[<type>] the class.

TypeClassWhat it reads
packagistexpAppStorePackagistSourcePackagist.org (or a server with its API): packages/list.json?vendor= and search.json for the catalogue of Vendors[], search.json for search, packages/<name>.json for an app, repo.packagist.org/p2/<name>.json for the newest release
composerexpAppStoreComposerRepositorySourceany Composer repository: packages.json with the packages inline (Satis) or available-packages plus metadata-url (Composer v2: Private Packagist, Repman, the packages.exponential.earth registry), with a bearer token from the secret store

Release notes come from the GitHub releases of a repository on github.com (expAppStoreGitHub).

The shape of an answer

Every source answers with the same arrays, so the pages never know where an app came from (see the class comment of expAppStoreSource): an app summary (name, title, description, type, repository, url, downloads, favers, category, latest ...) and an app detail (the summary plus versions, license, authors, stars, PHP requirement, installer name ...).

Adding a source type

class mySourceGitLabGroup extends expAppStoreSource
{
    public function catalogue( $refresh = false ) { /* summaries of the group's projects */ }
    public function search( $query, $page = 1, $perPage = 24, $refresh = false, $type = '' ) { /* results, total, page, pages, error */ }
    public function app( $name, $refresh = false ) { /* detail or null */ }
    public function versions( $name, $refresh = false ) { /* version rows, for Updates */ }
}
[SourceTypes]
Types[gitlab]=mySourceGitLabGroup

[Sources]
SourceList[]=gitlab-acme

[Source_gitlab-acme]
Type=gitlab
Name=ACME GitLab
URL=https://gitlab.example.com
TokenSecret=acme_gitlab_token

Fetch with expAppStoreHttp::json( $url, <kind>, $headers, $refresh ): https only, cached for [Cache] TTL[<kind>], the older answer when the network fails, the offline snapshot in static mode. Build summaries with $this->summary( array( ... ) ).

Planned sources

GitHub and GitLab accounts, other Packagist accounts, the packages.exponential.earth registry (a Composer v2 repository: the composer type already reads it), the 7x package store.

Something wrong on this page? Report an error

Documentation license

This page is part of the documentation of the extension exp_app_store and is distributed under the license of that extension.