Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
apemsel committed Mar 3, 2016
1 parent 7e7a771 commit f5c94b4
Show file tree
Hide file tree
Showing 5 changed files with 403 additions and 315 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h1>Class MutableAttributedString</h1>

<b>Author:</b>
Adrian Pemsel <a href="&#x6d;&#x61;&#x69;&#x6c;&#116;&#111;&#58;&#97;&#112;&#x65;&#x6d;&#x73;&#x65;&#x6c;&#64;&#103;&#109;&#97;&#105;&#x6c;&#x2e;&#x63;&#x6f;&#x6d;">&#97;&#112;&#x65;&#x6d;&#x73;&#x65;&#x6c;&#64;&#103;&#109;&#97;&#105;&#x6c;&#x2e;&#x63;&#x6f;&#x6d;</a><br>
<b>Located at</b> <a href="source-class-apemsel.AttributedString.MutableAttributedString.html#5-117" title="Go to source code">MutableAttributedString.php</a>
<b>Located at</b> <a href="source-class-apemsel.AttributedString.MutableAttributedString.html#4-116" title="Go to source code">MutableAttributedString.php</a>
<br>
</div>

Expand All @@ -144,7 +144,7 @@ <h1>Class MutableAttributedString</h1>

<td class="name"><div>
<a class="anchor" href="#_insert">#</a>
<code><a href="source-class-apemsel.AttributedString.MutableAttributedString.html#14-45" title="Go to source code">insert</a>( <span>integer <var>$pos</var></span>, <span>string <var>$string</var></span> )</code>
<code><a href="source-class-apemsel.AttributedString.MutableAttributedString.html#13-44" title="Go to source code">insert</a>( <span>integer <var>$pos</var></span>, <span>string <var>$string</var></span> )</code>

<div class="description short">
<p>Insert string at given offset</p>
Expand Down Expand Up @@ -180,7 +180,7 @@ <h4>Parameters</h4>

<td class="name"><div>
<a class="anchor" href="#_delete">#</a>
<code><a href="source-class-apemsel.AttributedString.MutableAttributedString.html#47-70" title="Go to source code">delete</a>( <span>integer <var>$pos</var></span>, <span>integer <var>$length</var></span> )</code>
<code><a href="source-class-apemsel.AttributedString.MutableAttributedString.html#46-69" title="Go to source code">delete</a>( <span>integer <var>$pos</var></span>, <span>integer <var>$length</var></span> )</code>

<div class="description short">
<p>Delete substring of given offset and length</p>
Expand Down Expand Up @@ -216,7 +216,7 @@ <h4>Parameters</h4>

<td class="name"><div>
<a class="anchor" href="#_mb_substr_replace">#</a>
<code><a href="source-class-apemsel.AttributedString.MutableAttributedString.html#72-116" title="Go to source code">mb_substr_replace</a>( <span>string <var>$string</var></span>, <span>string <var>$replacement</var></span>, <span>integer <var>$start</var></span>, <span>integer <var>$length</var> = <span class="php-keyword1">NULL</span></span> )</code>
<code><a href="source-class-apemsel.AttributedString.MutableAttributedString.html#71-115" title="Go to source code">mb_substr_replace</a>( <span>string <var>$string</var></span>, <span>string <var>$replacement</var></span>, <span>integer <var>$start</var></span>, <span>integer <var>$length</var> = <span class="php-keyword1">NULL</span></span> )</code>

<div class="description short">
<p>Missing mb_substr_replace() implementation</p>
Expand Down
126 changes: 94 additions & 32 deletions doc/class-apemsel.AttributedString.TokenizedAttributedString.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ <h1>Class TokenizedAttributedString</h1>

<b>Author:</b>
Adrian Pemsel <a href="&#x6d;&#x61;&#x69;&#x6c;&#116;&#111;&#58;&#97;&#112;&#x65;&#x6d;&#x73;&#x65;&#x6c;&#64;&#103;&#109;&#97;&#105;&#x6c;&#x2e;&#x63;&#x6f;&#x6d;">&#97;&#112;&#x65;&#x6d;&#x73;&#x65;&#x6c;&#64;&#103;&#109;&#97;&#105;&#x6c;&#x2e;&#x63;&#x6f;&#x6d;</a><br>
<b>Located at</b> <a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#5-161" title="Go to source code">TokenizedAttributedString.php</a>
<b>Located at</b> <a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#4-188" title="Go to source code">TokenizedAttributedString.php</a>
<br>
</div>

Expand All @@ -145,7 +145,7 @@ <h1>Class TokenizedAttributedString</h1>

<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#18-35" title="Go to source code">__construct</a>( <span>string|<code><a href="class-apemsel.AttributedString.AttributedString.html">apemsel\AttributedString\AttributedString</a></code> <var>$string</var></span>, <span>string <var>$tokenizer</var> = <span class="php-quote">&quot;whitespace&quot;</span></span> )</code>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#17-34" title="Go to source code">__construct</a>( <span>string|<code><a href="class-apemsel.AttributedString.AttributedString.html">apemsel\AttributedString\AttributedString</a></code> <var>$string</var></span>, <span>string <var>$tokenizer</var> = <span class="php-quote">&quot;whitespace&quot;</span></span> )</code>

