{
public function __construct()
{
- $this->data = array(
- 'memory' => 0,
- 'memory_limit' => $this->convertToBytes(ini_get('memory_limit')),
- );
+ $this->reset();
}
/**
$this->updateMemoryUsage();
}
+ /**
+ * {@inheritdoc}
+ */
+ public function reset()
+ {
+ $this->data = array(
+ 'memory' => 0,
+ 'memory_limit' => $this->convertToBytes(ini_get('memory_limit')),
+ );
+ }
+
/**
* {@inheritdoc}
*/
switch (substr($memoryLimit, -1)) {
case 't': $max *= 1024;
+ // no break
case 'g': $max *= 1024;
+ // no break
case 'm': $max *= 1024;
+ // no break
case 'k': $max *= 1024;
}