Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is actually very easy once you know how. You just need to set the <code>role</code> attribute on the <code>programlisting</code> element.</p> <pre><code>&lt;programlisting role="php"&gt; $some = 'code'; &lt;/programlisting&gt; </code></pre> <p>I couldn't find this documented anywhere, other than a brief mention in the <a href="http://sourceforge.net/project/shownotes.php?release_id=163614" rel="nofollow">release notes</a>, but from looking at the code, there seem to be four roles that are supported:</p> <ol> <li><strong>php</strong> - adds PHP syntax highlighting to the content and includes a line number on every line.</li> <li><strong>tutorial</strong> - adds HTML syntax hightlighting to the content and includes a line number on every line.</li> <li><strong>xml</strong> - adds <code>pre</code> tags around the content, but otherwise no syntax hightlighting and no line numbers.</li> <li><strong>html</strong> - treats the content as raw HTML, so you can use whatever markup you like.</li> </ol> <p>Any time you want to use angle brackets, though, you will need to escape those characters or wrap the content in a CDATA section. This even applies when you want to use raw HTML. If not, the parser will try and interpret the content as XML.</p> <p>For example, a raw HTML sample would look something like this:</p> <pre><code>&lt;programlisting role="html"&gt; &lt;![CDATA[ &lt;b&gt;This sentence will be bold.&lt;/b&gt; ]]&gt; &lt;/programlisting&gt; </code></pre> <p>Also note that all of this applies to the initial version of <em>phpDocumentor</em>. The new version (<em>phpDocumentor 2</em>) doesn't appear to support tutorials/extended documentation as far as I can tell.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload