Download the PHP package ironbound/state without Composer

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

IronBound State

Build Status codecov Latest Stable Version License

IronBound State is a State Machine library heavily influenced by yohang/finite.

Usage

Core Components

Subject

The subject is the object that maintains state and has transitions applied to it. The only requirement is that it is a PHP object; there is no interface defined for subjects.

State

The State object represents the current state the subject is in. For instance, a post could be in the "Pending" state or "Published" state. A delivery state could be "Processing", "Waiting at Carrier", "In Transit", and "Delivered".

Transition

The Transition object defines how a subject moves from one state to another. For instance, when you "Publish" a post it moves from the "Pending" state to the "Published" state. When you "Deliver to Carrier" a package, it transitions from "Processing" to "Waiting at Carrier".

Graph

The Graph object is responsible for holding the set of available states a subject can be in and the list of transitions between those states.

A subject can have more than one Graph. For instance, an ecommerce order might have a payment status and a delivery status. Each status is a separate graph.

State Machine

The StateMachine is how you interact with a subject's state and transition between states. It can tell you what transitions are available from the current state and apply a transition to change the subject's state.

State Mediator

There are many different ways that a subject can store and change it's state. For instance, it could be an instance property, behind a method, or perhaps tracked somewhere completely separate from the subject's data. The StateMediator is used to abstract these details away from the StateMachine.

Factories

The most direct way to use IronBound State is to instantiate a ConcreteStateMachine directly.

However, you may prefer an alternate construction style where you use a Factory that is preconfigured.

The recommended way to do this is to use the StateMachineFactoryConfigurator class to do the heavy lifting based on a configuration array.

Events

IronBound-State integrates with the PSR-14 Event Dispatcher spec to customize behavior and listen for actions.

You can provide the ConcreteStateMachine with an EventDispatcherInterface instance by calling ConcreteStateMachine::setEventDispatcher. The following events are currently supported.

TestTransitionEvent

Called during the evaluation process after determining that the transition is available, and it's guard returned a valid evaluation. Call TestTransitionEvent::reject($reason) to dynamically prevent a transition from being applied.

BeforeTransitionEvent

Called before updating a subject's state in response to a transition being applied.

AfterTransitionEvent

Called after updating a subject's state in response to a transition being applied.


All versions of state with dependencies

PHP Build Version
Package Version
Requires myclabs/php-enum Version ^1.7
php Version ^7.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 ironbound/state contains the following files

Loading the files please wait ....