Location: PHPKode > projects > Lithron > lithron-1.0.2/docs/manual/csstidy/csstidy.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

<head>
<title>phundament manual: Docs For Class csstidy</title>

<meta http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-cache"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="content-language" content="en"/>
<meta name="Author" content="Tobias Munk" />
<meta name="Subject" content="Web programming, PHP5 framework" />
<meta name="Language" content="en" />
<link rel="Shortcut Icon" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/media/style.css" />
<link rel="stylesheet" type="text/css" href="/media/manual.css" />
</head>
<body>
<div style="text-align:center" align="center" width="100%"><img src="/media/logo.png" style="margin: 15px 0 30px"></div>
<div id="page">
<div id="main">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="250" id="infobar">
      <b>Packages:</b><br />
              <a href="../li_lithron.html">lithron</a><br />
              <a href="../li_csstidy.html">csstidy</a><br />
            <br /><br />
                        <b>Classes:</b><br />
        <div class="package">
		    		<a href="../csstidy/csstidy.html">csstidy</a><br />
	    		<a href="../csstidy/csstidy_optimise.html">csstidy_optimise</a><br />
	    		<a href="../csstidy/csstidy_print.html">csstidy_print</a><br />
	  </div>

                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0">
     <!-- <tr><td valign="top" align="center">
      <form type="get" action="/docs/manual/search.php">
      Keyword <input type="text" name="keyword" size="50" />
      <input type="submit" value="Search" />
      </form>
      </td></tr>-->
      <tr><td valign="top"><!-- content begin -->

<h1>Class csstidy</h1>

<div class="inheritence-tree">
    <pre></pre>
</div>

<div class="class-description">
    <p>CSS Parser class</p>

    <p>This class represents a CSS parser which reads CSS code and saves it in an array.  In opposite to most other CSS parsers, it does not use regular expressions and  thus has full CSS2 support and a higher reliability.  Additional to that it applies some optimisations and fixes to the CSS code.  An online version should be available here: http://cdburnerxp.se/cssparse/css_optimiser.php</p></div>

