<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)"> <meta name="when" content="Wed, 14 Apr 2010 15:12:03 +0000"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css"> <link rel="start" href="../../../overview-summary.html"> <title>Parser (Doctrine)</title> </head> <body id="definition" onload="parent.document.title=document.title;"> <div class="header"> <h1>Doctrine</h1> <ul> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="../../../doctrine/common/annotations/package-summary.html">Namespace</a></li> <li class="active">Class</li> <li><a href="../../../doctrine/common/annotations/package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> </ul> </div> <div class="small_links"> <a href="../../../index.html" target="_top">Frames</a> <a href="../../../doctrine/common/annotations/parser.html" target="_top">No frames</a> </div> <div class="small_links"> Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a> Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a> </div> <hr> <div class="qualifiedName">Doctrine\Common\Annotations\Parser</div> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 36</div> <h1>Class Parser</h1> <pre class="tree"><strong>Parser</strong><br /></pre> <hr> <p class="signature">public class <strong>Parser</strong></p> <div class="comment" id="overview_description"><p>A simple parser for docblock annotations.</p></div> <dl> <dt>License:</dt> <dd>http://www.opensource.org/licenses/lgpl-license.php LGPL</dd> <dt>See Also:</dt> <dd><code>www.doctrine-project.org</code></dd> <dt>Since:</dt> <dd>2.0</dd> <dt>Version:</dt> <dd>$Revision: 3938 $</dd> <dt>Author:</dt> <dd>Guilherme Blanco <guilhermeblanco@hotmail.com></dd> <dd>Jonathan Wage <jonwage@gmail.com></dd> <dd>Roman Borschel <roman@code-factory.org></dd> <dd>Benjamin Eberlei <kontakt@beberlei.de></dd> </dl> <hr> <table id="summary_constr"> <tr><th colspan="2">Constructor Summary</th></tr> <tr> <td class="description"><p class="name"><a href="#Parser()">Parser</a>()</p><p class="description">Constructs a new AnnotationParser.</p></td> </tr> </table> <table id="summary_method"> <tr><th colspan="2">Method Summary</th></tr> <tr> <td class="type"> mixed</td> <td class="description"><p class="name"><a href="#Annotation()">Annotation</a>()</p><p class="description">Annotation ::= "@" AnnotationName ["(" [Values] ")"] AnnotationName ::= QualifiedName | SimpleName | AliasedName QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName AliasedName ::= Alias ":" SimpleName NameSpacePart ::= identifier SimpleName ::= identifier Alias ::= identifier</p></td> </tr> <tr> <td class="type"> array</td> <td class="description"><p class="name"><a href="#Annotations()">Annotations</a>()</p><p class="description">Annotations ::= Annotation {[ "*" ]* [Annotation]}</p></td> </tr> <tr> <td class="type"> array</td> <td class="description"><p class="name"><a href="#ArrayEntry()">ArrayEntry</a>()</p><p class="description">ArrayEntry ::= Value | KeyValuePair KeyValuePair ::= Key "=" PlainValue Key ::= string | integer</p></td> </tr> <tr> <td class="type"> array</td> <td class="description"><p class="name"><a href="#Arrayx()">Arrayx</a>()</p><p class="description">Array ::= "{" ArrayEntry {"," ArrayEntry}* "}"</p></td> </tr> <tr> <td class="type"> array</td> <td class="description"><p class="name"><a href="#FieldAssignment()">FieldAssignment</a>()</p><p class="description">FieldAssignment ::= FieldName "=" PlainValue FieldName ::= identifier</p></td> </tr> <tr> <td class="type"> mixed</td> <td class="description"><p class="name"><a href="#PlainValue()">PlainValue</a>()</p><p class="description">PlainValue ::= integer | string | float | boolean | Array | Annotation</p></td> </tr> <tr> <td class="type"> mixed</td> <td class="description"><p class="name"><a href="#Value()">Value</a>()</p><p class="description">Value ::= PlainValue | FieldAssignment</p></td> </tr> <tr> <td class="type"> array</td> <td class="description"><p class="name"><a href="#Values()">Values</a>()</p><p class="description">Values ::= Array | Value {"," Value}</p></td> </tr> <tr> <td class="type"> bool</td> <td class="description"><p class="name"><a href="#match()">match</a>(int|string token)</p><p class="description">Attempts to match the given token with the current lookahead token. </p></td> </tr> <tr> <td class="type"> array</td> <td class="description"><p class="name"><a href="#parse()">parse</a>(string docBlockString, string context)</p><p class="description">Parses the given docblock string for annotations.</p></td> </tr> <tr> <td class="type"> void</td> <td class="description"><p class="name"><a href="#setAnnotationNamespaceAlias()">setAnnotationNamespaceAlias</a>(mixed namespace, mixed alias, $alias )</p><p class="description">Sets an alias for an annotation namespace.</p></td> </tr> <tr> <td class="type"> void</td> <td class="description"><p class="name"><a href="#setDefaultAnnotationNamespace()">setDefaultAnnotationNamespace</a>(mixed defaultNamespace, $defaultNamespace )</p><p class="description">Sets the default namespace that is assumed for an annotation that does not define a namespace prefix.</p></td> </tr> </table> <h2 id="detail_constr">Constructor Detail</h2> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 85</div> <h3 id="Parser()">Parser</h3> <code class="signature">public <strong>Parser</strong>()</code> <div class="details"> <p>Constructs a new AnnotationParser.</p></div> <hr> <h2 id="detail_method">Method Detail</h2> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 224</div> <h3 id="Annotation()">Annotation</h3> <code class="signature">public mixed <strong>Annotation</strong>()</code> <div class="details"> <p>Annotation ::= "@" AnnotationName ["(" [Values] ")"] AnnotationName ::= QualifiedName | SimpleName | AliasedName QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName AliasedName ::= Alias ":" SimpleName NameSpacePart ::= identifier SimpleName ::= identifier Alias ::= identifier</p><dl> <dt>Returns:</dt> <dd>False if it is not a valid Annotation; instance of Annotation subclass otherwise.</dd> </dl> </div> <hr> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 189</div> <h3 id="Annotations()">Annotations</h3> <code class="signature">public array <strong>Annotations</strong>()</code> <div class="details"> <p>Annotations ::= Annotation {[ "*" ]* [Annotation]}</p></div> <hr> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 431</div> <h3 id="ArrayEntry()">ArrayEntry</h3> <code class="signature">public array <strong>ArrayEntry</strong>()</code> <div class="details"> <p>ArrayEntry ::= Value | KeyValuePair KeyValuePair ::= Key "=" PlainValue Key ::= string | integer</p></div> <hr> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 398</div> <h3 id="Arrayx()">Arrayx</h3> <code class="signature">public array <strong>Arrayx</strong>()</code> <div class="details"> <p>Array ::= "{" ArrayEntry {"," ArrayEntry}* "}"</p></div> <hr> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 384</div> <h3 id="FieldAssignment()">FieldAssignment</h3> <code class="signature">public array <strong>FieldAssignment</strong>()</code> <div class="details"> <p>FieldAssignment ::= FieldName "=" PlainValue FieldName ::= identifier</p></div> <hr> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 342</div> <h3 id="PlainValue()">PlainValue</h3> <code class="signature">public mixed <strong>PlainValue</strong>()</code> <div class="details"> <p>PlainValue ::= integer | string | float | boolean | Array | Annotation</p></div> <hr> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 326</div> <h3 id="Value()">Value</h3> <code class="signature">public mixed <strong>Value</strong>()</code> <div class="details"> <p>Value ::= PlainValue | FieldAssignment</p></div> <hr> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 284</div> <h3 id="Values()">Values</h3> <code class="signature">public array <strong>Values</strong>()</code> <div class="details"> <p>Values ::= Array | Value {"," Value}</p></div> <hr> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 147</div> <h3 id="match()">match</h3> <code class="signature">public bool <strong>match</strong>(int|string token)</code> <div class="details"> <p>Attempts to match the given token with the current lookahead token. If they match, updates the lookahead token; otherwise raises a syntax error.</p><dl> <dt>Parameters:</dt> <dd>token - type or value</dd> <dt>Returns:</dt> <dd>True if tokens match; false otherwise.</dd> </dl> </div> <hr> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 119</div> <h3 id="parse()">parse</h3> <code class="signature">public array <strong>parse</strong>(string docBlockString, string context)</code> <div class="details"> <p>Parses the given docblock string for annotations.</p><dl> <dt>Returns:</dt> <dd>Array of Annotations. If no annotations are found, an empty array is returned.</dd> </dl> </div> <hr> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 107</div> <h3 id="setAnnotationNamespaceAlias()">setAnnotationNamespaceAlias</h3> <code class="signature">public void <strong>setAnnotationNamespaceAlias</strong>(mixed namespace, mixed alias, $alias )</code> <div class="details"> <p>Sets an alias for an annotation namespace.</p></div> <hr> <div class="location">/Doctrine/Common/Annotations/Parser.php at line 96</div> <h3 id="setDefaultAnnotationNamespace()">setDefaultAnnotationNamespace</h3> <code class="signature">public void <strong>setDefaultAnnotationNamespace</strong>(mixed defaultNamespace, $defaultNamespace )</code> <div class="details"> <p>Sets the default namespace that is assumed for an annotation that does not define a namespace prefix.</p></div> <hr> <div class="header"> <h1>Doctrine</h1> <ul> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="../../../doctrine/common/annotations/package-summary.html">Namespace</a></li> <li class="active">Class</li> <li><a href="../../../doctrine/common/annotations/package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> </ul> </div> <div class="small_links"> <a href="../../../index.html" target="_top">Frames</a> <a href="../../../doctrine/common/annotations/parser.html" target="_top">No frames</a> </div> <div class="small_links"> Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a> Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a> </div> <hr> <p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p> </body> </html>