\CodeIgniter\DebugIterator

Iterator for debugging.

Summary

Methods
Properties
Constants
add()
run()
getReport()
No public properties found
No constants found
No protected methods found
$tests
$results
N/A
No private methods found
No private properties found
N/A

Properties

$tests

$tests : array

Stores the tests that we are to run.

Type

array

$results

$results : array

Stores the results of each of the tests.

Type

array

Methods

add()

add(string  $name, \Closure  $closure) : $this

Adds a test to run.

Tests are simply closures that the user can define any sequence of things to happen during the test.

Parameters

string $name
\Closure $closure

Returns

$this

run()

run(integer  $iterations = 1000, boolean  $output = true) : string|null

Runs through all of the tests that have been added, recording time to execute the desired number of iterations, and the approximate memory usage used during those iterations.

Parameters

integer $iterations
boolean $output

Returns

string|null

getReport()

getReport() : string

Get results.

Returns

string