ext.util.mixedcollection.html.svn-base

来自「PHP 知识管理系统(基于树结构的知识管理系统), 英文原版的PHP源码。」· SVN-BASE 代码 · 共 1,095 行 · 第 1/5 页

SVN-BASE
1,095
字号
        <ul><li><code>fn</code> : Function<div class="sub-desc">The function to be called, it will receive the args o (the object), k (the key).</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the function (defaults to this).</div></li><li><code>start</code> : Number<div class="sub-desc">(optional) The index to start searching at (defaults to 0).</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Number</code><div class="sub-desc">The matched index or -1</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">MixedCollection</td>
    </tr>
        <tr class="method-row inherited expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.MixedCollection-fireEvent"></a>
            <b>fireEvent</b>(&nbsp;<code>String eventName</code>, <code>Object... args</code>&nbsp;) : Boolean            <div class="mdesc">
                        <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
            <div class="long">
                Fires the specified event with the passed parameters (minus the event name).    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>eventName</code> : String<div class="sub-desc"></div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.MixedCollection-first"></a>
            <b>first</b>() : Object            <div class="mdesc">
                        <div class="short">Returns the first item in the collection.</div>
            <div class="long">
                Returns the first item in the collection.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li>None.</li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Object</code><div class="sub-desc">the first item in the collection..</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">MixedCollection</td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.MixedCollection-get"></a>
            <b>get</b>(&nbsp;<code>String/Number key</code>&nbsp;) : Object            <div class="mdesc">
                        <div class="short">Returns the item associated with the passed key or index.</div>
            <div class="long">
                Returns the item associated with the passed key or index.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>key</code> : String/Number<div class="sub-desc">The key or index of the item.</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Object</code><div class="sub-desc">The item associated with the passed key.</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">MixedCollection</td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.MixedCollection-getCount"></a>
            <b>getCount</b>() : Number            <div class="mdesc">
                        <div class="short">Returns the number of items in the collection.</div>
            <div class="long">
                Returns the number of items in the collection.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li>None.</li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Number</code><div class="sub-desc">the number of items in the collection.</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">MixedCollection</td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.MixedCollection-getKey"></a>
            <b>getKey</b>(&nbsp;<code>Object item</code>&nbsp;) : Object            <div class="mdesc">
                        <div class="short">MixedCollection has a generic way to fetch keys if you implement getKey.  The default implementationsimply returns i...</div>
            <div class="long">
                MixedCollection has a generic way to fetch keys if you implement getKey.  The default implementationsimply returns <tt style="font-weight:bold;">item.id</tt> but you can provide your own implementationto return a different value as in the following examples:
<pre><code><i>// normal way</i><b>var</b> mc = <b>new</b> Ext.util.MixedCollection();mc.add(someEl.dom.id, someEl);mc.add(otherEl.dom.id, otherEl);<i>//and so on</i><i>// using getKey</i><b>var</b> mc = <b>new</b> Ext.util.MixedCollection();mc.getKey = <b>function</b>(el){   <b>return</b> el.dom.id;};mc.add(someEl);mc.add(otherEl);<i>// or via the constructor</i><b>var</b> mc = <b>new</b> Ext.util.MixedCollection(false, <b>function</b>(el){   <b>return</b> el.dom.id;});mc.add(someEl);mc.add(otherEl);</code></pre>    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>item</code> : Object<div class="sub-desc">The item for which to find the key.</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Object</code><div class="sub-desc">The key for the passed item.</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">MixedCollection</td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.MixedCollection-getRange"></a>
            <b>getRange</b>(&nbsp;<span class="optional" title="Optional">[<code>Number startIndex</code>]</span>, <span class="optional" title="Optional">[<code>Number endIndex</code>]</span>&nbsp;) : Array            <div class="mdesc">
                        <div class="short">Returns a range of items in this collection</div>
            <div class="long">
                Returns a range of items in this collection    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>startIndex</code> : Number<div class="sub-desc">(optional) defaults to 0</div></li><li><code>endIndex</code> : Number<div class="sub-desc">(optional) default to the last item</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Array</code><div class="sub-desc">An array of items</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">MixedCollection</td>
    </tr>
        <tr class="method-row inherited expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.MixedCollection-hasListener"></a>
            <b>hasListener</b>(&nbsp;<code>String eventName</code>&nbsp;) : Boolean            <div class="mdesc">
                        <div class="short">Checks to see if this object has any listeners for a specified event</div>
            <div class="long">
                Checks to see if this object has any listeners for a specified event    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.MixedCollection-indexOf"></a>
            <b>indexOf</b>(&nbsp;<code>Object o</code>&nbsp;) : Number            <div class="mdesc">
                        <div class="short">Returns index within the collection of the passed Object.</div>
            <div class="long">
                Returns index within the collection of the passed Object.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>o</code> : Object<div class="sub-desc">The item to find the index of.</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Number</code><div class="sub-desc">index of the item.</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">MixedCollection</td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.MixedCollection-indexOfKey"></a>
            <b>indexOfKey</b>(&nbsp;<code>String key</code>&nbsp;) : Number            <div class="mdesc">
                        <div class="short">Returns index within the collection of the passed key.</div>
            <div class="long">
                Returns index within the collection of the passed key.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>key</code> : String<div class="sub-desc">The key to find the index of.</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Number</code><div class="sub-desc">index of the key.</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">MixedCollection</td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.util.MixedCollection-insert"></a>
            <b>insert</b>(&nbsp;<code>Number index</code>, <code>String key</code>, <span class="optional" title="Optional">[<code>Object o</code>]</span>&nbsp;) : Object            <div class="mdesc">

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?