<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="commonmark-cql.invoke" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>CommonMark\CQL::__invoke</refname>
  <refpurpose>CQL Execution</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>public</modifier> <methodname>CommonMark\CQL::__invoke</methodname>
   <methodparam><type>CommonMark\Node</type><parameter>root</parameter></methodparam>
   <methodparam><type>callable</type><parameter>handler</parameter></methodparam>
  </methodsynopsis>
  <para>
   Shall invoke the current CQL function on the given <parameter>root</parameter>,
   executing the given <parameter>handler</parameter> on entry to a <type>CommonMark\Node</type>
  </para>

 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>root</parameter></term>
    <listitem>
     <para>the root node of a tree</para>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><parameter>handler</parameter></term>
    <listitem>
     <para>
      should have the prototype:
      <methodsynopsis role="procedural">
      <type class="union"><type>bool</type><type>null</type></type><methodname>handler</methodname>
      <methodparam><type>CommonMark\Node</type><parameter>root</parameter></methodparam>
      <methodparam><type>CommonMark\Node</type><parameter>entering</parameter></methodparam>
      </methodsynopsis>
      <simplelist>
       <member>Should <parameter>handler</parameter> fail to return (void), or return <type>null</type>, CQL will continue executing</member>
       <member>Should the handler return a truthy value, CQL will continue executing.</member>
       <member>Should the handler return a falsy value, CQL will stop executing</member>
      </simplelist>
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
