. */ namespace Textpattern\Filter; /** * Callable filter. * * * try { * Txp::get('\Textpattern\Filter\FilterCallable', 'fn'); * } catch (Textpattern\Filter\Exception $e) { * echo $e->getMessage(); * } * * * @since 4.6.0 * @package Filter */ class FilterCallable extends \Textpattern\Type\TypeCallable { /** * {@inheritdoc} */ public function __construct($callable) { if (!is_callable($callable)) { throw new \Textpattern\Filter\Exception(gTxt('assert_callable')); } parent::__construct($callable); } }