Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

00f100/fcphp-dispach

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

00f100/fcphp-dispach

Library to dispach request to controller

Source
Packagist
Version
dev-master
Version published
Maintainers
1
Created
Source

FcPhp Dispach

Package to dispach request to controller. Uses FcPhp Di to find Controller instance.

Build Status codecov

PHP Version Packagist Version Total Downloads

How to install

Composer:

$ composer require 00f100/fcphp-dispach

or add in composer.json

{
    "require": {
        "00f100/fcphp-dispach": "*"
    }
}

How to use

Configure Dependency Injection with FcPhp Di


use FcPhp\Di\Facades\DiFacade;
use FcPhp\Controller\Controller;

// Class example ...
class ExampleController extends Controller
{
    public function findAll($foo, $bar)
    {
        return compact('foo', 'bar');
    }
}
// Configure class into FcPhp Di
$di = DiFacade::getInstance();
$di->set('ExampleController', 'ExampleController');

Get instance and run Dispach


use FcPhp\Dispach\Facades\DispachFacade;
// Init Dispach
$instance = DispachFacade::getInstance();

/*
    Return ExampleController->findAll('foo_value', 'bar_value'):
    Array (
        'foo' => 'foo_value',
        'bar' => 'bar_value'
    )
*/
print_r($instance->dispach('ExampleController@findAll', ['foo_value', 'bar_value']));

FAQs

Package last updated on 13 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts