xp_erase_history

xp_erase_history()

Erases the entire signal history.

Return type:void

Example #1 Basic Usage

<?php

// Create some history
xp_signal(XP_SIG('foo'), function(){});
for ($i=0;$i<10;$i++) {
    xp_emit(XP_SIG('foo'));
}

// Dump the history count
var_dump(count(xp_signal_history()));

// Erase the history
xp_erase_history();

var_dump(count(xp_signal_history()));

The above code will output.

10 ... 0
Read the Docs v: v5.0.1
Versions
latest
v5.0.1
v5.0.0
v4.0.1
v4.0.0
v3.1.1
v3.1.0
v3.0.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.