Page MenuHomeWickedGov Phorge

ShrinkerFactory.php
No OneTemporary

Size
789 B
Referenced Files
None
Subscribers
None

ShrinkerFactory.php

<?php
namespace Eris\Shrinker;
class ShrinkerFactory
{
private $options;
/**
* @param array $options
* 'timeLimit' => null|integer in seconds. The maximum time that should
* be allocated to a Shrinker before giving up
*/
public function __construct(array $options)
{
$this->options = $options;
}
public function multiple(array $generators, callable $assertion)
{
return $this->configureShrinker(new Multiple($generators, $assertion));
}
private function configureShrinker($shrinker)
{
if ($this->options['timeLimit'] !== null) {
$shrinker->setTimeLimit(FixedTimeLimit::realTime($this->options['timeLimit']));
}
return $shrinker;
}
}

File Metadata

Mime Type
text/x-php
Expires
Aug 16 2026, 02:22 (13 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a3/1d/c32a09627d47ff70ff8f841173e0
Default Alt Text
ShrinkerFactory.php (789 B)

Event Timeline