Download the PHP package escolalms/templates without Composer

On this page you can find all versions of the php package escolalms/templates. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package templates

Templates

swagger codecov phpunit downloads downloads downloads

Purpose

General purpose of this package is to store various templates in database and assigning them to Events so that content based on these templates is automatically generated and/or sent to users.

Usage

Each template is defined by

For every channel & event pair a single Variables definition is registered, which contains tokens that can be used in the template and replaced with values based on the data from the Event.

Analysing these three example files in tests:

and looking at the Template facade is simplest way to understand how this package works.

Facade

There is a Template facade declared, which is used to register Event-Channel-Variable sets and can be used in testing (as it can be replaced with a fake using Template::fake()).

To register Event-Channel-Variable set, Template::register($eventClass, $channelClass, $variableClass) must be called, where:

Channels & variables

This package has no Channels or Variables defined, everything should be created in separate packages.

Event Wrapper

EscolaLms\Templates\Events\EventWrapper is a class that wraps any event before trying to generate notification for it (and feed data from it to Template). This class contains methods for extracting necessary data from Event if that data is not available directly (for example User to which notification is being sent, and any other data that is required by registered Template).

Endpoints

All the endpoints are defined in swagger

Tests

Run ./vendor/bin/phpunit --filter 'EscolaLms\\Templates\\Tests' to run tests. See tests folder as it's quite good staring point as documentation appendix.

Test details: codecov phpunit

Listeners

Permissions

Permissions are defined in Enum and seeded in Seeder.


All versions of templates with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4 | >=8.0
doctrine/dbal Version ^2|^3
escolalms/core Version ^1.2
escolalms/settings Version ^0
fakerphp/faker Version ^1
laravel/framework Version >=8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package escolalms/templates contains the following files

Loading the files please wait ....