// In one command $output = FilterSet::factory('label', array('acronym', 'markdown')->process_all($string_to_parse); // As an object $filterset = FilterSet::factory('label'); $filterset->prepend('acronym', $config_array); $flterset->append('markdown'); $markdown_output = $filterset->process('markdown'); $acronym_output = $filterset->process('acronym'); $all_output = $filterset->process_all(); $filterset->reset() var_dump($filterset); // Will show that all filters have been erased.
$filter = new Filter('markdown', $config_array); $filtered_output = $filter->process($string_to_be_formatted); // Or in one call $filtered_output = new Filter('acronym')->process($string_to_be_formatted);
It looks like you're new here. If you want to get involved, click one of these buttons!