Download the PHP package pinkcrab/bladeone-engine without Composer

On this page you can find all versions of the php package pinkcrab/bladeone-engine. 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 bladeone-engine

Release Candidate 1.0.0-RC3


BladeOne_Engine

A BladeOne Engine for the PinkCrab Renderable Interface.

Latest Stable Version Total Downloads License PHP Version Require GitHub contributors GitHub issues

WP5.9 [PHP7.4-8.1] Tests WP6.0 [PHP7.4-8.1] Tests WP6.1 [PHP7.4-8.2] Tests WP6.2 [PHP7.4-8.2] Tests

codecov Scrutinizer Code Quality Maintainability

Supports and tested with the PinkCrab Perique Framework versions 2.0.*

Why?

The BladeOne implementation of the Renderable interface, allows the use of Blade within the PinkCrab Framework.

Setup

`

Out of the box, you can just include the BladeOne module when you are booting Perique and you will have full access to the BladeOne engine.

By default the following are assumed

Usage

Just like the native PHP_Engine found with Perique, you can inject the View service into any class and use it to render a view.

The above would render the template path/to/project/root/views/some/path/view_name.blade.php with access to $data in the view which would be to pass.

Would render as

It is fully possible to make use of the template inheritance and other blade features.

Configuring BladeOne

As with all other modules, BladeOne can be configured by passing a \Closure as the 2nd argument to the module() method.

Compact BladeOne Config

It is possible to do the Module config in a much more concise fashion, using the fluent API and PHP Arrow functions

You can also hold the config in its own class and use that.

BladeOne_Module Config

You can call the following methods on the BladeOne Module to configure the BladeOne Module.

BladeOne_Engine Config

You can call the following methods on the BladeOne_Engine to configure the BladeOne_Engine.

Blade Templating

Most Blade features are present, to see the full docs please visit the EFTEC/BladeOne wiki

Included Components

Out of the box PinkCrab_BladeOne comes with the BladeOneHTML trait added, giving access all HTML components.


Magic Call Methods

The BladeOne class has a large selection of Static and regular methods, these can all be accessed from BladeOne_Engine. These can be called as follows.

The can also be called in templates.

For the complete list of methods, please visit https://github.com/EFTEC/BladeOne/wiki/Methods-of-the-class

Static Access

calling engine() on view, will return the underlying rendering engine used, in this case PinkCrab_BladeOne.

Of course you can set the engine it self as a global variable using $provider->share('view_helper', [App::view(), 'engine']). Then you can use {$view_helper->some_method(\$data)} in your view.


Extending

It is possible to extend BladeOne via other plugins, if you would like to add additional functionality by adding custom directives, or adding additional methods to the BladeOne_Engine class. You can do this by using the PinkCrab_BladeOne::SETUP_CONFIG action and add any additional configs such as directives.

Dependencies

Requires

License

MIT License

http://www.opensource.org/licenses/mit-license.html

Previous Perique Support

Change Log


All versions of bladeone-engine with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
pinkcrab/perique-framework-core Version 2.0.*
eftec/bladeone Version 4.*
eftec/bladeonehtml Version 2.*
pinkcrab/function-constructors Version 0.2.*
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 pinkcrab/bladeone-engine contains the following files

Loading the files please wait ....