Skip to content

version 1.0.1 of php time limit manager component released

I happy to announce the release of 1.0.1 of bazzlines time limit manager component for php. Important changes are:

  • add getRuntimeIn[Seconds|Minutes|Hours]
  • extended unit tests by covering setting of the buffer
  • added getter for minutes and hours
  • updated dependencies

Memory Limit Manager for PHP

I'm happy to announce the release of version 1.0.1 from the componen Memory Limit Manager for PHP.

What is it good for?

  • provides easy setting of memory limit
  • gives you the advantage to add a buffer before reaching the limit to easy up reacting when limit is reached
  • helps you to set the limit in bytes, kilo bytes, mega bytes or giga bytes (same for the buffer)
  • comes with DependentInterface and AwareInterface

How can i use it?


$manager = new Net\Bazzline\Component\MemoryLimitManager\MemoryLimitManager();
$manager->setBufferInMegaBytes(4);
$manager->setLimitInMegaBytes(64);

while (!empty($dataSet)) {
    if ($manager->isLimitReached()) {
        //exit while loop, shutdown process
    } else {
        $data = array_shift($dataSet);
        //work on data set
    }
}

How can i install it?

Manuel


mkdir -p vendor/net_bazzline/php_component_memory_limit_manager
cd vendor/net_bazzline/php_component_memory_limit_manager
git clone https://github.com/bazzline/php_component_memory_limit_manager

With packagist


composer require net_bazzline/php_component_memory_limit_manager:dev-master