Download the PHP package scylabs/hook-bundle without Composer

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

ScyLabs Hook

Dynamic templating hook system for symfony.

Installation

To install this package, use composer .

Usage

The operation is very simple. First, you need to create entry points in your template, then connect PHP classes to these entry points.
I will explain in detail.

Create an entry point to connect hooks in twig

Okay , for the rest of the tutorial, we will say that the "entry point" is a door.
You can use the TwigExtension provided in this package.
The extension function has two parameters.

The first parameter is the target template NameSpace. Ex : layout.html.twig
The second parameter is the hook name and it is used to connect PHP classes in this door.

You can send _self in first parameter. _self is the current template NameSpace
It is important to add "raw" filter to interprete Hook's html.

You don't use twig ?

If you don't use twig , you can tell directly HooksFounder Service.
It works exactly like the extension, except that it directly returns an array of instantiated Hooks objects instead of hooks contents.

Connect Hooks to an entry point (door).

You can create an infinity of doors and an infinity of hooks to connect this doors.
To connect a hook to one door , you need to create a PHP class that extends AbstractHook class
I'ts the minimal code to connect a hook to a door. PS : You can connect one hook to many doors.

Last step : Add your Hook directory to the Container

I'ts done.

You can also show any hooks in your controller result in your SymfonyToolbar.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT


All versions of hook-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5
symfony/flex Version ^1.3.1
symfony/framework-bundle Version ^5.1
symfony/twig-pack Version ^1.0
symfony/yaml Version ^5.1
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 scylabs/hook-bundle contains the following files

Loading the files please wait ....