Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
apemsel committed Mar 5, 2016
1 parent 14618a9 commit 84a7263
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 10 deletions.
4 changes: 2 additions & 2 deletions doc/class-apemsel.AttributedString.AttributedString.html
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ <h4>Implementation of</h4>
<tr data-order="attributes" id="$attributes">
<td class="attributes"><code>
protected

array
</code></td>

<td class="name">
Expand All @@ -1203,7 +1203,7 @@ <h4>Implementation of</h4>
<td class="value">
<div>
<a href="#$attributes" class="anchor">#</a>
<code></code>
<code>[]</code>
</div>
</td>
</tr>
Expand Down
86 changes: 83 additions & 3 deletions doc/class-apemsel.AttributedString.MutableAttributedString.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,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#4-116" title="Go to source code">MutableAttributedString.php</a>
<b>Located at</b> <a href="source-class-apemsel.AttributedString.MutableAttributedString.html#4-136" title="Go to source code">MutableAttributedString.php</a>
<br>
</div>

Expand Down Expand Up @@ -255,6 +255,88 @@ <h4>See</h4>
</div>
</div></td>
</tr>
<tr data-order="offsetSet" id="_offsetSet">

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


</code>
</td>

<td class="name"><div>
<a class="anchor" href="#_offsetSet">#</a>
<code><a href="source-class-apemsel.AttributedString.MutableAttributedString.html#119-126" title="Go to source code">offsetSet</a>( <span>integer <var>$offset</var></span>, <span> <var>$value</var></span> )</code>

<div class="description short">
<p>Replace char at given offset</p>
</div>

<div class="description detailed hidden">
<p>Replace char at given offset</p>


<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$offset</var></dt>
<dd>offset</dd>
<dt><var>$value</var></dt>
<dd></dd>
</dl></div>


<h4>Throws</h4>
<div class="list">
InvalidArgumentException<br>always
</div>


<h4>Overrides</h4>
<div class="list"><code><a href="class-apemsel.AttributedString.AttributedString.html#_offsetSet">apemsel\AttributedString\AttributedString::offsetSet</a></code></div>

</div>
</div></td>
</tr>
<tr data-order="offsetUnset" id="_offsetUnset">

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


</code>
</td>

<td class="name"><div>
<a class="anchor" href="#_offsetUnset">#</a>
<code><a href="source-class-apemsel.AttributedString.MutableAttributedString.html#128-135" title="Go to source code">offsetUnset</a>( <span>integer <var>$offset</var></span> )</code>

<div class="description short">
<p>Unset char at given offset</p>
</div>

<div class="description detailed hidden">
<p>Unset char at given offset</p>


<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$offset</var></dt>
<dd>offset</dd>
</dl></div>


<h4>Throws</h4>
<div class="list">
InvalidArgumentException<br>always
</div>


<h4>Overrides</h4>
<div class="list"><code><a href="class-apemsel.AttributedString.AttributedString.html#_offsetUnset">apemsel\AttributedString\AttributedString::offsetUnset</a></code></div>

</div>
</div></td>
</tr>
</table>
</div>

