<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>Luminous: luminous Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Luminous  <span id="projectnumber">git-master</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.1.2 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-static-methods">Static Public Member Functions</a> | <a href="classluminous-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">luminous Class Reference</div> </div> </div><!--header--> <div class="contents"> <p>Users' API. <a href="classluminous.html#details">More...</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr class="memitem:a2091154c8802bc577130f6bf4b9fe7c5"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#a2091154c8802bc577130f6bf4b9fe7c5">__guess_language_cmp</a> ($a, $b)</td></tr> <tr class="memitem:ac10179e43dc878063150584091c1dcb4"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#ac10179e43dc878063150584091c1dcb4">cache_errors</a> ()</td></tr> <tr class="memdesc:ac10179e43dc878063150584091c1dcb4"><td class="mdescLeft"> </td><td class="mdescRight">Returns a list of cache errors encountered during the most recent highlight. <a href="#ac10179e43dc878063150584091c1dcb4"></a><br/></td></tr> <tr class="memitem:a5495a0831fcb35ccb4e46d54748916e1"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#a5495a0831fcb35ccb4e46d54748916e1">formatter</a> ()</td></tr> <tr class="memdesc:a5495a0831fcb35ccb4e46d54748916e1"><td class="mdescLeft"> </td><td class="mdescRight">Gets a formatter instance. <a href="#a5495a0831fcb35ccb4e46d54748916e1"></a><br/></td></tr> <tr class="memitem:ae6d5094890e6590efe54c33fb9ed23f6"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#ae6d5094890e6590efe54c33fb9ed23f6">guess_language</a> ($src, $confidence=0.05, $default= 'plain')</td></tr> <tr class="memdesc:ae6d5094890e6590efe54c33fb9ed23f6"><td class="mdescLeft"> </td><td class="mdescRight">Attempts to guess the language of a piece of source code. <a href="#ae6d5094890e6590efe54c33fb9ed23f6"></a><br/></td></tr> <tr class="memitem:a44f8e7eb81316db20d4e6969b7fe8ef5"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#a44f8e7eb81316db20d4e6969b7fe8ef5">guess_language_full</a> ($src)</td></tr> <tr class="memdesc:a44f8e7eb81316db20d4e6969b7fe8ef5"><td class="mdescLeft"> </td><td class="mdescRight">Attempts to guess the language of a piece of source code. <a href="#a44f8e7eb81316db20d4e6969b7fe8ef5"></a><br/></td></tr> <tr class="memitem:aec66d6c5d22ff1254f8c5ff73fb0f71d"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#aec66d6c5d22ff1254f8c5ff73fb0f71d">head_html</a> ()</td></tr> <tr class="memdesc:aec66d6c5d22ff1254f8c5ff73fb0f71d"><td class="mdescLeft"> </td><td class="mdescRight">Gets the markup you need to include in your web page. <a href="#aec66d6c5d22ff1254f8c5ff73fb0f71d"></a><br/></td></tr> <tr class="memitem:a51d6db398127b5b7a1bbb27af6a0790e"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#a51d6db398127b5b7a1bbb27af6a0790e">highlight</a> ($scanner, $source, $cache_or_settings=null)</td></tr> <tr class="memdesc:a51d6db398127b5b7a1bbb27af6a0790e"><td class="mdescLeft"> </td><td class="mdescRight">Highlights a string according to the current settings. <a href="#a51d6db398127b5b7a1bbb27af6a0790e"></a><br/></td></tr> <tr class="memitem:abe612a3df76685834bcd8afaffee544b"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#abe612a3df76685834bcd8afaffee544b">highlight_file</a> ($scanner, $file, $cache_or_settings=null)</td></tr> <tr class="memdesc:abe612a3df76685834bcd8afaffee544b"><td class="mdescLeft"> </td><td class="mdescRight">Highlights a file according to the current setings. <a href="#abe612a3df76685834bcd8afaffee544b"></a><br/></td></tr> <tr class="memitem:a49d5450bc78c1bfc1bc5aeaff954c39f"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#a49d5450bc78c1bfc1bc5aeaff954c39f">register_scanner</a> ($language_code, $classname, $readable_language, $path, $dependencies=null)</td></tr> <tr class="memdesc:a49d5450bc78c1bfc1bc5aeaff954c39f"><td class="mdescLeft"> </td><td class="mdescRight">Registers a scanner. <a href="#a49d5450bc78c1bfc1bc5aeaff954c39f"></a><br/></td></tr> <tr class="memitem:ae77609b01703562b0bfed047a7f48767"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#ae77609b01703562b0bfed047a7f48767">root</a> ()</td></tr> <tr class="memdesc:ae77609b01703562b0bfed047a7f48767"><td class="mdescLeft"> </td><td class="mdescRight">Get the full filesystem path to Luminous. <a href="#ae77609b01703562b0bfed047a7f48767"></a><br/></td></tr> <tr class="memitem:a1234abdb40eb18ceba4a5bcc12f9e89f"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#a1234abdb40eb18ceba4a5bcc12f9e89f">scanners</a> ()</td></tr> <tr class="memdesc:a1234abdb40eb18ceba4a5bcc12f9e89f"><td class="mdescLeft"> </td><td class="mdescRight">Gets a list of registered scanners. <a href="#a1234abdb40eb18ceba4a5bcc12f9e89f"></a><br/></td></tr> <tr class="memitem:ace722a2ba2c2251eabccf6f0d18bcbe9"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#ace722a2ba2c2251eabccf6f0d18bcbe9">set</a> ($option, $value=null)</td></tr> <tr class="memdesc:ace722a2ba2c2251eabccf6f0d18bcbe9"><td class="mdescLeft"> </td><td class="mdescRight">Sets the given option to the given value. <a href="#ace722a2ba2c2251eabccf6f0d18bcbe9"></a><br/></td></tr> <tr class="memitem:af5888c20eb26757b5bd9af198e44ec96"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#af5888c20eb26757b5bd9af198e44ec96">setting</a> ($option)</td></tr> <tr class="memdesc:af5888c20eb26757b5bd9af198e44ec96"><td class="mdescLeft"> </td><td class="mdescRight">Gets a setting's value. <a href="#af5888c20eb26757b5bd9af198e44ec96"></a><br/></td></tr> <tr class="memitem:a0bfdea509586ce343d2e6001ad33ccd0"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#a0bfdea509586ce343d2e6001ad33ccd0">theme</a> ($theme)</td></tr> <tr class="memdesc:a0bfdea509586ce343d2e6001ad33ccd0"><td class="mdescLeft"> </td><td class="mdescRight">Reads a CSS theme file Gets the CSS-string content of a theme file. Use this function for reading themes as it involves security checks against reading arbitrary files. <a href="#a0bfdea509586ce343d2e6001ad33ccd0"></a><br/></td></tr> <tr class="memitem:a069fa20b026732cc6366743f3688a822"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#a069fa20b026732cc6366743f3688a822">theme_exists</a> ($<a class="el" href="classluminous.html#a0bfdea509586ce343d2e6001ad33ccd0">theme</a>)</td></tr> <tr class="memdesc:a069fa20b026732cc6366743f3688a822"><td class="mdescLeft"> </td><td class="mdescRight">Checks whether a theme exists. <a href="#a069fa20b026732cc6366743f3688a822"></a><br/></td></tr> <tr class="memitem:a9bb8a124a3d5cff72a9756edabc7419a"><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classluminous.html#a9bb8a124a3d5cff72a9756edabc7419a">themes</a> ()</td></tr> <tr class="memdesc:a9bb8a124a3d5cff72a9756edabc7419a"><td class="mdescLeft"> </td><td class="mdescRight">Gets a list of installed themes. <a href="#a9bb8a124a3d5cff72a9756edabc7419a"></a><br/></td></tr> </table> <a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Users' API. </p> </div><h2>Member Function Documentation</h2> <a class="anchor" id="a2091154c8802bc577130f6bf4b9fe7c5"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::__guess_language_cmp </td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>$a</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"><em>$b</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Comparison function for <a class="el" href="classluminous.html#ae6d5094890e6590efe54c33fb9ed23f6" title="Attempts to guess the language of a piece of source code.">guess_language()</a>'s sorting </p> </div> </div> <a class="anchor" id="ac10179e43dc878063150584091c1dcb4"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::cache_errors </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Returns a list of cache errors encountered during the most recent highlight. </p> <dl class="section return"><dt>Returns</dt><dd>An array of errors the cache encountered (which may be empty), or <code>FALSE</code> if the cache is not enabled </dd></dl> </div> </div> <a class="anchor" id="a5495a0831fcb35ccb4e46d54748916e1"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::formatter </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gets a formatter instance. </p> <dl class="section return"><dt>Returns</dt><dd>an instance of a LuminousFormatter according to the current format setting</dd></dl> <p>This shouldn't be necessary for general usage, it is only implemented for testing. </p> </div> </div> <a class="anchor" id="ae6d5094890e6590efe54c33fb9ed23f6"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::guess_language </td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>$src</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"><em>$confidence</em> = <code>0.05</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"><em>$default</em> = <code>'plain'</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Attempts to guess the language of a piece of source code. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$src</td><td>The source code whose language is to be guessed </td></tr> <tr><td class="paramname">$confidence</td><td>The desired confidence level: if this is 0.05 but the best guess has a confidence of 0.04, then $default is returned. Note that the confidence level returned by scanners is quite arbitrary, so don't set this to '1' thinking that'll give you better results. A realistic confidence is likely to be quite low, because a scanner will only return 1 if it's able to pick out a shebang (#!) line or something else definitive. If there exists no such identifier, a 'strong' confidence which is right most of the time might be as low as 0.1. Therefore it is recommended to keep this between 0.01 and 0.10. </td></tr> <tr><td class="paramname">$default</td><td>The default name to return in the event that no scanner thinks this source belongs to them (at the desired confidence).</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>A valid code for the best scanner, or $default.</dd></dl> <p>This is a wrapper around <a class="el" href="classluminous.html#a44f8e7eb81316db20d4e6969b7fe8ef5" title="Attempts to guess the language of a piece of source code.">luminous::guess_language_full</a> </p> </div> </div> <a class="anchor" id="a44f8e7eb81316db20d4e6969b7fe8ef5"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::guess_language_full </td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>$src</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Attempts to guess the language of a piece of source code. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$src</td><td>The source code whose language is to be guessed </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>An array - the array is ordered by probability, with the most probable language coming first in the array. Each array element is an array which represents a language (scanner), and has the keys: <ul> <li><code>'language'</code> => Human-readable language description, </li> <li><code>'codes'</code> => valid codes for the language (array), </li> <li><code>'p'</code> => the probability (between 0.0 and 1.0 inclusive),</li> </ul> note that <code>'language'</code> and <code>'codes'</code> are the key => value pair from <a class="el" href="classluminous.html#a1234abdb40eb18ceba4a5bcc12f9e89f" title="Gets a list of registered scanners.">luminous::scanners()</a></dd></dl> <dl class="section warning"><dt>Warning</dt><dd>Language guessing is inherently unreliable but should be right about 80% of the time on common languages. Bear in mind that guessing is going to be severely hampered in the case that one language is used to generate code in another language.</dd></dl> <p>Usage for this function will be something like this: </p> <div class="fragment"><div class="line">$guesses = <a class="code" href="classluminous.html#ae6d5094890e6590efe54c33fb9ed23f6" title="Attempts to guess the language of a piece of source code.">luminous::guess_language</a>($src);</div> <div class="line">$output = <a class="code" href="classluminous.html#a51d6db398127b5b7a1bbb27af6a0790e" title="Highlights a string according to the current settings.">luminous::highlight</a>($guesses[0][<span class="stringliteral">'codes'</span>][0], $src);</div> </div><!-- fragment --><dl class="section see"><dt>See Also</dt><dd><a class="el" href="classluminous.html#ae6d5094890e6590efe54c33fb9ed23f6" title="Attempts to guess the language of a piece of source code.">luminous::guess_language</a> </dd></dl> </div> </div> <a class="anchor" id="aec66d6c5d22ff1254f8c5ff73fb0f71d"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::head_html </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gets the markup you need to include in your web page. </p> <dl class="section return"><dt>Returns</dt><dd>a string representing everything that needs to be printed in the <head> section of a website.</dd></dl> <p>This is influenced by the following settings: relative-root, include-javascript, include-jquery theme </p> </div> </div> <a class="anchor" id="a51d6db398127b5b7a1bbb27af6a0790e"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::highlight </td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>$scanner</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"><em>$source</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"><em>$cache_or_settings</em> = <code>null</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Highlights a string according to the current settings. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$scanner</td><td>The scanner to use, this can either be a langauge code, or it can be an instance of <a class="el" href="classLuminousScanner.html" title="the base class for all scanners">LuminousScanner</a>. </td></tr> <tr><td class="paramname">$source</td><td>The source string </td></tr> <tr><td class="paramname">$cache</td><td>Whether or not to use the cache </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the highlighted source code.</dd></dl> <p>To specify different output formats or other options, see <a class="el" href="classluminous.html#ace722a2ba2c2251eabccf6f0d18bcbe9" title="Sets the given option to the given value.">set()</a>. </p> </div> </div> <a class="anchor" id="abe612a3df76685834bcd8afaffee544b"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::highlight_file </td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>$scanner</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"><em>$file</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"><em>$cache_or_settings</em> = <code>null</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Highlights a file according to the current setings. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$scanner</td><td>The scanner to use, this can either be a langauge code, or it can be an instance of <a class="el" href="classLuminousScanner.html" title="the base class for all scanners">LuminousScanner</a>. </td></tr> <tr><td class="paramname">$file</td><td>the source string </td></tr> <tr><td class="paramname">$cache</td><td>Whether or not to use the cache </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the highlighted source code.</dd></dl> <p>To specify different output formats or other options, see <a class="el" href="classluminous.html#ace722a2ba2c2251eabccf6f0d18bcbe9" title="Sets the given option to the given value.">set()</a>. </p> </div> </div> <a class="anchor" id="a49d5450bc78c1bfc1bc5aeaff954c39f"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::register_scanner </td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>$language_code</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"><em>$classname</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"><em>$readable_language</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"><em>$path</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"><em>$dependencies</em> = <code>null</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Registers a scanner. </p> <p>Registers a scanner with Luminous's scanner table. Utilising this function means that Luminous will handle instantiation and inclusion of the scanner's source file in a lazy-manner.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$language_code</td><td>A string or array of strings designating the aliases by which this scanner may be accessed </td></tr> <tr><td class="paramname">$classname</td><td>The class name of the scanner, as string. If you leave this as 'null', it will be treated as a dummy file (you can use this to handle a set of non-circular include rules, if you run into problems). </td></tr> <tr><td class="paramname">$readable_language</td><td>A human readable language name </td></tr> <tr><td class="paramname">$path</td><td>The path to the source file containing your scanner </td></tr> <tr><td class="paramname">dependencies</td><td>An array of other scanners which this scanner depends on (as sub-scanners, or superclasses). Each item in the array should be a $language_code for another scanner. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="ae77609b01703562b0bfed047a7f48767"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::root </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the full filesystem path to Luminous. </p> <dl class="section return"><dt>Returns</dt><dd>what Luminous thinks its location is on the filesystem </dd></dl> </div> </div> <a class="anchor" id="a1234abdb40eb18ceba4a5bcc12f9e89f"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::scanners </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gets a list of registered scanners. </p> <dl class="section return"><dt>Returns</dt><dd>a list of scanners currently registered. The list is in the format:</dd></dl> <p>language_name => codes,</p> <p>where language_name is a string, and codes is an array of strings.</p> <p>The array is sorted alphabetically by key. </p> </div> </div> <a class="anchor" id="ace722a2ba2c2251eabccf6f0d18bcbe9"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::set </td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>$option</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"><em>$value</em> = <code>null</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Sets the given option to the given value. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$option</td><td>The name of the setting (corresponds to an attribute name in <a class="el" href="classLuminousOptions.html" title="Options class.">LuminousOptions</a>) </td></tr> <tr><td class="paramname">$value</td><td>The new value of the setting </td></tr> </table> </dd> </dl> <dl class="exception"><dt>Exceptions</dt><dd> <table class="exception"> <tr><td class="paramname">Exception</td><td>if the option is unrecognised (and in various other validation failures), </td></tr> <tr><td class="paramname">InvalidArgumentException</td><td>if the argument fails the type-validation check</td></tr> </table> </dd> </dl> <dl class="section note"><dt>Note</dt><dd>This function can also accept multiple settings if $option is a map of option_name=>value</dd></dl> <p>Options are stored in <a class="el" href="classLuminousOptions.html" title="Options class.">LuminousOptions</a>, which provides documentation of each option.</p> <dl class="section note"><dt>Note</dt><dd>as of 0.7 this is a thin wrapper around LuminousOptions::set()</dd></dl> <dl class="section see"><dt>See Also</dt><dd>LuminousOptions::set </dd></dl> </div> </div> <a class="anchor" id="af5888c20eb26757b5bd9af198e44ec96"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::setting </td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>$option</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gets a setting's value. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$option</td><td>The name of the setting (corresponds to an attribute name in <a class="el" href="classLuminousOptions.html" title="Options class.">LuminousOptions</a>) </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The value of the given setting </dd></dl> <dl class="exception"><dt>Exceptions</dt><dd> <table class="exception"> <tr><td class="paramname">Exception</td><td>if the option is unrecognised</td></tr> </table> </dd> </dl> <p>Options are stored in <a class="el" href="classLuminousOptions.html" title="Options class.">LuminousOptions</a>, which provides documentation of each option. </p> <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classLuminousOptions.html" title="Options class.">LuminousOptions</a> </dd></dl> </div> </div> <a class="anchor" id="a0bfdea509586ce343d2e6001ad33ccd0"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::theme </td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>$theme</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Reads a CSS theme file Gets the CSS-string content of a theme file. Use this function for reading themes as it involves security checks against reading arbitrary files. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$theme</td><td>The name of the theme to retrieve, which may or may not include the .css suffix. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the content of a theme; this is the actual CSS text. </dd></dl> </div> </div> <a class="anchor" id="a069fa20b026732cc6366743f3688a822"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::theme_exists </td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>$theme</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Checks whether a theme exists. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$theme</td><td>the name of a theme, which should be suffixed with .css </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd><code>TRUE</code> if a theme exists in style/, else <code>FALSE</code> </dd></dl> </div> </div> <a class="anchor" id="a9bb8a124a3d5cff72a9756edabc7419a"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static luminous::themes </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gets a list of installed themes. </p> <dl class="section return"><dt>Returns</dt><dd>the list of theme files present in style/. Each theme will simply be a filename, and will end in .css, and will not have any directory prefix. </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>src/luminous.php</li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Sat Jan 12 2013 16:03:50 for Luminous by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.1.2 </small></address> </body> </html>