Download the PHP package sokil/notification-bundle without Composer

On this page you can find all versions of the php package sokil/notification-bundle. 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 notification-bundle

Notification Bundle

Total Downloads Build Status Coverage Status

Installation

Use composer to install dependency:

Add bundle to AppKernel:

Add roles to role hierarchy in file ./app/config/security.yml:

Add routing to ./app/config/routing.yml:

Creating messages

Message builder

First we need to create message builder, which optain some dependencies from container and build message instances. It must extend \Sokil\NotificationBundle\MessageBuilder\AbstractBuilder class:

This builder must be registered as service in container and tagged by notification.message_builder:

This service will build messages with type someMessages for transport email. One message may be used for different transports. In this case just add another tag:

Message builder collection

Collection holds number of different messages. Collection used to group messages. It must extends class Sokil\NotificationBundle\MessageBuilder\BuilderCollection. To register new collection, define new service:

There is already collection with name default, defined as service notification.message_builder_collection.

To add message builder to collection, set collectionName attribute of builder's notification.message_builder tag:

If collectionName not specified, builder registered in default collection.

To get builder from collection:

If collection's service not defined, it will be created for you automatically, so you need only define collectionName in message builder's tag, and then get collection's service from container by id notification.message_builder_collection.{SOME_COLLECTION_NAME}.

Schema of notification

Available transports

Configuring custom transport

Preview

To enable preview, add routing to your ./app/config/routing.yml:

Now preview of mails available at route /notification/preview. To access this route, you reed to have ROLE_NOTIFICATION_MAIL_PREVIEW.

For example we have message builder described in service:

To see preview, open next URL in your browser:


All versions of notification-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^5.5 || ^7.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 sokil/notification-bundle contains the following files

Loading the files please wait ....