Expand All @@ -278,8 +360,6 @@ <h4>See</h4>
<code><a href="class-apemsel.AttributedString.AttributedString.html#_is">is()</a></code>,
<code><a href="class-apemsel.AttributedString.AttributedString.html#_offsetExists">offsetExists()</a></code>,
<code><a href="class-apemsel.AttributedString.AttributedString.html#_offsetGet">offsetGet()</a></code>,
<code><a href="class-apemsel.AttributedString.AttributedString.html#_offsetSet">offsetSet()</a></code>,
<code><a href="class-apemsel.AttributedString.AttributedString.html#_offsetUnset">offsetUnset()</a></code>,
<code><a href="class-apemsel.AttributedString.AttributedString.html#_searchAttribute">searchAttribute()</a></code>,
<code><a href="class-apemsel.AttributedString.AttributedString.html#_setLength">setLength()</a></code>,
<code><a href="class-apemsel.AttributedString.AttributedString.html#_setPattern">setPattern()</a></code>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h3>Classes</h3>
</span><span id="11" class="l"><a href="#11"> 11 </a><span class="php-keyword1">class</span> AttributedString <span class="php-keyword1">implements</span> \Countable, \ArrayAccess
</span><span id="12" class="l"><a href="#12"> 12 </a>{
</span><span id="13" class="l"><a href="#13"> 13 </a> <span class="php-keyword1">protected</span> <span class="php-var">$string</span>;
</span><span id="14" class="l"><a href="#14"> 14 </a> <span class="php-keyword1">protected</span> <span class="php-var">$attributes</span>;
</span><span id="14" class="l"><a href="#14"> 14 </a> <span class="php-keyword1">protected</span> <span class="php-var">$attributes</span> = [];
</span><span id="15" class="l"><a href="#15"> 15 </a> <span class="php-keyword1">protected</span> <span class="php-var">$length</span>;
</span><span id="16" class="l"><a href="#16"> 16 </a> <span class="php-keyword1">protected</span> <span class="php-var">$byteToChar</span>;
</span><span id="17" class="l"><a href="#17"> 17 </a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ <h3>Classes</h3>
</span></span><span id="51" class="l"><a href="#51"> 51 </a><span class="php-comment"> */</span>
</span><span id="52" class="l"><a href="#52"> 52 </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> <span class="php-keyword2">delete</span>(<span class="php-var">$pos</span>, <span class="php-var">$length</span>) {
</span><span id="53" class="l"><a href="#53"> 53 </a> <span class="php-var">$leftPart</span> = <span class="php-quote">&quot;&quot;</span>;
</span><span id="54" class="l"><a href="#54"> 54 </a> <span class="php-keyword1">if</span> (<span class="php-var">$pos</span> &gt; <span class="php-num">0</span>) {
</span><span id="55" class="l"><a href="#55"> 55 </a> <span class="php-var">$leftPart</span> = <span class="php-keyword2">mb_substr</span>(<span class="php-var">$this</span>-&gt;string, <span class="php-num">0</span>, <span class="php-var">$pos</span> - <span class="php-num">1</span>, <span class="php-quote">&quot;utf-8&quot;</span>);
</span><span id="54" class="l"><a href="#54"> 54 </a> <span class="php-keyword1">if</span> (<span class="php-var">$pos</span> &gt;= <span class="php-num">0</span>) {
</span><span id="55" class="l"><a href="#55"> 55 </a> <span class="php-var">$leftPart</span> = <span class="php-keyword2">mb_substr</span>(<span class="php-var">$this</span>-&gt;string, <span class="php-num">0</span>, <span class="php-var">$pos</span>, <span class="php-quote">&quot;utf-8&quot;</span>);
</span><span id="56" class="l"><a href="#56"> 56 </a> }
</span><span id="57" class="l"><a href="#57"> 57 </a>
</span><span id="58" class="l"><a href="#58"> 58 </a> <span class="php-var">$rightPart</span> = <span class="php-quote">&quot;&quot;</span>;
Expand Down Expand Up @@ -197,8 +197,28 @@ <h3>Classes</h3>
</span><span id="113" class="l"><a href="#113">113 </a>
</span><span id="114" class="l"><a href="#114">114 </a> <span class="php-keyword1">return</span> <span class="php-keyword2">join</span>(<span class="php-var">$smatches</span>[<span class="php-num">0</span>]);
</span><span id="115" class="l"><a href="#115">115 </a> }
</span><span id="116" class="l"><a href="#116">116 </a>}
</span><span id="117" class="l"><a href="#117">117 </a></span></code></pre>
</span><span id="116" class="l"><a href="#116">116 </a>
</span><span id="117" class="l"><a href="#117">117 </a> <span class="php-comment">// Modified ArrayAccess interface</span>
</span><span id="118" class="l"><a href="#118">118 </a>
</span><span id="119" class="l"><a href="#119">119 </a> <span class="php-comment">/**
</span></span><span id="120" class="l"><a href="#120">120 </a><span class="php-comment"> * Replace char at given offset
</span></span><span id="121" class="l"><a href="#121">121 </a><span class="php-comment"> *
</span></span><span id="122" class="l"><a href="#122">122 </a><span class="php-comment"> * @param int $offset offset
</span></span><span id="123" class="l"><a href="#123">123 </a><span class="php-comment"> */</span>
</span><span id="124" class="l"><a href="#124">124 </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> offsetSet(<span class="php-var">$offset</span>, <span class="php-var">$value</span>) {
</span><span id="125" class="l"><a href="#125">125 </a> <span class="php-var">$this</span>-&gt;string = self::mb_substr_replace(<span class="php-var">$this</span>-&gt;string, <span class="php-var">$value</span>, <span class="php-var">$offset</span>, <span class="php-keyword2">mb_strlen</span>(<span class="php-var">$value</span>, <span class="php-quote">&quot;utf-8&quot;</span>));
</span><span id="126" class="l"><a href="#126">126 </a> }
</span><span id="127" class="l"><a href="#127">127 </a>
</span><span id="128" class="l"><a href="#128">128 </a> <span class="php-comment">/**
</span></span><span id="129" class="l"><a href="#129">129 </a><span class="php-comment"> * Unset char at given offset
</span></span><span id="130" class="l"><a href="#130">130 </a><span class="php-comment"> *
</span></span><span id="131" class="l"><a href="#131">131 </a><span class="php-comment"> * @param int $offset offset
</span></span><span id="132" class="l"><a href="#132">132 </a><span class="php-comment"> */</span>
</span><span id="133" class="l"><a href="#133">133 </a> <span class="php-keyword1">public</span> <span class="php-keyword1">function</span> offsetUnset(<span class="php-var">$offset</span>) {
</span><span id="134" class="l"><a href="#134">134 </a> <span class="php-var">$this</span>-&gt;<span class="php-keyword2">delete</span>(<span class="php-var">$offset</span>, <span class="php-num">1</span>);
</span><span id="135" class="l"><a href="#135">135 </a> }
</span><span id="136" class="l"><a href="#136">136 </a>}
</span><span id="137" class="l"><a href="#137">137 </a></span></code></pre>
</div>

<div id="footer">
Expand Down

0 comments on commit 84a7263

Please sign in to comment.