Download the PHP package tobento/service-message without Composer

On this page you can find all versions of the php package tobento/service-message. 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 service-message

Message Service

Messages for PHP applications.

Table of Contents

Getting started

Add the latest version of the Message service project running this command.

Requirements

Highlights

Documentation

Message

Create Message

Parameters explanation

Parameter Description
level Any level. It's up to you.
message The message.
context Any context for the message.
key A key which might be used for an identifier for input data for instance.
parameters Any parameters used for Modifiers.
logged Used as to know if message has been logged already as not to log muliple times.

Message Factory

createMessage

createMessageFromArray

Message Interface

The message interface has the following methods:

With methods

You may use the with prefixed methods returning a new instance.

Render Message

Messages

Create Messages

Parameters explanation

Parameter Description
messageFactory Used for creating messages.
modifiers Used for modifying message. See Modifiers for more detail.
logger If a logger is set, messages will be logged right after messages are added and log parameter is set to true.

withMessageFactory

withModifiers

withLogger

Messages Factory

You might want to use the message factory to create the messages.

Add Messages

By using the addMessage method:

By using the add method:

By using the push method:

By using the withMessage method returning a new instance:

Filter Messages

Filter methods always returning a new instance.

filter

key

Filters messages by its key:

only

Filters messages only with the levels specified:

except

Filters messages except with the levels specified:

Get Messages

all

first

Get the first message:

last

Get the last message:

column

has

Messages Aware

You might support messages in any class by using the HasMessages trait:

Modifiers

Modifiers can be used for modifying the message such as translating.

Create Modifiers

Add Modifier

Prepend Modifier

Adds a modifier to the beginning.

Modify Message

Get Modifiers

Modifier

Pluralization

Parameter Replacer

Limit Length

Translator

For more information about the translator, check out the Translation Service documentation.

Parameter Translator

Sometimes you might need to translate message parameters:

Credits


All versions of service-message with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
tobento/service-collection Version ^1.0
tobento/service-support Version ^1.0
psr/log Version ^1.1 || ^2.0 || ^3.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 tobento/service-message contains the following files

Loading the files please wait ....