/**
* Magic method to convert the object to JSON string representation.
*
* @return string JSON representation of the actions array
*
* @since 1.7.0
*/
public function __toString()
{
$temp = array();
foreach ($this->data as $name => $rule) {
if ($data = $rule->getData()) {
$temp[$name] = $data;
}
}
return json_encode($temp, JSON_FORCE_OBJECT);
}