rosavox/lib/alveolata/xml/abstract/interface.php
2025-05-23 07:33:29 +00:00

56 lines
664 B
PHP

<?php
namespace alveolata\xml;
// require_once(DIR_ALVEOLATA . '/definitions.php');
/**
*/
interface interface_node
{
/**
* shall find all nodes, which fulfill a certain predicate
*
* @return array {list<…>}
*/
function find(
\Closure $sub,
\Closure $predicate,
?int $max_depth
) : array
;
/**
* shall replace nodes
*/
function transform(
\Closure $sub,
\Closure $function
)
;
/**
* shall convert the node to an array tree
*/
function to_raw(
\Closure $sub
)
;
/**
* shall convert the node to its string representation
*/
function to_string(
\Closure $sub,
int $depth
) : string
;
}
?>