2017 © Pedro PelĂĄez
 

library container

Maps classes to certain areas to inject processes and views.

image

ensphere/container

Maps classes to certain areas to inject processes and views.

  • Tuesday, January 30, 2018
  • by lukesnowden
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,283 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 9 % Grown

The README.md

Ensphere Container

Maps classes to certain areas to inject processes and views., (*1)

 Getting started

composer require ensphere/container:1.*

add the service provider, (*2)

Ensphere\Container\Providers\ServiceProvider::class

register the middleware in the web group, (*3)

Ensphere\Container\Http\Middleware\Validate::class

Define a binding area

$container = $app['ensphere.container'];
$container->register( 'dashboard-top-bar' )

Supply functionality

create a content stub., (*4)

use Ensphere\Container\Content;
use Illuminate\Http\Request;

class Stub extends Content {

    /**
     * the view to be rendered in said area
     * @var string
     */
    protected $view = 'views.view';

    /**
     * Validates pass instance of Validator back to the container to validate this section.
     * @param  Request $request - Illuminate\Http\Request
     * @return Instance of Illuminate\Contracts\Validation\Validator
     */
    public function validate( Request $request  )
    {

    }

    /**
     * called once all validation has passed from other areas.
     * @param  Request $request - Illuminate\Http\Request
     * @return NULL
     */
    public function process( Request $request )
    {

    }

}

Bind the stub to the area

$container->bind( 'dashboard-top-bar', [
    Namespace\To\Your\Stub::class
]);

Render the views

$topBar = $container->render( 'dashboard-top-bar' );

The MIT License (MIT)

Copyright (c) 2016 ensphere, (*5)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:, (*6)

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software., (*7)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*8)

The Versions

30/01 2018

dev-master

9999999-dev https://github.com/ensphere/container

Maps classes to certain areas to inject processes and views.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

ensphere container

30/01 2018

1.0.7

1.0.7.0 https://github.com/ensphere/container

Maps classes to certain areas to inject processes and views.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

ensphere container

04/05 2017

1.0.6

1.0.6.0 https://github.com/ensphere/container

Maps classes to certain areas to inject processes and views.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

ensphere container

13/03 2017

1.0.5

1.0.5.0 https://github.com/ensphere/container

Maps classes to certain areas to inject processes and views.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

ensphere container

01/12 2016

1.0.4

1.0.4.0 https://github.com/ensphere/container

Maps classes to certain areas to inject processes and views.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

ensphere container

17/03 2016

1.0.3

1.0.3.0 https://github.com/ensphere/container

Maps classes to certain areas to inject processes and views.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

ensphere container

25/02 2016

1.0.2

1.0.2.0 https://github.com/ensphere/container

Maps classes to certain areas to inject processes and views.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

ensphere container

22/02 2016

1.0.1

1.0.1.0 https://github.com/ensphere/container

Maps classes to certain areas to inject processes and views.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

ensphere container