Download the PHP package hiromi2424/transition without Composer

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

Transition Component

Build Status

Version

This was versioned as 2.0.

Introduction

Transition component is a CakePHP component to help your transitional pages logic.

Requirements

Recommended:

Setup

cd /path/to/root/app/Plugin # or /path/to/root/plugins
git clone git://github.com/hiromi2424/TransitionComponent.git Transition

Or:

cd /path/to/your_repository
git submodule add git://github.com/hiromi2424/TransitionComponent.git plugins/Transition

Notice

This component will store any request data into session by default. It means you will have to revalidate all of(or merged)data when saving into your database. However, you can also use "saveDataWhenInvalid" option to not store data when validation was failed.

Summary

Examples

  1. Simple Wizard Form

    class UsersController extends AppController{
    
        public $components = array('Transition.Transition');
    
        // base of user information
        public function register() {
    
            // give a next action name
            $this->Transition->checkData('register_enquete');
    
        }
    
        // input enquete
        public function register_enquete() {
    
            $this->Transition->automate(
                'register', // previous action to check
                'register_confirm', // next action
                'Enquete' // model name to validate
            );
    
        }
    
        // confirm inputs
        public function register_confirm() {
    
            $this->Transition->automate(
                'register_enquete', // prev
                'register_save', // next
                array(
                    'validationMethod' => 'validateCaptcha', // virtual function to validate with captcha
                )
             );
    
            $this->set('data', $this->Transition->allData());
            $this->set('captcha', createCaptcha()); // virtual function to create a captcha
    
        }
    
        // stroring inputs
        public function register_save() {
    
            // As like this, multi action name can be accepted
            $this->Transition->checkPrev(array(
                'register',
                'register_enquete',
                'register_confirm'
            ));
    
            // mergedData() returns all session data saved on the actions merged
            if ($this->User->saveAll($this->Transition->mergedData()) {
    
                // Clear all of session data TransitionComponent uses
                $this->Transition->clearData();
                $this->Session->setFlash(__('Registration complete !!', true));
                $this->redirect(array('action' => 'index'));
    
            } else {
    
                $this->Session->setFlash(__('Registration failed ...', true));
                $this->redirect(array('action' => 'register'));
    
            }
    
        }
    
    }
  2. Transition among two Controllers

    class FirstController extends AppContoller {
    
        public $components = array('Transition.Transition');
    
        public function one() {
            $this->Transition->checkData(array('controller' => 'second', 'action' => 'two'));
        }
    
        public function three() {
            $this->Transition->checkPrev(array(
                'one',
                array('controller' => 'second', 'action' => 'two')
            ));
        }
    
    }
    
    class SecondController extends AppContoller {
    
        public $components = array('Transition.Transition');
    
        public function two() {
            $this->Transition->automate(
                array('controller' => 'first', 'action' => 'one'),
                array('controller' => 'first', 'action' => 'three')
            );
        }
    }

All versions of transition with dependencies

PHP Build Version
Package Version
Requires composer/installers Version *
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 hiromi2424/transition contains the following files

Loading the files please wait ....