<div class="tag-list">
            
            <strong>Author:</strong> 
            Florian Schmitz (floele at gmail dot com) 2005-2006<br />
                        </div>

                                                                                                                            
    <hr size="1" noshade="noshade"/>
    <a name="method-summary"></a>
    <table class="method-summary" cellspacing="1">
        <tr>
            <th colspan="2">Method Summary</th>
        </tr>
                                                    <tr>
                    <td class="type" nowrap="nowrap" width="1%">
                        
                        
                        
                        bool
                    </td>
                    <td>
                        <div class="declaration">
                            <a href="../csstidy/csstidy.html#methodescaped">escaped</a>
						(	 &$string, 	integer $pos, 	string $string)
						</div>
                        <div class="description">
                            Checks if a character is escaped (and returns true if it is)
                        </div>
                    </td>
                </tr>
                                                                <tr>
                    <td class="type" nowrap="nowrap" width="1%">
                        
                        
                        
                        mixed
                    </td>
                    <td>
                        <div class="declaration">
                            <a href="../csstidy/csstidy.html#methodget_cfg">get_cfg</a>
						(	string $setting)
						</div>
                        <div class="description">
                            Get the value of a setting.
                        </div>
                    </td>
                </tr>
                                                                <tr>
                    <td class="type" nowrap="nowrap" width="1%">
                        
                        
                        
                        string
                    </td>
                    <td>
                        <div class="declaration">
                            <a href="../csstidy/csstidy.html#methodgvw_important">gvw_important</a>
						(	string $value)
						</div>
                        <div class="description">
                            Returns a value without !important
                        </div>
                    </td>
                </tr>
                                                                <tr>
                    <td class="type" nowrap="nowrap" width="1%">
                        
                        
                        
                        bool
                    </td>
                    <td>
                        <div class="declaration">
                            <a href="../csstidy/csstidy.html#methodis_important">is_important</a>
						(	 &$value, 	string $value)
						</div>
                        <div class="description">
                            Checks if $value is !important.
                        </div>
                    </td>
                </tr>
                                                                <tr>
                    <td class="type" nowrap="nowrap" width="1%">
                        
                        
                        
                        void
                    </td>
                    <td>
                        <div class="declaration">
                            <a href="../csstidy/csstidy.html#methodis_token">is_token</a>
						(	 &$string, 	integer $i, 	string $string)
						</div>
                        <div class="description">
                            Checks if there is a token at the current position
                        </div>
                    </td>
                </tr>
                                                                <tr>
                    <td class="type" nowrap="nowrap" width="1%">
                        
                        
                        
                        void
                    </td>
                    <td>
                        <div class="declaration">
                            <a href="../csstidy/csstidy.html#methodload_template">load_template</a>
						(	string $content, 	bool $from_file)
						</div>
                        <div class="description">
                            Loads a new template
                        </div>
                    </td>
                </tr>
                                                                <tr>
                    <td class="type" nowrap="nowrap" width="1%">
                        
                        
                        
                        bool
                    </td>
                    <td>
                        <div class="declaration">
                            <a href="../csstidy/csstidy.html#methodparse">parse</a>
						(	string $string)
						</div>
                        <div class="description">
                            Parses CSS in $string. The code is saved as array in $this-&gt;css
                        </div>
                    </td>
                </tr>
                                                                <tr>
                    <td class="type" nowrap="nowrap" width="1%">
                        
                        
                        
                        void
                    </td>
                    <td>
                        <div class="declaration">
                            <a href="../csstidy/csstidy.html#methodparse_from_url">parse_from_url</a>
						(	string $url)
						</div>
                        <div class="description">
                            Starts parsing from URL
                        </div>
                    </td>
                </tr>
                                                                <tr>
                    <td class="type" nowrap="nowrap" width="1%">
                        
                        
                        
                        bool;
                    </td>
                    <td>
                        <div class="declaration">
                            <a href="../csstidy/csstidy.html#methodproperty_is_valid">property_is_valid</a>
						(	string $property)
						</div>
                        <div class="description">
                            Checks if a property is valid
                        </div>
                    </td>
                </tr>
                                                                <tr>
                    <td class="type" nowrap="nowrap" width="1%">
                        
                        
                        
                        bool
                    </td>
                    <td>
                        <div class="declaration">
                            <a href="../csstidy/csstidy.html#methodset_cfg">set_cfg</a>
						(	string $setting, 	mixed $value)
						</div>
                        <div class="description">
                            Set the value of a setting.
                        </div>
                    </td>
                </tr>
                        </table>

                                                                                                                            


    <hr size="1" noshade="noshade"/>
    <a name="method-details"></a>
    <table class="method-details" cellspacing="1">
        <tr>
            <th>Method Details</th>
        </tr>
                    
                <tr>
                    <td class="method-data">

                        <a name="methodescaped"></a>

                        <h2>escaped</h2>

                        <table class="method-detail" cellspacing="0">
                            <tr>
                                <td nowrap="nowrap">public&nbsp;bool&nbsp;<strong>escaped</strong></td>
                                <td width="100%">( &$string , integer $pos , string $string )</td>
                            </tr>
                        </table>

                        <p>Checks if a character is escaped (and returns true if it is)</p>

                        				
			<div class="tag-list"><table class="method-summary" cellspacing="1">
							<tr><th colspan="3" class="small">Input</th></tr>
                                                            <tr><td valign="top"></td><td valign="top"><strong>&$string</strong><td valign="top"></td></tr>
                                                            <tr><td valign="top">integer</td><td valign="top"><strong>$pos</strong><td valign="top"></td></tr>
                                                            <tr><td valign="top">string</td><td valign="top"><strong>$string</strong><td valign="top"></td></tr>
                                                    							<tr><th colspan="3" class="small">Output</th></tr>
			    
                            							    							                             							<tr><th colspan="3" class="small">Exception</th></tr>
			    
                            							    							                            			</table></div>
                                              
                         <p/>
                    </td>
                </tr>
                                
                <tr>
                    <td class="method-data">

                        <a name="methodget_cfg"></a>

                        <h2>get_cfg</h2>

                        <table class="method-detail" cellspacing="0">
                            <tr>
                                <td nowrap="nowrap">public&nbsp;mixed&nbsp;<strong>get_cfg</strong></td>
                                <td width="100%">(string $setting )</td>
                            </tr>
                        </table>

                        <p>Get the value of a setting.</p>

                        				
			<div class="tag-list"><table class="method-summary" cellspacing="1">
							<tr><th colspan="3" class="small">Input</th></tr>
                                                            <tr><td valign="top">string</td><td valign="top"><strong>$setting</strong><td valign="top"></td></tr>
                                                    							<tr><th colspan="3" class="small">Output</th></tr>
			    
                            							    							                             							<tr><th colspan="3" class="small">Exception</th></tr>
			    
                            							    							                            			</table></div>
                                              
                         <p/>
                    </td>
                </tr>
                                
                <tr>
                    <td class="method-data">

                        <a name="methodgvw_important"></a>

                        <h2>gvw_important</h2>

                        <table class="method-detail" cellspacing="0">
                            <tr>
                                <td nowrap="nowrap">public&nbsp;string&nbsp;<strong>gvw_important</strong></td>
                                <td width="100%">(string $value )</td>
                            </tr>
                        </table>

                        <p>Returns a value without !important</p>

                        				
			<div class="tag-list"><table class="method-summary" cellspacing="1">
							<tr><th colspan="3" class="small">Input</th></tr>
                                                            <tr><td valign="top">string</td><td valign="top"><strong>$value</strong><td valign="top"></td></tr>
                                                    							<tr><th colspan="3" class="small">Output</th></tr>
			    
                            							    							                             							<tr><th colspan="3" class="small">Exception</th></tr>
			    
                            							    							                            			</table></div>
                                              
                         <p/>
                    </td>
                </tr>
                                
                <tr>
                    <td class="method-data">

                        <a name="methodis_important"></a>

                        <h2>is_important</h2>

                        <table class="method-detail" cellspacing="0">
                            <tr>
                                <td nowrap="nowrap">public&nbsp;bool&nbsp;<strong>is_important</strong></td>
                                <td width="100%">( &$value , string $value )</td>
                            </tr>
                        </table>

                        <p>Checks if $value is !important.</p>

                        				
			<div class="tag-list"><table class="method-summary" cellspacing="1">
							<tr><th colspan="3" class="small">Input</th></tr>
                                                            <tr><td valign="top"></td><td valign="top"><strong>&$value</strong><td valign="top"></td></tr>
                                                            <tr><td valign="top">string</td><td valign="top"><strong>$value</strong><td valign="top"></td></tr>
                                                    							<tr><th colspan="3" class="small">Output</th></tr>
			    
                            							    							                             							<tr><th colspan="3" class="small">Exception</th></tr>
			    
                            							    							                            			</table></div>
                                              
                         <p/>
                    </td>
                </tr>
                                
                <tr>
                    <td class="method-data">

                        <a name="methodis_token"></a>

                        <h2>is_token</h2>

                        <table class="method-detail" cellspacing="0">
                            <tr>
                                <td nowrap="nowrap">public&nbsp;void&nbsp;<strong>is_token</strong></td>
                                <td width="100%">( &$string , integer $i , string $string )</td>
                            </tr>
                        </table>

                        <p>Checks if there is a token at the current position</p>

                        				
			<div class="tag-list"><table class="method-summary" cellspacing="1">
							<tr><th colspan="3" class="small">Input</th></tr>
                                                            <tr><td valign="top"></td><td valign="top"><strong>&$string</strong><td valign="top"></td></tr>
                                                            <tr><td valign="top">integer</td><td valign="top"><strong>$i</strong><td valign="top"></td></tr>
                                                            <tr><td valign="top">string</td><td valign="top"><strong>$string</strong><td valign="top"></td></tr>
                                                    							<tr><th colspan="3" class="small">Output</th></tr>
			    
                            							    							                             							<tr><th colspan="3" class="small">Exception</th></tr>
			    
                            							    							                            			</table></div>
                                              
                         <p/>
                    </td>
                </tr>
                                
                <tr>
                    <td class="method-data">

                        <a name="methodload_template"></a>

                        <h2>load_template</h2>

                        <table class="method-detail" cellspacing="0">
                            <tr>
                                <td nowrap="nowrap">public&nbsp;void&nbsp;<strong>load_template</strong></td>
                                <td width="100%">(string $content , bool $from_file )</td>
                            </tr>
                        </table>

                        <p>Loads a new template</p>

                        				
			<div class="tag-list"><table class="method-summary" cellspacing="1">
							<tr><th colspan="3" class="small">Input</th></tr>
                                                            <tr><td valign="top">string</td><td valign="top"><strong>$content</strong><td valign="top">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;</td></tr>
                                                            <tr><td valign="top">bool</td><td valign="top"><strong>$from_file</strong><td valign="top">uses $content as filename if true</td></tr>
                                                    							<tr><th colspan="3" class="small">Output</th></tr>
			    
                            							    							    							                             							<tr><th colspan="3" class="small">Exception</th></tr>
			    
                            							    							    							                            			</table></div>
                                              
                         <p/>
                    </td>
                </tr>
                                
                <tr>
                    <td class="method-data">

                        <a name="methodparse"></a>

                        <h2>parse</h2>

                        <table class="method-detail" cellspacing="0">
                            <tr>
                                <td nowrap="nowrap">public&nbsp;bool&nbsp;<strong>parse</strong></td>
                                <td width="100%">(string $string )</td>
                            </tr>
                        </table>

                        <p>Parses CSS in $string. The code is saved as array in $this-&gt;css</p>

                        				
			<div class="tag-list"><table class="method-summary" cellspacing="1">
							<tr><th colspan="3" class="small">Input</th></tr>
                                                            <tr><td valign="top">string</td><td valign="top"><strong>$string</strong><td valign="top">the CSS code</td></tr>
                                                    							<tr><th colspan="3" class="small">Output</th></tr>
			    
                            							    							                             							<tr><th colspan="3" class="small">Exception</th></tr>
			    
                            							    							                            			</table></div>
                                              
                         <p/>
                    </td>
                </tr>
                                
                <tr>
                    <td class="method-data">

                        <a name="methodparse_from_url"></a>

                        <h2>parse_from_url</h2>

                        <table class="method-detail" cellspacing="0">
                            <tr>
                                <td nowrap="nowrap">public&nbsp;void&nbsp;<strong>parse_from_url</strong></td>
                                <td width="100%">(string $url )</td>
                            </tr>
                        </table>

                        <p>Starts parsing from URL</p>

                        				
			<div class="tag-list"><table class="method-summary" cellspacing="1">
							<tr><th colspan="3" class="small">Input</th></tr>
                                                            <tr><td valign="top">string</td><td valign="top"><strong>$url</strong><td valign="top"></td></tr>
                                                    							<tr><th colspan="3" class="small">Output</th></tr>
			    
                            							    							                             							<tr><th colspan="3" class="small">Exception</th></tr>
			    
                            							    							                            			</table></div>
                                              
                         <p/>
                    </td>
                </tr>
                                
                <tr>
                    <td class="method-data">

                        <a name="methodproperty_is_valid"></a>

                        <h2>property_is_valid</h2>

                        <table class="method-detail" cellspacing="0">
                            <tr>
                                <td nowrap="nowrap">public&nbsp;bool;&nbsp;<strong>property_is_valid</strong></td>
                                <td width="100%">(string $property )</td>
                            </tr>
                        </table>

                        <p>Checks if a property is valid</p>

                        				
			<div class="tag-list"><table class="method-summary" cellspacing="1">
							<tr><th colspan="3" class="small">Input</th></tr>
                                                            <tr><td valign="top">string</td><td valign="top"><strong>$property</strong><td valign="top"></td></tr>
                                                    							<tr><th colspan="3" class="small">Output</th></tr>
			    
                            							    							                             							<tr><th colspan="3" class="small">Exception</th></tr>
			    
                            							    							                            			</table></div>
                                              
                         <p/>
                    </td>
                </tr>
                                
                <tr>
                    <td class="method-data">

                        <a name="methodset_cfg"></a>

                        <h2>set_cfg</h2>

                        <table class="method-detail" cellspacing="0">
                            <tr>
                                <td nowrap="nowrap">public&nbsp;bool&nbsp;<strong>set_cfg</strong></td>
                                <td width="100%">(string $setting , mixed $value )</td>
                            </tr>
                        </table>

                        <p>Set the value of a setting.</p>

                        				
			<div class="tag-list"><table class="method-summary" cellspacing="1">
							<tr><th colspan="3" class="small">Input</th></tr>
                                                            <tr><td valign="top">string</td><td valign="top"><strong>$setting</strong><td valign="top"></td></tr>
                                                            <tr><td valign="top">mixed</td><td valign="top"><strong>$value</strong><td valign="top"></td></tr>
                                                    							<tr><th colspan="3" class="small">Output</th></tr>
			    
                            							    							                             							<tr><th colspan="3" class="small">Exception</th></tr>
			    
                            							    							                            			</table></div>
                                              
                         <p/>
                    </td>
                </tr>
                        </table>


      <!-- content end --></td></tr></table>
    </td>
  </tr>
</table>

</div><!-- main -->

<div id="footer">
  Copyright &copy; 2007 - <a title="diemeisterei" href="http://www.diemeisterei.de/">diemeisterei GmbH</a><br/>
  <a title="phundament" href="http://www.phundament.com/">phundament</a>
</div>

</div><!-- page -->

</body>
</html>
Return current item: Lithron