Location: PHPKode > projects > Dompdf > dompdf-0.4/doc/dompdf/Stylesheet.html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Stylesheet</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Stylesheet</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
											<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
						
			</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The master stylesheet class</p>
<div class="description"><p>The Stylesheet class is responsible for parsing stylesheets and style  tags/attributes.  It also acts as a registry of the individual Style  objects generated by the current set of loaded CSS files and style  elements.</p></div>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../dompdf/Style.html">Style</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_include_stylesheet_cls_php.html">/include/stylesheet.cls.php</a> (line <span class="field">59</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>


	<a name="sec-const-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constant Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="const-summary">
								<div class="const-title">
					<img src="../media/images/Constant.png" alt=" " />
					<a href="#DEFAULT_STYLESHEET" title="details" class="const-name">DEFAULT_STYLESHEET</a> = 					<span class="var-type"> __DEFAULT_STYLESHEET</span>

				</div>
							</div>
		</div>
	</div>

	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="var-summary">
								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$ACCEPTED_MEDIA_TYPES" title="details" class="var-name">$ACCEPTED_MEDIA_TYPES</a>
				</div>
							</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
								
				<div class="method-definition">
											<span class="method-result">Stylesheet</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#add_style" title="details" class="method-name">add_style</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">Style</span>&nbsp;<span class="var-name">$style</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#apply_styles" title="details" class="method-name">apply_styles</a>
											(<span class="var-type">Frame_Tree</span>&nbsp;<span class="var-name">$tree</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result"><a href="../dompdf/Style.html">Style</a></span>
										<a href="#create_style" title="details" class="method-name">create_style</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#load_css" title="details" class="method-name">load_css</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">&$css</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#load_css_file" title="details" class="method-name">load_css_file</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result"><a href="../dompdf/Style.html">Style</a></span>
										<a href="#lookup" title="details" class="method-name">lookup</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#__toString" title="details" class="method-name">__toString</a>
										()
									</div>
							</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$ACCEPTED_MEDIA_TYPES" id="$ACCEPTED_MEDIA_TYPES"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$ACCEPTED_MEDIA_TYPES</span>
			 = <span class="var-default">array(&quot;all&quot;, &quot;static&quot;, &quot;visual&quot;,<br />                                       &quot;bitmap&quot;, &quot;paged&quot;, &quot;print&quot;)</span>			(line <span class="line-number">123</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">accepted CSS media types</p>
	<ul class="tags">
				<li><span class="field">static:</span> </li>
			</ul>
	
	
		
		

</div>

						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																			<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">132</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The class constructor.</p>
<div class="description"><p>The base protocol, host &amp; path are initialized to those of  the current script.</p></div>
	
	<div class="method-signature">
		<span class="method-result">Stylesheet</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodadd_style" id="add_style"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">add_style</span> (line <span class="line-number">149</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">add a new Style object to the stylesheet</p>
<div class="description"><p>add_style() adds a new Style object to the current stylesheet, or  merges a new Style with an existing one.</p></div>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			add_style
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">Style</span>&nbsp;<span class="var-name">$style</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span><span class="var-description">: the Style's selector</span>			</li>
					<li>
				<span class="var-type"><a href="../dompdf/Style.html">Style</a></span>
				<span class="var-name">$style</span><span class="var-description">: the Style to be added</span>			</li>
				</ul>
		
		
	</div>
<a name="methodapply_styles" id="apply_styles"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">apply_styles</span> (line <span class="line-number">460</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">applies all current styles to a particular document tree</p>
<div class="description"><p>apply_styles() applies all currently loaded styles to the provided  <a href="../dompdf/Frame_Tree.html">Frame_Tree</a>.  Aside from parsing CSS, this is the main purpose  of this class.</p></div>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			apply_styles
		</span>
					(<span class="var-type">Frame_Tree</span>&nbsp;<span class="var-name">$tree</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../dompdf/Frame_Tree.html">Frame_Tree</a></span>
				<span class="var-name">$tree</span>			</li>
				</ul>
		
		
	</div>
<a name="methodcreate_style" id="create_style"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">create_style</span> (line <span class="line-number">181</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">create a new Style object associated with this stylesheet</p>
	
	<div class="method-signature">
		<span class="method-result"><a href="../dompdf/Style.html">Style</a></span>
		<span class="method-name">
			create_style
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodload_css" id="load_css"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">load_css</span> (line <span class="line-number">191</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">load and parse a CSS string</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			load_css
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">&$css</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$css</span>			</li>
				</ul>
		
		
	</div>
<a name="methodload_css_file" id="load_css_file"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">load_css_file</span> (line <span class="line-number">199</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">load and parse a CSS file</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			load_css_file
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span>			</li>
				</ul>
		
		
	</div>
<a name="methodlookup" id="lookup"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">lookup</span> (line <span class="line-number">169</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">lookup a specifc Style object</p>
<div class="description"><p>lookup() returns the Style specified by $key, or null if the Style is  not found.</p></div>
	
	<div class="method-signature">
		<span class="method-result"><a href="../dompdf/Style.html">Style</a></span>
		<span class="method-name">
			lookup
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span><span class="var-description">: the selector of the requested Style</span>			</li>
				</ul>
		
		
	</div>
<a name="method__toString" id="__toString"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">__toString</span> (line <span class="line-number">772</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">dumps the entire stylesheet as a string</p>
<div class="description"><p>Generates a string of each selector and associated style in the  Stylesheet.  Useful for debugging.</p></div>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			__toString
		</span>
				()
			</div>
	
		
		
	</div>
						
		</div>
	</div>

	<a name="sec-consts"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
														| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="constDEFAULT_STYLESHEET" id="DEFAULT_STYLESHEET"><!-- --></A>
<div class="oddrow">

	<div class="const-header">
		<img src="../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">DEFAULT_STYLESHEET</span>
			 = <span class="const-default"> __DEFAULT_STYLESHEET</span>
			(line <span class="line-number">67</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">the location of the default built-in CSS file.</p>
	
	
</div>

						
		</div>
	</div>

	<p class="notes" id="credit">
		Documentation generated on Fri, 04 Mar 2005 13:31:20 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</div></body>
</html>
Return current item: Dompdf