Corbomite Flash Data
Part of BuzzingPixel's Corbomite project.
Provides a means of flashing data to the next user's HTTP request.
Corbomite Flash Data provides a schedule config for Corbomite Schedule to run the Corbomite garbage collector. Flash data is meant to be short lived, therefore this garbage collector removes flash data that is more than 2 minutes old. You'll want to be sure that you've installed and set up the scheduler and that it's running on your application in production.
Corbomite Flash Data needs to add a database table in order to function. In order to do this, it needs to create some migrations which then need to be run. Run the
create-migrations command, which will place migration files in your Corbomite project.
php app flash/create-migrations
After running that command, you'll need to run the migrations:
php app migrate/up
Setting flash data
<?php $model = $flashDataApi->makeFlashDataModel(['name' => 'test_flash_data_key']); $model->dataItem('myItem', 'myVal'); $flashDataApi->setFlashData($model);
Getting flash data
Note that the flash data will be deleted immediately upon retrieval unless an argument of false is provided to
Copyright 2019 BuzzingPixel, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.