<div class="description short">

Expand Down Expand Up @@ -183,7 +183,7 @@ <h4>Overrides</h4>

<td class="name"><div>
<a class="anchor" href="#_getTokens">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#37-44" title="Go to source code">getTokens</a>( )</code>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#36-43" title="Go to source code">getTokens</a>( )</code>

<div class="description short">
<p>Return all tokens</p>
Expand All @@ -209,14 +209,14 @@ <h4>Returns</h4>

<td class="attributes"><code>
public
in[]
int[]

</code>
</td>

<td class="name"><div>
<a class="anchor" href="#_getTokenOffsets">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#46-53" title="Go to source code">getTokenOffsets</a>( )</code>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#45-52" title="Go to source code">getTokenOffsets</a>( )</code>

<div class="description short">
<p>Return all tokens' offsets</p>
Expand All @@ -229,7 +229,40 @@ <h4>Returns</h4>

<h4>Returns</h4>
<div class="list">
in[]<br>offsets
int[]<br>offsets
</div>




</div>
</div></td>
</tr>
<tr data-order="getTokenCount" id="_getTokenCount">

<td class="attributes"><code>
public
integer

</code>
</td>

<td class="name"><div>
<a class="anchor" href="#_getTokenCount">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#54-61" title="Go to source code">getTokenCount</a>( )</code>

<div class="description short">
<p>Return the number of tokens</p>
</div>

<div class="description detailed hidden">
<p>Return the number of tokens</p>



<h4>Returns</h4>
<div class="list">
integer<br>count
</div>


Expand All @@ -249,7 +282,7 @@ <h4>Returns</h4>

<td class="name"><div>
<a class="anchor" href="#_getToken">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#55-63" title="Go to source code">getToken</a>( <span>integer <var>$i</var></span> )</code>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#63-71" title="Go to source code">getToken</a>( <span>integer <var>$i</var></span> )</code>

<div class="description short">
<p>Get indicated token</p>
Expand Down Expand Up @@ -287,7 +320,7 @@ <h4>Returns</h4>

<td class="name"><div>
<a class="anchor" href="#_getTokenOffset">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#65-73" title="Go to source code">getTokenOffset</a>( <span>integer <var>$i</var></span> )</code>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#73-81" title="Go to source code">getTokenOffset</a>( <span>integer <var>$i</var></span> )</code>

<div class="description short">
<p>Get indicated token offset</p>
Expand Down Expand Up @@ -325,7 +358,7 @@ <h4>Returns</h4>

<td class="name"><div>
<a class="anchor" href="#_setTokenAttribute">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#75-88" title="Go to source code">setTokenAttribute</a>( <span>integer <var>$i</var></span>, <span>string <var>$attribute</var></span>, <span>boolean <var>$state</var> = <span class="php-keyword1">true</span></span> )</code>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#83-96" title="Go to source code">setTokenAttribute</a>( <span>integer <var>$i</var></span>, <span>string <var>$attribute</var></span>, <span>boolean <var>$state</var> = <span class="php-keyword1">true</span></span> )</code>

<div class="description short">
<p>Set a token to a given attribute and state</p>
Expand Down Expand Up @@ -363,7 +396,7 @@ <h4>Parameters</h4>

<td class="name"><div>
<a class="anchor" href="#_setTokenRangeAttribute">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#90-103" title="Go to source code">setTokenRangeAttribute</a>( <span>integer <var>$from</var></span>, <span>integer <var>$to</var></span>, <span>string <var>$attribute</var></span>, <span>boolean <var>$state</var> = <span class="php-keyword1">true</span></span> )</code>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#98-111" title="Go to source code">setTokenRangeAttribute</a>( <span>integer <var>$from</var></span>, <span>integer <var>$to</var></span>, <span>string <var>$attribute</var></span>, <span>boolean <var>$state</var> = <span class="php-keyword1">true</span></span> )</code>

<div class="description short">
<p>Set a range of tokens to a given attribute and state</p>
Expand Down Expand Up @@ -403,7 +436,7 @@ <h4>Parameters</h4>

<td class="name"><div>
<a class="anchor" href="#_setTokenDictionaryAttribute">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#105-118" title="Go to source code">setTokenDictionaryAttribute</a>( <span>string[] <var>$dictionary</var></span>, <span>string <var>$attribute</var></span>, <span>boolean <var>$state</var> = <span class="php-keyword1">true</span></span> )</code>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#113-126" title="Go to source code">setTokenDictionaryAttribute</a>( <span>string[] <var>$dictionary</var></span>, <span>string <var>$attribute</var></span>, <span>boolean <var>$state</var> = <span class="php-keyword1">true</span></span> )</code>

<div class="description short">
<p>Set all tokens matching given dictionary to attribute and state</p>
Expand Down Expand Up @@ -441,7 +474,7 @@ <h4>Parameters</h4>

<td class="name"><div>
<a class="anchor" href="#_attributesAtToken">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#120-128" title="Go to source code">attributesAtToken</a>( <span>integer <var>$i</var></span> )</code>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#128-136" title="Go to source code">attributesAtToken</a>( <span>integer <var>$i</var></span> )</code>

<div class="description short">
<p>Get all attribute of token at given index</p>
Expand Down Expand Up @@ -479,14 +512,14 @@ <h4>Returns</h4>

<td class="name"><div>
<a class="anchor" href="#_lowercaseTokens">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#133-137" title="Go to source code">lowercaseTokens</a>( )</code>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#138-145" title="Go to source code">lowercaseTokens</a>( )</code>

<div class="description short">

<p>Convert all tokens to lower case</p>
</div>

<div class="description detailed hidden">

<p>Convert all tokens to lower case</p>



Expand All @@ -500,25 +533,34 @@ <h4>Returns</h4>
<tr data-order="tokenizeOnWhitespace" id="_tokenizeOnWhitespace">

<td class="attributes"><code>
protected static

public static
string[]

</code>
</td>

<td class="name"><div>
<a class="anchor" href="#_tokenizeOnWhitespace">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#139-143" title="Go to source code">tokenizeOnWhitespace</a>( <span> <var>$string</var></span> )</code>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#147-157" title="Go to source code">tokenizeOnWhitespace</a>( <span>string <var>$string</var></span> )</code>

<div class="description short">

<p>Tokenize a string on whitespace</p>
</div>

<div class="description detailed hidden">

<p>Tokenize a string on whitespace</p>


<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$string</var></dt>
<dd>string to be tokenized</dd>
</dl></div>

<h4>Returns</h4>
<div class="list">
string[]<br>tokens
</div>



Expand All @@ -529,25 +571,34 @@ <h4>Returns</h4>
<tr data-order="tokenizeOnWords" id="_tokenizeOnWords">

<td class="attributes"><code>
protected static

public static
string[]

</code>
</td>

<td class="name"><div>
<a class="anchor" href="#_tokenizeOnWords">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#145-147" title="Go to source code">tokenizeOnWords</a>( <span> <var>$string</var></span> )</code>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#159-167" title="Go to source code">tokenizeOnWords</a>( <span>string <var>$string</var></span> )</code>

<div class="description short">

<p>Tokenize a string on words</p>
</div>

<div class="description detailed hidden">

<p>Tokenize a string on words</p>


<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$string</var></dt>
<dd>string to be tokenized</dd>
</dl></div>

<h4>Returns</h4>
<div class="list">
string[]<br>tokens
</div>



Expand All @@ -558,25 +609,36 @@ <h4>Returns</h4>
<tr data-order="tokenizeOnRegex" id="_tokenizeOnRegex">

<td class="attributes"><code>
protected static

public static
string[]

</code>
</td>

<td class="name"><div>
<a class="anchor" href="#_tokenizeOnRegex">#</a>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#149-160" title="Go to source code">tokenizeOnRegex</a>( <span> <var>$string</var></span>, <span> <var>$pattern</var></span> )</code>
<code><a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#169-187" title="Go to source code">tokenizeOnRegex</a>( <span>string <var>$string</var></span>, <span>string <var>$pattern</var></span> )</code>

<div class="description short">

<p>Tokenize a string with a given regex</p>
</div>

<div class="description detailed hidden">

<p>Tokenize a string with a given regex</p>


<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$string</var></dt>
<dd>string to be tokenized</dd>
<dt><var>$pattern</var></dt>
<dd>regex. The token must be captured in the first subgroup.</dd>
</dl></div>

<h4>Returns</h4>
<div class="list">
string[]<br>tokens
</div>



Expand Down Expand Up @@ -631,7 +693,7 @@ <h4>Returns</h4>
</code></td>

<td class="name">
<a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#15" title="Go to source code"><var>$tokens</var></a>
<a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#14" title="Go to source code"><var>$tokens</var></a>

<div class="description short">

Expand All @@ -656,7 +718,7 @@ <h4>Returns</h4>
</code></td>

<td class="name">
<a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#16" title="Go to source code"><var>$tokenOffsets</var></a>
<a href="source-class-apemsel.AttributedString.TokenizedAttributedString.html#15" title="Go to source code"><var>$tokenOffsets</var></a>

<div class="description short">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h3>Classes</h3>
</span><span id="3" class="l"><a href="#3"> 3 </a>
</span><span id="4" class="l"><a href="#4"> 4 </a><span class="php-comment">/**
</span></span><span id="5" class="l"><a href="#5"> 5 </a><span class="php-comment"> * Basic class to work with attributed strings.
</span></span><span id="6" class="l"><a href="#6"> 6 </a><span class="php-comment"> *
</span></span><span id="6" class="l"><a href="#6"> 6 </a><span class="php-comment"> *
</span></span><span id="7" class="l"><a href="#7"> 7 </a><span class="php-comment"> * Attributed strings are strings that can have multiple attributes per character of the string
</span></span><span id="8" class="l"><a href="#8"> 8 </a><span class="php-comment"> *
</span></span><span id="9" class="l"><a href="#9"> 9 </a><span class="php-comment"> * @author Adrian Pemsel &lt;[email protected]&gt;
Expand Down
Loading

0 comments on commit f5c94b4

Please sign in to comment.