Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time

Meta data file

The MetaDataFile Class is a simple data storage which writes data in a json format to a file. It is useful if you for example have to query APIs in a cronjob and you need to store the last successfully execution time...

The ProcessManagerSampleCommandSimple shows a basic usage.

Getting the file and writing data:

use Elements\Bundle\ProcessManagerBundle\MetaDataFile;

$metDataFileObject = MetaDataFile::getById('spample-id');
$data = $metDataFileObject->getData();

$metDataFileObject->setData(['lastRun' => $start->getTimestamp()])->save();