Location: PHPKode > scripts > CSS Prefix Spawner > CSS-Prefix-Spawner-master/csstidy/Docs/__filesource/fsource_csstidy__class.csstidy.php.html
<html>
<head>
<title>File Source for class.csstidy.php</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">csstidy</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_csstidy.html" class="menu">class tree: csstidy</a> ]
		  [ <a href="../elementindex_csstidy.html" class="menu">index: csstidy</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
      <b>Packages:</b><br />
              <a href="../li_csstidy.html">csstidy</a><br />
            <br /><br />
                  
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1 align="center">Source for file class.csstidy.php</h1>
<p>Documentation is available at <a href="../csstidy/_class_csstidy_php.html">class.csstidy.php</a></p>
<div class="php">
<div class="listing"><pre><ol><li><a name="a1"></a><span class="src-php">&lt;?php</span></li>
<li><a name="a2"></a><span class="src-doc">/**</span></li>
<li><a name="a3"></a><span class="src-doc"> * CSSTidy - CSS Parser and Optimiser</span></li>
<li><a name="a4"></a><span class="src-doc"> *</span></li>
<li><a name="a5"></a><span class="src-doc"> * CSS Parser class</span></li>
<li><a name="a6"></a><span class="src-doc"> *</span></li>
<li><a name="a7"></a><span class="src-doc"> * This file is part of CSSTidy.</span></li>
<li><a name="a8"></a><span class="src-doc"> *</span></li>
<li><a name="a9"></a><span class="src-doc"> * CSSTidy is free software; you can redistribute it and/or modify</span></li>
<li><a name="a10"></a><span class="src-doc"> * it under the terms of the GNU General Public License as published by</span></li>
<li><a name="a11"></a><span class="src-doc"> * the Free Software Foundation; either version 2 of the License, or</span></li>
<li><a name="a12"></a><span class="src-doc"> * (at your option) any later version.</span></li>
<li><a name="a13"></a><span class="src-doc"> *</span></li>
<li><a name="a14"></a><span class="src-doc"> * CSSTidy is distributed in the hope that it will be useful,</span></li>
<li><a name="a15"></a><span class="src-doc"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></li>
<li><a name="a16"></a><span class="src-doc"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></li>
<li><a name="a17"></a><span class="src-doc"> * GNU General Public License for more details.</span></li>
<li><a name="a18"></a><span class="src-doc"> *</span></li>
<li><a name="a19"></a><span class="src-doc"> * You should have received a copy of the GNU General Public License</span></li>
<li><a name="a20"></a><span class="src-doc"> * along with CSSTidy; if not, write to the Free Software</span></li>
<li><a name="a21"></a><span class="src-doc"> * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA</span></li>
<li><a name="a22"></a><span class="src-doc"> *</span></li>
<li><a name="a23"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://opensource.org/licenses/gpl-license.php GNU Public License</span></li>
<li><a name="a24"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> csstidy</span></li>
<li><a name="a25"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Florian Schmitz (floele at gmail dot com) 2005-2006</span></li>
<li><a name="a26"></a><span class="src-doc"> */</span></li>
<li><a name="a27"></a>&nbsp;</li>
<li><a name="a28"></a><span class="src-doc">/**</span></li>
<li><a name="a29"></a><span class="src-doc"> * Various CSS data needed for correct optimisations etc.</span></li>
<li><a name="a30"></a><span class="src-doc"> *</span></li>
<li><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.2</span></li>
<li><a name="a32"></a><span class="src-doc"> */</span></li>
<li><a name="a33"></a>require<span class="src-sym">(</span><span class="src-str">'data.inc.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a34"></a>&nbsp;</li>
<li><a name="a35"></a><span class="src-doc">/**</span></li>
<li><a name="a36"></a><span class="src-doc"> * Contains a class for printing CSS code</span></li>
<li><a name="a37"></a><span class="src-doc"> *</span></li>
<li><a name="a38"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.0</span></li>
<li><a name="a39"></a><span class="src-doc"> */</span></li>
<li><a name="a40"></a>require<span class="src-sym">(</span><span class="src-str">'class.csstidy_print.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a41"></a>&nbsp;</li>
<li><a name="a42"></a><span class="src-doc">/**</span></li>
<li><a name="a43"></a><span class="src-doc"> * Contains a class for optimising CSS code</span></li>
<li><a name="a44"></a><span class="src-doc"> *</span></li>
<li><a name="a45"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.0</span></li>
<li><a name="a46"></a><span class="src-doc"> */</span></li>
<li><a name="a47"></a>require<span class="src-sym">(</span><span class="src-str">'class.csstidy_optimise.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a48"></a>&nbsp;</li>
<li><a name="a49"></a><span class="src-doc">/**</span></li>
<li><a name="a50"></a><span class="src-doc"> * CSS Parser class</span></li>
<li><a name="a51"></a><span class="src-doc"> *</span></li>
<li><a name="a52"></a><span class="src-doc"> * This class represents a CSS parser which reads CSS code and saves it in an array.</span></li>
<li><a name="a53"></a><span class="src-doc"> * In opposite to most other CSS parsers, it does not use regular expressions and</span></li>
<li><a name="a54"></a><span class="src-doc"> * thus has full CSS2 support and a higher reliability.</span></li>
<li><a name="a55"></a><span class="src-doc"> * Additional to that it applies some optimisations and fixes to the CSS code.</span></li>
<li><a name="a56"></a><span class="src-doc"> * An online version should be available here: http://cdburnerxp.se/cssparse/css_optimiser.php</span></li>
<li><a name="a57"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> csstidy</span></li>
<li><a name="a58"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Florian Schmitz (floele at gmail dot com) 2005-2006</span></li>
<li><a name="a59"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.2</span></li>
<li><a name="a60"></a><span class="src-doc"> */</span></li>
<li><a name="a61"></a><span class="src-key">class </span><a href="../csstidy/csstidy.html">csstidy</a> <span class="src-sym">{</span></li>
<li><a name="a62"></a>&nbsp;</li>
<li><a name="a63"></a><span class="src-doc">/**</span></li>
<li><a name="a64"></a><span class="src-doc"> * Saves the parsed CSS</span></li>
<li><a name="a65"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></li>
<li><a name="a66"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a67"></a><span class="src-doc"> */</span></li>
<li><a name="a68"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$css">$css</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a69"></a>&nbsp;</li>
<li><a name="a70"></a><span class="src-doc">/**</span></li>
<li><a name="a71"></a><span class="src-doc"> * Saves the parsed CSS (raw)</span></li>
<li><a name="a72"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></li>
<li><a name="a73"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a74"></a><span class="src-doc"> */</span></li>
<li><a name="a75"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$tokens">$tokens</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a76"></a>&nbsp;</li>
<li><a name="a77"></a><span class="src-doc">/**</span></li>
<li><a name="a78"></a><span class="src-doc"> * Printer class</span></li>
<li><a name="a79"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@see</span><span class="src-doc"> csstidy_print</span></li>
<li><a name="a80"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">object </span></li>
<li><a name="a81"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a82"></a><span class="src-doc"> */</span></li>
<li><a name="a83"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$print">$print</a><span class="src-sym">;</span></li>
<li><a name="a84"></a>&nbsp;</li>
<li><a name="a85"></a><span class="src-doc">/**</span></li>
<li><a name="a86"></a><span class="src-doc"> * Optimiser class</span></li>
<li><a name="a87"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@see</span><span class="src-doc"> csstidy_optimise</span></li>
<li><a name="a88"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">object </span></li>
<li><a name="a89"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a90"></a><span class="src-doc"> */</span></li>
<li><a name="a91"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$optimise">$optimise</a><span class="src-sym">;</span></li>
<li><a name="a92"></a>&nbsp;</li>
<li><a name="a93"></a><span class="src-doc">/**</span></li>
<li><a name="a94"></a><span class="src-doc"> * Saves the CSS charset (@charset)</span></li>
<li><a name="a95"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a96"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a97"></a><span class="src-doc"> */</span></li>
<li><a name="a98"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$charset">$charset</a> = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a99"></a>&nbsp;</li>
<li><a name="a100"></a><span class="src-doc">/**</span></li>
<li><a name="a101"></a><span class="src-doc"> * Saves all @import URLs</span></li>
<li><a name="a102"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></li>
<li><a name="a103"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a104"></a><span class="src-doc"> */</span></li>
<li><a name="a105"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$import">$import</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a106"></a>&nbsp;</li>
<li><a name="a107"></a><span class="src-doc">/**</span></li>
<li><a name="a108"></a><span class="src-doc"> * Saves the namespace</span></li>
<li><a name="a109"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a110"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a111"></a><span class="src-doc"> */</span></li>
<li><a name="a112"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$namespace">$namespace</a> = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a113"></a>&nbsp;</li>
<li><a name="a114"></a><span class="src-doc">/**</span></li>
<li><a name="a115"></a><span class="src-doc"> * Contains the version of csstidy</span></li>
<li><a name="a116"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a117"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a118"></a><span class="src-doc"> */</span></li>
<li><a name="a119"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$version">$version</a> = <span class="src-str">'1.2'</span><span class="src-sym">;</span></li>
<li><a name="a120"></a>&nbsp;</li>
<li><a name="a121"></a><span class="src-doc">/**</span></li>
<li><a name="a122"></a><span class="src-doc"> * Stores the settings</span></li>
<li><a name="a123"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></li>
<li><a name="a124"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a125"></a><span class="src-doc"> */</span></li>
<li><a name="a126"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$settings">$settings</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a127"></a>&nbsp;</li>
<li><a name="a128"></a><span class="src-doc">/**</span></li>
<li><a name="a129"></a><span class="src-doc"> * Saves the parser-status.</span></li>
<li><a name="a130"></a><span class="src-doc"> *</span></li>
<li><a name="a131"></a><span class="src-doc"> * Possible values:</span></li>
<li><a name="a132"></a><span class="src-doc"> * - is = in selector</span></li>
<li><a name="a133"></a><span class="src-doc"> * - ip = in property</span></li>
<li><a name="a134"></a><span class="src-doc"> * - iv = in value</span></li>
<li><a name="a135"></a><span class="src-doc"> * - instr = in string (started at &quot; or ' or ( )</span></li>
<li><a name="a136"></a><span class="src-doc"> * - ic = in comment (ignore everything)</span></li>
<li><a name="a137"></a><span class="src-doc"> * - at = in @-block</span></li>
<li><a name="a138"></a><span class="src-doc"> * </span></li>
<li><a name="a139"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a140"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a141"></a><span class="src-doc"> */</span></li>
<li><a name="a142"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$status">$status</a> = <span class="src-str">'is'</span><span class="src-sym">;</span></li>
<li><a name="a143"></a>&nbsp;</li>
<li><a name="a144"></a>&nbsp;</li>
<li><a name="a145"></a><span class="src-doc">/**</span></li>
<li><a name="a146"></a><span class="src-doc"> * Saves the current at rule (@media)</span></li>
<li><a name="a147"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a148"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a149"></a><span class="src-doc"> */</span></li>
<li><a name="a150"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$at">$at</a> = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a151"></a>&nbsp;</li>
<li><a name="a152"></a><span class="src-doc">/**</span></li>
<li><a name="a153"></a><span class="src-doc"> * Saves the current selector</span></li>
<li><a name="a154"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a155"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a156"></a><span class="src-doc"> */</span></li>
<li><a name="a157"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$selector">$selector</a> = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a158"></a>&nbsp;</li>
<li><a name="a159"></a><span class="src-doc">/**</span></li>
<li><a name="a160"></a><span class="src-doc"> * Saves the current property</span></li>
<li><a name="a161"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a162"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a163"></a><span class="src-doc"> */</span></li>
<li><a name="a164"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$property">$property</a> = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a165"></a>&nbsp;</li>
<li><a name="a166"></a><span class="src-doc">/**</span></li>
<li><a name="a167"></a><span class="src-doc"> * Saves the position of , in selectors</span></li>
<li><a name="a168"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></li>
<li><a name="a169"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a170"></a><span class="src-doc"> */</span></li>
<li><a name="a171"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$sel_separate">$sel_separate</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a172"></a>&nbsp;</li>
<li><a name="a173"></a><span class="src-doc">/**</span></li>
<li><a name="a174"></a><span class="src-doc"> * Saves the current value</span></li>
<li><a name="a175"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a176"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a177"></a><span class="src-doc"> */</span></li>
<li><a name="a178"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$value">$value</a> = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a179"></a>&nbsp;</li>
<li><a name="a180"></a><span class="src-doc">/**</span></li>
<li><a name="a181"></a><span class="src-doc"> * Saves the current sub-value</span></li>
<li><a name="a182"></a><span class="src-doc"> *</span></li>
<li><a name="a183"></a><span class="src-doc"> * Example for a subvalue:</span></li>
<li><a name="a184"></a><span class="src-doc"> * background:url(foo.png) red no-repeat;</span></li>
<li><a name="a185"></a><span class="src-doc"> * &quot;url(foo.png)&quot;, &quot;red&quot;, and  &quot;no-repeat&quot; are subvalues,</span></li>
<li><a name="a186"></a><span class="src-doc"> * seperated by whitespace</span></li>
<li><a name="a187"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a188"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a189"></a><span class="src-doc"> */</span></li>
<li><a name="a190"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$sub_value">$sub_value</a> = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a191"></a>&nbsp;</li>
<li><a name="a192"></a><span class="src-doc">/**</span></li>
<li><a name="a193"></a><span class="src-doc"> * Array which saves all subvalues for a property.</span></li>
<li><a name="a194"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></li>
<li><a name="a195"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@see</span><span class="src-doc"> sub_value</span></li>
<li><a name="a196"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a197"></a><span class="src-doc"> */</span></li>
<li><a name="a198"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$sub_value_arr">$sub_value_arr</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a199"></a>&nbsp;</li>
<li><a name="a200"></a><span class="src-doc">/**</span></li>
<li><a name="a201"></a><span class="src-doc"> * Saves the char which opened the last string</span></li>
<li><a name="a202"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a203"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a204"></a><span class="src-doc"> */</span></li>
<li><a name="a205"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$str_char">$str_char</a> = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a206"></a>&nbsp;</li>
<li><a name="a207"></a><span class="src-doc">/**</span></li>
<li><a name="a208"></a><span class="src-doc"> * Status from which the parser switched to ic or instr</span></li>
<li><a name="a209"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a210"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a211"></a><span class="src-doc"> */</span></li>
<li><a name="a212"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$from">$from</a> = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a213"></a>&nbsp;</li>
<li><a name="a214"></a><span class="src-doc">/**</span></li>
<li><a name="a215"></a><span class="src-doc"> * Variable needed to manage string-in-strings, for example url(&quot;foo.png&quot;)</span></li>
<li><a name="a216"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></li>
<li><a name="a217"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a218"></a><span class="src-doc"> */</span></li>
<li><a name="a219"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$str_in_str">$str_in_str</a> = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a220"></a>&nbsp;</li>
<li><a name="a221"></a><span class="src-doc">/**</span></li>
<li><a name="a222"></a><span class="src-doc"> * =true if in invalid at-rule</span></li>
<li><a name="a223"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">bool </span></li>
<li><a name="a224"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a225"></a><span class="src-doc"> */</span></li>
<li><a name="a226"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$invalid_at">$invalid_at</a> = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a227"></a>&nbsp;</li>
<li><a name="a228"></a><span class="src-doc">/**</span></li>
<li><a name="a229"></a><span class="src-doc"> * =true if something has been added to the current selector</span></li>
<li><a name="a230"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">bool </span></li>
<li><a name="a231"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a232"></a><span class="src-doc"> */</span></li>
<li><a name="a233"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$added">$added</a> = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a234"></a>&nbsp;</li>
<li><a name="a235"></a><span class="src-doc">/**</span></li>
<li><a name="a236"></a><span class="src-doc"> * Array which saves the message log</span></li>
<li><a name="a237"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></li>
<li><a name="a238"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a239"></a><span class="src-doc"> */</span></li>
<li><a name="a240"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$log">$log</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a241"></a>&nbsp;</li>
<li><a name="a242"></a><span class="src-doc">/**</span></li>
<li><a name="a243"></a><span class="src-doc"> * Saves the line number</span></li>
<li><a name="a244"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">integer </span></li>
<li><a name="a245"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a246"></a><span class="src-doc"> */</span></li>
<li><a name="a247"></a><span class="src-key">var </span><a href="../csstidy/csstidy.html#var$line">$line</a> = <span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a248"></a>&nbsp;</li>
<li><a name="a249"></a><span class="src-doc">/**</span></li>
<li><a name="a250"></a><span class="src-doc"> * Loads standard template and sets default settings</span></li>
<li><a name="a251"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a252"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.2</span></li>
<li><a name="a253"></a><span class="src-doc"> */</span></li>
<li><a name="a254"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">(</span><span class="src-sym">)</span></li>
<li><a name="a255"></a><span class="src-sym">{    </span></li>
<li><a name="a256"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'remove_bslash'</span><span class="src-sym">] </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a257"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'compress_colors'</span><span class="src-sym">] </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a258"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'compress_font-weight'</span><span class="src-sym">] </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a259"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'lowercase_s'</span><span class="src-sym">] </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a260"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'optimise_shorthands'</span><span class="src-sym">] </span>= <span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a261"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'remove_last_;'</span><span class="src-sym">] </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a262"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'case_properties'</span><span class="src-sym">] </span>= <span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a263"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'sort_properties'</span><span class="src-sym">] </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a264"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'sort_selectors'</span><span class="src-sym">] </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a265"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'merge_selectors'</span><span class="src-sym">] </span>= <span class="src-num">2</span><span class="src-sym">;</span></li>
<li><a name="a266"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'discard_invalid_properties'</span><span class="src-sym">] </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a267"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'css_level'</span><span class="src-sym">] </span>= <span class="src-str">'CSS2.1'</span><span class="src-sym">;</span></li>
<li><a name="a268"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'preserve_css'</span><span class="src-sym">] </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a269"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-str">'timestamp'</span><span class="src-sym">] </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a270"></a>&nbsp;</li>
<li><a name="a271"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodload_template">load_template</a><span class="src-sym">(</span><span class="src-str">'default'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a272"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$print">print</a> = <span class="src-key">new </span><span class="src-id"><a href="../csstidy/csstidy_print.html">csstidy_print</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a273"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$optimise">optimise</a> = <span class="src-key">new </span><span class="src-id"><a href="../csstidy/csstidy_optimise.html">csstidy_optimise</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a274"></a><span class="src-sym">}</span></li>
<li><a name="a275"></a>&nbsp;</li>
<li><a name="a276"></a><span class="src-doc">/**</span></li>
<li><a name="a277"></a><span class="src-doc"> * Get the value of a setting.</span></li>
<li><a name="a278"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$setting </span></li>
<li><a name="a279"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a280"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">mixed </span></li>
<li><a name="a281"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.0</span></li>
<li><a name="a282"></a><span class="src-doc"> */</span></li>
<li><a name="a283"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodget_cfg">get_cfg</a><span class="src-sym">(</span><span class="src-var">$setting</span><span class="src-sym">)</span></li>
<li><a name="a284"></a><span class="src-sym">{</span></li>
<li><a name="a285"></a>    <span class="src-key">if</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-var">$setting</span><span class="src-sym">]</span><span class="src-sym">))</span></li>
<li><a name="a286"></a>    <span class="src-sym">{</span></li>
<li><a name="a287"></a>        <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-var">$setting</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a288"></a>    <span class="src-sym">}</span></li>
<li><a name="a289"></a>    <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a290"></a><span class="src-sym">}</span></li>
<li><a name="a291"></a>&nbsp;</li>
<li><a name="a292"></a><span class="src-doc">/**</span></li>
<li><a name="a293"></a><span class="src-doc"> * Set the value of a setting.</span></li>
<li><a name="a294"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$setting </span></li>
<li><a name="a295"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$value </span></li>
<li><a name="a296"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a297"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a298"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.0</span></li>
<li><a name="a299"></a><span class="src-doc"> */</span></li>
<li><a name="a300"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodset_cfg">set_cfg</a><span class="src-sym">(</span><span class="src-var">$setting</span><span class="src-sym">,</span><span class="src-var">$value</span><span class="src-sym">)</span></li>
<li><a name="a301"></a><span class="src-sym">{</span></li>
<li><a name="a302"></a>    <span class="src-key">if</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-var">$setting</span><span class="src-sym">]</span><span class="src-sym">) </span>&amp;&amp; <span class="src-var">$value </span>!== <span class="src-str">''</span><span class="src-sym">)</span></li>
<li><a name="a303"></a>    <span class="src-sym">{</span></li>
<li><a name="a304"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$settings">settings</a><span class="src-sym">[</span><span class="src-var">$setting</span><span class="src-sym">] </span>= <span class="src-var">$value</span><span class="src-sym">;</span></li>
<li><a name="a305"></a>        <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a306"></a>    <span class="src-sym">}</span></li>
<li><a name="a307"></a>    <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a308"></a><span class="src-sym">}</span></li>
<li><a name="a309"></a>&nbsp;</li>
<li><a name="a310"></a><span class="src-doc">/**</span></li>
<li><a name="a311"></a><span class="src-doc"> * Adds a token to $this-&gt;tokens</span></li>
<li><a name="a312"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$type </span></li>
<li><a name="a313"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$data </span></li>
<li><a name="a314"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">bool </span><span class="src-doc-var">$do </span><span class="src-doc">add a token even if preserve_css is off</span></li>
<li><a name="a315"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a316"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.0</span></li>
<li><a name="a317"></a><span class="src-doc"> */</span></li>
<li><a name="a318"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#method_add_token">_add_token</a><span class="src-sym">(</span><span class="src-var">$type</span><span class="src-sym">, </span><span class="src-var">$data</span><span class="src-sym">, </span><span class="src-var">$do </span>= <span class="src-id">false</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a319"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodget_cfg">get_cfg</a><span class="src-sym">(</span><span class="src-str">'preserve_css'</span><span class="src-sym">) </span>|| <span class="src-var">$do</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a320"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$tokens">tokens</a><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$type</span><span class="src-sym">, </span><span class="src-sym">(</span><span class="src-var">$type </span>== <span class="src-id"><a href="../csstidy/_data_inc_php.html#defineCOMMENT">COMMENT</a></span><span class="src-sym">) </span>? <span class="src-var">$data </span>: <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a321"></a>    <span class="src-sym">}</span></li>
<li><a name="a322"></a><span class="src-sym">}</span></li>
<li><a name="a323"></a> </li>
<li><a name="a324"></a><span class="src-doc">/**</span></li>
<li><a name="a325"></a><span class="src-doc"> * Add a message to the message log</span></li>
<li><a name="a326"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$message </span></li>
<li><a name="a327"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$type </span></li>
<li><a name="a328"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">integer </span><span class="src-doc-var">$line </span></li>
<li><a name="a329"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a330"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.0</span></li>
<li><a name="a331"></a><span class="src-doc"> */</span></li>
<li><a name="a332"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodlog">log</a><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">,</span><span class="src-var">$type</span><span class="src-sym">,</span><span class="src-var">$line </span>= -<span class="src-num">1</span><span class="src-sym">)</span></li>
<li><a name="a333"></a><span class="src-sym">{</span></li>
<li><a name="a334"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$line </span>=== -<span class="src-num">1</span><span class="src-sym">)</span></li>
<li><a name="a335"></a>    <span class="src-sym">{</span></li>
<li><a name="a336"></a>        <span class="src-var">$line </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$line">line</a><span class="src-sym">;</span></li>
<li><a name="a337"></a>    <span class="src-sym">}</span></li>
<li><a name="a338"></a>    <span class="src-var">$line </span>= <a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$line</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a339"></a>    <span class="src-var">$add </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'m' </span>=&gt; <span class="src-var">$message</span><span class="src-sym">, </span><span class="src-str">'t' </span>=&gt; <span class="src-var">$type</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a340"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$log">log</a><span class="src-sym">[</span><span class="src-var">$line</span><span class="src-sym">]</span><span class="src-sym">) </span>|| <span class="src-sym">!</span><a href="http://www.php.net/in_array">in_array</a><span class="src-sym">(</span><span class="src-var">$add</span><span class="src-sym">,</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$log">log</a><span class="src-sym">[</span><span class="src-var">$line</span><span class="src-sym">]</span><span class="src-sym">))</span></li>
<li><a name="a341"></a>    <span class="src-sym">{</span></li>
<li><a name="a342"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$log">log</a><span class="src-sym">[</span><span class="src-var">$line</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$add</span><span class="src-sym">;</span></li>
<li><a name="a343"></a>    <span class="src-sym">}</span></li>
<li><a name="a344"></a><span class="src-sym">}</span></li>
<li><a name="a345"></a>&nbsp;</li>
<li><a name="a346"></a><span class="src-doc">/**</span></li>
<li><a name="a347"></a><span class="src-doc"> * Parse unicode notations and find a replacement character</span></li>
<li><a name="a348"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$string </span></li>
<li><a name="a349"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">integer </span><span class="src-doc-var">$i </span></li>
<li><a name="a350"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a351"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a352"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.2</span></li>
<li><a name="a353"></a><span class="src-doc"> */</span></li>
<li><a name="a354"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#method_unicode">_unicode</a><span class="src-sym">(</span><span class="src-sym">&amp;</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-sym">&amp;</span><span class="src-var">$i</span><span class="src-sym">)</span></li>
<li><a name="a355"></a><span class="src-sym">{</span></li>
<li><a name="a356"></a>    ++<span class="src-var">$i</span><span class="src-sym">;</span></li>
<li><a name="a357"></a>    <span class="src-var">$add </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a358"></a>    <span class="src-var">$tokens </span>=<span class="src-sym">&amp; </span><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'csstidy'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'tokens'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a359"></a>    <span class="src-var">$replaced </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a360"></a>    </li>
<li><a name="a361"></a>    <span class="src-key">while</span><span class="src-sym">(</span><span class="src-var">$i </span>&lt; <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><a href="http://www.php.net/ctype_xdigit">ctype_xdigit</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">) </span>|| <a href="http://www.php.net/ctype_space">ctype_space</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">)) </span>&amp;&amp; <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$add</span><span class="src-sym">) </span>&lt; <span class="src-num">6</span><span class="src-sym">)</span></li>
<li><a name="a362"></a>    <span class="src-sym">{</span></li>
<li><a name="a363"></a>        <span class="src-var">$add </span>.= <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a364"></a>&nbsp;</li>
<li><a name="a365"></a>        <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/ctype_space">ctype_space</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a366"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a367"></a>        <span class="src-sym">}</span></li>
<li><a name="a368"></a>        <span class="src-var">$i</span>++<span class="src-sym">;</span></li>
<li><a name="a369"></a>    <span class="src-sym">}</span></li>
<li><a name="a370"></a>&nbsp;</li>
<li><a name="a371"></a>    <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/hexdec">hexdec</a><span class="src-sym">(</span><span class="src-var">$add</span><span class="src-sym">) </span>&gt; <span class="src-num">47 </span>&amp;&amp; <a href="http://www.php.net/hexdec">hexdec</a><span class="src-sym">(</span><span class="src-var">$add</span><span class="src-sym">) </span>&lt; <span class="src-num">58 </span>|| <a href="http://www.php.net/hexdec">hexdec</a><span class="src-sym">(</span><span class="src-var">$add</span><span class="src-sym">) </span>&gt; <span class="src-num">64 </span>&amp;&amp; <a href="http://www.php.net/hexdec">hexdec</a><span class="src-sym">(</span><span class="src-var">$add</span><span class="src-sym">) </span>&lt; <span class="src-num">91 </span>|| <a href="http://www.php.net/hexdec">hexdec</a><span class="src-sym">(</span><span class="src-var">$add</span><span class="src-sym">) </span>&gt; <span class="src-num">96 </span>&amp;&amp; <a href="http://www.php.net/hexdec">hexdec</a><span class="src-sym">(</span><span class="src-var">$add</span><span class="src-sym">) </span>&lt; <span class="src-num">123</span><span class="src-sym">)</span></li>
<li><a name="a372"></a>    <span class="src-sym">{</span></li>
<li><a name="a373"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodlog">log</a><span class="src-sym">(</span><span class="src-str">'Replaced unicode notation: Changed \\'</span>. <span class="src-var">$add </span>.<span class="src-str">' to ' </span>. <a href="http://www.php.net/chr">chr</a><span class="src-sym">(</span><a href="http://www.php.net/hexdec">hexdec</a><span class="src-sym">(</span><span class="src-var">$add</span><span class="src-sym">))</span><span class="src-sym">,</span><span class="src-str">'Information'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a374"></a>        <span class="src-var">$add </span>= <a href="http://www.php.net/chr">chr</a><span class="src-sym">(</span><a href="http://www.php.net/hexdec">hexdec</a><span class="src-sym">(</span><span class="src-var">$add</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a375"></a>        <span class="src-var">$replaced </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a376"></a>    <span class="src-sym">}</span></li>
<li><a name="a377"></a>    <span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a378"></a>        <span class="src-var">$add </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-str">'\\'</span>.<span class="src-var">$add</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a379"></a>    <span class="src-sym">}</span></li>
<li><a name="a380"></a>&nbsp;</li>
<li><a name="a381"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">@</span><a href="http://www.php.net/ctype_xdigit">ctype_xdigit</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span>+<span class="src-num">1</span><span class="src-sym">}</span><span class="src-sym">) </span>&amp;&amp; <a href="http://www.php.net/ctype_space">ctype_space</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">)</span></li>
<li><a name="a382"></a>       &amp;&amp; <span class="src-sym">!</span><span class="src-var">$replaced </span>|| <span class="src-sym">!</span><a href="http://www.php.net/ctype_space">ctype_space</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a383"></a>        <span class="src-var">$i</span>--<span class="src-sym">;</span></li>
<li><a name="a384"></a>    <span class="src-sym">}</span></li>
<li><a name="a385"></a>    </li>
<li><a name="a386"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$add </span>!= <span class="src-str">'\\' </span>|| <span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodget_cfg">get_cfg</a><span class="src-sym">(</span><span class="src-str">'remove_bslash'</span><span class="src-sym">) </span>|| <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$tokens</span><span class="src-sym">, </span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span>+<span class="src-num">1</span><span class="src-sym">}</span><span class="src-sym">) </span>!== <span class="src-id">false</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a387"></a>        <span class="src-key">return </span><span class="src-var">$add</span><span class="src-sym">;</span></li>
<li><a name="a388"></a>    <span class="src-sym">}</span></li>
<li><a name="a389"></a>    </li>
<li><a name="a390"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$add </span>== <span class="src-str">'\\'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a391"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodlog">log</a><span class="src-sym">(</span><span class="src-str">'Removed unnecessary backslash'</span><span class="src-sym">,</span><span class="src-str">'Information'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a392"></a>    <span class="src-sym">}</span></li>
<li><a name="a393"></a>    <span class="src-key">return </span><span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a394"></a><span class="src-sym">}</span></li>
<li><a name="a395"></a>&nbsp;</li>
<li><a name="a396"></a><span class="src-doc">/**</span></li>
<li><a name="a397"></a><span class="src-doc"> * Loads a new template</span></li>
<li><a name="a398"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$content </span><span class="src-doc">either filename (if $from_file == true), content of a template file, &quot;high_compression&quot;, &quot;highest_compression&quot;, &quot;low_compression&quot;, or &quot;default&quot;</span></li>
<li><a name="a399"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">bool </span><span class="src-doc-var">$from_file </span><span class="src-doc">uses $content as filename if true</span></li>
<li><a name="a400"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a401"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.1</span></li>
<li><a name="a402"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@see</span><span class="src-doc"> http://csstidy.sourceforge.net/templates.php</span></li>
<li><a name="a403"></a><span class="src-doc"> */</span></li>
<li><a name="a404"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodload_template">load_template</a><span class="src-sym">(</span><span class="src-var">$content</span><span class="src-sym">, </span><span class="src-var">$from_file</span>=<span class="src-id">true</span><span class="src-sym">)</span></li>
<li><a name="a405"></a><span class="src-sym">{</span></li>
<li><a name="a406"></a>    <span class="src-var">$predefined_templates </span>=<span class="src-sym">&amp; </span><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'csstidy'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'predefined_templates'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a407"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$content </span>== <span class="src-str">'high_compression' </span>|| <span class="src-var">$content </span>== <span class="src-str">'default' </span>|| <span class="src-var">$content </span>== <span class="src-str">'highest_compression' </span>|| <span class="src-var">$content </span>== <span class="src-str">'low_compression'</span><span class="src-sym">)</span></li>
<li><a name="a408"></a>    <span class="src-sym">{</span></li>
<li><a name="a409"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">template </span>= <span class="src-var">$predefined_templates</span><span class="src-sym">[</span><span class="src-var">$content</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a410"></a>        <span class="src-key">return</span><span class="src-sym">;</span></li>
<li><a name="a411"></a>    <span class="src-sym">}</span></li>
<li><a name="a412"></a>    </li>
<li><a name="a413"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$from_file</span><span class="src-sym">)</span></li>
<li><a name="a414"></a>    <span class="src-sym">{</span></li>
<li><a name="a415"></a>        <span class="src-var">$content </span>= <a href="http://www.php.net/strip_tags">strip_tags</a><span class="src-sym">(</span><a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-var">$content</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-str">'&lt;span&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a416"></a>    <span class="src-sym">}</span></li>
<li><a name="a417"></a>    <span class="src-var">$content </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;\r\n&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;\n&quot;</span><span class="src-sym">,</span><span class="src-var">$content</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">// Unify newlines (because the output also only uses \n)</span></li>
<li><a name="a418"></a>    <span class="src-var">$template </span>= <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">'|'</span><span class="src-sym">,</span><span class="src-var">$content</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a419"></a>&nbsp;</li>
<li><a name="a420"></a>    <span class="src-key">for </span><span class="src-sym">(</span><span class="src-var">$i </span>= <span class="src-num">0</span><span class="src-sym">; </span><span class="src-var">$i </span>&lt; <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$template</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-var">$i</span>++ <span class="src-sym">)</span></li>
<li><a name="a421"></a>    <span class="src-sym">{</span></li>
<li><a name="a422"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">template</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">] </span>= <span class="src-var">$template</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a423"></a>    <span class="src-sym">}</span></li>
<li><a name="a424"></a><span class="src-sym">}</span></li>
<li><a name="a425"></a>&nbsp;</li>
<li><a name="a426"></a><span class="src-doc">/**</span></li>
<li><a name="a427"></a><span class="src-doc"> * Starts parsing from URL</span></li>
<li><a name="a428"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$url </span></li>
<li><a name="a429"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a430"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.0</span></li>
<li><a name="a431"></a><span class="src-doc"> */</span></li>
<li><a name="a432"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodparse_from_url">parse_from_url</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">)</span></li>
<li><a name="a433"></a><span class="src-sym">{</span></li>
<li><a name="a434"></a>    <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodparse">parse</a><span class="src-sym">(</span><span class="src-sym">@</span><a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a435"></a><span class="src-sym">}</span></li>
<li><a name="a436"></a>&nbsp;</li>
<li><a name="a437"></a><span class="src-doc">/**</span></li>
<li><a name="a438"></a><span class="src-doc"> * Checks if there is a token at the current position</span></li>
<li><a name="a439"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$string </span></li>
<li><a name="a440"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">integer </span><span class="src-doc-var">$i </span></li>
<li><a name="a441"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a442"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.11</span></li>
<li><a name="a443"></a><span class="src-doc"> */</span></li>
<li><a name="a444"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodis_token">is_token</a><span class="src-sym">(</span><span class="src-sym">&amp;</span><span class="src-var">$string</span><span class="src-sym">, </span><span class="src-var">$i</span><span class="src-sym">)</span></li>
<li><a name="a445"></a><span class="src-sym">{</span></li>
<li><a name="a446"></a>    <span class="src-var">$tokens </span>=<span class="src-sym">&amp; </span><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'csstidy'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'tokens'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a447"></a>    <span class="src-key">return </span><span class="src-sym">(</span><a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$tokens</span><span class="src-sym">, </span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">) </span>!== <span class="src-id">false </span>&amp;&amp; <span class="src-sym">!</span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodescaped">escaped</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a448"></a><span class="src-sym">}</span></li>
<li><a name="a449"></a>&nbsp;</li>
<li><a name="a450"></a>&nbsp;</li>
<li><a name="a451"></a><span class="src-doc">/**</span></li>
<li><a name="a452"></a><span class="src-doc"> * Parses CSS in $string. The code is saved as array in $this-&gt;css</span></li>
<li><a name="a453"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$string </span><span class="src-doc">the CSS code</span></li>
<li><a name="a454"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a455"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a456"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.1</span></li>
<li><a name="a457"></a><span class="src-doc"> */</span></li>
<li><a name="a458"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodparse">parse</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a459"></a>    <span class="src-comm">// PHP bug? Settings need to be refreshed in PHP4</span></li>
<li><a name="a460"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$print">print</a> = <span class="src-key">new </span><span class="src-id"><a href="../csstidy/csstidy_print.html">csstidy_print</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a461"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$optimise">optimise</a> = <span class="src-key">new </span><span class="src-id"><a href="../csstidy/csstidy_optimise.html">csstidy_optimise</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a462"></a>    </li>
<li><a name="a463"></a>    <span class="src-var">$all_properties </span>=<span class="src-sym">&amp; </span><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'csstidy'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'all_properties'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a464"></a>    <span class="src-var">$at_rules </span>=<span class="src-sym">&amp; </span><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'csstidy'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'at_rules'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a465"></a>&nbsp;</li>
<li><a name="a466"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$css">css</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a467"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$print">print</a><span class="src-sym">-&gt;</span><span class="src-id">input_css </span>= <span class="src-var">$string</span><span class="src-sym">;</span></li>
<li><a name="a468"></a>    <span class="src-var">$string </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;\r\n&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;\n&quot;</span><span class="src-sym">,</span><span class="src-var">$string</span><span class="src-sym">) </span>. <span class="src-str">' '</span><span class="src-sym">;</span></li>
<li><a name="a469"></a>    <span class="src-var">$cur_comment </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a470"></a>    </li>
<li><a name="a471"></a>    <span class="src-key">for </span><span class="src-sym">(</span><span class="src-var">$i </span>= <span class="src-num">0</span><span class="src-sym">, </span><span class="src-var">$size </span>= <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-var">$i </span>&lt; <span class="src-var">$size</span><span class="src-sym">; </span><span class="src-var">$i</span>++ <span class="src-sym">)</span></li>
<li><a name="a472"></a>    <span class="src-sym">{</span></li>
<li><a name="a473"></a>        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">&quot;\n&quot; </span>|| <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">&quot;\r&quot;</span><span class="src-sym">)</span></li>
<li><a name="a474"></a>        <span class="src-sym">{</span></li>
<li><a name="a475"></a>            ++<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$line">line</a><span class="src-sym">;</span></li>
<li><a name="a476"></a>        <span class="src-sym">}</span></li>
<li><a name="a477"></a>        </li>
<li><a name="a478"></a>        <span class="src-key">switch</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$status">status</a><span class="src-sym">)</span></li>
<li><a name="a479"></a>        <span class="src-sym">{</span></li>
<li><a name="a480"></a>            <span class="src-comm">/* Case in at-block */</span></li>
<li><a name="a481"></a>            <span class="src-key">case </span><span class="src-str">'at'</span>:</li>
<li><a name="a482"></a>            <span class="src-key">if</span><span class="src-sym">(</span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodis_token">is_token</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span><span class="src-sym">))</span></li>
<li><a name="a483"></a>            <span class="src-sym">{</span></li>
<li><a name="a484"></a>                <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'/' </span>&amp;&amp; <span class="src-sym">@</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span>+<span class="src-num">1</span><span class="src-sym">} </span>== <span class="src-str">'*'</span><span class="src-sym">)</span></li>
<li><a name="a485"></a>                <span class="src-sym">{</span></li>
<li><a name="a486"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$status">status</a> = <span class="src-str">'ic'</span><span class="src-sym">; </span>++<span class="src-var">$i</span><span class="src-sym">;</span></li>
<li><a name="a487"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$from">from</a> = <span class="src-str">'at'</span><span class="src-sym">;</span></li>
<li><a name="a488"></a>                <span class="src-sym">}</span></li>
<li><a name="a489"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'{'</span><span class="src-sym">)</span></li>
<li><a name="a490"></a>                <span class="src-sym">{</span></li>
<li><a name="a491"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$status">status</a> = <span class="src-str">'is'</span><span class="src-sym">;</span></li>
<li><a name="a492"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#method_add_token">_add_token</a><span class="src-sym">(</span><span class="src-id"><a href="../csstidy/_data_inc_php.html#defineAT_START">AT_START</a></span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$at">at</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a493"></a>                <span class="src-sym">}</span></li>
<li><a name="a494"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">','</span><span class="src-sym">)</span></li>
<li><a name="a495"></a>                <span class="src-sym">{</span></li>
<li><a name="a496"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$at">at</a> = <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$at">at</a><span class="src-sym">)</span>.<span class="src-str">','</span><span class="src-sym">;</span></li>
<li><a name="a497"></a>                <span class="src-sym">}</span></li>
<li><a name="a498"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'\\'</span><span class="src-sym">)</span></li>
<li><a name="a499"></a>                <span class="src-sym">{</span></li>
<li><a name="a500"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$at">at</a> .= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#method_unicode">_unicode</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a501"></a>                <span class="src-sym">}</span></li>
<li><a name="a502"></a>            <span class="src-sym">}</span></li>
<li><a name="a503"></a>            <span class="src-key">else</span></li>
<li><a name="a504"></a>            <span class="src-sym">{</span></li>
<li><a name="a505"></a>                <span class="src-var">$lastpos </span>= <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$at">at</a><span class="src-sym">)</span>-<span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a506"></a>                <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-sym">( (</span><a href="http://www.php.net/ctype_space">ctype_space</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$at">at</a><span class="src-sym">{</span><span class="src-var">$lastpos</span><span class="src-sym">}</span><span class="src-sym">) </span>|| <a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodis_token">is_token</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$at">at</a><span class="src-sym">,</span><span class="src-var">$lastpos</span><span class="src-sym">) </span>&amp;&amp; <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$at">at</a><span class="src-sym">{</span><span class="src-var">$lastpos</span><span class="src-sym">} </span>== <span class="src-str">','</span><span class="src-sym">) </span>&amp;&amp; <a href="http://www.php.net/ctype_space">ctype_space</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">)))</span></li>
<li><a name="a507"></a>                <span class="src-sym">{</span></li>
<li><a name="a508"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$at">at</a> .= <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a509"></a>                <span class="src-sym">}</span></li>
<li><a name="a510"></a>            <span class="src-sym">}</span></li>
<li><a name="a511"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a512"></a>            </li>
<li><a name="a513"></a>            <span class="src-comm">/* Case in-selector */</span></li>
<li><a name="a514"></a>            <span class="src-key">case </span><span class="src-str">'is'</span>:</li>
<li><a name="a515"></a>            <span class="src-key">if</span><span class="src-sym">(</span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodis_token">is_token</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span><span class="src-sym">))</span></li>
<li><a name="a516"></a>            <span class="src-sym">{</span></li>
<li><a name="a517"></a>                <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'/' </span>&amp;&amp; <span class="src-sym">@</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span>+<span class="src-num">1</span><span class="src-sym">} </span>== <span class="src-str">'*' </span>&amp;&amp; <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a><span class="src-sym">) </span>== <span class="src-str">''</span><span class="src-sym">)</span></li>
<li><a name="a518"></a>                <span class="src-sym">{</span></li>
<li><a name="a519"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$status">status</a> = <span class="src-str">'ic'</span><span class="src-sym">; </span>++<span class="src-var">$i</span><span class="src-sym">;</span></li>
<li><a name="a520"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$from">from</a> = <span class="src-str">'is'</span><span class="src-sym">;</span></li>
<li><a name="a521"></a>                <span class="src-sym">}</span></li>
<li><a name="a522"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'@' </span>&amp;&amp; <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a><span class="src-sym">) </span>== <span class="src-str">''</span><span class="src-sym">)</span></li>
<li><a name="a523"></a>                <span class="src-sym">{</span></li>
<li><a name="a524"></a>                    <span class="src-comm">// Check for at-rule</span></li>
<li><a name="a525"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$invalid_at">invalid_at</a> = <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a526"></a>                    <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$at_rules </span><span class="src-key">as </span><span class="src-var">$name </span>=&gt; <span class="src-var">$type</span><span class="src-sym">)</span></li>
<li><a name="a527"></a>                    <span class="src-sym">{</span></li>
<li><a name="a528"></a>                        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/strcasecmp">strcasecmp</a><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span>+<span class="src-num">1</span><span class="src-sym">,</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">))</span><span class="src-sym">,</span><span class="src-var">$name</span><span class="src-sym">))</span></li>
<li><a name="a529"></a>                        <span class="src-sym">{</span></li>
<li><a name="a530"></a>                            <span class="src-sym">(</span><span class="src-var">$type </span>== <span class="src-str">'at'</span><span class="src-sym">) </span>? <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$at">at</a> = <span class="src-str">'@'</span>.<span class="src-var">$name </span>: <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a> = <span class="src-str">'@'</span>.<span class="src-var">$name</span><span class="src-sym">;</span></li>
<li><a name="a531"></a>                            <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$status">status</a> = <span class="src-var">$type</span><span class="src-sym">;</span></li>
<li><a name="a532"></a>                            <span class="src-var">$i </span>+= <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a533"></a>                            <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$invalid_at">invalid_at</a> = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a534"></a>                        <span class="src-sym">}</span></li>
<li><a name="a535"></a>                    <span class="src-sym">}</span></li>
<li><a name="a536"></a>                            </li>
<li><a name="a537"></a>                    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$invalid_at">invalid_at</a><span class="src-sym">)</span></li>
<li><a name="a538"></a>                    <span class="src-sym">{</span></li>
<li><a name="a539"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a> = <span class="src-str">'@'</span><span class="src-sym">;</span></li>
<li><a name="a540"></a>                        <span class="src-var">$invalid_at_name </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a541"></a>                        <span class="src-key">for</span><span class="src-sym">(</span><span class="src-var">$j </span>= <span class="src-var">$i</span>+<span class="src-num">1</span><span class="src-sym">; </span><span class="src-var">$j </span>&lt; <span class="src-var">$size</span><span class="src-sym">; </span>++<span class="src-var">$j</span><span class="src-sym">)</span></li>
<li><a name="a542"></a>                        <span class="src-sym">{</span></li>
<li><a name="a543"></a>                            <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/ctype_alpha">ctype_alpha</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$j</span><span class="src-sym">}</span><span class="src-sym">))</span></li>
<li><a name="a544"></a>                            <span class="src-sym">{</span></li>
<li><a name="a545"></a>                                <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a546"></a>                            <span class="src-sym">}</span></li>
<li><a name="a547"></a>                            <span class="src-var">$invalid_at_name </span>.= <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$j</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a548"></a>                        <span class="src-sym">}</span></li>
<li><a name="a549"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodlog">log</a><span class="src-sym">(</span><span class="src-str">'Invalid @-rule: '</span>.<span class="src-var">$invalid_at_name</span>.<span class="src-str">' (removed)'</span><span class="src-sym">,</span><span class="src-str">'Warning'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a550"></a>                    <span class="src-sym">}</span></li>
<li><a name="a551"></a>                <span class="src-sym">}</span></li>
<li><a name="a552"></a>                <span class="src-key">elseif</span><span class="src-sym">((</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'&quot;' </span>|| <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">&quot;'&quot;</span><span class="src-sym">))</span></li>
<li><a name="a553"></a>                <span class="src-sym">{</span></li>
<li><a name="a554"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a> .= <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a555"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$status">status</a> = <span class="src-str">'instr'</span><span class="src-sym">;</span></li>
<li><a name="a556"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$str_char">str_char</a> = <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a557"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$from">from</a> = <span class="src-str">'is'</span><span class="src-sym">;</span></li>
<li><a name="a558"></a>                <span class="src-sym">}</span></li>
<li><a name="a559"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$invalid_at">invalid_at</a> &amp;&amp; <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">';'</span><span class="src-sym">)</span></li>
<li><a name="a560"></a>                <span class="src-sym">{</span></li>
<li><a name="a561"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$invalid_at">invalid_at</a> = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a562"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$status">status</a> = <span class="src-str">'is'</span><span class="src-sym">;</span></li>
<li><a name="a563"></a>                <span class="src-sym">}</span></li>
<li><a name="a564"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'{'</span><span class="src-sym">)</span></li>
<li><a name="a565"></a>                <span class="src-sym">{</span></li>
<li><a name="a566"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$status">status</a> = <span class="src-str">'ip'</span><span class="src-sym">;</span></li>
<li><a name="a567"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#method_add_token">_add_token</a><span class="src-sym">(</span><span class="src-id"><a href="../csstidy/_data_inc_php.html#defineSEL_START">SEL_START</a></span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a568"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$added">added</a> = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a569"></a>                <span class="src-sym">}</span></li>
<li><a name="a570"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'}'</span><span class="src-sym">)</span></li>
<li><a name="a571"></a>                <span class="src-sym">{</span></li>
<li><a name="a572"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#method_add_token">_add_token</a><span class="src-sym">(</span><span class="src-id"><a href="../csstidy/_data_inc_php.html#defineAT_END">AT_END</a></span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$at">at</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a573"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$at">at</a> = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a574"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a> = <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a575"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$sel_separate">sel_separate</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a576"></a>                <span class="src-sym">}</span></li>
<li><a name="a577"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">','</span><span class="src-sym">) </span></li>
<li><a name="a578"></a>                <span class="src-sym">{</span></li>
<li><a name="a579"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a> = <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a><span class="src-sym">)</span>.<span class="src-str">','</span><span class="src-sym">;</span></li>
<li><a name="a580"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$sel_separate">sel_separate</a><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a581"></a>                <span class="src-sym">}</span></li>
<li><a name="a582"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'\\'</span><span class="src-sym">)</span></li>
<li><a name="a583"></a>                <span class="src-sym">{</span></li>
<li><a name="a584"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a> .= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#method_unicode">_unicode</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a585"></a>                <span class="src-sym">}</span></li>
<li><a name="a586"></a>                <span class="src-key">else </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a> .= <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a587"></a>            <span class="src-sym">}</span></li>
<li><a name="a588"></a>            <span class="src-key">else</span></li>
<li><a name="a589"></a>            <span class="src-sym">{</span></li>
<li><a name="a590"></a>                <span class="src-var">$lastpos </span>= <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a><span class="src-sym">)</span>-<span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a591"></a>                <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$lastpos </span>== -<span class="src-num">1 </span>|| <span class="src-sym">!</span><span class="src-sym">( (</span><a href="http://www.php.net/ctype_space">ctype_space</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a><span class="src-sym">{</span><span class="src-var">$lastpos</span><span class="src-sym">}</span><span class="src-sym">) </span>|| <a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodis_token">is_token</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a><span class="src-sym">,</span><span class="src-var">$lastpos</span><span class="src-sym">) </span>&amp;&amp; <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#var$selector">selector</a><span class="src-sym">{</span><span class="src-var">$lastpos</span><span class="src-sym">} </span>== <span class="src-str">','</span><span class="src-sym">) </span>&amp;&amp; <span class="src-id">ctype_space</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">)))</span></li>
<li><a name="a592"></a>                <span class="src-sym">{</span></li>
<li><a name="a593"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a> </span>.= <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a594"></a>                <span class="src-sym">}</span></li>
<li><a name="a595"></a>            <span class="src-sym">}</span></li>
<li><a name="a596"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a597"></a>            </li>
<li><a name="a598"></a>            <span class="src-comm">/* Case in-property */</span></li>
<li><a name="a599"></a>            <span class="src-key">case </span><span class="src-str">'ip'</span>:</li>
<li><a name="a600"></a>            <span class="src-key">if</span><span class="src-sym">(</span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodis_token">is_token</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span><span class="src-sym">))</span></li>
<li><a name="a601"></a>            <span class="src-sym">{</span></li>
<li><a name="a602"></a>                <span class="src-key">if</span><span class="src-sym">((</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">':' </span>|| <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'='</span><span class="src-sym">) </span>&amp;&amp; <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a> </span>!= <span class="src-str">''</span><span class="src-sym">)</span></li>
<li><a name="a603"></a>                <span class="src-sym">{</span></li>
<li><a name="a604"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$status">status</a> </span>= <span class="src-str">'iv'</span><span class="src-sym">;</span></li>
<li><a name="a605"></a>                    <span class="src-key">if</span><span class="src-sym">(</span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodproperty_is_valid">property_is_valid</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a></span><span class="src-sym">) </span>|| <span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodget_cfg">get_cfg</a><span class="src-sym">(</span><span class="src-str">'discard_invalid_properties'</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a606"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#method_add_token">_add_token</a><span class="src-sym">(</span><span class="src-id"><a href="../csstidy/_data_inc_php.html#definePROPERTY">PROPERTY</a></span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a607"></a>                    <span class="src-sym">}</span></li>
<li><a name="a608"></a>                <span class="src-sym">}</span></li>
<li><a name="a609"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'/' </span>&amp;&amp; <span class="src-sym">@</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span>+<span class="src-num">1</span><span class="src-sym">} </span>== <span class="src-str">'*' </span>&amp;&amp; <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a> </span>== <span class="src-str">''</span><span class="src-sym">)</span></li>
<li><a name="a610"></a>                <span class="src-sym">{</span></li>
<li><a name="a611"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$status">status</a> </span>= <span class="src-str">'ic'</span><span class="src-sym">; </span>++<span class="src-var">$i</span><span class="src-sym">;</span></li>
<li><a name="a612"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$from">from</a> </span>= <span class="src-str">'ip'</span><span class="src-sym">;</span></li>
<li><a name="a613"></a>                <span class="src-sym">}</span></li>
<li><a name="a614"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'}'</span><span class="src-sym">)</span></li>
<li><a name="a615"></a>                <span class="src-sym">{</span></li>
<li><a name="a616"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodexplode_selectors">explode_selectors</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a617"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$status">status</a> </span>= <span class="src-str">'is'</span><span class="src-sym">;</span></li>
<li><a name="a618"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$invalid_at">invalid_at</a> </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a619"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#method_add_token">_add_token</a><span class="src-sym">(</span><span class="src-id"><a href="../csstidy/_data_inc_php.html#defineSEL_END">SEL_END</a></span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a620"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a> </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a621"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a> </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a622"></a>                <span class="src-sym">}</span></li>
<li><a name="a623"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">';'</span><span class="src-sym">)</span></li>
<li><a name="a624"></a>                <span class="src-sym">{</span></li>
<li><a name="a625"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a> </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a626"></a>                <span class="src-sym">}</span></li>
<li><a name="a627"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'\\'</span><span class="src-sym">)</span></li>
<li><a name="a628"></a>                <span class="src-sym">{</span></li>
<li><a name="a629"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a> </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#method_unicode">_unicode</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a630"></a>                <span class="src-sym">}</span></li>
<li><a name="a631"></a>            <span class="src-sym">}</span></li>
<li><a name="a632"></a>            <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/ctype_space">ctype_space</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">))</span></li>
<li><a name="a633"></a>            <span class="src-sym">{</span></li>
<li><a name="a634"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a> </span>.= <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a635"></a>            <span class="src-sym">}</span></li>
<li><a name="a636"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a637"></a>            </li>
<li><a name="a638"></a>            <span class="src-comm">/* Case in-value */</span></li>
<li><a name="a639"></a>            <span class="src-key">case </span><span class="src-str">'iv'</span>:</li>
<li><a name="a640"></a>            <span class="src-var">$pn </span>= <span class="src-sym">((</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">&quot;\n&quot; </span>|| <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">&quot;\r&quot;</span><span class="src-sym">) </span>&amp;&amp; <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodproperty_is_next">property_is_next</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span>+<span class="src-num">1</span><span class="src-sym">) </span>|| <span class="src-var">$i </span>== <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">)</span>-<span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a641"></a>            <span class="src-key">if</span><span class="src-sym">(</span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodis_token">is_token</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span><span class="src-sym">) </span>|| <span class="src-var">$pn</span><span class="src-sym">)</span></li>
<li><a name="a642"></a>            <span class="src-sym">{</span></li>
<li><a name="a643"></a>                <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'/' </span>&amp;&amp; <span class="src-sym">@</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span>+<span class="src-num">1</span><span class="src-sym">} </span>== <span class="src-str">'*'</span><span class="src-sym">)</span></li>
<li><a name="a644"></a>                <span class="src-sym">{</span></li>
<li><a name="a645"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$status">status</a> </span>= <span class="src-str">'ic'</span><span class="src-sym">; </span>++<span class="src-var">$i</span><span class="src-sym">;</span></li>
<li><a name="a646"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$from">from</a> </span>= <span class="src-str">'iv'</span><span class="src-sym">;</span></li>
<li><a name="a647"></a>                <span class="src-sym">}</span></li>
<li><a name="a648"></a>                <span class="src-key">elseif</span><span class="src-sym">((</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'&quot;' </span>|| <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">&quot;'&quot; </span>|| <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'('</span><span class="src-sym">))</span></li>
<li><a name="a649"></a>                <span class="src-sym">{</span></li>
<li><a name="a650"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a> </span>.= <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a651"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$str_char">str_char</a> </span>= <span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'('</span><span class="src-sym">) </span>? <span class="src-str">')' </span>: <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a652"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$status">status</a> </span>= <span class="src-str">'instr'</span><span class="src-sym">;</span></li>
<li><a name="a653"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$from">from</a> </span>= <span class="src-str">'iv'</span><span class="src-sym">;</span></li>
<li><a name="a654"></a>                <span class="src-sym">}</span></li>
<li><a name="a655"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">','</span><span class="src-sym">)</span></li>
<li><a name="a656"></a>                <span class="src-sym">{</span></li>
<li><a name="a657"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a> </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a></span><span class="src-sym">)</span>.<span class="src-str">','</span><span class="src-sym">;</span></li>
<li><a name="a658"></a>                <span class="src-sym">}</span></li>
<li><a name="a659"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'\\'</span><span class="src-sym">)</span></li>
<li><a name="a660"></a>                <span class="src-sym">{</span></li>
<li><a name="a661"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a> </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#method_unicode">_unicode</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a662"></a>                <span class="src-sym">}</span></li>
<li><a name="a663"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">';' </span>|| <span class="src-var">$pn</span><span class="src-sym">)</span></li>
<li><a name="a664"></a>                <span class="src-sym">{</span></li>
<li><a name="a665"></a>                    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">{</span><span class="src-num">0</span><span class="src-sym">} </span>== <span class="src-str">'@' </span>&amp;&amp; isset<span class="src-sym">(</span><span class="src-var">$at_rules</span><span class="src-sym">[</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">,</span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">) </span>&amp;&amp; <span class="src-var">$at_rules</span><span class="src-sym">[</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">,</span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">] </span>== <span class="src-str">'iv'</span><span class="src-sym">)</span></li>
<li><a name="a666"></a>                    <span class="src-sym">{</span></li>
<li><a name="a667"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value_arr">sub_value_arr</a></span><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a668"></a>                        </li>
<li><a name="a669"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$status">status</a> </span>= <span class="src-str">'is'</span><span class="src-sym">;</span></li>
<li><a name="a670"></a>                        </li>
<li><a name="a671"></a>                        <span class="src-key">switch</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">)</span></li>
<li><a name="a672"></a>                        <span class="src-sym">{</span></li>
<li><a name="a673"></a>                            <span class="src-key">case </span><span class="src-str">'@charset'</span>: <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$charset">charset</a> </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value_arr">sub_value_arr</a></span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">; </span><span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a674"></a>                            <span class="src-key">case </span><span class="src-str">'@namespace'</span>: <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$namespace">namespace</a> </span>= <a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">' '</span><span class="src-sym">,</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value_arr">sub_value_arr</a></span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a675"></a>                            <span class="src-key">case </span><span class="src-str">'@import'</span>: <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$import">import</a></span><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">' '</span><span class="src-sym">,</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value_arr">sub_value_arr</a></span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a676"></a>                        <span class="src-sym">}</span></li>
<li><a name="a677"></a>        </li>
<li><a name="a678"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value_arr">sub_value_arr</a> </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a679"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a> </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a680"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a> </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a681"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sel_separate">sel_separate</a> </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a682"></a>                    <span class="src-sym">}</span></li>
<li><a name="a683"></a>                    <span class="src-key">else</span></li>
<li><a name="a684"></a>                    <span class="src-sym">{</span></li>
<li><a name="a685"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$status">status</a> </span>= <span class="src-str">'ip'</span><span class="src-sym">;</span></li>
<li><a name="a686"></a>                    <span class="src-sym">}</span></li>
<li><a name="a687"></a>                <span class="src-sym">}</span></li>
<li><a name="a688"></a>                <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>!= <span class="src-str">'}'</span><span class="src-sym">)</span></li>
<li><a name="a689"></a>                <span class="src-sym">{</span></li>
<li><a name="a690"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a> </span>.= <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a691"></a>                <span class="src-sym">}</span></li>
<li><a name="a692"></a>                <span class="src-key">if</span><span class="src-sym">((</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'}' </span>|| <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">';' </span>|| <span class="src-var">$pn</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">))</span></li>
<li><a name="a693"></a>                <span class="src-sym">{</span></li>
<li><a name="a694"></a>                    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$at">at</a> </span>== <span class="src-str">''</span><span class="src-sym">)</span></li>
<li><a name="a695"></a>                    <span class="src-sym">{</span></li>
<li><a name="a696"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$at">at</a> </span>= <span class="src-id"><a href="../csstidy/_data_inc_php.html#defineDEFAULT_AT">DEFAULT_AT</a></span><span class="src-sym">;</span></li>
<li><a name="a697"></a>                    <span class="src-sym">}</span></li>
<li><a name="a698"></a>                    </li>
<li><a name="a699"></a>                    <span class="src-comm">// case settings</span></li>
<li><a name="a700"></a>                    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodget_cfg">get_cfg</a><span class="src-sym">(</span><span class="src-str">'lowercase_s'</span><span class="src-sym">))</span></li>
<li><a name="a701"></a>                    <span class="src-sym">{</span></li>
<li><a name="a702"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a> </span>= <a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a703"></a>                    <span class="src-sym">}</span></li>
<li><a name="a704"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a> </span>= <a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a705"></a>                    </li>
<li><a name="a706"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$optimise">optimise</a></span><span class="src-sym">-&gt;</span><span class="src-id">subvalue</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a707"></a>                    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a> </span>!= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a708"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value_arr">sub_value_arr</a></span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a></span><span class="src-sym">;</span></li>
<li><a name="a709"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a> </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a710"></a>                    <span class="src-sym">}                </span></li>
<li><a name="a711"></a>                        </li>
<li><a name="a712"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$value">value</a> </span>= <a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">' '</span><span class="src-sym">,</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value_arr">sub_value_arr</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a713"></a>&nbsp;</li>
<li><a name="a714"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a> </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a715"></a>                    </li>
<li><a name="a716"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$optimise">optimise</a></span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$value">value</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a717"></a>                             </li>
<li><a name="a718"></a>                    <span class="src-var">$valid </span>= <a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodproperty_is_valid">property_is_valid</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a719"></a>                    <span class="src-key">if</span><span class="src-sym">((</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$invalid_at">invalid_at</a> </span>|| <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodget_cfg">get_cfg</a><span class="src-sym">(</span><span class="src-str">'preserve_css'</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodget_cfg">get_cfg</a><span class="src-sym">(</span><span class="src-str">'discard_invalid_properties'</span><span class="src-sym">) </span>|| <span class="src-var">$valid</span><span class="src-sym">))</span></li>
<li><a name="a720"></a>                    <span class="src-sym">{</span></li>
<li><a name="a721"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodcss_add_property">css_add_property</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$at">at</a></span><span class="src-sym">,</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">,</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a></span><span class="src-sym">,</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$value">value</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a722"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#method_add_token">_add_token</a><span class="src-sym">(</span><span class="src-id"><a href="../csstidy/_data_inc_php.html#defineVALUE">VALUE</a></span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$value">value</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a723"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$optimise">optimise</a></span><span class="src-sym">-&gt;</span><span class="src-id">shorthands</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a724"></a>                    <span class="src-sym">}</span></li>
<li><a name="a725"></a>                    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$valid</span><span class="src-sym">)</span></li>
<li><a name="a726"></a>                    <span class="src-sym">{</span></li>
<li><a name="a727"></a>                        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodget_cfg">get_cfg</a><span class="src-sym">(</span><span class="src-str">'discard_invalid_properties'</span><span class="src-sym">))</span></li>
<li><a name="a728"></a>                        <span class="src-sym">{</span></li>
<li><a name="a729"></a>                            <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodlog">log</a><span class="src-sym">(</span><span class="src-str">'Removed invalid property: '</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a></span><span class="src-sym">,</span><span class="src-str">'Warning'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a730"></a>                        <span class="src-sym">}</span></li>
<li><a name="a731"></a>                        <span class="src-key">else</span></li>
<li><a name="a732"></a>                        <span class="src-sym">{</span></li>
<li><a name="a733"></a>                            <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodlog">log</a><span class="src-sym">(</span><span class="src-str">'Invalid property in '</span>.<a href="http://www.php.net/strtoupper">strtoupper</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodget_cfg">get_cfg</a><span class="src-sym">(</span><span class="src-str">'css_level'</span><span class="src-sym">))</span>.<span class="src-str">': '</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a></span><span class="src-sym">,</span><span class="src-str">'Warning'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a734"></a>                        <span class="src-sym">}</span></li>
<li><a name="a735"></a>                    <span class="src-sym">}</span></li>
<li><a name="a736"></a>                                        </li>
<li><a name="a737"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$property">property</a> </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a738"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value_arr">sub_value_arr</a> </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a739"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$value">value</a> </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a740"></a>                <span class="src-sym">}</span></li>
<li><a name="a741"></a>                <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'}'</span><span class="src-sym">)</span></li>
<li><a name="a742"></a>                <span class="src-sym">{</span></li>
<li><a name="a743"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodexplode_selectors">explode_selectors</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a744"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#method_add_token">_add_token</a><span class="src-sym">(</span><span class="src-id"><a href="../csstidy/_data_inc_php.html#defineSEL_END">SEL_END</a></span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a745"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$status">status</a> </span>= <span class="src-str">'is'</span><span class="src-sym">;</span></li>
<li><a name="a746"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$invalid_at">invalid_at</a> </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a747"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a> </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a748"></a>                <span class="src-sym">}    </span></li>
<li><a name="a749"></a>            <span class="src-sym">}</span></li>
<li><a name="a750"></a>            <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$pn</span><span class="src-sym">)</span></li>
<li><a name="a751"></a>            <span class="src-sym">{</span></li>
<li><a name="a752"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a> </span>.= <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a753"></a>&nbsp;</li>
<li><a name="a754"></a>                <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/ctype_space">ctype_space</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">))</span></li>
<li><a name="a755"></a>                <span class="src-sym">{</span></li>
<li><a name="a756"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$optimise">optimise</a></span><span class="src-sym">-&gt;</span><span class="src-id">subvalue</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a757"></a>                    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a> </span>!= <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a758"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value_arr">sub_value_arr</a></span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a></span><span class="src-sym">;</span></li>
<li><a name="a759"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a> </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a760"></a>                    <span class="src-sym">}</span></li>
<li><a name="a761"></a>                <span class="src-sym">}</span></li>
<li><a name="a762"></a>            <span class="src-sym">}</span></li>
<li><a name="a763"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a764"></a>            </li>
<li><a name="a765"></a>            <span class="src-comm">/* Case in string */</span></li>
<li><a name="a766"></a>            <span class="src-key">case </span><span class="src-str">'instr'</span>:</li>
<li><a name="a767"></a>            <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$str_char">str_char</a> </span>== <span class="src-str">')' </span>&amp;&amp; <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'&quot;' </span>&amp;&amp; <span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$str_in_str">str_in_str</a> </span>&amp;&amp; <span class="src-sym">!</span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodescaped">escaped</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span><span class="src-sym">))</span></li>
<li><a name="a768"></a>            <span class="src-sym">{</span></li>
<li><a name="a769"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$str_in_str">str_in_str</a> </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a770"></a>            <span class="src-sym">}</span></li>
<li><a name="a771"></a>            <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$str_char">str_char</a> </span>== <span class="src-str">')' </span>&amp;&amp; <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'&quot;' </span>&amp;&amp; <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$str_in_str">str_in_str</a> </span>&amp;&amp; <span class="src-sym">!</span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodescaped">escaped</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span><span class="src-sym">))</span></li>
<li><a name="a772"></a>            <span class="src-sym">{</span></li>
<li><a name="a773"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$str_in_str">str_in_str</a> </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a774"></a>            <span class="src-sym">}</span></li>
<li><a name="a775"></a>            <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$str_char">str_char</a> </span>&amp;&amp; <span class="src-sym">!</span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodescaped">escaped</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$str_in_str">str_in_str</a></span><span class="src-sym">)</span></li>
<li><a name="a776"></a>            <span class="src-sym">{</span></li>
<li><a name="a777"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$status">status</a> </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$from">from</a></span><span class="src-sym">;</span></li>
<li><a name="a778"></a>            <span class="src-sym">}</span></li>
<li><a name="a779"></a>            <span class="src-var">$temp_add </span>= <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a780"></a>                                                                <span class="src-comm">// ...and no not-escaped backslash at the previous position</span></li>
<li><a name="a781"></a>            <span class="src-key">if</span><span class="src-sym">( (</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">&quot;\n&quot; </span>|| <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">&quot;\r&quot;</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">!</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span>-<span class="src-num">1</span><span class="src-sym">} </span>== <span class="src-str">'\\' </span>&amp;&amp; <span class="src-sym">!</span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodescaped">escaped</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$i</span>-<span class="src-num">1</span><span class="src-sym">)) )</span></li>
<li><a name="a782"></a>            <span class="src-sym">{</span></li>
<li><a name="a783"></a>                <span class="src-var">$temp_add </span>= <span class="src-str">&quot;\\A &quot;</span><span class="src-sym">;</span></li>
<li><a name="a784"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodlog">log</a><span class="src-sym">(</span><span class="src-str">'Fixed incorrect newline in string'</span><span class="src-sym">,</span><span class="src-str">'Warning'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a785"></a>            <span class="src-sym">}</span></li>
<li><a name="a786"></a>            <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$from">from</a> </span>== <span class="src-str">'iv'</span><span class="src-sym">)</span></li>
<li><a name="a787"></a>            <span class="src-sym">{</span></li>
<li><a name="a788"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sub_value">sub_value</a> </span>.= <span class="src-var">$temp_add</span><span class="src-sym">;</span></li>
<li><a name="a789"></a>            <span class="src-sym">}</span></li>
<li><a name="a790"></a>            <span class="src-key">elseif</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$from">from</a> </span>== <span class="src-str">'is'</span><span class="src-sym">)</span></li>
<li><a name="a791"></a>            <span class="src-sym">{</span></li>
<li><a name="a792"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a> </span>.= <span class="src-var">$temp_add</span><span class="src-sym">;</span></li>
<li><a name="a793"></a>            <span class="src-sym">}</span></li>
<li><a name="a794"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a795"></a>            </li>
<li><a name="a796"></a>            <span class="src-comm">/* Case in-comment */</span></li>
<li><a name="a797"></a>            <span class="src-key">case </span><span class="src-str">'ic'</span>:</li>
<li><a name="a798"></a>            <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">} </span>== <span class="src-str">'*' </span>&amp;&amp; <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span>+<span class="src-num">1</span><span class="src-sym">} </span>== <span class="src-str">'/'</span><span class="src-sym">)</span></li>
<li><a name="a799"></a>            <span class="src-sym">{</span></li>
<li><a name="a800"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$status">status</a> </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$from">from</a></span><span class="src-sym">;</span></li>
<li><a name="a801"></a>                <span class="src-var">$i</span>++<span class="src-sym">;</span></li>
<li><a name="a802"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#method_add_token">_add_token</a><span class="src-sym">(</span><span class="src-id"><a href="../csstidy/_data_inc_php.html#defineCOMMENT">COMMENT</a></span><span class="src-sym">, </span><span class="src-var">$cur_comment</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a803"></a>                <span class="src-var">$cur_comment </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a804"></a>            <span class="src-sym">}</span></li>
<li><a name="a805"></a>            <span class="src-key">else</span></li>
<li><a name="a806"></a>            <span class="src-sym">{</span></li>
<li><a name="a807"></a>                <span class="src-var">$cur_comment </span>.= <span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$i</span><span class="src-sym">}</span><span class="src-sym">;</span></li>
<li><a name="a808"></a>            <span class="src-sym">}</span></li>
<li><a name="a809"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a810"></a>        <span class="src-sym">}</span></li>
<li><a name="a811"></a>    <span class="src-sym">}</span></li>
<li><a name="a812"></a>&nbsp;</li>
<li><a name="a813"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$optimise">optimise</a></span><span class="src-sym">-&gt;</span><span class="src-id">postparse</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a814"></a>&nbsp;</li>
<li><a name="a815"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$print">print</a></span><span class="src-sym">-&gt;</span><span class="src-id">_reset</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a816"></a>&nbsp;</li>
<li><a name="a817"></a>    <span class="src-key">return </span><span class="src-sym">!</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$css">css</a></span><span class="src-sym">) </span>&amp;&amp; <span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$import">import</a></span><span class="src-sym">) </span>&amp;&amp; <span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$charset">charset</a></span><span class="src-sym">) </span>&amp;&amp; <span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$tokens">tokens</a></span><span class="src-sym">) </span>&amp;&amp; <span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$namespace">namespace</a></span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a818"></a><span class="src-sym">}</span></li>
<li><a name="a819"></a>&nbsp;</li>
<li><a name="a820"></a><span class="src-doc">/**</span></li>
<li><a name="a821"></a><span class="src-doc"> * Explodes selectors</span></li>
<li><a name="a822"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a823"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.0</span></li>
<li><a name="a824"></a><span class="src-doc"> */</span></li>
<li><a name="a825"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodexplode_selectors">explode_selectors</a><span class="src-sym">(</span><span class="src-sym">)</span></li>
<li><a name="a826"></a><span class="src-sym">{</span></li>
<li><a name="a827"></a>    <span class="src-comm">// Explode multiple selectors</span></li>
<li><a name="a828"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodget_cfg">get_cfg</a><span class="src-sym">(</span><span class="src-str">'merge_selectors'</span><span class="src-sym">) </span>== <span class="src-num">1</span><span class="src-sym">)</span></li>
<li><a name="a829"></a>    <span class="src-sym">{</span></li>
<li><a name="a830"></a>        <span class="src-var">$new_sels </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a831"></a>        <span class="src-var">$lastpos </span>= <span class="src-num">0</span><span class="src-sym">;</span></li>
<li><a name="a832"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sel_separate">sel_separate</a></span><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a833"></a>        <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sel_separate">sel_separate</a> </span><span class="src-key">as </span><span class="src-var">$num </span>=&gt; <span class="src-var">$pos</span><span class="src-sym">)</span></li>
<li><a name="a834"></a>        <span class="src-sym">{</span></li>
<li><a name="a835"></a>            <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$num </span>== <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sel_separate">sel_separate</a></span><span class="src-sym">)</span>-<span class="src-num">1</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a836"></a>                <span class="src-var">$pos </span>+= <span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a837"></a>            <span class="src-sym">}</span></li>
<li><a name="a838"></a>            </li>
<li><a name="a839"></a>            <span class="src-var">$new_sels</span><span class="src-sym">[</span><span class="src-sym">] </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">,</span><span class="src-var">$lastpos</span><span class="src-sym">,</span><span class="src-var">$pos</span>-<span class="src-var">$lastpos</span>-<span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a840"></a>            <span class="src-var">$lastpos </span>= <span class="src-var">$pos</span><span class="src-sym">;</span></li>
<li><a name="a841"></a>        <span class="src-sym">}</span></li>
<li><a name="a842"></a> </li>
<li><a name="a843"></a>        <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$new_sels</span><span class="src-sym">) </span>&gt; <span class="src-num">1</span><span class="src-sym">)</span></li>
<li><a name="a844"></a>        <span class="src-sym">{</span></li>
<li><a name="a845"></a>            <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$new_sels </span><span class="src-key">as </span><span class="src-var">$selector</span><span class="src-sym">)</span></li>
<li><a name="a846"></a>            <span class="src-sym">{</span></li>
<li><a name="a847"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodmerge_css_blocks">merge_css_blocks</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$at">at</a></span><span class="src-sym">,</span><span class="src-var">$selector</span><span class="src-sym">,</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$css">css</a></span><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$at">at</a></span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a848"></a>            <span class="src-sym">}</span></li>
<li><a name="a849"></a>            unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$css">css</a></span><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$at">at</a></span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$selector">selector</a></span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a850"></a>        <span class="src-sym">}</span></li>
<li><a name="a851"></a>    <span class="src-sym">}</span></li>
<li><a name="a852"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$sel_separate">sel_separate</a> </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a853"></a><span class="src-sym">}</span></li>
<li><a name="a854"></a>&nbsp;</li>
<li><a name="a855"></a><span class="src-doc">/**</span></li>
<li><a name="a856"></a><span class="src-doc"> * Checks if a character is escaped (and returns true if it is)</span></li>
<li><a name="a857"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$string </span></li>
<li><a name="a858"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">integer </span><span class="src-doc-var">$pos </span></li>
<li><a name="a859"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a860"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a861"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.02</span></li>
<li><a name="a862"></a><span class="src-doc"> */</span></li>
<li><a name="a863"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodescaped">escaped</a><span class="src-sym">(</span><span class="src-sym">&amp;</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$pos</span><span class="src-sym">) </span></li>
<li><a name="a864"></a><span class="src-sym">{</span></li>
<li><a name="a865"></a>    <span class="src-key">return </span><span class="src-sym">!</span><span class="src-sym">(</span><span class="src-sym">@</span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">{</span><span class="src-var">$pos</span>-<span class="src-num">1</span><span class="src-sym">} </span>!= <span class="src-str">'\\'</span><span class="src-sym">) </span>|| <a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodescaped">escaped</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,</span><span class="src-var">$pos</span>-<span class="src-num">1</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a866"></a><span class="src-sym">}</span></li>
<li><a name="a867"></a>&nbsp;</li>
<li><a name="a868"></a><span class="src-doc">/**</span></li>
<li><a name="a869"></a><span class="src-doc"> * Adds a property with value to the existing CSS code</span></li>
<li><a name="a870"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$media </span></li>
<li><a name="a871"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$selector </span></li>
<li><a name="a872"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$property </span></li>
<li><a name="a873"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$new_val </span></li>
<li><a name="a874"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a875"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.2</span></li>
<li><a name="a876"></a><span class="src-doc"> */</span></li>
<li><a name="a877"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodcss_add_property">css_add_property</a><span class="src-sym">(</span><span class="src-var">$media</span><span class="src-sym">,</span><span class="src-var">$selector</span><span class="src-sym">,</span><span class="src-var">$property</span><span class="src-sym">,</span><span class="src-var">$new_val</span><span class="src-sym">)</span></li>
<li><a name="a878"></a><span class="src-sym">{   </span></li>
<li><a name="a879"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodget_cfg">get_cfg</a><span class="src-sym">(</span><span class="src-str">'preserve_css'</span><span class="src-sym">) </span>|| <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$new_val</span><span class="src-sym">) </span>== <span class="src-str">''</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a880"></a>        <span class="src-key">return</span><span class="src-sym">;</span></li>
<li><a name="a881"></a>    <span class="src-sym">}</span></li>
<li><a name="a882"></a>&nbsp;</li>
<li><a name="a883"></a>    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$added">added</a> </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a884"></a>    <span class="src-key">if</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$css">css</a></span><span class="src-sym">[</span><span class="src-var">$media</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$selector</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$property</span><span class="src-sym">]</span><span class="src-sym">))</span></li>
<li><a name="a885"></a>    <span class="src-sym">{</span></li>
<li><a name="a886"></a>        <span class="src-key">if</span><span class="src-sym">((</span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodis_important">is_important</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$css">css</a></span><span class="src-sym">[</span><span class="src-var">$media</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$selector</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$property</span><span class="src-sym">]</span><span class="src-sym">) </span>&amp;&amp; <a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodis_important">is_important</a><span class="src-sym">(</span><span class="src-var">$new_val</span><span class="src-sym">)) </span>|| <span class="src-sym">!</span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodis_important">is_important</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$css">css</a></span><span class="src-sym">[</span><span class="src-var">$media</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$selector</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$property</span><span class="src-sym">]</span><span class="src-sym">))</span></li>
<li><a name="a887"></a>        <span class="src-sym">{</span></li>
<li><a name="a888"></a>            unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$css">css</a></span><span class="src-sym">[</span><span class="src-var">$media</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$selector</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$property</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a889"></a>            <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$css">css</a></span><span class="src-sym">[</span><span class="src-var">$media</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$selector</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$property</span><span class="src-sym">] </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$new_val</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a890"></a>        <span class="src-sym">}</span></li>
<li><a name="a891"></a>    <span class="src-sym">}</span></li>
<li><a name="a892"></a>    <span class="src-key">else</span></li>
<li><a name="a893"></a>    <span class="src-sym">{</span></li>
<li><a name="a894"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id"><a href="../csstidy/csstidy.html#var$css">css</a></span><span class="src-sym">[</span><span class="src-var">$media</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$selector</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-var">$property</span><span class="src-sym">] </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$new_val</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a895"></a>    <span class="src-sym">}</span></li>
<li><a name="a896"></a><span class="src-sym">}</span></li>
<li><a name="a897"></a>&nbsp;</li>
<li><a name="a898"></a><span class="src-doc">/**</span></li>
<li><a name="a899"></a><span class="src-doc"> * Adds CSS to an existing media/selector</span></li>
<li><a name="a900"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$media </span></li>
<li><a name="a901"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$selector </span></li>
<li><a name="a902"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc-var">$css_add </span></li>
<li><a name="a903"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a904"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.1</span></li>
<li><a name="a905"></a><span class="src-doc"> */</span></li>
<li><a name="a906"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodmerge_css_blocks">merge_css_blocks</a><span class="src-sym">(</span><span class="src-var">$media</span><span class="src-sym">,</span><span class="src-var">$selector</span><span class="src-sym">,</span><span class="src-var">$css_add</span><span class="src-sym">)</span></li>
<li><a name="a907"></a><span class="src-sym">{</span></li>
<li><a name="a908"></a>    <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$css_add </span><span class="src-key">as </span><span class="src-var">$property </span>=&gt; <span class="src-var">$value</span><span class="src-sym">)</span></li>
<li><a name="a909"></a>    <span class="src-sym">{</span></li>
<li><a name="a910"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodcss_add_property">css_add_property</a><span class="src-sym">(</span><span class="src-var">$media</span><span class="src-sym">,</span><span class="src-var">$selector</span><span class="src-sym">,</span><span class="src-var">$property</span><span class="src-sym">,</span><span class="src-var">$value</span><span class="src-sym">,</span><span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a911"></a>    <span class="src-sym">}</span></li>
<li><a name="a912"></a><span class="src-sym">}</span></li>
<li><a name="a913"></a>&nbsp;</li>
<li><a name="a914"></a><span class="src-doc">/**</span></li>
<li><a name="a915"></a><span class="src-doc"> * Checks if $value is !important.</span></li>
<li><a name="a916"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$value </span></li>
<li><a name="a917"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a918"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a919"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.0</span></li>
<li><a name="a920"></a><span class="src-doc"> */</span></li>
<li><a name="a921"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodis_important">is_important</a><span class="src-sym">(</span><span class="src-sym">&amp;</span><span class="src-var">$value</span><span class="src-sym">)</span></li>
<li><a name="a922"></a><span class="src-sym">{</span></li>
<li><a name="a923"></a>    <span class="src-key">return </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/strcasecmp">strcasecmp</a><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'csstidy'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'whitespace'</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-str">''</span><span class="src-sym">,</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">,</span>-<span class="src-num">10</span><span class="src-sym">,</span><span class="src-num">10</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-str">'!important'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a924"></a><span class="src-sym">}</span></li>
<li><a name="a925"></a>&nbsp;</li>
<li><a name="a926"></a><span class="src-doc">/**</span></li>
<li><a name="a927"></a><span class="src-doc"> * Returns a value without !important</span></li>
<li><a name="a928"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$value </span></li>
<li><a name="a929"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a930"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a931"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.0</span></li>
<li><a name="a932"></a><span class="src-doc"> */</span></li>
<li><a name="a933"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodgvw_important">gvw_important</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span></li>
<li><a name="a934"></a><span class="src-sym">{</span></li>
<li><a name="a935"></a>    <span class="src-key">if</span><span class="src-sym">(</span><a href="../csstidy/csstidy.html#methodcsstidy">csstidy</a><span class="src-sym">::</span><a href="../csstidy/csstidy.html#methodis_important">is_important</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))</span></li>
<li><a name="a936"></a>    <span class="src-sym">{</span></li>
<li><a name="a937"></a>        <span class="src-var">$value </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a938"></a>        <span class="src-var">$value </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span>-<span class="src-num">9</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a939"></a>        <span class="src-var">$value </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a940"></a>        <span class="src-var">$value </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span>-<span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a941"></a>        <span class="src-var">$value </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a942"></a>        <span class="src-key">return </span><span class="src-var">$value</span><span class="src-sym">;</span></li>
<li><a name="a943"></a>    <span class="src-sym">}</span></li>
<li><a name="a944"></a>    <span class="src-key">return </span><span class="src-var">$value</span><span class="src-sym">;</span></li>
<li><a name="a945"></a><span class="src-sym">}</span></li>
<li><a name="a946"></a>&nbsp;</li>
<li><a name="a947"></a><span class="src-doc">/**</span></li>
<li><a name="a948"></a><span class="src-doc"> * Checks if the next word in a string from pos is a CSS property</span></li>
<li><a name="a949"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$istring </span></li>
<li><a name="a950"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">integer </span><span class="src-doc-var">$pos </span></li>
<li><a name="a951"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool </span></li>
<li><a name="a952"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> private</span></li>
<li><a name="a953"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.2</span></li>
<li><a name="a954"></a><span class="src-doc"> */</span></li>
<li><a name="a955"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodproperty_is_next">property_is_next</a><span class="src-sym">(</span><span class="src-var">$istring</span><span class="src-sym">, </span><span class="src-var">$pos</span><span class="src-sym">)</span></li>
<li><a name="a956"></a><span class="src-sym">{</span></li>
<li><a name="a957"></a>    <span class="src-var">$all_properties </span>=<span class="src-sym">&amp; </span><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'csstidy'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'all_properties'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a958"></a>    <span class="src-var">$istring </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$istring</span><span class="src-sym">,</span><span class="src-var">$pos</span><span class="src-sym">,</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$istring</span><span class="src-sym">)</span>-<span class="src-var">$pos</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a959"></a>    <span class="src-var">$pos </span>= <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$istring</span><span class="src-sym">,</span><span class="src-str">':'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a960"></a>    <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$pos </span>=== <span class="src-id">false</span><span class="src-sym">)</span></li>
<li><a name="a961"></a>    <span class="src-sym">{</span></li>
<li><a name="a962"></a>        <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a963"></a>    <span class="src-sym">}</span></li>
<li><a name="a964"></a>    <span class="src-var">$istring </span>= <a href="http://www.php.net/strtolower">strtolower</a><span class="src-sym">(</span><a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$istring</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-var">$pos</span><span class="src-sym">)))</span><span class="src-sym">;</span></li>
<li><a name="a965"></a>    <span class="src-key">if</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$all_properties</span><span class="src-sym">[</span><span class="src-var">$istring</span><span class="src-sym">]</span><span class="src-sym">))</span></li>
<li><a name="a966"></a>    <span class="src-sym">{</span></li>
<li><a name="a967"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodlog">log</a><span class="src-sym">(</span><span class="src-str">'Added semicolon to the end of declaration'</span><span class="src-sym">,</span><span class="src-str">'Warning'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a968"></a>        <span class="src-key">return </span><span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a969"></a>    <span class="src-sym">}</span></li>
<li><a name="a970"></a>    <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a971"></a><span class="src-sym">}</span></li>
<li><a name="a972"></a>&nbsp;</li>
<li><a name="a973"></a><span class="src-doc">/**</span></li>
<li><a name="a974"></a><span class="src-doc"> * Checks if a property is valid</span></li>
<li><a name="a975"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$property </span></li>
<li><a name="a976"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">bool; </span></li>
<li><a name="a977"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a978"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> 1.0</span></li>
<li><a name="a979"></a><span class="src-doc"> */</span></li>
<li><a name="a980"></a><span class="src-key">function </span><a href="../csstidy/csstidy.html#methodproperty_is_valid">property_is_valid</a><span class="src-sym">(</span><span class="src-var">$property</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a981"></a>    <span class="src-var">$all_properties </span>=<span class="src-sym">&amp; </span><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'csstidy'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'all_properties'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a982"></a>    <span class="src-key">return </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$all_properties</span><span class="src-sym">[</span><span class="src-var">$property</span><span class="src-sym">]</span><span class="src-sym">) </span>&amp;&amp; <a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$all_properties</span><span class="src-sym">[</span><span class="src-var">$property</span><span class="src-sym">]</span><span class="src-sym">,</span><a href="http://www.php.net/strtoupper">strtoupper</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../csstidy/csstidy.html#methodget_cfg">get_cfg</a><span class="src-sym">(</span><span class="src-str">'css_level'</span><span class="src-sym">))) </span>!== <span class="src-id">false </span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a983"></a><span class="src-sym">}</span></li>
<li><a name="a984"></a>&nbsp;</li>
<li><a name="a985"></a><span class="src-sym">}</span></li>
<li><a name="a986"></a><span class="src-php">?&gt;</span></li>
</ol></pre></div>
</div>
        <div class="credit">
		    <hr />
		    Documentation generated on Mon, 15 May 2006 22:55:14 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.3.0RC3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>
Return current item: CSS Prefix Spawner