Skip to content
Browse files

Documenting more methods and generating new API docs. Added a new exa…

…mple to demonstrate mixed loading methods.
  • Loading branch information...
1 parent 32ea41b commit 2fac56094254ea1f0206a91e71d84f3017ddbf7f @cauld cauld committed
View
6 CHANGES
@@ -5,8 +5,10 @@ ChangeLog
* Initial release
1.0.0b2
- * Doc cleanup
+ * Documentation and example cleanup
* Combo script incorrectly exploded the query string on & not &.
* Modified APC/Curl support checks
* Adding APC support for combo.php
- * Combo.php was not handling relative image path in the raw css. Now converts to absolute paths.
+ * Combo.php was not handling relative image pathes in the raw css. Now
+ converts to absolute paths.
+ * Adding a new example to demonstrate mixed loading methods
View
590 api_docs/PHP.YAHOO_util_Loader.html
@@ -167,7 +167,8 @@ <h3 id="properties">Properties</h3>
</h4>
<div class="detail">
<div class="description" property="yui:description">
- Combined into a single request using the combo service to pontentially reduce the number of http requests required.
+ Combined into a single request using the combo service to pontentially reduce the number of
+http requests required. This option is not supported when loading custom modules.
</div>
</div>
@@ -264,6 +265,97 @@ <h3 id="properties">Properties</h3>
<div class="section method details">
<h3 id="methods">Methods</h3>
<div class="content">
+ <div class="" rel="yui:method" resource="#method_addToCombo">
+ <h4>
+ <a name="method_addToCombo">addToCombo</a></h4>
+ <div class="detail" >
+ <code>
+
+
+
+ void
+ <strong property="yui:name">addToCombo</strong>
+ (
+
+
+ name
+
+
+ ,
+ type
+
+
+ )
+ </code>
+
+ <div class="description" property="yui:description">
+ Adds a module the combo collection for a specified resource type
+ </div>
+
+ <div class="description">
+
+ <dl rel="yui:parameters">
+ <dt>Parameters:</dt>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">name</span>
+ &lt;<span property="yui:type">string</span>&gt;
+ </code>
+ <span property="yui:description"> The module name to add</span>
+ </dd>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">type</span>
+ &lt;<span property="yui:type">string</span>&gt;
+ </code>
+ <span property="yui:description"> Resource type (i.e.) YUI_JS or YUI_CSS</span>
+ </dd>
+ </dl>
+
+ <dl>
+ <dt>Returns:
+ <code property="yui:return">
+ void
+ </code></dt>
+ <dd property="yui:returnInfo"></dd>
+ </dl>
+
+
+
+
+ </div>
+
+ </div>
+ <hr />
+ </div>
+ <div class="" rel="yui:method" resource="#method_canJSON">
+ <h4>
+ <a name="method_canJSON">canJSON</a></h4>
+ <div class="detail" >
+ <code>
+
+
+
+
+ <strong property="yui:name">canJSON</strong>
+ (
+ )
+ </code>
+
+ <div class="description" property="yui:description">
+ Detects if environment supports JSON encode/decode
+ </div>
+
+ <div class="description">
+
+
+
+
+
+
+ </div>
+
+ </div>
+ <hr />
+ </div>
<div class="" rel="yui:method" resource="#method_css">
<h4>
<a name="method_css">css</a></h4>
@@ -290,7 +382,7 @@ <h3 id="methods">Methods</h3>
<code property="yui:return">
string
</code></dt>
- <dd property="yui:returnInfo">(e.g.)</dd>
+ <dd property="yui:returnInfo"></dd>
</dl>
@@ -581,6 +673,426 @@ <h3 id="methods">Methods</h3>
</div>
<hr />
</div>
+ <div class="" rel="yui:method" resource="#method_getAllDependencies">
+ <h4>
+ <a name="method_getAllDependencies">getAllDependencies</a></h4>
+ <div class="detail" >
+ <code>
+
+
+
+ array
+ <strong property="yui:name">getAllDependencies</strong>
+ (
+
+
+ mname
+
+
+ ,
+ loadOptional
+
+
+ ,
+ completed
+
+
+ )
+ </code>
+
+ <div class="description" property="yui:description">
+ Identify dependencies for a give module name
+ </div>
+
+ <div class="description">
+
+ <dl rel="yui:parameters">
+ <dt>Parameters:</dt>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">mname</span>
+ &lt;<span property="yui:type">string</span>&gt;
+ </code>
+ <span property="yui:description"> Module name</span>
+ </dd>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">loadOptional</span>
+ &lt;<span property="yui:type">boolean</span>&gt;
+ </code>
+ <span property="yui:description"> Load optional dependencies</span>
+ </dd>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">completed</span>
+ &lt;<span property="yui:type">array</span>&gt;
+ </code>
+ <span property="yui:description"></span>
+ </dd>
+ </dl>
+
+ <dl>
+ <dt>Returns:
+ <code property="yui:return">
+ array
+ </code></dt>
+ <dd property="yui:returnInfo"></dd>
+ </dl>
+
+
+
+
+ </div>
+
+ </div>
+ <hr />
+ </div>
+ <div class="" rel="yui:method" resource="#method_getComboLink">
+ <h4>
+ <a name="method_getComboLink">getComboLink</a></h4>
+ <div class="detail" >
+ <code>
+
+
+
+ string
+ <strong property="yui:name">getComboLink</strong>
+ (
+
+
+ type
+
+
+ )
+ </code>
+
+ <div class="description" property="yui:description">
+ Retrieves the combo link or script include for the currently loaded modules of a specific resource type
+ </div>
+
+ <div class="description">
+
+ <dl rel="yui:parameters">
+ <dt>Parameters:</dt>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">type</span>
+ &lt;<span property="yui:type">string</span>&gt;
+ </code>
+ <span property="yui:description"> Resource type (i.e.) YUI_JS or YUI_CSS</span>
+ </dd>
+ </dl>
+
+ <dl>
+ <dt>Returns:
+ <code property="yui:return">
+ string
+ </code></dt>
+ <dd property="yui:returnInfo">link or script include</dd>
+ </dl>
+
+
+
+
+ </div>
+
+ </div>
+ <hr />
+ </div>
+ <div class="" rel="yui:method" resource="#method_getContent">
+ <h4>
+ <a name="method_getContent">getContent</a></h4>
+ <div class="detail" >
+ <code>
+
+
+
+ string
+ <strong property="yui:name">getContent</strong>
+ (
+
+
+ name
+
+
+ ,
+ type
+
+
+ )
+ </code>
+
+ <div class="description" property="yui:description">
+ Retrieve the style or script node with embedded source for a given module name and resource type
+ </div>
+
+ <div class="description">
+
+ <dl rel="yui:parameters">
+ <dt>Parameters:</dt>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">name</span>
+ &lt;<span property="yui:type">string</span>&gt;
+ </code>
+ <span property="yui:description"> The module name to fetch the source from</span>
+ </dd>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">type</span>
+ &lt;<span property="yui:type">string</span>&gt;
+ </code>
+ <span property="yui:description"> Resource type (i.e.) YUI_JS or YUI_CSS</span>
+ </dd>
+ </dl>
+
+ <dl>
+ <dt>Returns:
+ <code property="yui:return">
+ string
+ </code></dt>
+ <dd property="yui:returnInfo">style or script node with embedded source</dd>
+ </dl>
+
+
+
+
+ </div>
+
+ </div>
+ <hr />
+ </div>
+ <div class="" rel="yui:method" resource="#method_getLink">
+ <h4>
+ <a name="method_getLink">getLink</a></h4>
+ <div class="detail" >
+ <code>
+
+
+
+ string
+ <strong property="yui:name">getLink</strong>
+ (
+
+
+ name
+
+
+ ,
+ type
+
+
+ )
+ </code>
+
+ <div class="description" property="yui:description">
+ Retrieve the link or script include for a given module name and resource type
+ </div>
+
+ <div class="description">
+
+ <dl rel="yui:parameters">
+ <dt>Parameters:</dt>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">name</span>
+ &lt;<span property="yui:type">string</span>&gt;
+ </code>
+ <span property="yui:description"> The module name to fetch the include for</span>
+ </dd>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">type</span>
+ &lt;<span property="yui:type">string</span>&gt;
+ </code>
+ <span property="yui:description"> Resource type (i.e.) YUI_JS or YUI_CSS</span>
+ </dd>
+ </dl>
+
+ <dl>
+ <dt>Returns:
+ <code property="yui:return">
+ string
+ </code></dt>
+ <dd property="yui:returnInfo">link or script include</dd>
+ </dl>
+
+
+
+
+ </div>
+
+ </div>
+ <hr />
+ </div>
+ <div class="" rel="yui:method" resource="#method_getLoadedModules">
+ <h4>
+ <a name="method_getLoadedModules">getLoadedModules</a></h4>
+ <div class="detail" >
+ <code>
+
+
+
+ array
+ <strong property="yui:name">getLoadedModules</strong>
+ (
+ )
+ </code>
+
+ <div class="description" property="yui:description">
+ Identifies what module(s) have been loaded via the load method and/or marked as loaded via the setLoaded method
+ </div>
+
+ <div class="description">
+
+
+ <dl>
+ <dt>Returns:
+ <code property="yui:return">
+ array
+ </code></dt>
+ <dd property="yui:returnInfo"></dd>
+ </dl>
+
+
+
+
+ </div>
+
+ </div>
+ <hr />
+ </div>
+ <div class="" rel="yui:method" resource="#method_getLoadedModulesAsJSON">
+ <h4>
+ <a name="method_getLoadedModulesAsJSON">getLoadedModulesAsJSON</a></h4>
+ <div class="detail" >
+ <code>
+
+
+
+ json
+ <strong property="yui:name">getLoadedModulesAsJSON</strong>
+ (
+ )
+ </code>
+
+ <div class="description" property="yui:description">
+ Identifies what module(s) have been loaded via the load method and/or marked as loaded via the setLoaded method
+ </div>
+
+ <div class="description">
+
+
+ <dl>
+ <dt>Returns:
+ <code property="yui:return">
+ json
+ </code></dt>
+ <dd property="yui:returnInfo"></dd>
+ </dl>
+
+
+
+
+ </div>
+
+ </div>
+ <hr />
+ </div>
+ <div class="" rel="yui:method" resource="#method_getProvides">
+ <h4>
+ <a name="method_getProvides">getProvides</a></h4>
+ <div class="detail" >
+ <code>
+
+
+
+ array
+ <strong property="yui:name">getProvides</strong>
+ (
+
+
+ name
+
+
+ )
+ </code>
+
+ <div class="description" property="yui:description">
+ Identifies what module(s) are provided by a given module name (e.g.) yaho-dom-event provides yahoo, dom, and event
+ </div>
+
+ <div class="description">
+
+ <dl rel="yui:parameters">
+ <dt>Parameters:</dt>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">name</span>
+ &lt;<span property="yui:type">string</span>&gt;
+ </code>
+ <span property="yui:description"> Module name</span>
+ </dd>
+ </dl>
+
+ <dl>
+ <dt>Returns:
+ <code property="yui:return">
+ array
+ </code></dt>
+ <dd property="yui:returnInfo"></dd>
+ </dl>
+
+
+
+
+ </div>
+
+ </div>
+ <hr />
+ </div>
+ <div class="" rel="yui:method" resource="#method_getRaw">
+ <h4>
+ <a name="method_getRaw">getRaw</a></h4>
+ <div class="detail" >
+ <code>
+
+
+
+ string
+ <strong property="yui:name">getRaw</strong>
+ (
+
+
+ name
+
+
+ )
+ </code>
+
+ <div class="description" property="yui:description">
+ Retrieve the raw source contents for a given module name
+ </div>
+
+ <div class="description">
+
+ <dl rel="yui:parameters">
+ <dt>Parameters:</dt>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">name</span>
+ &lt;<span property="yui:type">string</span>&gt;
+ </code>
+ <span property="yui:description"> The module name you wish to fetch the source from</span>
+ </dd>
+ </dl>
+
+ <dl>
+ <dt>Returns:
+ <code property="yui:return">
+ string
+ </code></dt>
+ <dd property="yui:returnInfo">raw source</dd>
+ </dl>
+
+
+
+
+ </div>
+
+ </div>
+ <hr />
+ </div>
<div class="" rel="yui:method" resource="#method_getRemoteContent">
<h4>
<a name="method_getRemoteContent">getRemoteContent</a></h4>
@@ -808,6 +1320,67 @@ <h3 id="methods">Methods</h3>
</div>
<hr />
</div>
+ <div class="" rel="yui:method" resource="#method_overrideBase">
+ <h4>
+ <a name="method_overrideBase">overrideBase</a></h4>
+ <div class="detail" >
+ <code>
+
+
+
+ void
+ <strong property="yui:name">overrideBase</strong>
+ (
+
+
+ base
+
+
+ ,
+ modules
+
+
+ )
+ </code>
+
+ <div class="description" property="yui:description">
+ Used to override the base dir for specific set of modules (Note: not supported when using the combo service)
+ </div>
+
+ <div class="description">
+
+ <dl rel="yui:parameters">
+ <dt>Parameters:</dt>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">base</span>
+ &lt;<span property="yui:type">string</span>&gt;
+ </code>
+ <span property="yui:description"> Base path (e.g.) 2.6.0/build</span>
+ </dd>
+ <dd rel="yui:parameter">
+ <code><span property="yui:name">modules</span>
+ &lt;<span property="yui:type">array</span>&gt;
+ </code>
+ <span property="yui:description"> Module names of which to override base</span>
+ </dd>
+ </dl>
+
+ <dl>
+ <dt>Returns:
+ <code property="yui:return">
+ void
+ </code></dt>
+ <dd property="yui:returnInfo"></dd>
+ </dl>
+
+
+
+
+ </div>
+
+ </div>
+ <hr />
+ </div>
<div class="" rel="yui:method" resource="#method_raw">
<h4>
<a name="method_raw">raw</a></h4>
@@ -1232,6 +1805,8 @@ <h3 id="methods">Methods</h3>
<div id="methodsList" class="module">
<h4>Methods</h4>
<ul class="content">
+ <li class=""><a href="#method_addToCombo" title="addToCombo">addToCombo</a></li>
+ <li class=""><a href="#method_canJSON" title="canJSON">canJSON</a></li>
<li class=""><a href="#method_css" title="css">css</a></li>
<li class=""><a href="#method_css_data" title="css_data">css_data</a></li>
<li class=""><a href="#method_css_embed" title="css_embed">css_embed</a></li>
@@ -1239,10 +1814,19 @@ <h3 id="methods">Methods</h3>
<li class=""><a href="#method_css_raw" title="css_raw">css_raw</a></li>
<li class=""><a href="#method_data" title="data">data</a></li>
<li class=""><a href="#method_embed" title="embed">embed</a></li>
+ <li class=""><a href="#method_getAllDependencies" title="getAllDependencies">getAllDependencies</a></li>
+ <li class=""><a href="#method_getComboLink" title="getComboLink">getComboLink</a></li>
+ <li class=""><a href="#method_getContent" title="getContent">getContent</a></li>
+ <li class=""><a href="#method_getLink" title="getLink">getLink</a></li>
+ <li class=""><a href="#method_getLoadedModules" title="getLoadedModules">getLoadedModules</a></li>
+ <li class=""><a href="#method_getLoadedModulesAsJSON" title="getLoadedModulesAsJSON">getLoadedModulesAsJSON</a></li>
+ <li class=""><a href="#method_getProvides" title="getProvides">getProvides</a></li>
+ <li class=""><a href="#method_getRaw" title="getRaw">getRaw</a></li>
<li class=""><a href="#method_getRemoteContent" title="getRemoteContent">getRemoteContent</a></li>
<li class=""><a href="#method_getUrl" title="getUrl">getUrl</a></li>
<li class=""><a href="#method_json" title="json">json</a></li>
<li class=""><a href="#method_load" title="load">load</a></li>
+ <li class=""><a href="#method_overrideBase" title="overrideBase">overrideBase</a></li>
<li class=""><a href="#method_raw" title="raw">raw</a></li>
<li class=""><a href="#method_script" title="script">script</a></li>
<li class=""><a href="#method_script_data" title="script_data">script_data</a></li>
@@ -1265,7 +1849,7 @@ <h3 id="methods">Methods</h3>
</div>
</div>
<script type="text/javascript">
- ALL_YUI_PROPS = [{"url": "PHP.YAHOO_util_Loader.html#property_allowRollups", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "allowRollups"}, {"url": "PHP.YAHOO_util_Loader.html#property_base", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "base"}, {"url": "PHP.YAHOO_util_Loader.html#property_combine", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "combine"}, {"url": "PHP.YAHOO_util_Loader.html#property_comboBase", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "comboBase"}, {"url": "PHP.YAHOO_util_Loader.html#method_css", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_data"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_embed"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_json"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_raw"}, {"url": "PHP.YAHOO_util_Loader.html#method_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "data"}, {"url": "PHP.YAHOO_util_Loader.html#method_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "embed"}, {"url": "PHP.YAHOO_util_Loader.html#property_filterList", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "filterList"}, {"url": "PHP.YAHOO_util_Loader.html#method_getRemoteContent", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getRemoteContent"}, {"url": "PHP.YAHOO_util_Loader.html#method_getUrl", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getUrl"}, {"url": "PHP.YAHOO_util_Loader.html#method_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "json"}, {"url": "PHP.YAHOO_util_Loader.html#method_load", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "load"}, {"url": "PHP.YAHOO_util_Loader.html#property_loadOptional", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "loadOptional"}, {"url": "PHP.YAHOO_util_Loader.html#method_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "raw"}, {"url": "PHP.YAHOO_util_Loader.html#property_rollupsToTop", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "rollupsToTop"}, {"url": "PHP.YAHOO_util_Loader.html#method_script", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_data"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_embed"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_json"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_raw"}, {"url": "PHP.YAHOO_util_Loader.html#method_setLoaded", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "setLoaded"}, {"url": "PHP.YAHOO_util_Loader.html#method_tags", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "tags"}];
+ ALL_YUI_PROPS = [{"url": "PHP.YAHOO_util_Loader.html#method_addToCombo", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "addToCombo"}, {"url": "PHP.YAHOO_util_Loader.html#property_allowRollups", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "allowRollups"}, {"url": "PHP.YAHOO_util_Loader.html#property_base", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "base"}, {"url": "PHP.YAHOO_util_Loader.html#method_canJSON", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "canJSON"}, {"url": "PHP.YAHOO_util_Loader.html#property_combine", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "combine"}, {"url": "PHP.YAHOO_util_Loader.html#property_comboBase", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "comboBase"}, {"url": "PHP.YAHOO_util_Loader.html#method_css", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_data"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_embed"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_json"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_raw"}, {"url": "PHP.YAHOO_util_Loader.html#method_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "data"}, {"url": "PHP.YAHOO_util_Loader.html#method_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "embed"}, {"url": "PHP.YAHOO_util_Loader.html#property_filterList", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "filterList"}, {"url": "PHP.YAHOO_util_Loader.html#method_getAllDependencies", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getAllDependencies"}, {"url": "PHP.YAHOO_util_Loader.html#method_getComboLink", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getComboLink"}, {"url": "PHP.YAHOO_util_Loader.html#method_getContent", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getContent"}, {"url": "PHP.YAHOO_util_Loader.html#method_getLink", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getLink"}, {"url": "PHP.YAHOO_util_Loader.html#method_getLoadedModules", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getLoadedModules"}, {"url": "PHP.YAHOO_util_Loader.html#method_getLoadedModulesAsJSON", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getLoadedModulesAsJSON"}, {"url": "PHP.YAHOO_util_Loader.html#method_getProvides", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getProvides"}, {"url": "PHP.YAHOO_util_Loader.html#method_getRaw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getRaw"}, {"url": "PHP.YAHOO_util_Loader.html#method_getRemoteContent", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getRemoteContent"}, {"url": "PHP.YAHOO_util_Loader.html#method_getUrl", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getUrl"}, {"url": "PHP.YAHOO_util_Loader.html#method_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "json"}, {"url": "PHP.YAHOO_util_Loader.html#method_load", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "load"}, {"url": "PHP.YAHOO_util_Loader.html#property_loadOptional", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "loadOptional"}, {"url": "PHP.YAHOO_util_Loader.html#method_overrideBase", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "overrideBase"}, {"url": "PHP.YAHOO_util_Loader.html#method_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "raw"}, {"url": "PHP.YAHOO_util_Loader.html#property_rollupsToTop", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "rollupsToTop"}, {"url": "PHP.YAHOO_util_Loader.html#method_script", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_data"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_embed"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_json"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_raw"}, {"url": "PHP.YAHOO_util_Loader.html#method_setLoaded", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "setLoaded"}, {"url": "PHP.YAHOO_util_Loader.html#method_tags", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "tags"}];
</script>
</body>
</html>
View
23 api_docs/assets/ac-js
@@ -35,21 +35,38 @@ Event.onAvailable('yui-classopts-form', function() {
var checkCookie = function(id) {
var value = YAHOO.util.Cookie.getSub('yuidoc', id),
- el = Dom.get(id);
+ el = Dom.get(id), checked = (value === 'checked');;
+
+ /*
if (value === 'checked') {
el.checked = true;
} else {
el.checked = false;
}
+ */
+
+ el.checked = checked;
+ return checked;
};
- var els = ['show_deprecated', 'show_protected', 'show_private'];
+ var els = ['show_deprecated', 'show_protected', 'show_private'],
+ reapplyHash = false;
for (var i = 0; i < els.length; i++) {
Event.on(els[i], 'click', handleClick);
- checkCookie(els[i]);
+ reapplyHash = checkCookie(els[i]) || reapplyHash;
handleClick(els[i]);
}
+
+ // If we dynamically show private/protected/etc items during
+ // load, we need to reapply anchors so that the search feature
+ // works correctly for items that are initially hidden.
+ if (reapplyHash) {
+ var dl = document.location, hash = dl.hash;
+ if (hash) {
+ dl.hash = hash;
+ }
+ }
});
View
2 api_docs/assets/api.css
@@ -53,7 +53,9 @@ a:visited { color: #003399;}
#yui-classopts-form fieldset legend { display: none; }
/* undo reset.css styles for description block formatting */
+#doc3 .description dl { margin: 5px 0 10px 0; }
#doc3 .description ul { padding: 10px 0 10px 28px; font-size: 90%; list-style: disc}
+#doc3 .description li { list-style: disc}
#doc3 .description p { padding-bottom: 10px}
#doc3 .description strong { font-weight: bold;}
#doc3 .description em {padding: 2px; background-color: #EFECCA}
View
BIN api_docs/assets/bg_hd.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
15 api_docs/classmap.js
@@ -0,0 +1,15 @@
+YAHOO.env.classMap = {"PHP.YAHOO_util_Loader": "phploader"};
+
+YAHOO.env.resolveClass = function(className) {
+ var a=className.split('.'), ns=YAHOO.env.classMap;
+
+ for (var i=0; i<a.length; i=i+1) {
+ if (ns[a[i]]) {
+ ns = ns[a[i]];
+ } else {
+ return null;
+ }
+ }
+
+ return ns;
+};
View
45 api_docs/index.html
@@ -2,7 +2,7 @@
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <title>API: phploader (YUI Library)</title>
+ <title>API: (YUI Library)</title>
<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
<link rel="stylesheet" type="text/css" href="assets/api.css" />
@@ -16,11 +16,8 @@
<div id="doc3" class="yui-t2">
<div id="hd">
<h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
- <h3>phploader&nbsp; <span class="subtitle">1.0.0beta</span></h3>
+ <h3>&nbsp; <span class="subtitle">1.0.0beta</span></h3>
<a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a>
- &gt; <a href="./module_phploader.html" title="phploader">phploader</a>
-
-
<form onsubmit="return false">
<div id="propertysearch">
Search: <input autocomplete="off" id="searchinput" />
@@ -43,38 +40,12 @@
</fieldset>
</form>
-
- <h3>Module: phploader
-
-
-
- </h3>
- <div class="description summary">
- Used to specify JavaScript and CSS module requirements. It maintains a dependency
-tree for these modules so when a module is requested, all of the other modules it
-depends on are included as well. By default, the YUI Library is configured, and
-other modules and their dependencies can be added via PHP.
- </div>
-
-
-
- <div class="yui-gc">
- <div class="yui-u first">
-
- <p>This module contains the following classes:</p>
- <script>
- //var YUI_CLASS_LIST = [{"extends": {"superclass": {}, "events": {}, "configs": {}, "properties": {}, "methods": {}}, "description": "The YUI PHP loader base class which provides dynamic server-side loading for YUI", "guessedname": "PHP.YAHOO_util_Loader", "name": "PHP.YAHOO_util_Loader"}];
- </script>
- <div id="splash_classList">
- <ul>
- <li><a href="PHP.YAHOO_util_Loader.html" title="PHP.YAHOO_util_Loader" id="class_0">PHP.YAHOO_util_Loader</a></li>
- </ul>
- </div>
+ <div class="summary description">
+ This is the API documentation for the
+ <a href="http://developer.yahoo.com/yui/">Yahoo! UI Library</a>.
+ <p>Choose a module name from the list for more information.</p>
</div>
- <div class="yui-u">
- </div>
- </div>
</div>
</div>
@@ -84,7 +55,7 @@
<div id="moduleList" class="module">
<h4>Modules</h4>
<ul class="content">
- <li class="selected"><a href="module_phploader.html" title="phploader">phploader</a></li>
+ <li class=""><a href="module_phploader.html" title="phploader">phploader</a></li>
</ul>
</div>
@@ -115,7 +86,7 @@
</div>
</div>
<script type="text/javascript">
- ALL_YUI_PROPS = [{"url": "PHP.YAHOO_util_Loader.html#property_allowRollups", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "allowRollups"}, {"url": "PHP.YAHOO_util_Loader.html#property_base", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "base"}, {"url": "PHP.YAHOO_util_Loader.html#property_combine", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "combine"}, {"url": "PHP.YAHOO_util_Loader.html#property_comboBase", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "comboBase"}, {"url": "PHP.YAHOO_util_Loader.html#method_css", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_data"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_embed"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_json"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_raw"}, {"url": "PHP.YAHOO_util_Loader.html#method_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "data"}, {"url": "PHP.YAHOO_util_Loader.html#method_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "embed"}, {"url": "PHP.YAHOO_util_Loader.html#property_filterList", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "filterList"}, {"url": "PHP.YAHOO_util_Loader.html#method_getRemoteContent", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getRemoteContent"}, {"url": "PHP.YAHOO_util_Loader.html#method_getUrl", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getUrl"}, {"url": "PHP.YAHOO_util_Loader.html#method_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "json"}, {"url": "PHP.YAHOO_util_Loader.html#method_load", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "load"}, {"url": "PHP.YAHOO_util_Loader.html#property_loadOptional", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "loadOptional"}, {"url": "PHP.YAHOO_util_Loader.html#method_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "raw"}, {"url": "PHP.YAHOO_util_Loader.html#property_rollupsToTop", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "rollupsToTop"}, {"url": "PHP.YAHOO_util_Loader.html#method_script", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_data"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_embed"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_json"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_raw"}, {"url": "PHP.YAHOO_util_Loader.html#method_setLoaded", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "setLoaded"}, {"url": "PHP.YAHOO_util_Loader.html#method_tags", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "tags"}];
+ ALL_YUI_PROPS = [{"url": "PHP.YAHOO_util_Loader.html#method_addToCombo", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "addToCombo"}, {"url": "PHP.YAHOO_util_Loader.html#property_allowRollups", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "allowRollups"}, {"url": "PHP.YAHOO_util_Loader.html#property_base", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "base"}, {"url": "PHP.YAHOO_util_Loader.html#method_canJSON", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "canJSON"}, {"url": "PHP.YAHOO_util_Loader.html#property_combine", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "combine"}, {"url": "PHP.YAHOO_util_Loader.html#property_comboBase", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "comboBase"}, {"url": "PHP.YAHOO_util_Loader.html#method_css", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_data"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_embed"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_json"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_raw"}, {"url": "PHP.YAHOO_util_Loader.html#method_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "data"}, {"url": "PHP.YAHOO_util_Loader.html#method_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "embed"}, {"url": "PHP.YAHOO_util_Loader.html#property_filterList", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "filterList"}, {"url": "PHP.YAHOO_util_Loader.html#method_getAllDependencies", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getAllDependencies"}, {"url": "PHP.YAHOO_util_Loader.html#method_getComboLink", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getComboLink"}, {"url": "PHP.YAHOO_util_Loader.html#method_getContent", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getContent"}, {"url": "PHP.YAHOO_util_Loader.html#method_getLink", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getLink"}, {"url": "PHP.YAHOO_util_Loader.html#method_getLoadedModules", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getLoadedModules"}, {"url": "PHP.YAHOO_util_Loader.html#method_getLoadedModulesAsJSON", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getLoadedModulesAsJSON"}, {"url": "PHP.YAHOO_util_Loader.html#method_getProvides", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getProvides"}, {"url": "PHP.YAHOO_util_Loader.html#method_getRaw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getRaw"}, {"url": "PHP.YAHOO_util_Loader.html#method_getRemoteContent", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getRemoteContent"}, {"url": "PHP.YAHOO_util_Loader.html#method_getUrl", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getUrl"}, {"url": "PHP.YAHOO_util_Loader.html#method_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "json"}, {"url": "PHP.YAHOO_util_Loader.html#method_load", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "load"}, {"url": "PHP.YAHOO_util_Loader.html#property_loadOptional", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "loadOptional"}, {"url": "PHP.YAHOO_util_Loader.html#method_overrideBase", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "overrideBase"}, {"url": "PHP.YAHOO_util_Loader.html#method_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "raw"}, {"url": "PHP.YAHOO_util_Loader.html#property_rollupsToTop", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "rollupsToTop"}, {"url": "PHP.YAHOO_util_Loader.html#method_script", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_data"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_embed"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_json"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_raw"}, {"url": "PHP.YAHOO_util_Loader.html#method_setLoaded", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "setLoaded"}, {"url": "PHP.YAHOO_util_Loader.html#method_tags", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "tags"}];
</script>
</body>
</html>
View
1 api_docs/index.json
@@ -0,0 +1 @@
+[{"url": "PHP.YAHOO_util_Loader.html#method_addToCombo", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "addToCombo"}, {"url": "PHP.YAHOO_util_Loader.html#property_allowRollups", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "allowRollups"}, {"url": "PHP.YAHOO_util_Loader.html#property_base", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "base"}, {"url": "PHP.YAHOO_util_Loader.html#method_canJSON", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "canJSON"}, {"url": "PHP.YAHOO_util_Loader.html#property_combine", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "combine"}, {"url": "PHP.YAHOO_util_Loader.html#property_comboBase", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "comboBase"}, {"url": "PHP.YAHOO_util_Loader.html#method_css", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_data"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_embed"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_json"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_raw"}, {"url": "PHP.YAHOO_util_Loader.html#method_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "data"}, {"url": "PHP.YAHOO_util_Loader.html#method_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "embed"}, {"url": "PHP.YAHOO_util_Loader.html#property_filterList", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "filterList"}, {"url": "PHP.YAHOO_util_Loader.html#method_getAllDependencies", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getAllDependencies"}, {"url": "PHP.YAHOO_util_Loader.html#method_getComboLink", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getComboLink"}, {"url": "PHP.YAHOO_util_Loader.html#method_getContent", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getContent"}, {"url": "PHP.YAHOO_util_Loader.html#method_getLink", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getLink"}, {"url": "PHP.YAHOO_util_Loader.html#method_getLoadedModules", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getLoadedModules"}, {"url": "PHP.YAHOO_util_Loader.html#method_getLoadedModulesAsJSON", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getLoadedModulesAsJSON"}, {"url": "PHP.YAHOO_util_Loader.html#method_getProvides", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getProvides"}, {"url": "PHP.YAHOO_util_Loader.html#method_getRaw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getRaw"}, {"url": "PHP.YAHOO_util_Loader.html#method_getRemoteContent", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getRemoteContent"}, {"url": "PHP.YAHOO_util_Loader.html#method_getUrl", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getUrl"}, {"url": "PHP.YAHOO_util_Loader.html#method_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "json"}, {"url": "PHP.YAHOO_util_Loader.html#method_load", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "load"}, {"url": "PHP.YAHOO_util_Loader.html#property_loadOptional", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "loadOptional"}, {"url": "PHP.YAHOO_util_Loader.html#method_overrideBase", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "overrideBase"}, {"url": "PHP.YAHOO_util_Loader.html#method_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "raw"}, {"url": "PHP.YAHOO_util_Loader.html#property_rollupsToTop", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "rollupsToTop"}, {"url": "PHP.YAHOO_util_Loader.html#method_script", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_data"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_embed"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_json"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_raw"}, {"url": "PHP.YAHOO_util_Loader.html#method_setLoaded", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "setLoaded"}, {"url": "PHP.YAHOO_util_Loader.html#method_tags", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "tags"}]
View
1,629 api_docs/loader.php.html
1,629 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
121 api_docs/module_phploader.html
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <title>API: phploader (YUI Library)</title>
+
+ <link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
+ <link rel="stylesheet" type="text/css" href="assets/api.css" />
+
+ <script type="text/javascript" src="assets/api-js"></script>
+ <script type="text/javascript" src="assets/ac-js"></script>
+</head>
+
+<body id="yahoo-com">
+
+<div id="doc3" class="yui-t2">
+ <div id="hd">
+ <h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
+ <h3>phploader&nbsp; <span class="subtitle">1.0.0beta</span></h3>
+ <a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a>
+ &gt; <a href="./module_phploader.html" title="phploader">phploader</a>
+
+
+ <form onsubmit="return false">
+ <div id="propertysearch">
+ Search: <input autocomplete="off" id="searchinput" />
+ <div id="searchresults">
+ &nbsp;
+ </div>
+ </div>
+ </form>
+ </div>
+
+ <div id="bd">
+ <div id="yui-main">
+ <div class="yui-b">
+ <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
+ <fieldset>
+ <legend>Filters</legend>
+ <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
+ <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
+ <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
+ </fieldset>
+ </form>
+
+
+ <h3>Module: phploader
+
+
+
+ </h3>
+ <div class="description summary">
+ Used to specify JavaScript and CSS module requirements. It maintains a dependency
+tree for these modules so when a module is requested, all of the other modules it
+depends on are included as well. By default, the YUI Library is configured, and
+other modules and their dependencies can be added via PHP.
+ </div>
+
+
+
+ <div class="yui-gc">
+ <div class="yui-u first">
+
+ <p>This module contains the following classes:</p>
+ <script>
+ //var YUI_CLASS_LIST = [{"extends": {"superclass": {}, "events": {}, "configs": {}, "properties": {}, "methods": {}}, "description": "The YUI PHP loader base class which provides dynamic server-side loading for YUI", "guessedname": "PHP.YAHOO_util_Loader", "name": "PHP.YAHOO_util_Loader"}];
+ </script>
+ <div id="splash_classList">
+ <ul>
+ <li><a href="PHP.YAHOO_util_Loader.html" title="PHP.YAHOO_util_Loader" id="class_0">PHP.YAHOO_util_Loader</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="yui-u">
+
+ </div>
+ </div>
+
+ </div>
+ </div>
+ <div class="yui-b">
+ <div class="nav">
+
+ <div id="moduleList" class="module">
+ <h4>Modules</h4>
+ <ul class="content">
+ <li class="selected"><a href="module_phploader.html" title="phploader">phploader</a></li>
+ </ul>
+ </div>
+
+ <div id="classList" class="module">
+ <h4>Classes</h4>
+ <ul class="content">
+ <li class=""><a href="PHP.YAHOO_util_Loader.html" title="PHP.YAHOO_util_Loader">PHP.YAHOO_util_Loader</a></li>
+ </ul>
+ </div>
+
+ <div id="fileList" class="module">
+ <h4>Files</h4>
+ <ul class="content">
+ <li class=""><a href="loader.php.html" title="loader.php">loader.php</a></li>
+ </ul>
+ </div>
+
+
+
+
+
+ </div>
+ </div>
+ </div>
+ <div id="ft">
+ <hr />
+ Copyright &copy; 2009 Yahoo! Inc. All rights reserved.
+ </div>
+</div>
+<script type="text/javascript">
+ ALL_YUI_PROPS = [{"url": "PHP.YAHOO_util_Loader.html#method_addToCombo", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "addToCombo"}, {"url": "PHP.YAHOO_util_Loader.html#property_allowRollups", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "allowRollups"}, {"url": "PHP.YAHOO_util_Loader.html#property_base", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "base"}, {"url": "PHP.YAHOO_util_Loader.html#method_canJSON", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "canJSON"}, {"url": "PHP.YAHOO_util_Loader.html#property_combine", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "combine"}, {"url": "PHP.YAHOO_util_Loader.html#property_comboBase", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "comboBase"}, {"url": "PHP.YAHOO_util_Loader.html#method_css", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_data"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_embed"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_json"}, {"url": "PHP.YAHOO_util_Loader.html#method_css_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "css_raw"}, {"url": "PHP.YAHOO_util_Loader.html#method_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "data"}, {"url": "PHP.YAHOO_util_Loader.html#method_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "embed"}, {"url": "PHP.YAHOO_util_Loader.html#property_filterList", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "filterList"}, {"url": "PHP.YAHOO_util_Loader.html#method_getAllDependencies", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getAllDependencies"}, {"url": "PHP.YAHOO_util_Loader.html#method_getComboLink", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getComboLink"}, {"url": "PHP.YAHOO_util_Loader.html#method_getContent", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getContent"}, {"url": "PHP.YAHOO_util_Loader.html#method_getLink", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getLink"}, {"url": "PHP.YAHOO_util_Loader.html#method_getLoadedModules", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getLoadedModules"}, {"url": "PHP.YAHOO_util_Loader.html#method_getLoadedModulesAsJSON", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getLoadedModulesAsJSON"}, {"url": "PHP.YAHOO_util_Loader.html#method_getProvides", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getProvides"}, {"url": "PHP.YAHOO_util_Loader.html#method_getRaw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getRaw"}, {"url": "PHP.YAHOO_util_Loader.html#method_getRemoteContent", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getRemoteContent"}, {"url": "PHP.YAHOO_util_Loader.html#method_getUrl", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "getUrl"}, {"url": "PHP.YAHOO_util_Loader.html#method_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "json"}, {"url": "PHP.YAHOO_util_Loader.html#method_load", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "load"}, {"url": "PHP.YAHOO_util_Loader.html#property_loadOptional", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "loadOptional"}, {"url": "PHP.YAHOO_util_Loader.html#method_overrideBase", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "overrideBase"}, {"url": "PHP.YAHOO_util_Loader.html#method_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "raw"}, {"url": "PHP.YAHOO_util_Loader.html#property_rollupsToTop", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "property", "name": "rollupsToTop"}, {"url": "PHP.YAHOO_util_Loader.html#method_script", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_data", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_data"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_embed", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_embed"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_json", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_json"}, {"url": "PHP.YAHOO_util_Loader.html#method_script_raw", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "script_raw"}, {"url": "PHP.YAHOO_util_Loader.html#method_setLoaded", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "setLoaded"}, {"url": "PHP.YAHOO_util_Loader.html#method_tags", "access": "", "host": "PHP.YAHOO_util_Loader", "type": "method", "name": "tags"}];
+</script>
+</body>
+</html>
View
1 api_docs/raw.json
@@ -0,0 +1 @@
+{"majorversion": 2, "filemap": {"loader.php": {"classlist": ["PHP.YAHOO_util_Loader"], "name": "loader.php", "module": "phploader"}}, "modules": {"phploader": {"description": "Used to specify JavaScript and CSS module requirements. It maintains a dependency\ntree for these modules so when a module is requested, all of the other modules it \ndepends on are included as well. By default, the YUI Library is configured, and \nother modules and their dependencies can be added via PHP.", "submodules": [], "classlist": ["PHP.YAHOO_util_Loader"], "filelist": ["loader.php"], "subdata": {}, "name": "phploader"}}, "classmap": {"PHP.YAHOO_util_Loader": {"name": "PHP.YAHOO_util_Loader", "constructors": [{"params": [{"type": "string", "name": "yuiVersion", "description": " Defines which version of YUI metadata to load"}, {"type": "string", "name": "cacheKey", "description": " Unique APC cache key. This is combined with the YUI base\nso that updates to YUI will force a new cache entry. However, if your custom config \nchanges, this key should be changed (otherwise the old values will be used until the cache expires)."}, {"type": "array", "name": "modules", "description": " A list of custom modules"}, {"type": "boolean", "name": "noYUI", "description": " Pass true if you do not want the YUI metadata"}], "description": "The YAHOO_util_Loader class constructor"}], "namespace": "PHP", "module": "phploader", "methods": {"load": {"params": [{"type": "", "name": "string", "description": " $varname [, string $... ] List of component names"}], "description": "Used to load YUI and/or custom components"}, "getRaw": {"return": {"type": "string", "description": "raw source"}, "params": [{"type": "string", "name": "name", "description": " The module name you wish to fetch the source from"}], "description": "Retrieve the raw source contents for a given module name"}, "getRemoteContent": {"return": {"type": "", "description": "raw source"}, "params": [{"type": "string", "name": "url", "description": " URL to fetch data from"}], "description": "Retrieve the contents of a remote resource"}, "getLoadedModules": {"return": {"type": "array", "description": ""}, "description": "Identifies what module(s) have been loaded via the load method and/or marked as loaded via the setLoaded method"}, "overrideBase": {"params": [{"type": "string", "name": "base", "description": " Base path (e.g.) 2.6.0/build"}, {"type": "array", "name": "modules", "description": " Module names of which to override base"}], "description": "Used to override the base dir for specific set of modules (Note: not supported when using the combo service)"}, "raw": {"return": {"type": "string", "description": "Returns the raw JavaScript and/or CSS code inline without the actual style tags"}, "params": [{"type": "string", "name": "moduleType", "description": ""}, {"type": "boolean", "name": "allowRollups", "description": ""}, {"type": "boolean", "name": "skipSort", "description": ""}], "description": "Used to produce the raw Javacript and CSS code inline without the actual script or style tags", "guessedname": "moduleType", "guessedtype": "function"}, "getLink": {"return": {"type": "string", "description": "link or script include"}, "params": [{"type": "string", "name": "name", "description": " The module name to fetch the include for"}, {"type": "string", "name": "type", "description": " Resource type (i.e.) YUI_JS or YUI_CSS"}], "description": "Retrieve the link or script include for a given module name and resource type"}, "getProvides": {"return": {"type": "array", "description": ""}, "params": [{"type": "string", "name": "name", "description": " Module name"}], "description": "Identifies what module(s) are provided by a given module name (e.g.) yaho-dom-event provides yahoo, dom, and event"}, "script_json": {"return": {"type": "string", "description": "Returns a JSON object containing urls for each JavaScript component"}, "description": "Used to fetch a JSON object with the required JavaScript components"}, "script": {"return": {"type": "string", "description": ""}, "description": "Used to output each of the required script tags"}, "css_data": {"return": {"type": "array", "description": "Returns an array of data about each of the identified JavaScript components"}, "description": "Used to fetch an array of the required CSS components"}, "getLoadedModulesAsJSON": {"return": {"type": "json", "description": ""}, "description": "Identifies what module(s) have been loaded via the load method and/or marked as loaded via the setLoaded method"}, "addToCombo": {"params": [{"type": "string", "name": "name", "description": " The module name to add"}, {"type": "string", "name": "type", "description": " Resource type (i.e.) YUI_JS or YUI_CSS"}], "description": "Adds a module the combo collection for a specified resource type"}, "json": {"return": {"type": "string", "description": "Returns a JSON object with the required JavaScript and CSS components"}, "params": [{"type": "string", "name": "moduleType", "description": ""}, {"type": "boolean", "name": "allowRollups", "description": ""}, {"type": "boolean", "name": "skipSort", "description": ""}, {"type": "boolean", "name": "full", "description": ""}], "description": "Used to fetch a JSON object with the required JavaScript and CSS components", "guessedname": "moduleType", "guessedtype": "function"}, "getContent": {"return": {"type": "string", "description": "style or script node with embedded source"}, "params": [{"type": "string", "name": "name", "description": " The module name to fetch the source from"}, {"type": "string", "name": "type", "description": " Resource type (i.e.) YUI_JS or YUI_CSS"}], "description": "Retrieve the style or script node with embedded source for a given module name and resource type"}, "css": {"return": {"type": "string", "description": ""}, "description": "Used to output each of the required link tags"}, "getUrl": {"params": [{"type": "string", "name": "name", "description": " YUI component name"}], "description": "Retrieve the calculated url for the component in question"}, "getComboLink": {"return": {"type": "string", "description": "link or script include"}, "params": [{"type": "string", "name": "type", "description": " Resource type (i.e.) YUI_JS or YUI_CSS"}], "description": "Retrieves the combo link or script include for the currently loaded modules of a specific resource type"}, "css_json": {"return": {"type": "string", "description": "Returns a JSON object containing urls for each CSS component"}, "description": "Used to fetch a JSON object with the required CSS components"}, "tags": {"return": {"type": "string", "description": ""}, "params": [{"type": "string", "name": "moduleType", "description": " Type of html tag to return (i.e.) js or css. Default is both."}, {"type": "boolean", "name": "skipSort", "description": ""}], "description": "Used to output each of the required html tags (i.e.) script or link", "guessedname": "moduleType", "guessedtype": "function"}, "css_raw": {"return": {"type": "string", "description": "Returns the raw CSS code inline without the actual style tags"}, "description": "Used to produce the raw CSS code inline without the actual style tags"}, "script_embed": {"return": {"type": "string", "description": "Returns the script tag(s) with the JavaScript inline"}, "description": "Used to embed the raw JavaScript inline"}, "script_raw": {"return": {"type": "string", "description": "Returns the raw JavaScript code inline without the actual script tags"}, "description": "Used to produce the raw JavaScript code inline without the actual script tags"}, "data": {"return": {"type": "string", "description": ""}, "params": [{"type": "string", "name": "moduleType", "description": " Type of html tag to return (i.e.) js or css. Default is both."}, {"type": "boolean", "name": "allowRollups", "description": ""}, {"type": "boolean", "name": "skipSort", "description": ""}], "description": "Used to output an Array which contains data about the required JavaScript & CSS components", "guessedname": "moduleType", "guessedtype": "function"}, "canJSON": {"return": {"type": "", "description": "boolean"}, "description": "Detects if environment supports JSON encode/decode"}, "getAllDependencies": {"return": {"type": "array", "description": ""}, "params": [{"type": "string", "name": "mname", "description": " Module name"}, {"type": "boolean", "name": "loadOptional", "description": " Load optional dependencies"}, {"type": "array", "name": "completed", "description": ""}], "description": "Identify dependencies for a give module name", "guessedname": "loadOptional", "guessedtype": "function"}, "css_embed": {"return": {"type": "string", "description": "(e.g.) Returns the style tag(s) with the CSS inline"}, "description": "Used to embed the raw CSS"}, "setLoaded": {"params": [{"type": "", "name": "string", "description": " $varname [, string $... ] List of module names"}], "description": "Used to specify modules that are already on the page that should not be loaded again"}, "embed": {"return": {"type": "string", "description": "Returns the style tag(s) with the CSS inline and/or the script tag(s) with the JavaScript inline"}, "params": [{"type": "string", "name": "moduleType", "description": " Type of html tag to return (i.e.) js or css. Default is both."}, {"type": "boolean", "name": "skipSort", "description": ""}], "description": "Used to output each of the required html tags inline (i.e.) script and/or style", "guessedname": "moduleType", "guessedtype": "function"}, "script_data": {"return": {"type": "array", "description": "Returns an array of data about each of the identified JavaScript components"}, "description": "Used to fetch an array of the required JavaScript components"}}, "file": "loader.php", "shortname": "YAHOO_util_Loader", "properties": {"comboBase": {"default": "http://yui.yahooapis.com/combo?", "type": "string", "description": "The base path to the combo service. Uses the Yahoo! CDN service by default.\nYou do not have to set this property to use the combine option. YUI PHP Loader ships \nwith an intrinsic, lightweight combo-handler as well (see combo.php).", "guessedname": "comboBase", "guessedtype": "property"}, "allowRollups": {"default": "true", "type": "boolean", "description": "Should we allow rollups", "guessedname": "allowRollups", "guessedtype": "property"}, "loadOptional": {"default": "false", "type": "boolean", "description": "Whether or not to load optional dependencies for the requested modules", "guessedname": "loadOptional", "guessedtype": "property"}, "filterList": {"default": "null", "type": "array", "description": "A list of modules to apply the filter to. If not supplied, all\nmodules will have any defined filters applied. Tip: Useful for debugging.", "guessedname": "filterList", "guessedtype": "property"}, "base": {"default": "http://yui.yahooapis.com/[YUI VERSION]/build/", "type": "string", "description": "The base directory", "guessedname": "base", "guessedtype": "property"}, "combine": {"default": "false", "type": "boolean", "description": "Combined into a single request using the combo service to pontentially reduce the number of \nhttp requests required. This option is not supported when loading custom modules.", "guessedname": "combine", "guessedtype": "property"}, "rollupsToTop": {"default": "false", "type": "boolean", "description": "Force rollup modules to be sorted as moved to the top of\nthe stack when performing an automatic rollup. This has a very small performance consequence.", "guessedname": "rollupsToTop", "guessedtype": "property"}}, "description": "The YUI PHP loader base class which provides dynamic server-side loading for YUI"}}, "version": "1.0.0beta", "namespaces": ["PHP"]}
View
1 examples/inc/phploader.inc
@@ -3,6 +3,7 @@
<ul>
<li><a href='phploader-basic.php'>Using YUI PHP Loader to Load the Calendar Control (Basic)</a></li>
<li><a href='phploader-advanced.php'>Using YUI PHP Loader to Load the Calendar Control (Advanced)</a></li>
+ <li><a href='phploader-mixed-loading.php'>Mixed Loading Methods</a></li>
<li><a href='phploader-custom-modules.php'>Adding Custom (Non-YUI) Content with YUI PHP Loader</a></li>
<li><a href='phploader-custom-modules-with-yui.php'>Adding Custom Modules with YUI Dependencies</a></li>
<li><a href='phploader-local-combo-handler.php'>Using the Local Combo Handler</a></li>
View
1 examples/index.html
@@ -58,6 +58,7 @@ <h1 class="firstContent">
</h1>
<li><a href='phploader-basic.php'>Using PHP Loader to Load the Calendar Control (Basic)</a>: This example demonstrates a simple implementation in which we bring in the YUI Calendar Control — and its JavaScript and CSS dependencies — using the PHP Loader Utility.</li>
<li><a href='phploader-advanced.php'>Using PHP Loader to Load the Calendar Control (Advanced)</a>: This example demonstrates a more advanced implementation in which we bring in the YUI Calendar Control — and its JavaScript and CSS dependencies — using the PHP Loader Utility. The major difference between this and the previous example is that the CSS and JavaScript are output via separate method calls allowing for more control/optimization.</li>
+ <li><a href='phploader-mixed-loading.php'>Mixed Loading Methods</a>: This example demonstrates a more advanced implementation in which we bring in the YUI Calendar Control — and its JavaScript and CSS dependencies — using the PHP Loader Utility. The major difference between this and the previous example is that we mix static and dynamic loading of module dependencies.</li>
<li><a href='phploader-custom-modules.php'>Adding Custom (Non-YUI) Content with PHP Loader</a>: PHP Loader can be used to add YUI components to the page, but it can also be used to add other components that you create yourself (or that you pull from a third-party source). This example shows one simple way to pull in external content with PHP Loader.</li>
<li><a href='phploader-custom-modules-with-yui.php'>Adding Custom Modules with YUI Dependencies</a>: PHP Loader can be used to add YUI components to the page, but it can also be used to add other components that you create yourself (or that you pull from a third-party source). This example shows how to pull in external content that has dependencies on YUI components.</li>
<li><a href='phploader-local-combo-handler.php'>Using the Local Combo Handler</a>: PHP Loader ships with intrinsic combo-handling support. This feature will allow PHP Loader to combine files without relying on a remote combo-service such as the one outlined <a href="http://developer.yahoo.com/yui/articles/hosting/?#combo">here</a>. It should also prove useful in environments where SSL is required and/or where including scripts from remote servers is prohibited.</li>
View
104 examples/phploader-mixed-loading.php
@@ -0,0 +1,104 @@
+<?PHP include("./inc/header.inc");?>
+
+ <div id="yui-main">
+ <div class="yui-b">
+ <div class="yui-ge">
+ <div class="yui-u first example">
+
+
+ <div class="promo">
+ <h1>YUI PHP Loader Utility: Mixed Loading Methods</h1>
+
+ <div class="exampleIntro">
+ <p>In this example, we bring YUI components onto the page using a mixture of static and dynamic loading methods. A static script include is used to bring in the <a href="http://developer.yahoo.com/yui/yahoo/">Yahoo Global Object</a>, the <a href="http://developer.yahoo.com/yui/dom/">Dom Collection</a>, the <a href="http://developer.yahoo.com/yui/event/">Event Utility</a> components. The <a href="http://developer.yahoo.com/yui/phploader/">YUI PHP Loader Utility</a> is used to load the Calendar component. This example implements YUI PHP Loader via a <code>YAHOO_util_Loader</code> instance. We include the YUI PHP Loader script file, then specify in configuration which component we want loaded on the page, which components to skip loading since they are already present on the page, and what we want to do once everything <em>is</em> loaded.</p>
+ <p>This example loads in new window to demonstrate a somewhat more advanced use case &mdash; a page with no other content, wherein the Loader is introducing YUI into a simple context.</p>
+ </div>
+
+ <div class="example-container module newWindow">
+ <div id="example-canvas" class="bd">
+ <p class="newWindowButton yui-skin-sam"><span id="newWindowLink"><span class="first-child"><a href="phploader-mixed-loading_source.php" target="_blank">View example in new window.</a></span></span>
+ </div>
+
+ </div>
+ </div>
+
+ <h2 class="first">Advanced Use Case: Mixed Loading Methods</h2>
+
+<p>This example implements the <a href="http://developer.yahoo.com/yui/phploader/">YUI PHP Loader Utility</a> to load the <a href="http://developer.yahoo.com/yui/calendar/">Calendar Control</a>.</p>
+
+<p>The workflow happens in four steps:</p>
+<ol>
+ <li><strong>Include the YUI PHP Loader class file</strong></li>
+ <li><strong>Create a <code>YAHOO_util_YUILoader</code> instance:</strong> Set configuration flags as needed, call the load method with a list of components to load, notify the loader of any modules to avoid loading, and define what to do once the components are loaded (in this case, once the components are loaded we instantiate a Calendar Control on the page).</li>
+ <li><strong>Ouput YUI CSS &lt;link&gt; nodes</strong></li>
+ <li><strong>Ouput YUI JavaScript &lt;script&gt; nodes </strong></li>
+</ol>
+<p>Here's what that looks like in terms of raw source &mdash; this is the full source code for this example: </p>
+<textarea name="code" class="php" cols="60" rows="1">
+&lt;?PHP
+include("loader.php");
+$loader = new YAHOO_util_Loader("<?PHP echo $yuiCurrentVersion;?>");
+
+//Specify YUI components to load
+$loader->load("calendar");
+?&gt;
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>YUI PHP Loader Utility Advanced Example: Mixed Loading Methods</title>
+ &lt;?PHP
+ //Output the CSS link tags
+ echo $loader->css();
+ ?&gt;
+</head>
+
+<body class="yui-skin-sam">
+
+<h1>YUI PHP Loader Utility Advanced Example: Mixed Loading Methods</h1>
+
+<p>In this example, we bring a YUI component onto the page using the <a href="http://developer.yahoo.com/yui/phploader/">YUI PHP Loader Utility</a>.
+This example implements YUI PHP Loader via a <code>YAHOO_util_Loader</code> instance. We include the YUI PHP Loader class file, then specify in
+configuration which component we want loaded on the page &mdash; and what we want to do once it <em>is</em> loaded. The main difference between
+this example and the previous advanced example is that we have mixed the component loading methods. The Calender component requires the Yahoo, Dom,
+and Event modules. In the previous example we let PHP Loader bring these into the document for us. However, in this case we placed a static
+script include into the document that brings in these resources. We do not wish to have PHP Loader duplicate the loading of these components so
+we utilize the <em>setLoaded</em> method to notify PHP Loader that we already have these components in the document and to skip loading them a second time.</p>
+
+<div id="calendar_container"></div>
+
+<script type="text/javascript" src="http://yui.yahooapis.com/<?PHP echo $yuiCurrentVersion;?>/build/yahoo-dom-event/yahoo-dom-event.js"></script>
+&lt;?PHP
+//Output the script tags (but don't re-include yahoo-dom-event)
+$loader->setLoaded("yahoo", "dom", "event");
+echo $loader->script();
+?&gt;
+<script type="text/javascript">
+ YAHOO.util.Event.onAvailable("calendar_container", function() {
+ var myCal = new YAHOO.widget.Calendar("mycal_id", "calendar_container");
+ myCal.render();
+ })
+</script>
+</body>
+</html>
+</textarea>
+
+<p>This code executes the following steps in order:</p>
+<ol>
+ <li><strong>YUI PHP Loader loads taking the configuration settings into account.</strong> It gets instructions about what components are required and how to configure them.</li>
+ <li><strong>YUI PHP Loader checks the dependency tree.</strong> Loader knows that the Calendar component requires the <a href="http://developer.yahoo.com/yui/yahoo/">Yahoo Global Object</a>, the <a href="http://developer.yahoo.com/yui/dom/">Dom Collection</a>, and the <a href="http://developer.yahoo.com/yui/event/">Event Utility</a> components. Normally the loader would bring these dependencies into the page for us, but in this case the <em>setLoaded</em> method was used to have the loader avoid loading these resources since they were already included via a static script node.</li>
+</ol>
+
+</div>
+
+<div class="yui-u">
+ <div id="examples">
+ <?PHP include("./inc/phploader.inc"); ?>
+ </div>
+ <div id="module">
+ <?PHP include("./inc/resources.inc"); ?>
+ </div>
+</div>
+
+</div>
+</div>
+<?PHP include "./inc/footer.inc" ?>
View
47 examples/phploader-mixed-loading_source.php
@@ -0,0 +1,47 @@
+<?PHP
+include("./inc/config.inc");
+include("../phploader/loader.php");
+$loader = new YAHOO_util_Loader($yuiCurrentVersion);
+
+//Specify YUI components to load
+$loader->load("calendar");
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>YUI PHP Loader Utility Advanced Example: Mixed Loading Methods</title>
+ <?PHP
+ //Output the CSS link tags
+ echo $loader->css();
+ ?>
+</head>
+
+<body class="yui-skin-sam">
+
+ <h1>YUI PHP Loader Utility Advanced Example: Mixed Loading Methods</h1>
+
+ <p>In this example, we bring a YUI component onto the page using the <a href="http://developer.yahoo.com/yui/phploader/">YUI PHP Loader Utility</a>.
+ This example implements YUI PHP Loader via a <code>YAHOO_util_Loader</code> instance. We include the YUI PHP Loader class file, then specify in
+ configuration which component we want loaded on the page &mdash; and what we want to do once it <em>is</em> loaded. The main difference between
+ this example and the previous advanced example is that we have mixed the component loading methods. The Calender component requires the Yahoo, Dom,
+ and Event modules. In the previous example we let PHP Loader bring these into the document for us. However, in this case we placed a static
+ script include into the document that brings in these resources. We do not wish to have PHP Loader duplicate the loading of these components so
+ we utilize the <em>setLoaded</em> method to notify PHP Loader that we already have these components in the document and to skip loading them a second time.</p>
+
+ <div id="calendar_container"></div>
+
+ <script type="text/javascript" src="http://yui.yahooapis.com/<?PHP echo $yuiCurrentVersion; ?>/build/yahoo-dom-event/yahoo-dom-event.js"></script>
+ <?PHP
+ //Output the script tags (but don't re-include yahoo-dom-event)
+ $loader->setLoaded("yahoo", "dom", "event");
+ echo $loader->script();
+ ?>
+ <script type="text/javascript">
+ YAHOO.util.Event.onAvailable("calendar_container", function() {
+ var myCal = new YAHOO.widget.Calendar("mycal_id", "calendar_container");
+ myCal.render();
+ })
+ </script>
+</body>
+</html>
View
84 phploader/loader.php
@@ -425,7 +425,7 @@ function script() {
/**
* Used to output each of the required link tags
* @method css
- * @return {string} (e.g.)
+ * @return {string}
*/
function css() {
return $this->tags(YUI_CSS);
@@ -581,13 +581,10 @@ function raw($moduleType=null, $allowRollups=false, $skipSort=false) {
}
function log($msg) {
- //error_log($msg, 3, "yui_loader_log.txt");
error_log($msg, 0);
- //print_r("<p>" . $msg . "</p>");
}
function accountFor($name) {
-
//$this->log("accountFor: " . $name);
$this->accountedFor[$name] = $name;
@@ -699,9 +696,16 @@ function skinSetup($name) {
}
return $skinName;
-
}
-
+
+ /**
+ * Identify dependencies for a give module name
+ * @method getAllDependencies
+ * @param {string} mname Module name
+ * @param {boolean} loadOptional Load optional dependencies
+ * @param {array} completed
+ * @return {array}
+ */
function getAllDependencies($mname, $loadOptional=false, $completed=array()) {
// $this->log("Building deps list for " . $mname);
@@ -1301,7 +1305,7 @@ function getUrl($name) {
* Retrieve the contents of a remote resource
* @method getRemoteContent
* @param {string} url URL to fetch data from
- * @return
+ * @return raw source
*/
function getRemoteContent($url) {
@@ -1340,7 +1344,13 @@ function getRemoteContent($url) {
return $remote_content;
}
-
+
+ /**
+ * Retrieve the raw source contents for a given module name
+ * @method getRaw
+ * @param {string} name The module name you wish to fetch the source from
+ * @return {string} raw source
+ */
function getRaw($name) {
if(!$this->curlAvail) {
return "<!--// cURL was not detected, so the content cannot be fetched -->";
@@ -1350,16 +1360,20 @@ function getRaw($name) {
return $this->getRemoteContent($url);
}
+ /**
+ * Retrieve the style or script node with embedded source for a given module name and resource type
+ * @method getContent
+ * @param {string} name The module name to fetch the source from
+ * @param {string} type Resource type (i.e.) YUI_JS or YUI_CSS
+ * @return {string} style or script node with embedded source
+ */
function getContent($name, $type) {
-
if(!$this->curlAvail) {
return "<!--// cURL was not detected, so the content cannot be fetched/embedded -->" . $this->getLink($name, $type);
}
$url = $this->getUrl($name);
- //$this->log("URL: " . $url);
-
if (!$url) {
return '<!-- PATH FOR "'. $name . '" NOT SPECIFIED -->';
} else if ($type == YUI_CSS) {
@@ -1367,11 +1381,16 @@ function getContent($name, $type) {
} else {
return '<script type="text/javascript">' . $this->getRemoteContent($url) . '</script>';
}
-
}
-
+
+ /**
+ * Retrieve the link or script include for a given module name and resource type
+ * @method getLink
+ * @param {string} name The module name to fetch the include for
+ * @param {string} type Resource type (i.e.) YUI_JS or YUI_CSS
+ * @return {string} link or script include
+ */
function getLink($name, $type) {
-
$url = $this->getUrl($name);
if (!$url) {
@@ -1383,6 +1402,12 @@ function getLink($name, $type) {
}
}
+ /**
+ * Retrieves the combo link or script include for the currently loaded modules of a specific resource type
+ * @method getComboLink
+ * @param {string} type Resource type (i.e.) YUI_JS or YUI_CSS
+ * @return {string} link or script include
+ */
function getComboLink($type) {
$url = '';
@@ -1416,6 +1441,12 @@ function getComboLink($type) {
return $url;
}
+ /**
+ * Adds a module the combo collection for a specified resource type
+ * @method addToCombo
+ * @param {string} name The module name to add
+ * @param {string} type Resource type (i.e.) YUI_JS or YUI_CSS
+ */
function addToCombo($name, $type) {
$pathToModule = $this->comboDefaultVersion . '/build/' . $this->modules[$name][YUI_PATH];
if ($type == YUI_CSS) {
@@ -1437,10 +1468,21 @@ function addToCombo($name, $type) {
}
}
+ /**
+ * Detects if environment supports JSON encode/decode
+ * @method canJSON
+ * @return boolean
+ */
function canJSON() {
return $this->jsonAvail;
}
-
+
+ /**
+ * Identifies what module(s) are provided by a given module name (e.g.) yaho-dom-event provides yahoo, dom, and event
+ * @method getProvides
+ * @param {string} name Module name
+ * @return {array}
+ */
function getProvides($name) {
$p = array($name);
if (isset($this->modules[$name])) {
@@ -1454,7 +1496,12 @@ function getProvides($name) {
return $p;
}
-
+
+ /**
+ * Identifies what module(s) have been loaded via the load method and/or marked as loaded via the setLoaded method
+ * @method getLoadedModules
+ * @return {array}
+ */
function getLoadedModules() {
$loaded = array();
foreach ($this->loaded as $i=>$value) {
@@ -1471,6 +1518,11 @@ function getLoadedModules() {
return $loaded;
}
+ /**
+ * Identifies what module(s) have been loaded via the load method and/or marked as loaded via the setLoaded method
+ * @method getLoadedModulesAsJSON
+ * @return {json}
+ */
function getLoadedModulesAsJSON() {
if (!$this->canJSON()) {
return "{\"Error\", \"json library not available\"}";

0 comments on commit 2fac560

Please sign in to comment.
Something went wrong with that request. Please try again.