Download the PHP package sidlee/flow-manager without Composer

On this page you can find all versions of the php package sidlee/flow-manager. 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 flow-manager

SidLee\Flow-Manager

Library to assist in the creation and management of complex wizard flows in projects using Symfony2's HttpFoundation component.

Library Maintainers

Usage

Creating a Step

In order to create a step, you must create a class implementing the interface SidLee\FlowManager\StepInterface. You may use SidLee\FlowManager\AbstractStep as a template if you wish.

use SidLee\FlowManager\AbstractStep;
use SidLee\FlowManager\NavigationResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

class WizardStartStep extends AbstractStep
{
    public function handleRequest(Request $request, NavigationResponse $navResponse, $data) {
        return new Response("Hello World");
    }
}

In order to cause a navigation within the flow, simply return a SidLee\FlowManager\NavigationResponse instead of a Symfony\Component\HttpFoundation\Response.

use SidLee\FlowManager\AbstractStep;
use SidLee\FlowManager\NavigationDirection;
use SidLee\FlowManager\NavigationResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

class WizardStartStep extends AbstractStep
{
    public function handleRequest(Request $request, NavigationResponse $navResponse, $data) {
        if($request->request->getAlpha('navigation') === 'NEXT') {
            return new NavigationResponse(NavigationDirection::NEXT());
        }
        return new Response("Hello World");
    }
}

Creating a flow

The wizard (or flow) is created and managed via a specialized collection called SidLee\FlowManager\StepCollection.

In order to create a flow, you must first populate your StepCollection with the desired steps (and names).

use SidLee\FlowManager\StepCollection;

$stepCollection = new StepCollection();
$stepCollection->add('start', new WizardStartStep());
$stepCollection->add('accountInfo', new AccountInformationStep());
$stepCollection->add('confirmAccountInfo', new AccountInformationConfirmationStep());
$stepCollection->add('welcome', new WelcomeStep());

For more complex flows, you can also nest StepCollection instances (use add() with a StepCollection instead of a StepInterface).

Using the created flow

Once the flow has been created, you must create an implementation of SidLee\FlowManager\AbstractFlowManager that will be able to manage the flow.

You must implement following functions:

Once your implementation is completed, you then have create a instance of your FlowManager by specifying a root key and the StepCollection representing your flow. You may also pass the desired EventDispatcher to be used for events.

Step Identifiers

Steps will be assigned a string identified based on the name and their nesting level in the StepCollection as well as the root key passed to the FlowManager.

Assuming that you have the following structure inside a StepCollection:

- wizard_start
- registration_subflow
    - account_information
    - credentials_information
    - captcha
- download_client
- welcome

and that your root key in the FlowManager is "firstTimeSetup". The steps will be given the following fully qualified identifiers:

- firstTimeSetup.wizard_start
- firstTimeSetup.registration_subflow.account_information
- firstTimeSetup.registration_subflow.credentials_information
- firstTimeSetup.registration_subflow.captcha
- firstTimeSetup.download_client
- firstTimeSetup.welcome

These identifiers can be used to navigate directly to a step using NavigationDirection::DIRECT().


All versions of flow-manager with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
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 sidlee/flow-manager contains the following files

Loading the files please wait ....