Index: sandbox/2.4-expresso-api/phpgwapi/templates/default/login_default.php
===================================================================
--- sandbox/2.4-expresso-api/phpgwapi/templates/default/login_default.php	(revision 5281)
+++ sandbox/2.4-expresso-api/phpgwapi/templates/default/login_default.php	(revision 5888)
@@ -177,4 +177,46 @@
 			else
 				$_POST['login'] = $_POST['user'];
+
+			/**
+			 * LOGIN OAUTH POR CURL
+			 */
+			$ch = curl_init();
+
+			$param  = 'grant_type=password';
+			$param .= '&client_id=' . $GLOBALS['oauth']['client_id'];
+			$param .= '&client_secret=' . $GLOBALS['oauth']['client_secret'];
+			$param .= '&username=' . $_POST['user'];
+			$param .= '&password=' . $_POST['passwd'];
+
+			// set URL and other appropriate options
+			curl_setopt($ch, CURLOPT_URL, $GLOBALS['oauth']['url_token']);
+			curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: */*'));
+			curl_setopt($ch, CURLOPT_POST, TRUE);
+			curl_setopt($ch, CURLOPT_POSTFIELDS, $param);
+			curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);  //configura para nao imprimir a saida na tela
+			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);//Passe um nï¿œmero long como parï¿œmetro que contï¿œm o limite de tempo, em segundos, que vocï¿œ permite as funï¿œï¿œes CURL levar. 
+
+			// grab URL and pass it to the browser
+			$res = curl_exec($ch);
+			
+			// close cURL resource, and free up system resources
+			curl_close($ch);
+			$a = json_decode($res);
+	
+			if ( isset($a->access_token) ) {
+				$_SESSION['oauth']['access_token'] = $a->access_token;
+				$_SESSION['oauth']['expires_in'] = $a->expires_in;
+				$_SESSION['oauth']['token_type'] = $a->token_type;
+				$_SESSION['oauth']['scope'] = $a->scope;
+				$_SESSION['oauth']['refresh_token'] = $a->refresh_token;
+				
+				
+			}
+			else {
+			}
+			/**
+			 * ####################
+			 */
+
 		}
 		if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' &&
@@ -598,5 +640,5 @@
 	if(isset($ultima_revisao)) $tmpl->set_var('ultima_rev','<br>' . $ultima_revisao);
 
-	// Adiciona código personalizado de outro template
+	// Adiciona cï¿œdigo personalizado de outro template
 	// que esteja utilizando o login_default.php
 	if(is_file('.'.$template_dir.'/login.inc.php')) {
Index: sandbox/2.4-expresso-api/.htaccess
===================================================================
--- sandbox/2.4-expresso-api/.htaccess	(revision 5419)
+++ sandbox/2.4-expresso-api/.htaccess	(revision 5888)
@@ -126,4 +126,5 @@
 RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|HEAD)$ [NC]
 RewriteRule ^.*$ - [F] 
+RewriteRule ^rest(.*)$ prototype/rest/$1 [QSA,L]
 
 #
Index: sandbox/2.4-expresso-api/prototype/services/OpenLDAP.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/services/OpenLDAP.php	(revision 5441)
+++ sandbox/2.4-expresso-api/prototype/services/OpenLDAP.php	(revision 5888)
@@ -19,5 +19,5 @@
 	if( isset($criteria["order"]) )
 	    ldap_sort( $this->con, $sr, $criteria["order"] ); 
-	
+		
 	return  self::_formatEntries( ldap_get_entries( $this->con, $sr ) , $map);
     }
Index: sandbox/2.4-expresso-api/prototype/me.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/me.php	(revision 5399)
+++ sandbox/2.4-expresso-api/prototype/me.php	(revision 5888)
@@ -4,5 +4,5 @@
 
 $me = Controller::read(array('concept' => 'user', 'service' => 'OpenLDAP'  , 'id' => Config::me('uidNumber')));
-
+$me['token'] = $_SESSION['oauth']['access_token'];  
 echo json_encode( $me );
 
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_cache.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_cache.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_cache.dashboard.html	(revision 5888)
@@ -0,0 +1,118 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>cache</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [0,0,0,0,0,0,1,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[50,5,"<a href=\"api_cache_MemoryCache.php.html#30\">MemoryCache<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">cache</td></tr>
+      <tr><td><div align="center"><p><a href="api_cache.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="api_cache_MemoryCache.php.html#105">MemoryCache::clearAll</a> (0%)</li>
+              <li><a href="api_cache_MemoryCache.php.html#97">MemoryCache::clear</a> (0%)</li>
+              <li><a href="api_cache_MemoryCache.php.html#43">MemoryCache::__construct</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/services.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/services.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/services.html	(revision 5888)
@@ -0,0 +1,146 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>services</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">services</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="services.html">services</a> (<a href="services.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="68.92%">
+              <div class="size butter"  style="width:68.924302788845%" title="68.92%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">68.92%</td>
+          <td class="coverNumMed">173 / 251</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="32.56%">
+                <div class="size scarlet_red"  style="width:32.558139534884%" title="32.56%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">32.56%</td>
+          <td class="coverNumLo">14 / 43</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="services_OpenLDAP.php.html">OpenLDAP.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="78.12%">
+              <div class="size chameleon"  style="width:78.125%" title="78.12%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">78.12%</td>
+          <td class="coverNumHi">75 / 96</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="26.32%">
+                <div class="size scarlet_red"  style="width:26.315789473684%" title="26.32%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">26.32%</td>
+          <td class="coverNumLo">5 / 19</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="services_PostgreSQL.php.html">PostgreSQL.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="63.23%">
+              <div class="size butter"  style="width:63.225806451613%" title="63.23%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">63.23%</td>
+          <td class="coverNumMed">98 / 155</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="37.50%">
+                <div class="size butter"  style="width:37.5%" title="37.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">37.50%</td>
+          <td class="coverNumMed">9 / 24</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/yahoo-dom-event.js
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/yahoo-dom-event.js	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/yahoo-dom-event.js	(revision 5888)
@@ -0,0 +1,14 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
+}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
+if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
+if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
+if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
+/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
+if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
+}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/style.css
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/style.css	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/style.css	(revision 5888)
@@ -0,0 +1,500 @@
+/* All views: initial background and text color */
+body
+{
+  background-color: #fff;
+  color: #2e3436;
+  font-family: arial, helvetica, sans-serif;
+  font-size: 12px;
+  margin: 0 auto;
+  width: 100%;
+}
+
+/* All views: standard link format*/
+a:link
+{
+  color: #2e3436;
+  text-decoration: underline;
+}
+
+/* All views: standard link - visited format */
+a:visited
+{
+  color: #2e3436;
+  text-decoration: underline;
+}
+
+/* All views: standard link - activated format */
+a:active
+{
+  color: #2e3436;
+  text-decoration: underline;
+}
+
+/* All views: main title format */
+td.title
+{
+  text-align: center;
+  padding: 10px;
+  font-family: sans-serif;
+  font-style: italic;
+  font-weight: bold;
+  font-size: 1.6em;
+}
+
+/* All views: header item format */
+td.headerItem
+{
+  text-align: right;
+  padding-right: 6px;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* All views: header item value format */
+td.headerValue
+{
+  text-align: left;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* All views: header legend item format */
+td.legendItem
+{
+  text-align: right;
+  padding-right: 6px;
+  padding-top: 10px;
+  padding-bottom: 2px;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* All views: header legend item value format */
+td.legendValue
+{
+  text-align: left;
+  padding-top: 10px;
+  padding-bottom: 2px;
+  color:  #2e3436;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* All views: color of horizontal ruler */
+td.ruler
+{
+  background-color: #d3d7cf;
+}
+
+/* All views: version string format */
+td.versionInfo
+{
+  text-align: center;
+  padding-top: 2px;
+  font-family: sans-serif;
+  font-style: italic;
+}
+
+/* Directory view/File view (all)/Test case descriptions:
+table headline format */
+td.tableHead
+{
+  text-align: center;
+  color: #ffffff;
+  background-color: #555753;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* Directory view/File view (all): filename entry format */
+td.coverItem, td.coverDirectory, td.coverFile
+{
+  text-align: left;
+  padding-left: 10px;
+  padding-right: 20px;
+  background-color: #d3d7cf;
+  font-family: monospace;
+}
+
+td.coverDirectory
+{
+  font-weight: bold;
+}
+
+/* Directory view/File view (all): bar-graph entry format*/
+td.coverBar
+{
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #d3d7cf;
+  text-align:center;
+  width: 100px;
+}
+
+/* Directory view/File view (all): bar-graph outline color */
+div.coverBarOutline
+{
+  background-color: #fff;
+  border: 1px solid #2e3436;
+  height: 10px;
+  overflow:hidden;
+  width: 100px;
+}
+
+/* Directory view/File view (all): common style for bar-graph  */
+div.coverBarOutline div.size
+{
+    height: 10px; float:left;
+}
+
+/* Directory view/File view (all): bar-graph color no coverage rate */
+div.coverBarOutline div.snow
+{
+    background-color:#fff;
+}
+
+/* Directory view/File view (all): bar-graph color for low coverage rate */
+div.coverBarOutline div.scarlet_red
+{
+    background-color:#ef2929;
+}
+
+/* Directory view/File view (all): bar-graph color for middle coverage rate */
+div.coverBarOutline div.butter
+{
+    background-color:#fce94f;
+}
+
+/* Directory view/File view (all):  bar-graph color for high coverage rate */
+div.coverBarOutline div.chameleon
+{
+    background-color:#8ae234;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+no coverage rate */
+td.coverPerNone
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #d3d7cf;
+  font-weight: bold;
+}
+
+/* Directory view/File view (all): line count entry for files with
+no coverage rate */
+td.coverNumNone
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #d3d7cf;
+  white-space: nowrap;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+high coverage rate */
+td.coverPerHi
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #8ae234;
+  font-weight: bold;
+}
+
+/* Directory view/File view (all): line count entry for files with
+high coverage rate */
+td.coverNumHi
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #8ae234;
+  white-space: nowrap;
+}
+
+/* Directory view/File view (all): legend entry for high coverage
+rate */
+span.coverLegendHi
+{
+  text-align: center;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #8ae234;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+medium coverage rate */
+td.coverPerMed
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #fce94f;
+  font-weight: bold;
+}
+
+/* Directory view/File view (all): line count entry for files with
+medium coverage rate */
+td.coverNumMed
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #fce94f;
+  white-space: nowrap;
+}
+
+/* Directory view/File view (all): legend entry for medium coverage
+rate */
+span.coverLegendMed
+{
+  text-align: center;
+  padding-left: 10px;
+  padding-right: 10px;
+  margin-top: 5px;
+  margin-bottom: 5px;
+  margin-right: 2px;
+  background-color: #fce94f;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+low coverage rate */
+td.coverPerLo
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #f57900;
+  font-weight: bold;
+}
+
+/* Directory view/File view (all): line count entry for files with
+low coverage rate */
+td.coverNumLo
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #f57900;
+  white-space: nowrap;
+}
+
+/* Directory view/File view (all): legend entry for low coverage
+rate */
+span.coverLegendLo
+{
+  text-align: center;
+  padding-left: 10px;
+  padding-right: 10px;
+  margin-right: 2px;
+  background-color: #f57900;
+}
+
+/* File view (all): "show/hide details" link format */
+a.detail:link
+{
+  color: #ffffff;
+}
+
+/* File view (all): "show/hide details" link - visited format */
+a.detail:visited
+{
+  color: #ffffff;
+}
+
+/* File view (all): "show/hide details" link - activated format */
+a.detail:active
+{
+  color: #ffffff;
+}
+
+/* File view (detail): test name table headline format */
+td.testNameHead
+{
+  text-align: left;
+  padding-left: 10px;
+  background-color: #729fcf;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* File view (detail): test lines table headline format */
+td.testLinesHead
+{
+  text-align: center;
+  background-color: #729fcf;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* File view (detail): test name entry */
+td.testName
+{
+  text-align: left;
+  padding-left: 10px;
+  background-color: #729fcf;
+}
+
+/* File view (detail): test percentage entry */
+td.testPer
+{
+  text-align: right;
+  vertical-align: top;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #729fcf;
+}
+
+/* File view (detail): test lines count entry */
+td.testNum
+{
+  text-align: right;
+  vertical-align: top;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #729fcf;
+  white-space: nowrap;
+}
+
+/* Test case descriptions: test name format*/
+dt
+{
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* Test case descriptions: description table body */
+td.testDescription
+{
+  padding-top: 10px;
+  padding-left: 30px;
+  padding-bottom: 10px;
+  padding-right: 30px;
+  background-color: #729fcf;
+}
+
+/* Source code view: source code format */
+pre.source
+{
+  font-family: monospace;
+  white-space: pre;
+}
+
+/* Source code view: line number format */
+span.lineNum
+{
+  background-color: #d3d7cf;
+}
+
+span.lineNum a {
+  text-decoration: none;
+}
+
+/* Source code view: format for lines which were executed */
+span.lineCov
+{
+  background-color: #8ae234;
+}
+
+/* Source code view: format for Cov legend */
+span.LegendCov
+{
+  text-align: center;
+  padding-left: 10px;
+  padding-right: 10px;
+  margin-right: 2px;
+  background-color: #8ae234;
+}
+
+/* Source code view: format for lines which were not executed */
+span.lineNoCov
+{
+  background-color: #f57900;
+}
+
+/* Source code view: format for NoCov legend */
+span.LegendNoCov
+{
+  text-align: center;
+  padding-left: 10px;
+  padding-right: 10px;
+  margin-right: 2px;
+  background-color: #f57900;
+}
+
+/* Source code view: format for lines which are dead code */
+span.lineDeadCode
+{
+  background-color: #d3d7cf;
+}
+
+/* Source code view: format for NoCov legend */
+span.LegendDeadCode
+{
+  text-align: center;
+  padding-left: 10px;
+  padding-right: 10px;
+  margin-right: 2px;
+  background-color: #d3d7cf;
+}
+
+/* Test view: format for tests which have passed */
+li.testPassed
+{
+}
+
+/* Test view: format for tests which failed */
+li.testFailure
+{
+  background-color: #f57900;
+}
+
+/* Test view: format for tests which failed with an error */
+li.testError
+{
+  background-color: #f57900;
+}
+
+/* Test view: format for incomplete and skipped tests */
+li.testIncomplete
+{
+  background-color: #fcaf3e;
+}
+
+/* CRAP */
+td.crap
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 20px;
+  background-color: #d3d7cf;
+}
+
+pre span.comment {
+  color: #888a85;
+}
+
+pre span.default {
+  color: #2e3436;
+}
+
+pre span.html {
+  color: #888a85;
+}
+
+pre span.keyword {
+  color: #2e3436;
+  font-weight: bold;
+}
+
+pre span.string {
+  color: #2e3436;
+}
+
+#classCoverageDistribution, #classComplexity {
+	height: 200px;
+	width: 475px;
+}
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>oauth2</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">oauth2</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_oauth2.html">oauth2</a> (<a href="library_oauth2.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 296</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="library_oauth2_lib.html">lib</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 296</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar_interceptors.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar_interceptors.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar_interceptors.dashboard.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>interceptors</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [1,0,1,0,0,0,0,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[0,7,"<a href=\"modules_calendar_interceptors_Helpers.php.html#3\">Helpers<\/a>"],[19.354838709677,4,"<a href=\"modules_calendar_interceptors_LDAPMapping.php.html#5\">LDAPMapping<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">interceptors</td></tr>
+      <tr><td><div align="center"><p><a href="modules_calendar_interceptors.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#3">Helpers</a> (56)</li>
+              <li><a href="modules_calendar_interceptors_LDAPMapping.php.html#5">LDAPMapping</a> (12)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#43">Helpers::lg</a> (0%)</li>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#38">Helpers::getOrganizer</a> (0%)</li>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#5">Helpers::futureEvent</a> (0%)</li>
+              <li><a href="modules_calendar_interceptors_LDAPMapping.php.html#7">LDAPMapping::encodeFindUser</a> (19%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib_OAuth2ServerException.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib_OAuth2ServerException.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib_OAuth2ServerException.php.html	(revision 5888)
@@ -0,0 +1,367 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>OAuth2ServerException.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">OAuth2ServerException.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_oauth2.html">oauth2</a>/<a href="library_oauth2_lib.html">lib</a>/<a href="library_oauth2_lib_OAuth2ServerException.php.html">OAuth2ServerException.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 17</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">OAuth2ServerException</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+          <td class="crap">72</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 17</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#23">__construct($http_status_code, $error, $error_description = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 7</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#37">getDescription()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#44">getHttpCode()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#56">sendHttpResponse()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#71">sendHeaders()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#79">__toString()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                      
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                            
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : /**                                                                                                        
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                :  * OAuth2 errors that require termination of OAuth2 due to                                                 
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :  * an error.                                                                                               
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :  *                                                                                                         
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :  */                                                                                                        
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                : class OAuth2ServerException extends Exception {                                                            
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :                                                                                                            
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :     protected $httpCode;                                                                                   
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                :     protected $errorData = array();                                                                        
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :                                                                                                            
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :     /**                                                                                                    
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :      * @param $http_status_code                                                                            
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :      * HTTP status code message as predefined.                                                             
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :      * @param $error                                                                                       
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :      * A single error code.                                                                                
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :      * @param $error_description                                                                           
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :      * (optional) A human-readable text providing additional information,                                  
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :      * used to assist in the understanding and resolution of the error                                     
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :      * occurred.                                                                                           
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :      */                                                                                                    
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :     public function __construct($http_status_code, $error, $error_description = NULL) {                    
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span><span class="lineNoCov">              0 :         parent::__construct($error);                                                                       </span>
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :                                                                                                            
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span><span class="lineNoCov">              0 :         $this-&gt;httpCode = $http_status_code;                                                               </span>
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :                                                                                                            
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span><span class="lineNoCov">              0 :         $this-&gt;errorData['error'] = $error;                                                                </span>
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span><span class="lineNoCov">              0 :         if ($error_description) {                                                                          </span>
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span><span class="lineNoCov">              0 :             $this-&gt;errorData['error_description'] = $error_description;                                    </span>
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span><span class="lineNoCov">              0 :         }                                                                                                  </span>
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span><span class="lineNoCov">              0 :     }                                                                                                      </span>
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :                                                                                                            
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :     /**                                                                                                    
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :      * @return string                                                                                      
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :      */                                                                                                    
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :     public function getDescription() {                                                                     
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineNoCov">              0 :         return isset($this-&gt;errorData['error_description']) ? $this-&gt;errorData['error_description'] : null;</span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :     }                                                                                                      
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                :                                                                                                            
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :     /**                                                                                                    
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :      * @return string                                                                                      
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :      */                                                                                                    
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :     public function getHttpCode() {                                                                        
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span><span class="lineNoCov">              0 :         return $this-&gt;httpCode;                                                                            </span>
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :     }                                                                                                      
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :                                                                                                            
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :     /**                                                                                                    
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :      * Send out error message in JSON.                                                                     
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :      *                                                                                                     
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.1                                  
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                  
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :      *                                                                                                     
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :      * @ingroup oauth2_error                                                                               
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :      */                                                                                                    
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span>                :     public function sendHttpResponse() {                                                                   
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span><span class="lineNoCov">              0 :         header(&quot;HTTP/1.1 &quot; . $this-&gt;httpCode);                                                             </span>
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span><span class="lineNoCov">              0 :         $this-&gt;sendHeaders();                                                                              </span>
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span><span class="lineNoCov">              0 :         echo (string) $this;                                                                               </span>
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span><span class="lineNoCov">              0 :         exit();                                                                                            </span>
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :     }                                                                                                      
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :                                                                                                            
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :     /**                                                                                                    
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :      * Send out HTTP headers for JSON.                                                                     
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :      *                                                                                                     
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.1                                  
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                  
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :      *                                                                                                     
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :      * @ingroup oauth2_section_5                                                                           
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                :      */                                                                                                    
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                :     protected function sendHeaders() {                                                                     
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span><span class="lineNoCov">              0 :         header(&quot;Content-Type: application/json&quot;);                                                          </span>
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span><span class="lineNoCov">              0 :         header(&quot;Cache-Control: no-store&quot;);                                                                 </span>
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span><span class="lineNoCov">              0 :     }                                                                                                      </span>
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :                                                                                                            
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :     /**                                                                                                    
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :      * @see Exception::__toString()                                                                        
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                :      */                                                                                                    
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :     public function __toString() {                                                                         
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span><span class="lineNoCov">              0 :         return json_encode($this-&gt;errorData);                                                              </span>
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                :     }                                                                                                      
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library.dashboard.html	(revision 5888)
@@ -0,0 +1,129 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>library</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [4,0,0,0,0,0,0,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[0,130,"<a href=\"library_oauth2_lib_OAuth2.php.html#44\">OAuth2<\/a>"],[0,4,"<a href=\"library_oauth2_lib_OAuth2AuthenticateException.php.html#11\">OAuth2AuthenticateException<\/a>"],[0,14,"<a href=\"library_oauth2_lib_OAuth2RedirectException.php.html#10\">OAuth2RedirectException<\/a>"],[0,8,"<a href=\"library_oauth2_lib_OAuth2ServerException.php.html#8\">OAuth2ServerException<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">library</td></tr>
+      <tr><td><div align="center"><p><a href="library.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#44">OAuth2</a> (17030)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#10">OAuth2RedirectException</a> (210)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#8">OAuth2ServerException</a> (72)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#11">OAuth2AuthenticateException</a> (20)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#52">OAuth2AuthenticateException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#32">OAuth2RedirectException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#30">OAuth2AuthenticateException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1358">OAuth2::validateRedirectUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1329">OAuth2::getAuthorizationHeader</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1344">OAuth2::sendJsonHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#47">OAuth2RedirectException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#66">OAuth2RedirectException::buildUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#71">OAuth2ServerException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#79">OAuth2ServerException::__toString</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/services_PostgreSQL.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/services_PostgreSQL.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/services_PostgreSQL.php.html	(revision 5888)
@@ -0,0 +1,1437 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>PostgreSQL.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">PostgreSQL.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="services.html">services</a>/<a href="services_PostgreSQL.php.html">PostgreSQL.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="37.50%">
+                <div class="size butter"  style="width:37.5%" title="37.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">37.50%</td>
+          <td class="coverNumMed">9 / 24</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="63.23%">
+                <div class="size butter"  style="width:63.225806451613%" title="63.23%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">63.23%</td>
+          <td class="coverNumMed">98 / 155</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">PostgreSQL</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="37.50%">
+                <div class="size butter"  style="width:37.5%" title="37.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">37.50%</td>
+          <td class="coverNumMed">9 / 24</td>
+          <td class="crap">463.42</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="63.23%">
+                <div class="size butter"  style="width:63.225806451613%" title="63.23%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">63.23%</td>
+          <td class="coverNumMed">98 / 155</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#9">find ( $uri, $justthese = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">4 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#20">read ( $uri, $justthese = false , $criteria = false)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#29">deleteAll ( $uri,   $justthese = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">3 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#35">delete ( $uri, $justthese = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#39">replace ( $uri,  $data, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#44">update ( $uri,  $data )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#49">create ( $uri,  $data )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#53">execSql( $sql )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">3.33</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="66.67%">
+                  <div class="size butter"  style="width:66.666666666667%" title="66.67%"></div>
+              </div>
+          </td>
+          <td class="coverPerMed">66.67%</td>
+          <td class="coverNumMed">4 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#66">execResultSql( $sql, $unique = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">3.14</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="75.00%">
+                  <div class="size chameleon"  style="width:75%" title="75.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">75.00%</td>
+          <td class="coverNumHi">3 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#75">begin( $uri )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">5 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#84">commit($uri )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2.31</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="57.14%">
+                  <div class="size butter"  style="width:57.142857142857%" title="57.14%"></div>
+              </div>
+          </td>
+          <td class="coverPerMed">57.14%</td>
+          <td class="coverNumMed">4 / 7</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#99">rollback( $uri )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#104">open  ( $config )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">11</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">8 / 8</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#119">close()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#127">setup()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#129">teardown()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#131">parseInsertData( $data , $concept)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">9 / 9</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#148">parseUpdateData( $data , &amp;$map)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#161">parseSelectResult( $result , $unique = false)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">5</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">7 / 7</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#176">parseCriteria( $criteria  , &amp;$map , $query = '' )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">20.16</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="57.69%">
+                  <div class="size butter"  style="width:57.692307692308%" title="57.69%"></div>
+              </div>
+          </td>
+          <td class="coverPerMed">57.69%</td>
+          <td class="coverNumMed">15 / 26</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#223">parseFilter( $filter ,&amp;$map)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">19.39</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="54.55%">
+                  <div class="size butter"  style="width:54.545454545455%" title="54.55%"></div>
+              </div>
+          </td>
+          <td class="coverPerMed">54.55%</td>
+          <td class="coverNumMed">12 / 22</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#261">parseOperator( $op )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">10</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">12 / 12</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#278">parseJustthese($justthese , &amp;$map)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">5</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">11 / 11</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#300">parseOrder($order , &amp;$map)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 8</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                                                                    
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : class PostgreSQL implements Service                                                                                                                                                      
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : {                                                                                                                                                                                        
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :     private $con; //Conexão com o banco de dados                                                                                                                                         
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :     private $config; //Configuração                                                                                                                                                      
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :     public  $error = false; //Armazena um erro caso ocorra                                                                                                                               
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :     public function find ( $uri, $justthese = false, $criteria = false ){                                                                                                                
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span><span class="lineCov">              8 :         $map =  Config::get($uri['concept'], 'PostgreSQL.mapping');                                                                                                                      </span>
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span><span class="lineCov">              8 :     $criteria = ($criteria !== false) ? $this-&gt;parseCriteria ( $criteria , $map) : '';                                                                                                   </span>
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span><span class="lineCov">              8 :     $justthese = self::parseJustthese($justthese, $map);                                                                                                                                 </span>
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span><span class="lineCov">              8 :     return $this-&gt;execResultSql( 'SELECT '.$justthese['select'].' FROM '. (Config::get($uri['concept'],'PostgreSQL.concept')) .' '.$criteria );                                          </span>
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :    public function read ( $uri, $justthese = false , $criteria = false){                                                                                                                 
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span><span class="lineNoCov">              0 :       $map =  Config::get($uri['concept'], 'PostgreSQL.mapping');                                                                                                                        </span>
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span><span class="lineNoCov">              0 :       $justthese = self::parseJustthese($justthese, $map);                                                                                                                               </span>
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span><span class="lineNoCov">              0 :       $criteria = ($criteria !== false) ? $this-&gt;parseCriteria ( $criteria , $map , ' WHERE id = \''.addslashes( $uri['id'] ).'\'') : ' WHERE id = \''.addslashes( $uri['id'] ).'\'';    </span>
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span><span class="lineNoCov">              0 :       return $this-&gt;execResultSql( 'SELECT '.$justthese['select'].' FROM '. (Config::get($uri['concept'],'PostgreSQL.concept')) .$criteria , true );                                     </span>
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :     public function deleteAll ( $uri,   $justthese = false, $criteria = false ){                                                                                                         
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span><span class="lineCov">             12 :             $map = Config::get($uri['concept'], 'PostgreSQL.mapping');                                                                                                                   </span>
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span><span class="lineCov">             12 :         if(!self::parseCriteria ( $criteria , $map)) return false; //Validador para não apagar tabela inteira                                                                            </span>
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span><span class="lineCov">             12 :         return $this-&gt;execSql( 'DELETE FROM '.(Config::get($uri['concept'],'PostgreSQL.concept')).' '.self::parseCriteria ( $criteria ,$map) );                                          </span>
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :     public function delete ( $uri, $justthese = false ){                                                                                                                                 
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span><span class="lineNoCov">              0 :         return $this-&gt;execSql('DELETE FROM '.(Config::get($uri['concept'],'PostgreSQL.concept')).' WHERE id = '.addslashes($uri['id']));                                                 </span>
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :     public function replace ( $uri,  $data, $criteria = false ){                                                                                                                         
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span><span class="lineNoCov">              0 :             $map = Config::get($uri['concept'], 'PostgreSQL.mapping');                                                                                                                   </span>
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span><span class="lineNoCov">              0 :         return $this-&gt;execSql('UPDATE '.(Config::get($uri['concept'],'PostgreSQL.concept')).' '. self::parseUpdateData( $data ,$map).' '.self::parseCriteria($criteria , $map));         </span>
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :     public function update ( $uri,  $data ){                                                                                                                                             
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span><span class="lineNoCov">              0 :             $map = Config::get($uri['concept'], 'PostgreSQL.mapping');                                                                                                                   </span>
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span><span class="lineNoCov">              0 :         return $this-&gt;execSql('UPDATE '.(Config::get($uri['concept'],'PostgreSQL.concept')).' '. self::parseUpdateData( $data ,$map).' WHERE id = \''. addslashes( $uri['id']) .'\'');   </span>
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :     public function create ( $uri,  $data ){                                                                                                                                             
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span><span class="lineCov">             12 :         return $this-&gt;execResultSql( 'INSERT INTO '.(Config::get($uri['concept'],'PostgreSQL.concept')).' '.self::parseInsertData( $data , $uri['concept'] ), true );                    </span>
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :     private function execSql( $sql ){                                                                                                                                                    
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span><span class="lineCov">             12 :         if(!$this-&gt;con)    $this-&gt;open( $this-&gt;config );                                                                                                                                 </span>
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span><span class="lineCov">             12 :         $rs = pg_query( $this-&gt;con, $sql );                                                                                                                                              </span>
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span><span class="lineCov">             12 :         if ( !$rs ){                                                                                                                                                                     </span>
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span><span class="lineNoCov">              0 :             $this-&gt;error = pg_last_error ( $this-&gt;con );                                                                                                                                 </span>
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span><span class="lineNoCov">              0 :             return false;                                                                                                                                                                </span>
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :         }                                                                                                                                                                                
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span><span class="lineCov">             12 :         return $rs;                                                                                                                                                                      </span>
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :     public function execResultSql( $sql, $unique = false ){                                                                                                                              
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span><span class="lineCov">             12 :         $rs = $this-&gt;execSql( $sql );                                                                                                                                                    </span>
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span><span class="lineCov">             12 :         if( $rs &amp;&amp; $rs &gt; 0 )                                                                                                                                                             </span>
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span><span class="lineCov">             12 :         return self::parseSelectResult( $rs , $unique );                                                                                                                                 </span>
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span><span class="lineNoCov">              0 :         return $rs;                                                                                                                                                                      </span>
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :     public function begin( $uri ) {                                                                                                                                                      
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span><span class="lineCov">             12 :     if(!$this-&gt;con)                                                                                                                                                                      </span>
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span><span class="lineCov">             12 :         $this-&gt;open( $this-&gt;config );                                                                                                                                                    </span>
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span><span class="lineCov">             12 :         $this-&gt;error = false;                                                                                                                                                            </span>
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span><span class="lineCov">             12 :     pg_query($this-&gt;con, &quot;BEGIN WORK&quot;);                                                                                                                                                  </span>
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span><span class="lineCov">             12 :     }                                                                                                                                                                                    </span>
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                :     public function commit($uri ) {                                                                                                                                                      
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span><span class="lineCov">             12 :     if( $this-&gt;error !== false )                                                                                                                                                         </span>
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span><span class="lineCov">             12 :     {                                                                                                                                                                                    </span>
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span><span class="lineNoCov">              0 :         $error = $this-&gt;error;                                                                                                                                                           </span>
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span><span class="lineNoCov">              0 :         $this-&gt;error = false;                                                                                                                                                            </span>
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span><span class="lineNoCov">              0 :         throw new Exception( $error );                                                                                                                                                   </span>
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span><span class="lineCov">             12 :     pg_query($this-&gt;con, &quot;COMMIT&quot;);                                                                                                                                                      </span>
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span><span class="lineCov">             12 :     return( true );                                                                                                                                                                      </span>
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :     public function rollback( $uri ){                                                                                                                                                    
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span><span class="lineNoCov">              0 :     pg_query($this-&gt;con, &quot;ROLLBACK&quot;);                                                                                                                                                    </span>
+<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                    </span>
+<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span>                :     public function open  ( $config ){                                                                                                                                                   
+<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span><span class="lineCov">              1 :         $this-&gt;config = $config;                                                                                                                                                         </span>
+<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span><span class="lineCov">              1 :         $rs = '';                                                                                                                                                                        </span>
+<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span><span class="lineCov">              1 :         $rs .= ( isset($this-&gt;config['host']) &amp;&amp; $this-&gt;config['host'] )  ? ' host='.$this-&gt;config['host'] : '' ;                                                                        </span>
+<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span><span class="lineCov">              1 :         $rs .= ( isset($this-&gt;config['user']) &amp;&amp; $this-&gt;config['user'] )  ? ' user='.$this-&gt;config['user'] : '' ;                                                                        </span>
+<span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111">     111</a> </span><span class="lineCov">              1 :         $rs .= ( isset($this-&gt;config['password']) &amp;&amp; $this-&gt;config['password'] )  ? ' password='.$this-&gt;config['password'] : '' ;                                                        </span>
+<span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112">     112</a> </span><span class="lineCov">              1 :         $rs .= ( isset($this-&gt;config['dbname']) &amp;&amp; $this-&gt;config['dbname'] )  ? ' dbname='.$this-&gt;config['dbname'] : '' ;                                                                </span>
+<span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113">     113</a> </span><span class="lineCov">              1 :         $rs .= ( isset($this-&gt;config['port']) &amp;&amp; $this-&gt;config['port'] )  ? ' port='.$this-&gt;config['port'] : '' ;                                                                        </span>
+<span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114">     114</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115">     115</a> </span><span class="lineCov">              1 :         return( $this-&gt;con = pg_connect( $rs ) );                                                                                                                                        </span>
+<span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116">     116</a> </span>                :         //$this-&gt;con = pg_connect('host='.$config['host'].' user='.$config['user'].' password='.$config['password'].' dbname='.$config['dbname'].'  options=\'--client_encoding=UTF8\'');
+<span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117">     117</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118">     118</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119">     119</a> </span>                :     public function close(){                                                                                                                                                             
+<span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120">     120</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121">     121</a> </span><span class="lineNoCov">              0 :         pg_close($this-&gt;con);                                                                                                                                                            </span>
+<span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122">     122</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123">     123</a> </span><span class="lineNoCov">              0 :             $this-&gt;con = false;                                                                                                                                                          </span>
+<span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124">     124</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125">     125</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                    </span>
+<span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126">     126</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127">     127</a> </span><span class="lineNoCov">              0 :     public function setup(){}                                                                                                                                                            </span>
+<span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128">     128</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129">     129</a> </span><span class="lineNoCov">              0 :     public function teardown(){}                                                                                                                                                         </span>
+<span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130">     130</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131">     131</a> </span>                :     private static function parseInsertData( $data , $concept){                                                                                                                          
+<span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132">     132</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133">     133</a> </span><span class="lineCov">             12 :             $map = Config::get($concept, 'PostgreSQL.mapping');                                                                                                                          </span>
+<span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134">     134</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135">     135</a> </span><span class="lineCov">             12 :         $ind = array();                                                                                                                                                                  </span>
+<span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136">     136</a> </span><span class="lineCov">             12 :         $val = array();                                                                                                                                                                  </span>
+<span class="lineNum" id="container137"><a name="137"></a><a href="#137" id="line137">     137</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138">     138</a> </span><span class="lineCov">             12 :         foreach ($data as $i =&gt; $v){                                                                                                                                                     </span>
+<span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139">     139</a> </span><span class="lineCov">             12 :                     if(!isset($map[$i])) continue;                                                                                                                                       </span>
+<span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140">     140</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141">     141</a> </span><span class="lineCov">             12 :             $ind[] = $map[$i];                                                                                                                                                           </span>
+<span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142">     142</a> </span><span class="lineCov">             12 :             $val[] = '\''.addslashes($v).'\'';                                                                                                                                           </span>
+<span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143">     143</a> </span><span class="lineCov">             12 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144">     144</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145">     145</a> </span><span class="lineCov">             12 :         return '('.implode(',', $ind).') VALUES ('.implode(',', $val).') RETURNING id';                                                                                                  </span>
+<span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146">     146</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147">     147</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148">     148</a> </span>                :     private static function parseUpdateData( $data , &amp;$map){                                                                                                                             
+<span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149">     149</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150">     150</a> </span><span class="lineNoCov">              0 :         $d = array();                                                                                                                                                                    </span>
+<span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151">     151</a> </span><span class="lineNoCov">              0 :         foreach ($data as $i =&gt; $v)                                                                                                                                                      </span>
+<span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152">     152</a> </span>                :             {                                                                                                                                                                            
+<span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153">     153</a> </span><span class="lineNoCov">              0 :                 if(!isset($map[$i])) continue;                                                                                                                                           </span>
+<span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154">     154</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155">     155</a> </span><span class="lineNoCov">              0 :                 $d[] = $map[$i].' = \''.addslashes ($v).'\'';                                                                                                                            </span>
+<span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156">     156</a> </span><span class="lineNoCov">              0 :             }                                                                                                                                                                            </span>
+<span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157">     157</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158">     158</a> </span><span class="lineNoCov">              0 :         return 'SET '.implode(',', $d);                                                                                                                                                  </span>
+<span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159">     159</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160">     160</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161">     161</a> </span>                :     private static function parseSelectResult( $result , $unique = false){                                                                                                               
+<span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162">     162</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163">     163</a> </span><span class="lineCov">             12 :         $return = array();                                                                                                                                                               </span>
+<span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164">     164</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165">     165</a> </span><span class="lineCov">             12 :         if  (!$result) return false;                                                                                                                                                     </span>
+<span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166">     166</a> </span><span class="lineCov">             12 :         if (pg_num_rows($result) === 0) return $return;                                                                                                                                  </span>
+<span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167">     167</a> </span>                :         else                                                                                                                                                                             
+<span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168">     168</a> </span><span class="lineCov">             12 :           while( $row = pg_fetch_assoc( $result ))                                                                                                                                       </span>
+<span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169">     169</a> </span><span class="lineCov">             12 :               $return[] = $row;                                                                                                                                                          </span>
+<span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170">     170</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171">     171</a> </span><span class="lineCov">             12 :         if($unique === true) return $return[0];                                                                                                                                          </span>
+<span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172">     172</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173">     173</a> </span><span class="lineCov">              4 :         return $return;                                                                                                                                                                  </span>
+<span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174">     174</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175">     175</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176">     176</a> </span>                :     private static function parseCriteria( $criteria  , &amp;$map , $query = '' ){                                                                                                           
+<span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177">     177</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178">     178</a> </span><span class="lineCov">             12 :         if( isset($criteria[&quot;filter&quot;]) &amp;&amp; $criteria[&quot;filter&quot;] !== NULL )                                                                                                                 </span>
+<span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179">     179</a> </span><span class="lineCov">             12 :         {                                                                                                                                                                                </span>
+<span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180">     180</a> </span>                :             /*                                                                                                                                                                           
+<span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181">     181</a> </span>                :           * ex: array   (                                                                                                                                                                
+<span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182">     182</a> </span>                :           *          [0] 'OR',                                                                                                                                                           
+<span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183">     183</a> </span>                :           *          [1] array( 'OR', array( array( '=', 'campo', 'valor' ) ),                                                                                                           
+<span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184">     184</a> </span>                :           *          [2] array( '=', 'campo' , 'valor' ),                                                                                                                                
+<span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185">     185</a> </span>                :           *          [3] array( 'IN', 'campo', array( '1' , '2' , '3' ) )                                                                                                                
+<span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186">     186</a> </span>                :           *        )                                                                                                                                                                     
+<span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187">     187</a> </span>                :           * OR                                                                                                                                                                           
+<span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188">     188</a> </span>                :           *        array( '=' , 'campo' , 'valor' )                                                                                                                                      
+<span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189">     189</a> </span>                :         */                                                                                                                                                                               
+<span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190">     190</a> </span><span class="lineCov">             12 :                 $query .= ($query === '') ?  'WHERE ('.self::parseFilter( $criteria['filter'] , $map).')' : ' AND ('.self::parseFilter( $criteria['filter'] , $map).')';                 </span>
+<span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191">     191</a> </span><span class="lineCov">             12 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192">     192</a> </span>                :         /*                                                                                                                                                                               
+<span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193">     193</a> </span>                :           * ex: array( 'table1' =&gt; 'table2' ,  'table1' =&gt; 'table2')                                                                                                                     
+<span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194">     194</a> </span>                :           *                                                                                                                                                                              
+<span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195">     195</a> </span>                :           */                                                                                                                                                                             
+<span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196">     196</a> </span><span class="lineCov">             12 :         if( isset($criteria[&quot;join&quot;]) )                                                                                                                                                   </span>
+<span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197">     197</a> </span><span class="lineCov">             12 :         {                                                                                                                                                                                </span>
+<span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198">     198</a> </span><span class="lineNoCov">              0 :         foreach ($criteria[&quot;join&quot;] as $i =&gt; $v)                                                                                                                                          </span>
+<span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199">     199</a> </span><span class="lineNoCov">              0 :             $query .= ' AND '.$i.' = '.$v.' ';                                                                                                                                           </span>
+<span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200">     200</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201">     201</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202">     202</a> </span><span class="lineCov">             12 :         if( isset($criteria[&quot;group&quot;]) )                                                                                                                                                  </span>
+<span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203">     203</a> </span><span class="lineCov">             12 :         {                                                                                                                                                                                </span>
+<span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204">     204</a> </span><span class="lineNoCov">              0 :             $query .= ' GROUP BY '.( is_array($criteria[&quot;group&quot;]) ? implode(', ', $criteria[&quot;group&quot;]) : $criteria[&quot;group&quot;] ).' ';                                                        </span>
+<span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205">     205</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container206"><a name="206"></a><a href="#206" id="line206">     206</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container207"><a name="207"></a><a href="#207" id="line207">     207</a> </span><span class="lineCov">             12 :         if( isset($criteria[&quot;order&quot;]) )                                                                                                                                                  </span>
+<span class="lineNum" id="container208"><a name="208"></a><a href="#208" id="line208">     208</a> </span><span class="lineCov">             12 :         {                                                                                                                                                                                </span>
+<span class="lineNum" id="container209"><a name="209"></a><a href="#209" id="line209">     209</a> </span><span class="lineNoCov">              0 :             $query .= ' ORDER BY '.self::parseOrder( $criteria[&quot;order&quot;], $map ).' ';                                                                                                     </span>
+<span class="lineNum" id="container210"><a name="210"></a><a href="#210" id="line210">     210</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container211"><a name="211"></a><a href="#211" id="line211">     211</a> </span><span class="lineCov">             12 :         if( isset($criteria[&quot;limit&quot;]) )                                                                                                                                                  </span>
+<span class="lineNum" id="container212"><a name="212"></a><a href="#212" id="line212">     212</a> </span><span class="lineCov">             12 :         {                                                                                                                                                                                </span>
+<span class="lineNum" id="container213"><a name="213"></a><a href="#213" id="line213">     213</a> </span><span class="lineNoCov">              0 :             $query .= ' LIMIT '. $criteria[&quot;limit&quot;] .' ';                                                                                                                                </span>
+<span class="lineNum" id="container214"><a name="214"></a><a href="#214" id="line214">     214</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container215"><a name="215"></a><a href="#215" id="line215">     215</a> </span><span class="lineCov">             12 :         if( isset($criteria[&quot;offset&quot;]) )                                                                                                                                                 </span>
+<span class="lineNum" id="container216"><a name="216"></a><a href="#216" id="line216">     216</a> </span><span class="lineCov">             12 :         {                                                                                                                                                                                </span>
+<span class="lineNum" id="container217"><a name="217"></a><a href="#217" id="line217">     217</a> </span><span class="lineNoCov">              0 :             $query .= ' OFFSET '. $criteria[&quot;offset&quot;] .' ';                                                                                                                              </span>
+<span class="lineNum" id="container218"><a name="218"></a><a href="#218" id="line218">     218</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container219"><a name="219"></a><a href="#219" id="line219">     219</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container220"><a name="220"></a><a href="#220" id="line220">     220</a> </span><span class="lineCov">             12 :         return $query;                                                                                                                                                                   </span>
+<span class="lineNum" id="container221"><a name="221"></a><a href="#221" id="line221">     221</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container222"><a name="222"></a><a href="#222" id="line222">     222</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container223"><a name="223"></a><a href="#223" id="line223">     223</a> </span>                :     private static function parseFilter( $filter ,&amp;$map){                                                                                                                                
+<span class="lineNum" id="container224"><a name="224"></a><a href="#224" id="line224">     224</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container225"><a name="225"></a><a href="#225" id="line225">     225</a> </span><span class="lineCov">             12 :     if( !is_array( $filter ) || count($filter) &lt;= 0) return null;                                                                                                                        </span>
+<span class="lineNum" id="container226"><a name="226"></a><a href="#226" id="line226">     226</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container227"><a name="227"></a><a href="#227" id="line227">     227</a> </span><span class="lineCov">             12 :     $op = self::parseOperator( array_shift( $filter ) );                                                                                                                                 </span>
+<span class="lineNum" id="container228"><a name="228"></a><a href="#228" id="line228">     228</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container229"><a name="229"></a><a href="#229" id="line229">     229</a> </span><span class="lineCov">             12 :     if( is_array($filter[0]) )                                                                                                                                                           </span>
+<span class="lineNum" id="container230"><a name="230"></a><a href="#230" id="line230">     230</a> </span><span class="lineCov">             12 :     {                                                                                                                                                                                    </span>
+<span class="lineNum" id="container231"><a name="231"></a><a href="#231" id="line231">     231</a> </span><span class="lineNoCov">              0 :         $nested = array();                                                                                                                                                               </span>
+<span class="lineNum" id="container232"><a name="232"></a><a href="#232" id="line232">     232</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container233"><a name="233"></a><a href="#233" id="line233">     233</a> </span><span class="lineNoCov">              0 :         foreach( $filter as $i =&gt; $f )                                                                                                                                                   </span>
+<span class="lineNum" id="container234"><a name="234"></a><a href="#234" id="line234">     234</a> </span><span class="lineNoCov">              0 :                 if( $n = self::parseFilter( $f , $map))                                                                                                                                  </span>
+<span class="lineNum" id="container235"><a name="235"></a><a href="#235" id="line235">     235</a> </span><span class="lineNoCov">              0 :                     $nested[] = $n;                                                                                                                                                      </span>
+<span class="lineNum" id="container236"><a name="236"></a><a href="#236" id="line236">     236</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container237"><a name="237"></a><a href="#237" id="line237">     237</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container238"><a name="238"></a><a href="#238" id="line238">     238</a> </span><span class="lineNoCov">              0 :         return (count($nested) &gt; 0 ) ? '('.implode( ' '.$op.' ', $nested ).')' : '';                                                                                                     </span>
+<span class="lineNum" id="container239"><a name="239"></a><a href="#239" id="line239">     239</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container240"><a name="240"></a><a href="#240" id="line240">     240</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container241"><a name="241"></a><a href="#241" id="line241">     241</a> </span><span class="lineCov">             12 :         if(!isset($map[$filter[0]])) return '';                                                                                                                                          </span>
+<span class="lineNum" id="container242"><a name="242"></a><a href="#242" id="line242">     242</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container243"><a name="243"></a><a href="#243" id="line243">     243</a> </span><span class="lineCov">             12 :         $filter[0] = $map[$filter[0]];                                                                                                                                                   </span>
+<span class="lineNum" id="container244"><a name="244"></a><a href="#244" id="line244">     244</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container245"><a name="245"></a><a href="#245" id="line245">     245</a> </span><span class="lineCov">             12 :     $igSuffix = $igPrefix = '';                                                                                                                                                          </span>
+<span class="lineNum" id="container246"><a name="246"></a><a href="#246" id="line246">     246</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container247"><a name="247"></a><a href="#247" id="line247">     247</a> </span><span class="lineCov">             12 :     if( strpos( $op[0], 'i' ) === 0 )                                                                                                                                                    </span>
+<span class="lineNum" id="container248"><a name="248"></a><a href="#248" id="line248">     248</a> </span><span class="lineCov">             12 :     {                                                                                                                                                                                    </span>
+<span class="lineNum" id="container249"><a name="249"></a><a href="#249" id="line249">     249</a> </span><span class="lineNoCov">              0 :         $op[0] = substr( $op[0], 1 );                                                                                                                                                    </span>
+<span class="lineNum" id="container250"><a name="250"></a><a href="#250" id="line250">     250</a> </span><span class="lineNoCov">              0 :         $filter[0] = 'upper(&quot;'.$filter[0].'&quot;)';                                                                                                                                          </span>
+<span class="lineNum" id="container251"><a name="251"></a><a href="#251" id="line251">     251</a> </span><span class="lineNoCov">              0 :         $igPrefix = 'upper(';                                                                                                                                                            </span>
+<span class="lineNum" id="container252"><a name="252"></a><a href="#252" id="line252">     252</a> </span><span class="lineNoCov">              0 :         $igSuffix = ')';                                                                                                                                                                 </span>
+<span class="lineNum" id="container253"><a name="253"></a><a href="#253" id="line253">     253</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                    </span>
+<span class="lineNum" id="container254"><a name="254"></a><a href="#254" id="line254">     254</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container255"><a name="255"></a><a href="#255" id="line255">     255</a> </span><span class="lineCov">             12 :     if( is_array($filter[1]) )                                                                                                                                                           </span>
+<span class="lineNum" id="container256"><a name="256"></a><a href="#256" id="line256">     256</a> </span><span class="lineCov">             12 :         return( $filter[0].' '.$op[0].&quot; ($igPrefix'&quot;.implode( &quot;'$igSuffix,$igPrefix'&quot;, array_map(&quot;addslashes&quot; , $filter[1]) ).&quot;'$igSuffix)&quot; );                                           </span>
+<span class="lineNum" id="container257"><a name="257"></a><a href="#257" id="line257">     257</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container258"><a name="258"></a><a href="#258" id="line258">     258</a> </span><span class="lineCov">             12 :     return( $filter[0].' '.$op[0].&quot; $igPrefix'&quot;.$op[1].addslashes( $filter[1] ).$op[2].&quot;'$igSuffix&quot; );                                                                                   </span>
+<span class="lineNum" id="container259"><a name="259"></a><a href="#259" id="line259">     259</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container260"><a name="260"></a><a href="#260" id="line260">     260</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container261"><a name="261"></a><a href="#261" id="line261">     261</a> </span>                :     private static function parseOperator( $op ){                                                                                                                                        
+<span class="lineNum" id="container262"><a name="262"></a><a href="#262" id="line262">     262</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container263"><a name="263"></a><a href="#263" id="line263">     263</a> </span><span class="lineCov">             12 :     switch(strtolower($op))                                                                                                                                                              </span>
+<span class="lineNum" id="container264"><a name="264"></a><a href="#264" id="line264">     264</a> </span>                :     {                                                                                                                                                                                    
+<span class="lineNum" id="container265"><a name="265"></a><a href="#265" id="line265">     265</a> </span><span class="lineCov">             12 :         case 'and':                                                                                                                                                                      </span>
+<span class="lineNum" id="container266"><a name="266"></a><a href="#266" id="line266">     266</a> </span><span class="lineCov">             12 :         case 'or': return( $op );                                                                                                                                                        </span>
+<span class="lineNum" id="container267"><a name="267"></a><a href="#267" id="line267">     267</a> </span><span class="lineCov">             12 :         case 'in': return array( $op );                                                                                                                                                  </span>
+<span class="lineNum" id="container268"><a name="268"></a><a href="#268" id="line268">     268</a> </span><span class="lineCov">             12 :         case '^': return array( 'like', '%',  '' );                                                                                                                                      </span>
+<span class="lineNum" id="container269"><a name="269"></a><a href="#269" id="line269">     269</a> </span><span class="lineCov">             12 :         case '$': return array( 'like',  '', '%' );                                                                                                                                      </span>
+<span class="lineNum" id="container270"><a name="270"></a><a href="#270" id="line270">     270</a> </span><span class="lineCov">             12 :         case '*': return array( 'like', '%', '%' );                                                                                                                                      </span>
+<span class="lineNum" id="container271"><a name="271"></a><a href="#271" id="line271">     271</a> </span><span class="lineCov">             12 :         case 'i^': return array( 'ilike', '%',  '' );                                                                                                                                    </span>
+<span class="lineNum" id="container272"><a name="272"></a><a href="#272" id="line272">     272</a> </span><span class="lineCov">             12 :         case 'i$': return array( 'ilike',  '', '%' );                                                                                                                                    </span>
+<span class="lineNum" id="container273"><a name="273"></a><a href="#273" id="line273">     273</a> </span><span class="lineCov">             12 :         case 'i*': return array( 'ilike', '%', '%' );                                                                                                                                    </span>
+<span class="lineNum" id="container274"><a name="274"></a><a href="#274" id="line274">     274</a> </span><span class="lineCov">             12 :         default : return array( $op,  '',  '' );                                                                                                                                         </span>
+<span class="lineNum" id="container275"><a name="275"></a><a href="#275" id="line275">     275</a> </span><span class="lineCov">             12 :     }                                                                                                                                                                                    </span>
+<span class="lineNum" id="container276"><a name="276"></a><a href="#276" id="line276">     276</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container277"><a name="277"></a><a href="#277" id="line277">     277</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container278"><a name="278"></a><a href="#278" id="line278">     278</a> </span>                :     private static function parseJustthese($justthese , &amp;$map)                                                                                                                           
+<span class="lineNum" id="container279"><a name="279"></a><a href="#279" id="line279">     279</a> </span>                :     {                                                                                                                                                                                    
+<span class="lineNum" id="container280"><a name="280"></a><a href="#280" id="line280">     280</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container281"><a name="281"></a><a href="#281" id="line281">     281</a> </span><span class="lineCov">              8 :         if(!is_array($justthese)) //Caso seja um full select pegar todas as keys                                                                                                         </span>
+<span class="lineNum" id="container282"><a name="282"></a><a href="#282" id="line282">     282</a> </span><span class="lineCov">              8 :             $justthese = array_keys($map);                                                                                                                                               </span>
+<span class="lineNum" id="container283"><a name="283"></a><a href="#283" id="line283">     283</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container284"><a name="284"></a><a href="#284" id="line284">     284</a> </span><span class="lineCov">              8 :         $return = array();                                                                                                                                                               </span>
+<span class="lineNum" id="container285"><a name="285"></a><a href="#285" id="line285">     285</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container286"><a name="286"></a><a href="#286" id="line286">     286</a> </span><span class="lineCov">              8 :         foreach ($justthese as &amp;$value)                                                                                                                                                  </span>
+<span class="lineNum" id="container287"><a name="287"></a><a href="#287" id="line287">     287</a> </span>                :         {                                                                                                                                                                                
+<span class="lineNum" id="container288"><a name="288"></a><a href="#288" id="line288">     288</a> </span><span class="lineCov">              8 :             if(!isset($map[$value])) continue; //Escapa itens não existentes no mapa                                                                                                     </span>
+<span class="lineNum" id="container289"><a name="289"></a><a href="#289" id="line289">     289</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container290"><a name="290"></a><a href="#290" id="line290">     290</a> </span><span class="lineCov">              8 :             if(is_array($map[$value]))                                                                                                                                                   </span>
+<span class="lineNum" id="container291"><a name="291"></a><a href="#291" id="line291">     291</a> </span><span class="lineCov">              8 :                 $return['deepness'][$value] = $map[$value];                                                                                                                              </span>
+<span class="lineNum" id="container292"><a name="292"></a><a href="#292" id="line292">     292</a> </span>                :             else                                                                                                                                                                         
+<span class="lineNum" id="container293"><a name="293"></a><a href="#293" id="line293">     293</a> </span><span class="lineCov">              8 :                 $return['select'][] = $map[$value] .' as &quot;'. $value. '&quot;';                                                                                                                </span>
+<span class="lineNum" id="container294"><a name="294"></a><a href="#294" id="line294">     294</a> </span><span class="lineCov">              8 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container295"><a name="295"></a><a href="#295" id="line295">     295</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container296"><a name="296"></a><a href="#296" id="line296">     296</a> </span><span class="lineCov">              8 :         $return['select'] = implode(', ', $return['select']);                                                                                                                            </span>
+<span class="lineNum" id="container297"><a name="297"></a><a href="#297" id="line297">     297</a> </span><span class="lineCov">              8 :         return $return;                                                                                                                                                                  </span>
+<span class="lineNum" id="container298"><a name="298"></a><a href="#298" id="line298">     298</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container299"><a name="299"></a><a href="#299" id="line299">     299</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container300"><a name="300"></a><a href="#300" id="line300">     300</a> </span>                :    private static function parseOrder($order , &amp;$map)                                                                                                                                    
+<span class="lineNum" id="container301"><a name="301"></a><a href="#301" id="line301">     301</a> </span>                :     {                                                                                                                                                                                    
+<span class="lineNum" id="container302"><a name="302"></a><a href="#302" id="line302">     302</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container303"><a name="303"></a><a href="#303" id="line303">     303</a> </span><span class="lineNoCov">              0 :         if($notArray = !is_array($order)) //Caso seja um full select pegar todas as keys                                                                                                 </span>
+<span class="lineNum" id="container304"><a name="304"></a><a href="#304" id="line304">     304</a> </span><span class="lineNoCov">              0 :             $order = array( $order );                                                                                                                                                    </span>
+<span class="lineNum" id="container305"><a name="305"></a><a href="#305" id="line305">     305</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container306"><a name="306"></a><a href="#306" id="line306">     306</a> </span><span class="lineNoCov">              0 :         $return = array();                                                                                                                                                               </span>
+<span class="lineNum" id="container307"><a name="307"></a><a href="#307" id="line307">     307</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container308"><a name="308"></a><a href="#308" id="line308">     308</a> </span><span class="lineNoCov">              0 :         foreach ($order as &amp;$value)                                                                                                                                                      </span>
+<span class="lineNum" id="container309"><a name="309"></a><a href="#309" id="line309">     309</a> </span>                :         {                                                                                                                                                                                
+<span class="lineNum" id="container310"><a name="310"></a><a href="#310" id="line310">     310</a> </span><span class="lineNoCov">              0 :             if(!isset($map[$value])) continue; //Escapa itens não existentes no mapa                                                                                                     </span>
+<span class="lineNum" id="container311"><a name="311"></a><a href="#311" id="line311">     311</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container312"><a name="312"></a><a href="#312" id="line312">     312</a> </span><span class="lineNoCov">              0 :             $value = $map[$value];                                                                                                                                                       </span>
+<span class="lineNum" id="container313"><a name="313"></a><a href="#313" id="line313">     313</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container314"><a name="314"></a><a href="#314" id="line314">     314</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container315"><a name="315"></a><a href="#315" id="line315">     315</a> </span><span class="lineNoCov">              0 :         return ( $notArray ?  $order[0] : implode(', ', $order) );                                                                                                                       </span>
+<span class="lineNum" id="container316"><a name="316"></a><a href="#316" id="line316">     316</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container317"><a name="317"></a><a href="#317" id="line317">     317</a> </span>                : }                                                                                                                                                                                        
+<span class="lineNum" id="container318"><a name="318"></a><a href="#318" id="line318">     318</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container319"><a name="319"></a><a href="#319" id="line319">     319</a> </span>                : ?&gt;                                                                                                                                                                                       
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel11": {
+          "header": "8 tests cover line 11",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel13": {
+          "header": "8 tests cover line 13",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel15": {
+          "header": "8 tests cover line 15",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel17": {
+          "header": "8 tests cover line 17",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel30": {
+          "header": "12 tests cover line 30",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel31": {
+          "header": "12 tests cover line 31",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel32": {
+          "header": "12 tests cover line 32",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel50": {
+          "header": "12 tests cover line 50",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel54": {
+          "header": "12 tests cover line 54",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel56": {
+          "header": "12 tests cover line 56",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel58": {
+          "header": "12 tests cover line 58",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel63": {
+          "header": "12 tests cover line 63",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel67": {
+          "header": "12 tests cover line 67",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel69": {
+          "header": "12 tests cover line 69",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel70": {
+          "header": "12 tests cover line 70",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel77": {
+          "header": "12 tests cover line 77",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel78": {
+          "header": "12 tests cover line 78",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel80": {
+          "header": "12 tests cover line 80",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel81": {
+          "header": "12 tests cover line 81",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel82": {
+          "header": "12 tests cover line 82",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel86": {
+          "header": "12 tests cover line 86",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel87": {
+          "header": "12 tests cover line 87",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel94": {
+          "header": "12 tests cover line 94",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel96": {
+          "header": "12 tests cover line 96",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel106": {
+          "header": "1 test covers line 106",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel108": {
+          "header": "1 test covers line 108",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel109": {
+          "header": "1 test covers line 109",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel110": {
+          "header": "1 test covers line 110",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel111": {
+          "header": "1 test covers line 111",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel112": {
+          "header": "1 test covers line 112",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel113": {
+          "header": "1 test covers line 113",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel115": {
+          "header": "1 test covers line 115",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel133": {
+          "header": "12 tests cover line 133",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel135": {
+          "header": "12 tests cover line 135",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel136": {
+          "header": "12 tests cover line 136",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel138": {
+          "header": "12 tests cover line 138",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel139": {
+          "header": "12 tests cover line 139",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel141": {
+          "header": "12 tests cover line 141",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel142": {
+          "header": "12 tests cover line 142",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel143": {
+          "header": "12 tests cover line 143",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel145": {
+          "header": "12 tests cover line 145",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel163": {
+          "header": "12 tests cover line 163",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel165": {
+          "header": "12 tests cover line 165",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel166": {
+          "header": "12 tests cover line 166",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel168": {
+          "header": "12 tests cover line 168",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel169": {
+          "header": "12 tests cover line 169",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel171": {
+          "header": "12 tests cover line 171",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel173": {
+          "header": "4 tests cover line 173",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li></ul>",
+          "footer": ""
+        },
+        "panel178": {
+          "header": "12 tests cover line 178",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel179": {
+          "header": "12 tests cover line 179",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel190": {
+          "header": "12 tests cover line 190",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel191": {
+          "header": "12 tests cover line 191",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel196": {
+          "header": "12 tests cover line 196",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel197": {
+          "header": "12 tests cover line 197",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel202": {
+          "header": "12 tests cover line 202",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel203": {
+          "header": "12 tests cover line 203",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel207": {
+          "header": "12 tests cover line 207",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel208": {
+          "header": "12 tests cover line 208",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel211": {
+          "header": "12 tests cover line 211",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel212": {
+          "header": "12 tests cover line 212",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel215": {
+          "header": "12 tests cover line 215",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel216": {
+          "header": "12 tests cover line 216",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel220": {
+          "header": "12 tests cover line 220",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel225": {
+          "header": "12 tests cover line 225",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel227": {
+          "header": "12 tests cover line 227",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel229": {
+          "header": "12 tests cover line 229",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel230": {
+          "header": "12 tests cover line 230",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel241": {
+          "header": "12 tests cover line 241",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel243": {
+          "header": "12 tests cover line 243",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel245": {
+          "header": "12 tests cover line 245",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel247": {
+          "header": "12 tests cover line 247",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel248": {
+          "header": "12 tests cover line 248",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel255": {
+          "header": "12 tests cover line 255",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel256": {
+          "header": "12 tests cover line 256",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel258": {
+          "header": "12 tests cover line 258",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel263": {
+          "header": "12 tests cover line 263",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel265": {
+          "header": "12 tests cover line 265",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel266": {
+          "header": "12 tests cover line 266",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel267": {
+          "header": "12 tests cover line 267",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel268": {
+          "header": "12 tests cover line 268",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel269": {
+          "header": "12 tests cover line 269",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel270": {
+          "header": "12 tests cover line 270",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel271": {
+          "header": "12 tests cover line 271",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel272": {
+          "header": "12 tests cover line 272",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel273": {
+          "header": "12 tests cover line 273",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel274": {
+          "header": "12 tests cover line 274",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel275": {
+          "header": "12 tests cover line 275",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel281": {
+          "header": "8 tests cover line 281",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel282": {
+          "header": "8 tests cover line 282",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel284": {
+          "header": "8 tests cover line 284",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel286": {
+          "header": "8 tests cover line 286",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel288": {
+          "header": "8 tests cover line 288",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel290": {
+          "header": "8 tests cover line 290",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel291": {
+          "header": "8 tests cover line 291",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel293": {
+          "header": "8 tests cover line 293",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel294": {
+          "header": "8 tests cover line 294",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel296": {
+          "header": "8 tests cover line 296",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel297": {
+          "header": "8 tests cover line 297",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/index.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/index.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/index.dashboard.html	(revision 5888)
@@ -0,0 +1,135 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title></title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [5,0,1,0,0,1,2,1,1,0,0,1]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[50,5,"<a href=\"api_cache_MemoryCache.php.html#30\">MemoryCache<\/a>"],[40,21,"<a href=\"api_config.php.html#3\">Config<\/a>"],[56.676557863501,191,"<a href=\"api_controller.php.html#20\">Controller<\/a>"],[0,130,"<a href=\"library_oauth2_lib_OAuth2.php.html#44\">OAuth2<\/a>"],[0,4,"<a href=\"library_oauth2_lib_OAuth2AuthenticateException.php.html#11\">OAuth2AuthenticateException<\/a>"],[0,14,"<a href=\"library_oauth2_lib_OAuth2RedirectException.php.html#10\">OAuth2RedirectException<\/a>"],[0,8,"<a href=\"library_oauth2_lib_OAuth2ServerException.php.html#8\">OAuth2ServerException<\/a>"],[0,7,"<a href=\"modules_calendar_interceptors_Helpers.php.html#3\">Helpers<\/a>"],[19.354838709677,4,"<a href=\"modules_calendar_interceptors_LDAPMapping.php.html#5\">LDAPMapping<\/a>"],[100,19,"<a href=\"rest_oauth_OAuth2StorageUserCredential.php.html#11\">OAuth2StorageUserCredential<\/a>"],[78.125,51,"<a href=\"services_OpenLDAP.php.html#3\">OpenLDAP<\/a>"],[63.225806451613,87,"<a href=\"services_PostgreSQL.php.html#3\">PostgreSQL<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title"></td></tr>
+      <tr><td><div align="center"><p><a href="index.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#44">OAuth2</a> (17030)</li>
+              <li><a href="api_controller.php.html#20">Controller</a> (3157)</li>
+              <li><a href="services_PostgreSQL.php.html#3">PostgreSQL</a> (463)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#10">OAuth2RedirectException</a> (210)</li>
+              <li><a href="api_config.php.html#3">Config</a> (116)</li>
+              <li><a href="services_OpenLDAP.php.html#3">OpenLDAP</a> (78)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#8">OAuth2ServerException</a> (72)</li>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#3">Helpers</a> (56)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#11">OAuth2AuthenticateException</a> (20)</li>
+              <li><a href="modules_calendar_interceptors_LDAPMapping.php.html#5">LDAPMapping</a> (12)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#37">OAuth2ServerException::getDescription</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#23">OAuth2ServerException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#66">OAuth2RedirectException::buildUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#47">OAuth2RedirectException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#44">OAuth2ServerException::getHttpCode</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#56">OAuth2ServerException::sendHttpResponse</a> (0%)</li>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#38">Helpers::getOrganizer</a> (0%)</li>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#5">Helpers::futureEvent</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#79">OAuth2ServerException::__toString</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#71">OAuth2ServerException::sendHeaders</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules.dashboard.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>modules</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [1,0,1,0,0,0,0,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[0,7,"<a href=\"modules_calendar_interceptors_Helpers.php.html#3\">Helpers<\/a>"],[19.354838709677,4,"<a href=\"modules_calendar_interceptors_LDAPMapping.php.html#5\">LDAPMapping<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">modules</td></tr>
+      <tr><td><div align="center"><p><a href="modules.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#3">Helpers</a> (56)</li>
+              <li><a href="modules_calendar_interceptors_LDAPMapping.php.html#5">LDAPMapping</a> (12)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#43">Helpers::lg</a> (0%)</li>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#38">Helpers::getOrganizer</a> (0%)</li>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#5">Helpers::futureEvent</a> (0%)</li>
+              <li><a href="modules_calendar_interceptors_LDAPMapping.php.html#7">LDAPMapping::encodeFindUser</a> (19%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api.dashboard.html	(revision 5888)
@@ -0,0 +1,127 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>api</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [0,0,0,0,0,1,2,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[50,5,"<a href=\"api_cache_MemoryCache.php.html#30\">MemoryCache<\/a>"],[40,21,"<a href=\"api_config.php.html#3\">Config<\/a>"],[56.676557863501,191,"<a href=\"api_controller.php.html#20\">Controller<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">api</td></tr>
+      <tr><td><div align="center"><p><a href="api.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="api_controller.php.html#20">Controller</a> (3157)</li>
+              <li><a href="api_config.php.html#3">Config</a> (116)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="api_controller.php.html#137">Controller::format</a> (0%)</li>
+              <li><a href="api_controller.php.html#142">Controller::parse</a> (0%)</li>
+              <li><a href="api_controller.php.html#147">Controller::URI</a> (0%)</li>
+              <li><a href="api_controller.php.html#132">Controller::rollback</a> (0%)</li>
+              <li><a href="api_controller.php.html#127">Controller::commit</a> (0%)</li>
+              <li><a href="api_controller.php.html#109">Controller::update</a> (0%)</li>
+              <li><a href="api_controller.php.html#122">Controller::begin</a> (0%)</li>
+              <li><a href="api_controller.php.html#155">Controller::links</a> (0%)</li>
+              <li><a href="api_controller.php.html#203">Controller::isConcept</a> (0%)</li>
+              <li><a href="api_controller.php.html#598">Controller::fallback</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>calendar</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">calendar</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="modules.html">modules</a>/<a href="modules_calendar.html">calendar</a> (<a href="modules_calendar.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="12.50%">
+              <div class="size scarlet_red"  style="width:12.5%" title="12.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">12.50%</td>
+          <td class="coverNumLo">7 / 56</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="modules_calendar_interceptors.html">interceptors</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="12.50%">
+              <div class="size scarlet_red"  style="width:12.5%" title="12.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">12.50%</td>
+          <td class="coverNumLo">7 / 56</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib_OAuth2AuthenticateException.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib_OAuth2AuthenticateException.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib_OAuth2AuthenticateException.php.html	(revision 5888)
@@ -0,0 +1,264 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>OAuth2AuthenticateException.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">OAuth2AuthenticateException.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_oauth2.html">oauth2</a>/<a href="library_oauth2_lib.html">lib</a>/<a href="library_oauth2_lib_OAuth2AuthenticateException.php.html">OAuth2AuthenticateException.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 11</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">OAuth2AuthenticateException</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+          <td class="crap">20</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 11</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#30">__construct($httpCode, $tokenType, $realm, $error, $error_description = NULL, $scope = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 9</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#52">sendHeaders()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                             
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                   
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : /**                                                                                                               
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                :  * Send an error header with the given realm and an error, if provided.                                           
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :  * Suitable for the bearer token type.                                                                            
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :  *                                                                                                                
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :  * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-04#section-2.4                                      
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :  *                                                                                                                
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :  * @ingroup oauth2_error                                                                                          
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :  */                                                                                                               
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                : class OAuth2AuthenticateException extends OAuth2ServerException {                                                 
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :                                                                                                                   
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :     protected $header;                                                                                            
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :                                                                                                                   
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :     /**                                                                                                           
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :      *                                                                                                            
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :      * @param $http_status_code                                                                                   
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :      * HTTP status code message as predefined.                                                                    
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :      * @param $error                                                                                              
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :      * The &quot;error&quot; attribute is used to provide the client with the reason                                        
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :      * why the access request was declined.                                                                       
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :      * @param $error_description                                                                                  
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :      * (optional) The &quot;error_description&quot; attribute provides a human-readable text                                
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :      * containing additional information, used to assist in the understanding                                     
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :      * and resolution of the error occurred.                                                                      
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :      * @param $scope                                                                                              
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :      * A space-delimited list of scope values indicating the required scope                                       
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :      * of the access token for accessing the requested resource.                                                  
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :      */                                                                                                           
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :     public function __construct($httpCode, $tokenType, $realm, $error, $error_description = NULL, $scope = NULL) {
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span><span class="lineNoCov">              0 :         parent::__construct($httpCode, $error, $error_description);                                               </span>
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :                                                                                                                   
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span><span class="lineNoCov">              0 :         if ($scope) {                                                                                             </span>
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span><span class="lineNoCov">              0 :             $this-&gt;errorData['scope'] = $scope;                                                                   </span>
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span><span class="lineNoCov">              0 :         }                                                                                                         </span>
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :                                                                                                                   
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :         // Build header                                                                                           
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineNoCov">              0 :         $this-&gt;header = sprintf('WWW-Authenticate: %s realm=&quot;%s&quot;', ucwords($tokenType), $realm);                  </span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span><span class="lineNoCov">              0 :         foreach ( $this-&gt;errorData as $key =&gt; $value ) {                                                          </span>
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span><span class="lineNoCov">              0 :             $this-&gt;header .= &quot;, $key=\&quot;$value\&quot;&quot;;                                                                 </span>
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span><span class="lineNoCov">              0 :         }                                                                                                         </span>
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span><span class="lineNoCov">              0 :     }                                                                                                             </span>
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :                                                                                                                   
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :     /**                                                                                                           
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :      * Send out HTTP headers for JSON.                                                                            
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :      *                                                                                                            
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.1                                         
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                         
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :      *                                                                                                            
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :      * @ingroup oauth2_section_5                                                                                  
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :      */                                                                                                           
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :     protected function sendHeaders() {                                                                            
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span><span class="lineNoCov">              0 :         header($this-&gt;header);                                                                                    </span>
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span><span class="lineNoCov">              0 :     }                                                                                                             </span>
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/services.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/services.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/services.dashboard.html	(revision 5888)
@@ -0,0 +1,127 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>services</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [0,0,0,0,0,0,0,1,1,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[78.125,51,"<a href=\"services_OpenLDAP.php.html#3\">OpenLDAP<\/a>"],[63.225806451613,87,"<a href=\"services_PostgreSQL.php.html#3\">PostgreSQL<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">services</td></tr>
+      <tr><td><div align="center"><p><a href="services.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="services_PostgreSQL.php.html#3">PostgreSQL</a> (463)</li>
+              <li><a href="services_OpenLDAP.php.html#3">OpenLDAP</a> (78)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="services_PostgreSQL.php.html#44">PostgreSQL::update</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#39">PostgreSQL::replace</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#35">PostgreSQL::delete</a> (0%)</li>
+              <li><a href="services_OpenLDAP.php.html#25">OpenLDAP::read</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#99">PostgreSQL::rollback</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#119">PostgreSQL::close</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#300">PostgreSQL::parseOrder</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#148">PostgreSQL::parseUpdateData</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#129">PostgreSQL::teardown</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#127">PostgreSQL::setup</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/jquery.min.js
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/jquery.min.js	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/jquery.min.js	(revision 5888)
@@ -0,0 +1,4 @@
+/*! jQuery v1.6.3 http://jquery.com/ | http://jquery.org/license */
+(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bA.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bP,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(Q.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(w,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.3",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g+"With"](this===b?d:this,[h])}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML="   <link><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type=checkbox>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u,v;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null
+,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,M(a.origType,a.selector),f.extend({},a,{handler:L,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,M(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?D:C):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=D;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=D;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=D,this.stopPropagation()},isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C};var E=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},F=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?F:E,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?F:E)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="submit"||c==="image")&&f(b).closest("form").length&&J("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&J("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var G,H=function(a){var b=f.nodeName(a,"input")?a.type:"",c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var K={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||C,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=w.exec(h),k="",j&&(k=j[0],h=h.replace(w,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,K[h]?(a.push(K[h]+k),h=h+k):h=(K[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+M(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+M(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var N=/Until$/,O=/^(?:parents|prevUntil|prevAll)/,P=/,/,Q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,S=f.expr.match.POS,T={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(V(this,a,!1),"not",a)},filter:function(a){return this.pushStack(V(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=S.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|object|embed|option|style)/i,bb=/checked\s*(?:[^=]|=\s*.checked.)/i,bc=/\/(java|ecma)script/i,bd=/^\s*<!(?:\[CDATA\[|\-\-)/,be={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bb.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!ba.test(a[0])&&(f.support.checkClone||!bb.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);
+return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bk(k[i]);else bk(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bc.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/([A-Z]|^ms)/g,bp=/^-?\d+(?:px)?$/i,bq=/^-?\d/,br=/^([\-+])=([\-+.\de]+)/,bs={position:"absolute",visibility:"hidden",display:"block"},bt=["Left","Right"],bu=["Top","Bottom"],bv,bw,bx;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bv(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=br.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bv)return bv(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return by(a,b,d);f.swap(a,bs,function(){e=by(a,b,d)});return e}},set:function(a,b){if(!bp.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cr(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cq("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cq("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cr(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cq("show",1),slideUp:cq("hide",1),slideToggle:cq("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return d.step(a)}var d=this,e=f.fx;this.startTime=cn||co(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&f.timers.push(g)&&!cl&&(cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||co(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cs=/^t(?:able|d|h)$/i,ct=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cu(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cs.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar_interceptors_Helpers.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar_interceptors_Helpers.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar_interceptors_Helpers.php.html	(revision 5888)
@@ -0,0 +1,284 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>Helpers.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">Helpers.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="modules.html">modules</a>/<a href="modules_calendar.html">calendar</a>/<a href="modules_calendar_interceptors.html">interceptors</a>/<a href="modules_calendar_interceptors_Helpers.php.html">Helpers.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 24</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">Helpers</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+          <td class="crap">56</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 24</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#5">futureEvent( $startTime , $rangeEnd )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">20</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 15</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#38">getOrganizer( &amp;$schedulable )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#43">lg($print, $name = '')</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 7</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                                                                                         
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                                                                                                               
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : class Helpers {                                                                                                                                                                                               
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                :                                                                                                                                                                                                               
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :     public static function futureEvent( $startTime , $rangeEnd )                                                                                                                                              
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :     {                                                                                                                                                                                                         
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :         //Verifica data                                                                                                                                                                                       
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span><span class="lineNoCov">              0 :         $range = new DateTime( '@'.(int)($rangeEnd / 1000) , new DateTimeZone('UTC') );                                                                                                                       </span>
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span><span class="lineNoCov">              0 :         list( $y1  , $m1 , $d1) = explode( '-' , $range-&gt;format('y-m-d'));                                                                                                                                    </span>
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :                                                                                                                                                                                                               
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span><span class="lineNoCov">              0 :         $rangeEndMicrotime = gmmktime(0, 0, 0, $m1 , $d1, $y1);                                                                                                                                               </span>
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span><span class="lineNoCov">              0 :         $nowMicrotime =   gmmktime(0, 0, 0);                                                                                                                                                                  </span>
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :                                                                                                                                                                                                               
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span><span class="lineNoCov">              0 :         if($rangeEndMicrotime &lt; $nowMicrotime )                                                                                                                                                               </span>
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span><span class="lineNoCov">              0 :             return false;                                                                                                                                                                                     </span>
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :                                                                                                                                                                                                               
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span><span class="lineNoCov">              0 :         if($rangeEndMicrotime  === $nowMicrotime ) //caso seja o mesmo dia verifica a hora do evento.                                                                                                         </span>
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span><span class="lineNoCov">              0 :         {                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span><span class="lineNoCov">              0 :             $sTime = new DateTime( '@'.(int)($startTime / 1000) , new DateTimeZone('UTC') );                                                                                                                  </span>
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span><span class="lineNoCov">              0 :             $eventHour = (date_format( $sTime , 'H') * 3600) + (date_format( $sTime , 'i') * 60) + date_format( $sTime , 's');                                                                                </span>
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span><span class="lineNoCov">              0 :             $nowHour = (gmdate('H') * 3600) + (gmdate('i') * 60) + gmdate('s');                                                                                                                               </span>
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :                                                                                                                                                                                                               
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span><span class="lineNoCov">              0 :             if( $eventHour  &lt;  $nowHour )                                                                                                                                                                     </span>
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span><span class="lineNoCov">              0 :                     return false;                                                                                                                                                                             </span>
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span><span class="lineNoCov">              0 :        return true;                                                                                                                                                                                           </span>
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :     }                                                                                                                                                                                                         
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :                                                                                                                                                                                                               
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :     /**                                                                                                                                                                                                       
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :     * Resgata o organizador do evento                                                                                                                                                                         
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :     *                                                                                                                                                                                                         
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :     * @license    http://www.gnu.org/copyleft/gpl.html GPL                                                                                                                                                    
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :     * @author     Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)                                                                                         
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :     * @sponsor    Caixa Econômica Federal                                                                                                                                                                     
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :     * @author     Cristiano Corrêa Schmidt                                                                                                                                                                    
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :     * @access     public                                                                                                                                                                                      
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :     */                                                                                                                                                                                                        
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span>                :     protected static function getOrganizer( &amp;$schedulable ) {                                                                                                                                                 
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span><span class="lineNoCov">              0 :          $f = Controller::find(array('concept' =&gt; 'participant') , false , array('deepness' =&gt; '1' , 'filter' =&gt; array('AND' , array('=', 'schedulable' , $schedulable ) , array('=', 'isOrganizer' , '1'))));</span>
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span><span class="lineNoCov">              0 :          return ( isset( $f[0] ) ) ? $f[0] : false;                                                                                                                                                           </span>
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :     }                                                                                                                                                                                                         
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :                                                                                                                                                                                                               
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :     public static function lg($print, $name = ''){                                                                                                                                                            
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span><span class="lineNoCov">              0 :     ob_start();                                                                                                                                                                                               </span>
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span><span class="lineNoCov">              0 :     print &quot;\n&quot;;                                                                                                                                                                                               </span>
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span><span class="lineNoCov">              0 :     print $name . &quot;: &quot;;                                                                                                                                                                                       </span>
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span><span class="lineNoCov">              0 :         print_r( $print );                                                                                                                                                                                    </span>
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span><span class="lineNoCov">              0 :         $output = ob_get_clean();                                                                                                                                                                             </span>
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span><span class="lineNoCov">              0 :         file_put_contents( &quot;/tmp/prototype.log&quot;, $output , FILE_APPEND );                                                                                                                                     </span>
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :                                                                                                                                                                                                               
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :                                                                                                                                                                                                               
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                : }                                                                                                                                                                                                             
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :                                                                                                                                                                                                               
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                : ?&gt;                                                                                                                                                                                                            
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/container-min.js
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/container-min.js	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/container-min.js	(revision 5888)
@@ -0,0 +1,19 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+(function(){YAHOO.util.Config=function(d){if(d){this.init(d);}};var b=YAHOO.lang,c=YAHOO.util.CustomEvent,a=YAHOO.util.Config;a.CONFIG_CHANGED_EVENT="configChanged";a.BOOLEAN_TYPE="boolean";a.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(d){this.owner=d;this.configChangedEvent=this.createEvent(a.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=c.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(d){return(typeof d==a.BOOLEAN_TYPE);},checkNumber:function(d){return(!isNaN(d));},fireEvent:function(d,f){var e=this.config[d];if(e&&e.event){e.event.fire(f);}},addProperty:function(e,d){e=e.toLowerCase();this.config[e]=d;d.event=this.createEvent(e,{scope:this.owner});d.event.signature=c.LIST;d.key=e;if(d.handler){d.event.subscribe(d.handler,this.owner);}this.setProperty(e,d.value,true);if(!d.suppressEvent){this.queueProperty(e,d.value);}},getConfig:function(){var d={},f=this.config,g,e;for(g in f){if(b.hasOwnProperty(f,g)){e=f[g];if(e&&e.event){d[g]=e.value;}}}return d;},getProperty:function(d){var e=this.config[d.toLowerCase()];if(e&&e.event){return e.value;}else{return undefined;}},resetProperty:function(d){d=d.toLowerCase();var e=this.config[d];if(e&&e.event){if(d in this.initialConfig){this.setProperty(d,this.initialConfig[d]);return true;}}else{return false;}},setProperty:function(e,g,d){var f;e=e.toLowerCase();if(this.queueInProgress&&!d){this.queueProperty(e,g);return true;}else{f=this.config[e];if(f&&f.event){if(f.validator&&!f.validator(g)){return false;}else{f.value=g;if(!d){this.fireEvent(e,g);this.configChangedEvent.fire([e,g]);}return true;}}else{return false;}}},queueProperty:function(v,r){v=v.toLowerCase();var u=this.config[v],l=false,k,g,h,j,p,t,f,n,o,d,m,w,e;if(u&&u.event){if(!b.isUndefined(r)&&u.validator&&!u.validator(r)){return false;}else{if(!b.isUndefined(r)){u.value=r;}else{r=u.value;}l=false;k=this.eventQueue.length;for(m=0;m<k;m++){g=this.eventQueue[m];if(g){h=g[0];j=g[1];if(h==v){this.eventQueue[m]=null;this.eventQueue.push([v,(!b.isUndefined(r)?r:j)]);l=true;break;}}}if(!l&&!b.isUndefined(r)){this.eventQueue.push([v,r]);}}if(u.supercedes){p=u.supercedes.length;for(w=0;w<p;w++){t=u.supercedes[w];f=this.eventQueue.length;for(e=0;e<f;e++){n=this.eventQueue[e];if(n){o=n[0];d=n[1];if(o==t.toLowerCase()){this.eventQueue.push([o,d]);this.eventQueue[e]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(d){d=d.toLowerCase();var e=this.config[d];if(e&&e.event&&!b.isUndefined(e.value)){if(this.queueInProgress){this.queueProperty(d);}else{this.fireEvent(d,e.value);}}},applyConfig:function(d,g){var f,e;if(g){e={};for(f in d){if(b.hasOwnProperty(d,f)){e[f.toLowerCase()]=d[f];}}this.initialConfig=e;}for(f in d){if(b.hasOwnProperty(d,f)){this.queueProperty(f,d[f]);}}},refresh:function(){var d;for(d in this.config){if(b.hasOwnProperty(this.config,d)){this.refireEvent(d);}}},fireQueue:function(){var e,h,d,g,f;this.queueInProgress=true;for(e=0;e<this.eventQueue.length;e++){h=this.eventQueue[e];if(h){d=h[0];g=h[1];f=this.config[d];f.value=g;this.eventQueue[e]=null;this.fireEvent(d,g);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(d,e,g,h){var f=this.config[d.toLowerCase()];if(f&&f.event){if(!a.alreadySubscribed(f.event,e,g)){f.event.subscribe(e,g,h);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(d,e,g){var f=this.config[d.toLowerCase()];if(f&&f.event){return f.event.unsubscribe(e,g);}else{return false;}},toString:function(){var d="Config";if(this.owner){d+=" ["+this.owner.toString()+"]";}return d;},outputEventQueue:function(){var d="",g,e,f=this.eventQueue.length;for(e=0;e<f;e++){g=this.eventQueue[e];if(g){d+=g[0]+"="+g[1]+", ";}}return d;},destroy:function(){var e=this.config,d,f;for(d in e){if(b.hasOwnProperty(e,d)){f=e[d];f.event.unsubscribeAll();f.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};a.alreadySubscribed=function(e,h,j){var f=e.subscribers.length,d,g;if(f>0){g=f-1;do{d=e.subscribers[g];if(d&&d.obj==j&&d.fn==h){return true;}}while(g--);}return false;};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(r,q){if(r){this.init(r,q);}else{}};var f=YAHOO.util.Dom,d=YAHOO.util.Config,n=YAHOO.util.Event,m=YAHOO.util.CustomEvent,g=YAHOO.widget.Module,i=YAHOO.env.ua,h,p,o,e,a={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTROY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},j={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};g.IMG_ROOT=null;g.IMG_ROOT_SSL=null;g.CSS_MODULE="yui-module";g.CSS_HEADER="hd";g.CSS_BODY="bd";g.CSS_FOOTER="ft";g.RESIZE_MONITOR_SECURE_URL="javascript:false;";g.RESIZE_MONITOR_BUFFER=1;g.textResizeEvent=new m("textResize");g.forceDocumentRedraw=function(){var q=document.documentElement;if(q){q.className+=" ";q.className=YAHOO.lang.trim(q.className);}};function l(){if(!h){h=document.createElement("div");h.innerHTML=('<div class="'+g.CSS_HEADER+'"></div>'+'<div class="'+g.CSS_BODY+'"></div><div class="'+g.CSS_FOOTER+'"></div>');p=h.firstChild;o=p.nextSibling;e=o.nextSibling;}return h;}function k(){if(!p){l();}return(p.cloneNode(false));}function b(){if(!o){l();}return(o.cloneNode(false));}function c(){if(!e){l();}return(e.cloneNode(false));}g.prototype={constructor:g,element:null,header:null,body:null,footer:null,id:null,imageRoot:g.IMG_ROOT,initEvents:function(){var q=m.LIST;
+this.beforeInitEvent=this.createEvent(a.BEFORE_INIT);this.beforeInitEvent.signature=q;this.initEvent=this.createEvent(a.INIT);this.initEvent.signature=q;this.appendEvent=this.createEvent(a.APPEND);this.appendEvent.signature=q;this.beforeRenderEvent=this.createEvent(a.BEFORE_RENDER);this.beforeRenderEvent.signature=q;this.renderEvent=this.createEvent(a.RENDER);this.renderEvent.signature=q;this.changeHeaderEvent=this.createEvent(a.CHANGE_HEADER);this.changeHeaderEvent.signature=q;this.changeBodyEvent=this.createEvent(a.CHANGE_BODY);this.changeBodyEvent.signature=q;this.changeFooterEvent=this.createEvent(a.CHANGE_FOOTER);this.changeFooterEvent.signature=q;this.changeContentEvent=this.createEvent(a.CHANGE_CONTENT);this.changeContentEvent.signature=q;this.destroyEvent=this.createEvent(a.DESTROY);this.destroyEvent.signature=q;this.beforeShowEvent=this.createEvent(a.BEFORE_SHOW);this.beforeShowEvent.signature=q;this.showEvent=this.createEvent(a.SHOW);this.showEvent.signature=q;this.beforeHideEvent=this.createEvent(a.BEFORE_HIDE);this.beforeHideEvent.signature=q;this.hideEvent=this.createEvent(a.HIDE);this.hideEvent.signature=q;},platform:function(){var q=navigator.userAgent.toLowerCase();if(q.indexOf("windows")!=-1||q.indexOf("win32")!=-1){return"windows";}else{if(q.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var q=navigator.userAgent.toLowerCase();if(q.indexOf("opera")!=-1){return"opera";}else{if(q.indexOf("msie 7")!=-1){return"ie7";}else{if(q.indexOf("msie")!=-1){return"ie";}else{if(q.indexOf("safari")!=-1){return"safari";}else{if(q.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(j.VISIBLE.key,{handler:this.configVisible,value:j.VISIBLE.value,validator:j.VISIBLE.validator});this.cfg.addProperty(j.EFFECT.key,{handler:this.configEffect,suppressEvent:j.EFFECT.suppressEvent,supercedes:j.EFFECT.supercedes});this.cfg.addProperty(j.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:j.MONITOR_RESIZE.value});this.cfg.addProperty(j.APPEND_TO_DOCUMENT_BODY.key,{value:j.APPEND_TO_DOCUMENT_BODY.value});},init:function(v,u){var s,w;this.initEvents();this.beforeInitEvent.fire(g);this.cfg=new d(this);if(this.isSecure){this.imageRoot=g.IMG_ROOT_SSL;}if(typeof v=="string"){s=v;v=document.getElementById(v);if(!v){v=(l()).cloneNode(false);v.id=s;}}this.id=f.generateId(v);this.element=v;w=this.element.firstChild;if(w){var r=false,q=false,t=false;do{if(1==w.nodeType){if(!r&&f.hasClass(w,g.CSS_HEADER)){this.header=w;r=true;}else{if(!q&&f.hasClass(w,g.CSS_BODY)){this.body=w;q=true;}else{if(!t&&f.hasClass(w,g.CSS_FOOTER)){this.footer=w;t=true;}}}}}while((w=w.nextSibling));}this.initDefaultConfig();f.addClass(this.element,g.CSS_MODULE);if(u){this.cfg.applyConfig(u,true);}if(!d.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(g);},initResizeMonitor:function(){var r=(i.gecko&&this.platform=="windows");if(r){var q=this;setTimeout(function(){q._initResizeMonitor();},0);}else{this._initResizeMonitor();}},_initResizeMonitor:function(){var q,s,u;function w(){g.textResizeEvent.fire();}if(!i.opera){s=f.get("_yuiResizeMonitor");var v=this._supportsCWResize();if(!s){s=document.createElement("iframe");if(this.isSecure&&g.RESIZE_MONITOR_SECURE_URL&&i.ie){s.src=g.RESIZE_MONITOR_SECURE_URL;}if(!v){u=["<html><head><script ",'type="text/javascript">',"window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","/script></head>","<body></body></html>"].join("");s.src="data:text/html;charset=utf-8,"+encodeURIComponent(u);}s.id="_yuiResizeMonitor";s.title="Text Resize Monitor";s.tabIndex=-1;s.setAttribute("role","presentation");s.style.position="absolute";s.style.visibility="hidden";var r=document.body,t=r.firstChild;if(t){r.insertBefore(s,t);}else{r.appendChild(s);}s.style.backgroundColor="transparent";s.style.borderWidth="0";s.style.width="2em";s.style.height="2em";s.style.left="0";s.style.top=(-1*(s.offsetHeight+g.RESIZE_MONITOR_BUFFER))+"px";s.style.visibility="visible";if(i.webkit){q=s.contentWindow.document;q.open();q.close();}}if(s&&s.contentWindow){g.textResizeEvent.subscribe(this.onDomResize,this,true);if(!g.textResizeInitialized){if(v){if(!n.on(s.contentWindow,"resize",w)){n.on(s,"resize",w);}}g.textResizeInitialized=true;}this.resizeMonitor=s;}}},_supportsCWResize:function(){var q=true;if(i.gecko&&i.gecko<=1.8){q=false;}return q;},onDomResize:function(s,r){var q=-1*(this.resizeMonitor.offsetHeight+g.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=q+"px";this.resizeMonitor.style.left="0";},setHeader:function(r){var q=this.header||(this.header=k());if(r.nodeName){q.innerHTML="";q.appendChild(r);}else{q.innerHTML=r;}if(this._rendered){this._renderHeader();}this.changeHeaderEvent.fire(r);this.changeContentEvent.fire();},appendToHeader:function(r){var q=this.header||(this.header=k());q.appendChild(r);this.changeHeaderEvent.fire(r);this.changeContentEvent.fire();},setBody:function(r){var q=this.body||(this.body=b());if(r.nodeName){q.innerHTML="";q.appendChild(r);}else{q.innerHTML=r;}if(this._rendered){this._renderBody();}this.changeBodyEvent.fire(r);this.changeContentEvent.fire();},appendToBody:function(r){var q=this.body||(this.body=b());q.appendChild(r);this.changeBodyEvent.fire(r);this.changeContentEvent.fire();},setFooter:function(r){var q=this.footer||(this.footer=c());if(r.nodeName){q.innerHTML="";q.appendChild(r);}else{q.innerHTML=r;}if(this._rendered){this._renderFooter();}this.changeFooterEvent.fire(r);this.changeContentEvent.fire();},appendToFooter:function(r){var q=this.footer||(this.footer=c());q.appendChild(r);this.changeFooterEvent.fire(r);this.changeContentEvent.fire();},render:function(s,q){var t=this;function r(u){if(typeof u=="string"){u=document.getElementById(u);
+}if(u){t._addToParent(u,t.element);t.appendEvent.fire();}}this.beforeRenderEvent.fire();if(!q){q=this.element;}if(s){r(s);}else{if(!f.inDocument(this.element)){return false;}}this._renderHeader(q);this._renderBody(q);this._renderFooter(q);this._rendered=true;this.renderEvent.fire();return true;},_renderHeader:function(q){q=q||this.element;if(this.header&&!f.inDocument(this.header)){var r=q.firstChild;if(r){q.insertBefore(this.header,r);}else{q.appendChild(this.header);}}},_renderBody:function(q){q=q||this.element;if(this.body&&!f.inDocument(this.body)){if(this.footer&&f.isAncestor(q,this.footer)){q.insertBefore(this.body,this.footer);}else{q.appendChild(this.body);}}},_renderFooter:function(q){q=q||this.element;if(this.footer&&!f.inDocument(this.footer)){q.appendChild(this.footer);}},destroy:function(q){var r,s=!(q);if(this.element){n.purgeElement(this.element,s);r=this.element.parentNode;}if(r){r.removeChild(this.element);}this.element=null;this.header=null;this.body=null;this.footer=null;g.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(r,q,s){var t=q[0];if(t){if(this.beforeShowEvent.fire()){f.setStyle(this.element,"display","block");this.showEvent.fire();}}else{if(this.beforeHideEvent.fire()){f.setStyle(this.element,"display","none");this.hideEvent.fire();}}},configEffect:function(r,q,s){this._cachedEffects=(this.cacheEffects)?this._createEffects(q[0]):null;},cacheEffects:true,_createEffects:function(t){var q=null,u,r,s;if(t){if(t instanceof Array){q=[];u=t.length;for(r=0;r<u;r++){s=t[r];if(s.effect){q[q.length]=s.effect(this,s.duration);}}}else{if(t.effect){q=[t.effect(this,t.duration)];}}}return q;},configMonitorResize:function(s,r,t){var q=r[0];if(q){this.initResizeMonitor();}else{g.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(q,r){if(!this.cfg.getProperty("appendtodocumentbody")&&q===document.body&&q.firstChild){q.insertBefore(r,q.firstChild);}else{q.appendChild(r);}},toString:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(g,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(p,o){YAHOO.widget.Overlay.superclass.constructor.call(this,p,o);};var i=YAHOO.lang,m=YAHOO.util.CustomEvent,g=YAHOO.widget.Module,n=YAHOO.util.Event,f=YAHOO.util.Dom,d=YAHOO.util.Config,k=YAHOO.env.ua,b=YAHOO.widget.Overlay,h="subscribe",e="unsubscribe",c="contained",j,a={"BEFORE_MOVE":"beforeMove","MOVE":"move"},l={"X":{key:"x",validator:i.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:i.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:i.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(k.ie==6?true:false),validator:i.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:i.isBoolean,supercedes:["constraintoviewport"]}};b.IFRAME_SRC="javascript:false;";b.IFRAME_OFFSET=3;b.VIEWPORT_OFFSET=10;b.TOP_LEFT="tl";b.TOP_RIGHT="tr";b.BOTTOM_LEFT="bl";b.BOTTOM_RIGHT="br";b.PREVENT_OVERLAP_X={"tltr":true,"blbr":true,"brbl":true,"trtl":true};b.PREVENT_OVERLAP_Y={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};b.CSS_OVERLAY="yui-overlay";b.CSS_HIDDEN="yui-overlay-hidden";b.CSS_IFRAME="yui-overlay-iframe";b.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;b.windowScrollEvent=new m("windowScroll");b.windowResizeEvent=new m("windowResize");b.windowScrollHandler=function(p){var o=n.getTarget(p);if(!o||o===window||o===window.document){if(k.ie){if(!window.scrollEnd){window.scrollEnd=-1;}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){b.windowScrollEvent.fire();},1);}else{b.windowScrollEvent.fire();}}};b.windowResizeHandler=function(o){if(k.ie){if(!window.resizeEnd){window.resizeEnd=-1;}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){b.windowResizeEvent.fire();},100);}else{b.windowResizeEvent.fire();}};b._initialized=null;if(b._initialized===null){n.on(window,"scroll",b.windowScrollHandler);n.on(window,"resize",b.windowResizeHandler);b._initialized=true;}b._TRIGGER_MAP={"windowScroll":b.windowScrollEvent,"windowResize":b.windowResizeEvent,"textResize":g.textResizeEvent};YAHOO.extend(b,g,{CONTEXT_TRIGGERS:[],init:function(p,o){b.superclass.init.call(this,p);this.beforeInitEvent.fire(b);f.addClass(this.element,b.CSS_OVERLAY);if(o){this.cfg.applyConfig(o,true);}if(this.platform=="mac"&&k.gecko){if(!d.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}if(!d.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}this.initEvent.fire(b);},initEvents:function(){b.superclass.initEvents.call(this);var o=m.LIST;this.beforeMoveEvent=this.createEvent(a.BEFORE_MOVE);this.beforeMoveEvent.signature=o;this.moveEvent=this.createEvent(a.MOVE);this.moveEvent.signature=o;},initDefaultConfig:function(){b.superclass.initDefaultConfig.call(this);var o=this.cfg;o.addProperty(l.X.key,{handler:this.configX,validator:l.X.validator,suppressEvent:l.X.suppressEvent,supercedes:l.X.supercedes});o.addProperty(l.Y.key,{handler:this.configY,validator:l.Y.validator,suppressEvent:l.Y.suppressEvent,supercedes:l.Y.supercedes});
+o.addProperty(l.XY.key,{handler:this.configXY,suppressEvent:l.XY.suppressEvent,supercedes:l.XY.supercedes});o.addProperty(l.CONTEXT.key,{handler:this.configContext,suppressEvent:l.CONTEXT.suppressEvent,supercedes:l.CONTEXT.supercedes});o.addProperty(l.FIXED_CENTER.key,{handler:this.configFixedCenter,value:l.FIXED_CENTER.value,validator:l.FIXED_CENTER.validator,supercedes:l.FIXED_CENTER.supercedes});o.addProperty(l.WIDTH.key,{handler:this.configWidth,suppressEvent:l.WIDTH.suppressEvent,supercedes:l.WIDTH.supercedes});o.addProperty(l.HEIGHT.key,{handler:this.configHeight,suppressEvent:l.HEIGHT.suppressEvent,supercedes:l.HEIGHT.supercedes});o.addProperty(l.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:l.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:l.AUTO_FILL_HEIGHT.supercedes});o.addProperty(l.ZINDEX.key,{handler:this.configzIndex,value:l.ZINDEX.value});o.addProperty(l.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:l.CONSTRAIN_TO_VIEWPORT.value,validator:l.CONSTRAIN_TO_VIEWPORT.validator,supercedes:l.CONSTRAIN_TO_VIEWPORT.supercedes});o.addProperty(l.IFRAME.key,{handler:this.configIframe,value:l.IFRAME.value,validator:l.IFRAME.validator,supercedes:l.IFRAME.supercedes});o.addProperty(l.PREVENT_CONTEXT_OVERLAP.key,{value:l.PREVENT_CONTEXT_OVERLAP.value,validator:l.PREVENT_CONTEXT_OVERLAP.validator,supercedes:l.PREVENT_CONTEXT_OVERLAP.supercedes});},moveTo:function(o,p){this.cfg.setProperty("xy",[o,p]);},hideMacGeckoScrollbars:function(){f.replaceClass(this.element,"show-scrollbars","hide-scrollbars");},showMacGeckoScrollbars:function(){f.replaceClass(this.element,"hide-scrollbars","show-scrollbars");},_setDomVisibility:function(o){f.setStyle(this.element,"visibility",(o)?"visible":"hidden");var p=b.CSS_HIDDEN;if(o){f.removeClass(this.element,p);}else{f.addClass(this.element,p);}},configVisible:function(x,w,t){var p=w[0],B=f.getStyle(this.element,"visibility"),o=this._cachedEffects||this._createEffects(this.cfg.getProperty("effect")),A=(this.platform=="mac"&&k.gecko),y=d.alreadySubscribed,q,v,s,r,u,z;if(B=="inherit"){v=this.element.parentNode;while(v.nodeType!=9&&v.nodeType!=11){B=f.getStyle(v,"visibility");if(B!="inherit"){break;}v=v.parentNode;}if(B=="inherit"){B="visible";}}if(p){if(A){this.showMacGeckoScrollbars();}if(o){if(p){if(B!="visible"||B===""||this._fadingOut){if(this.beforeShowEvent.fire()){z=o.length;for(s=0;s<z;s++){q=o[s];if(s===0&&!y(q.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){q.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}q.animateIn();}}}}}else{if(B!="visible"||B===""){if(this.beforeShowEvent.fire()){this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire();}}else{this._setDomVisibility(true);}}}else{if(A){this.hideMacGeckoScrollbars();}if(o){if(B=="visible"||this._fadingIn){if(this.beforeHideEvent.fire()){z=o.length;for(r=0;r<z;r++){u=o[r];if(r===0&&!y(u.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){u.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}u.animateOut();}}}else{if(B===""){this._setDomVisibility(false);}}}else{if(B=="visible"||B===""){if(this.beforeHideEvent.fire()){this._setDomVisibility(false);this.hideEvent.fire();}}else{this._setDomVisibility(false);}}}},doCenterOnDOMEvent:function(){var o=this.cfg,p=o.getProperty("fixedcenter");if(o.getProperty("visible")){if(p&&(p!==c||this.fitsInViewport())){this.center();}}},fitsInViewport:function(){var s=b.VIEWPORT_OFFSET,q=this.element,t=q.offsetWidth,r=q.offsetHeight,o=f.getViewportWidth(),p=f.getViewportHeight();return((t+s<o)&&(r+s<p));},configFixedCenter:function(s,q,t){var u=q[0],p=d.alreadySubscribed,r=b.windowResizeEvent,o=b.windowScrollEvent;if(u){this.center();if(!p(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center);}if(!p(r,this.doCenterOnDOMEvent,this)){r.subscribe(this.doCenterOnDOMEvent,this,true);}if(!p(o,this.doCenterOnDOMEvent,this)){o.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);r.unsubscribe(this.doCenterOnDOMEvent,this);o.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(r,p,s){var o=p[0],q=this.element;f.setStyle(q,"height",o);this.cfg.refireEvent("iframe");},configAutoFillHeight:function(t,s,p){var v=s[0],q=this.cfg,u="autofillheight",w="height",r=q.getProperty(u),o=this._autoFillOnHeightChange;q.unsubscribeFromConfigEvent(w,o);g.textResizeEvent.unsubscribe(o);this.changeContentEvent.unsubscribe(o);if(r&&v!==r&&this[r]){f.setStyle(this[r],w,"");}if(v){v=i.trim(v.toLowerCase());q.subscribeToConfigEvent(w,o,this[v],this);g.textResizeEvent.subscribe(o,this[v],this);this.changeContentEvent.subscribe(o,this[v],this);q.setProperty(u,v,true);}},configWidth:function(r,o,s){var q=o[0],p=this.element;f.setStyle(p,"width",q);this.cfg.refireEvent("iframe");},configzIndex:function(q,o,r){var s=o[0],p=this.element;if(!s){s=f.getStyle(p,"zIndex");if(!s||isNaN(s)){s=0;}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(s<=0){s=1;}}f.setStyle(p,"zIndex",s);this.cfg.setProperty("zIndex",s,true);if(this.iframe){this.stackIframe();}},configXY:function(q,p,r){var t=p[0],o=t[0],s=t[1];this.cfg.setProperty("x",o);this.cfg.setProperty("y",s);this.beforeMoveEvent.fire([o,s]);o=this.cfg.getProperty("x");s=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([o,s]);},configX:function(q,p,r){var o=p[0],s=this.cfg.getProperty("y");this.cfg.setProperty("x",o,true);this.cfg.setProperty("y",s,true);this.beforeMoveEvent.fire([o,s]);o=this.cfg.getProperty("x");s=this.cfg.getProperty("y");f.setX(this.element,o,true);this.cfg.setProperty("xy",[o,s],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([o,s]);},configY:function(q,p,r){var o=this.cfg.getProperty("x"),s=p[0];this.cfg.setProperty("x",o,true);this.cfg.setProperty("y",s,true);this.beforeMoveEvent.fire([o,s]);o=this.cfg.getProperty("x");s=this.cfg.getProperty("y");f.setY(this.element,s,true);
+this.cfg.setProperty("xy",[o,s],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([o,s]);},showIframe:function(){var p=this.iframe,o;if(p){o=this.element.parentNode;if(o!=p.parentNode){this._addToParent(o,p);}p.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var o=this.iframe,q=this.element,s=b.IFRAME_OFFSET,p=(s*2),r;if(o){o.style.width=(q.offsetWidth+p+"px");o.style.height=(q.offsetHeight+p+"px");r=this.cfg.getProperty("xy");if(!i.isArray(r)||(isNaN(r[0])||isNaN(r[1]))){this.syncPosition();r=this.cfg.getProperty("xy");}f.setXY(o,[(r[0]-s),(r[1]-s)]);}},stackIframe:function(){if(this.iframe){var o=f.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(o)&&!isNaN(o)){f.setStyle(this.iframe,"zIndex",(o-1));}}},configIframe:function(r,q,s){var o=q[0];function t(){var v=this.iframe,w=this.element,x;if(!v){if(!j){j=document.createElement("iframe");if(this.isSecure){j.src=b.IFRAME_SRC;}if(k.ie){j.style.filter="alpha(opacity=0)";j.frameBorder=0;}else{j.style.opacity="0";}j.style.position="absolute";j.style.border="none";j.style.margin="0";j.style.padding="0";j.style.display="none";j.tabIndex=-1;j.className=b.CSS_IFRAME;}v=j.cloneNode(false);v.id=this.id+"_f";x=w.parentNode;var u=x||document.body;this._addToParent(u,v);this.iframe=v;}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}function p(){t.call(this);this.beforeShowEvent.unsubscribe(p);this._iframeDeferred=false;}if(o){if(this.cfg.getProperty("visible")){t.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(p);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);}},configConstrainToViewport:function(p,o,q){var r=o[0];if(r){if(!d.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}if(!d.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM);}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(u,t,q){var x=t[0],r,o,v,s,p,w=this.CONTEXT_TRIGGERS;if(x){r=x[0];o=x[1];v=x[2];s=x[3];p=x[4];if(w&&w.length>0){s=(s||[]).concat(w);}if(r){if(typeof r=="string"){this.cfg.setProperty("context",[document.getElementById(r),o,v,s,p],true);}if(o&&v){this.align(o,v,p);}if(this._contextTriggers){this._processTriggers(this._contextTriggers,e,this._alignOnTrigger);}if(s){this._processTriggers(s,h,this._alignOnTrigger);this._contextTriggers=s;}}}},_alignOnTrigger:function(p,o){this.align();},_findTriggerCE:function(o){var p=null;if(o instanceof m){p=o;}else{if(b._TRIGGER_MAP[o]){p=b._TRIGGER_MAP[o];}}return p;},_processTriggers:function(s,v,r){var q,u;for(var p=0,o=s.length;p<o;++p){q=s[p];u=this._findTriggerCE(q);if(u){u[v](r,this,true);}else{this[v](q,r);}}},align:function(p,w,s){var v=this.cfg.getProperty("context"),t=this,o,q,u;function r(z,A){var y=null,x=null;switch(p){case b.TOP_LEFT:y=A;x=z;break;case b.TOP_RIGHT:y=A-q.offsetWidth;x=z;break;case b.BOTTOM_LEFT:y=A;x=z-q.offsetHeight;break;case b.BOTTOM_RIGHT:y=A-q.offsetWidth;x=z-q.offsetHeight;break;}if(y!==null&&x!==null){if(s){y+=s[0];x+=s[1];}t.moveTo(y,x);}}if(v){o=v[0];q=this.element;t=this;if(!p){p=v[1];}if(!w){w=v[2];}if(!s&&v[4]){s=v[4];}if(q&&o){u=f.getRegion(o);switch(w){case b.TOP_LEFT:r(u.top,u.left);break;case b.TOP_RIGHT:r(u.top,u.right);break;case b.BOTTOM_LEFT:r(u.bottom,u.left);break;case b.BOTTOM_RIGHT:r(u.bottom,u.right);break;}}}},enforceConstraints:function(p,o,q){var s=o[0];var r=this.getConstrainedXY(s[0],s[1]);this.cfg.setProperty("x",r[0],true);this.cfg.setProperty("y",r[1],true);this.cfg.setProperty("xy",r,true);},_getConstrainedPos:function(y,p){var t=this.element,r=b.VIEWPORT_OFFSET,A=(y=="x"),z=(A)?t.offsetWidth:t.offsetHeight,s=(A)?f.getViewportWidth():f.getViewportHeight(),D=(A)?f.getDocumentScrollLeft():f.getDocumentScrollTop(),C=(A)?b.PREVENT_OVERLAP_X:b.PREVENT_OVERLAP_Y,o=this.cfg.getProperty("context"),u=(z+r<s),w=this.cfg.getProperty("preventcontextoverlap")&&o&&C[(o[1]+o[2])],v=D+r,B=D+s-z-r,q=p;if(p<v||p>B){if(w){q=this._preventOverlap(y,o[0],z,s,D);}else{if(u){if(p<v){q=v;}else{if(p>B){q=B;}}}else{q=v;}}}return q;},_preventOverlap:function(y,w,z,u,C){var A=(y=="x"),t=b.VIEWPORT_OFFSET,s=this,q=((A)?f.getX(w):f.getY(w))-C,o=(A)?w.offsetWidth:w.offsetHeight,p=q-t,r=(u-(q+o))-t,D=false,v=function(){var x;if((s.cfg.getProperty(y)-C)>q){x=(q-z);}else{x=(q+o);}s.cfg.setProperty(y,(x+C),true);return x;},B=function(){var E=((s.cfg.getProperty(y)-C)>q)?r:p,x;if(z>E){if(D){v();}else{v();D=true;x=B();}}return x;};B();return this.cfg.getProperty(y);},getConstrainedX:function(o){return this._getConstrainedPos("x",o);},getConstrainedY:function(o){return this._getConstrainedPos("y",o);},getConstrainedXY:function(o,p){return[this.getConstrainedX(o),this.getConstrainedY(p)];},center:function(){var r=b.VIEWPORT_OFFSET,s=this.element.offsetWidth,q=this.element.offsetHeight,p=f.getViewportWidth(),t=f.getViewportHeight(),o,u;if(s<p){o=(p/2)-(s/2)+f.getDocumentScrollLeft();}else{o=r+f.getDocumentScrollLeft();}if(q<t){u=(t/2)-(q/2)+f.getDocumentScrollTop();}else{u=r+f.getDocumentScrollTop();}this.cfg.setProperty("xy",[parseInt(o,10),parseInt(u,10)]);this.cfg.refireEvent("iframe");if(k.webkit){this.forceContainerRedraw();}},syncPosition:function(){var o=f.getXY(this.element);
+this.cfg.setProperty("x",o[0],true);this.cfg.setProperty("y",o[1],true);this.cfg.setProperty("xy",o,true);},onDomResize:function(q,p){var o=this;b.superclass.onDomResize.call(this,q,p);setTimeout(function(){o.syncPosition();o.cfg.refireEvent("iframe");o.cfg.refireEvent("context");},0);},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(p){var o=null;if(p.ownerDocument&&p.ownerDocument.defaultView){var q=p.ownerDocument.defaultView.getComputedStyle(p,"");if(q){o=parseInt(q.height,10);}}return(i.isNumber(o))?o:null;};}else{return function(p){var o=null;if(p.style.pixelHeight){o=p.style.pixelHeight;}return(i.isNumber(o))?o:null;};}})(),_validateAutoFillHeight:function(o){return(!o)||(i.isString(o)&&b.STD_MOD_RE.test(o));},_autoFillOnHeightChange:function(r,p,q){var o=this.cfg.getProperty("height");if((o&&o!=="auto")||(o===0)){this.fillHeight(q);}},_getPreciseHeight:function(p){var o=p.offsetHeight;if(p.getBoundingClientRect){var q=p.getBoundingClientRect();o=q.bottom-q.top;}return o;},fillHeight:function(r){if(r){var p=this.innerElement||this.element,o=[this.header,this.body,this.footer],v,w=0,x=0,t=0,q=false;for(var u=0,s=o.length;u<s;u++){v=o[u];if(v){if(r!==v){x+=this._getPreciseHeight(v);}else{q=true;}}}if(q){if(k.ie||k.opera){f.setStyle(r,"height",0+"px");}w=this._getComputedHeight(p);if(w===null){f.addClass(p,"yui-override-padding");w=p.clientHeight;f.removeClass(p,"yui-override-padding");}t=Math.max(w-x,0);f.setStyle(r,"height",t+"px");if(r.offsetHeight!=t){t=Math.max(t-(r.offsetHeight-t),0);}f.setStyle(r,"height",t+"px");}}},bringToTop:function(){var s=[],r=this.element;function v(z,y){var B=f.getStyle(z,"zIndex"),A=f.getStyle(y,"zIndex"),x=(!B||isNaN(B))?0:parseInt(B,10),w=(!A||isNaN(A))?0:parseInt(A,10);if(x>w){return -1;}else{if(x<w){return 1;}else{return 0;}}}function q(y){var x=f.hasClass(y,b.CSS_OVERLAY),w=YAHOO.widget.Panel;if(x&&!f.isAncestor(r,y)){if(w&&f.hasClass(y,w.CSS_PANEL)){s[s.length]=y.parentNode;}else{s[s.length]=y;}}}f.getElementsBy(q,"div",document.body);s.sort(v);var o=s[0],u;if(o){u=f.getStyle(o,"zIndex");if(!isNaN(u)){var t=false;if(o!=r){t=true;}else{if(s.length>1){var p=f.getStyle(s[1],"zIndex");if(!isNaN(p)&&(u==p)){t=true;}}}if(t){this.cfg.setProperty("zindex",(parseInt(u,10)+2));}}}},destroy:function(o){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;b.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);b.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);g.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);if(this._contextTriggers){this._processTriggers(this._contextTriggers,e,this._alignOnTrigger);}b.superclass.destroy.call(this,o);},forceContainerRedraw:function(){var o=this;f.addClass(o.element,"yui-force-redraw");setTimeout(function(){f.removeClass(o.element,"yui-force-redraw");},0);},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(g){this.init(g);};var d=YAHOO.widget.Overlay,c=YAHOO.util.Event,e=YAHOO.util.Dom,b=YAHOO.util.Config,f=YAHOO.util.CustomEvent,a=YAHOO.widget.OverlayManager;a.CSS_FOCUSED="focused";a.prototype={constructor:a,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(i){this.cfg=new b(this);this.initDefaultConfig();if(i){this.cfg.applyConfig(i,true);}this.cfg.fireQueue();var h=null;this.getActive=function(){return h;};this.focus=function(j){var k=this.find(j);if(k){k.focus();}};this.remove=function(k){var m=this.find(k),j;if(m){if(h==m){h=null;}var l=(m.element===null&&m.cfg===null)?true:false;if(!l){j=e.getStyle(m.element,"zIndex");m.cfg.setProperty("zIndex",-1000,true);}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));m.hideEvent.unsubscribe(m.blur);m.destroyEvent.unsubscribe(this._onOverlayDestroy,m);m.focusEvent.unsubscribe(this._onOverlayFocusHandler,m);m.blurEvent.unsubscribe(this._onOverlayBlurHandler,m);if(!l){c.removeListener(m.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);m.cfg.setProperty("zIndex",j,true);m.cfg.setProperty("manager",null);}if(m.focusEvent._managed){m.focusEvent=null;}if(m.blurEvent._managed){m.blurEvent=null;}if(m.focus._managed){m.focus=null;}if(m.blur._managed){m.blur=null;}}};this.blurAll=function(){var k=this.overlays.length,j;if(k>0){j=k-1;do{this.overlays[j].blur();}while(j--);}};this._manageBlur=function(j){var k=false;if(h==j){e.removeClass(h.element,a.CSS_FOCUSED);h=null;k=true;}return k;};this._manageFocus=function(j){var k=false;if(h!=j){if(h){h.blur();}h=j;this.bringToTop(h);e.addClass(h.element,a.CSS_FOCUSED);k=true;}return k;};var g=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}if(g){this.register(g);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(i){var g=c.getTarget(i),h=this.close;if(h&&(g==h||e.isAncestor(h,g))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(h,g,i){this.remove(i);},_onOverlayFocusHandler:function(h,g,i){this._manageFocus(i);},_onOverlayBlurHandler:function(h,g,i){this._manageBlur(i);},_bindFocus:function(g){var h=this;if(!g.focusEvent){g.focusEvent=g.createEvent("focus");g.focusEvent.signature=f.LIST;g.focusEvent._managed=true;}else{g.focusEvent.subscribe(h._onOverlayFocusHandler,g,h);}if(!g.focus){c.on(g.element,h.cfg.getProperty("focusevent"),h._onOverlayElementFocus,null,g);g.focus=function(){if(h._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst();}this.focusEvent.fire();}};g.focus._managed=true;}},_bindBlur:function(g){var h=this;if(!g.blurEvent){g.blurEvent=g.createEvent("blur");g.blurEvent.signature=f.LIST;g.focusEvent._managed=true;}else{g.blurEvent.subscribe(h._onOverlayBlurHandler,g,h);}if(!g.blur){g.blur=function(){if(h._manageBlur(this)){this.blurEvent.fire();}};g.blur._managed=true;}g.hideEvent.subscribe(g.blur);
+},_bindDestroy:function(g){var h=this;g.destroyEvent.subscribe(h._onOverlayDestroy,g,h);},_syncZIndex:function(g){var h=e.getStyle(g.element,"zIndex");if(!isNaN(h)){g.cfg.setProperty("zIndex",parseInt(h,10));}else{g.cfg.setProperty("zIndex",0);}},register:function(g){var k=false,h,j;if(g instanceof d){g.cfg.addProperty("manager",{value:this});this._bindFocus(g);this._bindBlur(g);this._bindDestroy(g);this._syncZIndex(g);this.overlays.push(g);this.bringToTop(g);k=true;}else{if(g instanceof Array){for(h=0,j=g.length;h<j;h++){k=this.register(g[h])||k;}}}return k;},bringToTop:function(m){var i=this.find(m),l,g,j;if(i){j=this.overlays;j.sort(this.compareZIndexDesc);g=j[0];if(g){l=e.getStyle(g.element,"zIndex");if(!isNaN(l)){var k=false;if(g!==i){k=true;}else{if(j.length>1){var h=e.getStyle(j[1].element,"zIndex");if(!isNaN(h)&&(l==h)){k=true;}}}if(k){i.cfg.setProperty("zindex",(parseInt(l,10)+2));}}j.sort(this.compareZIndexDesc);}}},find:function(g){var l=g instanceof d,j=this.overlays,p=j.length,k=null,m,h;if(l||typeof g=="string"){for(h=p-1;h>=0;h--){m=j[h];if((l&&(m===g))||(m.id==g)){k=m;break;}}}return k;},compareZIndexDesc:function(j,i){var h=(j.cfg)?j.cfg.getProperty("zIndex"):null,g=(i.cfg)?i.cfg.getProperty("zIndex"):null;if(h===null&&g===null){return 0;}else{if(h===null){return 1;}else{if(g===null){return -1;}else{if(h>g){return -1;}else{if(h<g){return 1;}else{return 0;}}}}}},showAll:function(){var h=this.overlays,j=h.length,g;for(g=j-1;g>=0;g--){h[g].show();}},hideAll:function(){var h=this.overlays,j=h.length,g;for(g=j-1;g>=0;g--){h[g].hide();}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.Tooltip=function(p,o){YAHOO.widget.Tooltip.superclass.constructor.call(this,p,o);};var e=YAHOO.lang,n=YAHOO.util.Event,m=YAHOO.util.CustomEvent,c=YAHOO.util.Dom,j=YAHOO.widget.Tooltip,h=YAHOO.env.ua,g=(h.ie&&(h.ie<=6||document.compatMode=="BackCompat")),f,i={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:e.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:e.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:e.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:e.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"},"DISABLED":{key:"disabled",value:false,suppressEvent:true},"XY_OFFSET":{key:"xyoffset",value:[0,25],suppressEvent:true}},a={"CONTEXT_MOUSE_OVER":"contextMouseOver","CONTEXT_MOUSE_OUT":"contextMouseOut","CONTEXT_TRIGGER":"contextTrigger"};j.CSS_TOOLTIP="yui-tt";function k(q,o){var p=this.cfg,r=p.getProperty("width");if(r==o){p.setProperty("width",q);}}function d(p,o){if("_originalWidth" in this){k.call(this,this._originalWidth,this._forcedWidth);}var q=document.body,u=this.cfg,t=u.getProperty("width"),r,s;if((!t||t=="auto")&&(u.getProperty("container")!=q||u.getProperty("x")>=c.getViewportWidth()||u.getProperty("y")>=c.getViewportHeight())){s=this.element.cloneNode(true);s.style.visibility="hidden";s.style.top="0px";s.style.left="0px";q.appendChild(s);r=(s.offsetWidth+"px");q.removeChild(s);s=null;u.setProperty("width",r);u.refireEvent("xy");this._originalWidth=t||"";this._forcedWidth=r;}}function b(p,o,q){this.render(q);}function l(){n.onDOMReady(b,this.cfg.getProperty("container"),this);}YAHOO.extend(j,YAHOO.widget.Overlay,{init:function(p,o){j.superclass.init.call(this,p);this.beforeInitEvent.fire(j);c.addClass(this.element,j.CSS_TOOLTIP);if(o){this.cfg.applyConfig(o,true);}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("changeContent",d);this.subscribe("init",l);this.subscribe("render",this.onRender);this.initEvent.fire(j);},initEvents:function(){j.superclass.initEvents.call(this);var o=m.LIST;this.contextMouseOverEvent=this.createEvent(a.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=o;this.contextMouseOutEvent=this.createEvent(a.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=o;this.contextTriggerEvent=this.createEvent(a.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=o;},initDefaultConfig:function(){j.superclass.initDefaultConfig.call(this);this.cfg.addProperty(i.PREVENT_OVERLAP.key,{value:i.PREVENT_OVERLAP.value,validator:i.PREVENT_OVERLAP.validator,supercedes:i.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(i.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:i.SHOW_DELAY.validator});this.cfg.addProperty(i.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:i.AUTO_DISMISS_DELAY.value,validator:i.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(i.HIDE_DELAY.key,{handler:this.configHideDelay,value:i.HIDE_DELAY.value,validator:i.HIDE_DELAY.validator});this.cfg.addProperty(i.TEXT.key,{handler:this.configText,suppressEvent:i.TEXT.suppressEvent});this.cfg.addProperty(i.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(i.DISABLED.key,{handler:this.configContainer,value:i.DISABLED.value,supressEvent:i.DISABLED.suppressEvent});this.cfg.addProperty(i.XY_OFFSET.key,{value:i.XY_OFFSET.value.concat(),supressEvent:i.XY_OFFSET.suppressEvent});},configText:function(p,o,q){var r=o[0];if(r){this.setBody(r);}},configContainer:function(q,p,r){var o=p[0];if(typeof o=="string"){this.cfg.setProperty("container",document.getElementById(o),true);}},_removeEventListeners:function(){var r=this._context,o,q,p;if(r){o=r.length;if(o>0){p=o-1;do{q=r[p];n.removeListener(q,"mouseover",this.onContextMouseOver);n.removeListener(q,"mousemove",this.onContextMouseMove);n.removeListener(q,"mouseout",this.onContextMouseOut);}while(p--);}}},configContext:function(t,p,u){var s=p[0],v,o,r,q;if(s){if(!(s instanceof Array)){if(typeof s=="string"){this.cfg.setProperty("context",[document.getElementById(s)],true);}else{this.cfg.setProperty("context",[s],true);}s=this.cfg.getProperty("context");}this._removeEventListeners();this._context=s;v=this._context;if(v){o=v.length;if(o>0){q=o-1;do{r=v[q];n.on(r,"mouseover",this.onContextMouseOver,this);
+n.on(r,"mousemove",this.onContextMouseMove,this);n.on(r,"mouseout",this.onContextMouseOut,this);}while(q--);}}}},onContextMouseMove:function(p,o){o.pageX=n.getPageX(p);o.pageY=n.getPageY(p);},onContextMouseOver:function(q,p){var o=this;if(o.title){p._tempTitle=o.title;o.title="";}if(p.fireEvent("contextMouseOver",o,q)!==false&&!p.cfg.getProperty("disabled")){if(p.hideProcId){clearTimeout(p.hideProcId);p.hideProcId=null;}n.on(o,"mousemove",p.onContextMouseMove,p);p.showProcId=p.doShow(q,o);}},onContextMouseOut:function(q,p){var o=this;if(p._tempTitle){o.title=p._tempTitle;p._tempTitle=null;}if(p.showProcId){clearTimeout(p.showProcId);p.showProcId=null;}if(p.hideProcId){clearTimeout(p.hideProcId);p.hideProcId=null;}p.fireEvent("contextMouseOut",o,q);p.hideProcId=setTimeout(function(){p.hide();},p.cfg.getProperty("hidedelay"));},doShow:function(r,o){var t=this.cfg.getProperty("xyoffset"),p=t[0],s=t[1],q=this;if(h.opera&&o.tagName&&o.tagName.toUpperCase()=="A"){s+=12;}return setTimeout(function(){var u=q.cfg.getProperty("text");if(q._tempTitle&&(u===""||YAHOO.lang.isUndefined(u)||YAHOO.lang.isNull(u))){q.setBody(q._tempTitle);}else{q.cfg.refireEvent("text");}q.moveTo(q.pageX+p,q.pageY+s);if(q.cfg.getProperty("preventoverlap")){q.preventOverlap(q.pageX,q.pageY);}n.removeListener(o,"mousemove",q.onContextMouseMove);q.contextTriggerEvent.fire(o);q.show();q.hideProcId=q.doHide();},this.cfg.getProperty("showdelay"));},doHide:function(){var o=this;return setTimeout(function(){o.hide();},this.cfg.getProperty("autodismissdelay"));},preventOverlap:function(s,r){var o=this.element.offsetHeight,q=new YAHOO.util.Point(s,r),p=c.getRegion(this.element);p.top-=5;p.left-=5;p.right+=5;p.bottom+=5;if(p.contains(q)){this.cfg.setProperty("y",(r-o-5));}},onRender:function(s,r){function t(){var w=this.element,v=this.underlay;if(v){v.style.width=(w.offsetWidth+6)+"px";v.style.height=(w.offsetHeight+1)+"px";}}function p(){c.addClass(this.underlay,"yui-tt-shadow-visible");if(h.ie){this.forceUnderlayRedraw();}}function o(){c.removeClass(this.underlay,"yui-tt-shadow-visible");}function u(){var x=this.underlay,w,v,z,y;if(!x){w=this.element;v=YAHOO.widget.Module;z=h.ie;y=this;if(!f){f=document.createElement("div");f.className="yui-tt-shadow";}x=f.cloneNode(false);w.appendChild(x);this.underlay=x;this._shadow=this.underlay;p.call(this);this.subscribe("beforeShow",p);this.subscribe("hide",o);if(g){window.setTimeout(function(){t.call(y);},0);this.cfg.subscribeToConfigEvent("width",t);this.cfg.subscribeToConfigEvent("height",t);this.subscribe("changeContent",t);v.textResizeEvent.subscribe(t,this,true);this.subscribe("destroy",function(){v.textResizeEvent.unsubscribe(t,this);});}}}function q(){u.call(this);this.unsubscribe("beforeShow",q);}if(this.cfg.getProperty("visible")){u.call(this);}else{this.subscribe("beforeShow",q);}},forceUnderlayRedraw:function(){var o=this;c.addClass(o.underlay,"yui-force-redraw");setTimeout(function(){c.removeClass(o.underlay,"yui-force-redraw");},0);},destroy:function(){this._removeEventListeners();j.superclass.destroy.call(this);},toString:function(){return"Tooltip "+this.id;}});}());(function(){YAHOO.widget.Panel=function(v,u){YAHOO.widget.Panel.superclass.constructor.call(this,v,u);};var s=null;var e=YAHOO.lang,f=YAHOO.util,a=f.Dom,t=f.Event,m=f.CustomEvent,k=YAHOO.util.KeyListener,i=f.Config,h=YAHOO.widget.Overlay,o=YAHOO.widget.Panel,l=YAHOO.env.ua,p=(l.ie&&(l.ie<=6||document.compatMode=="BackCompat")),g,q,c,d={"BEFORE_SHOW_MASK":"beforeShowMask","BEFORE_HIDE_MASK":"beforeHideMask","SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},n={"CLOSE":{key:"close",value:true,validator:e.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(f.DD?true:false),validator:e.isBoolean,supercedes:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:e.isBoolean,supercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:e.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]},"STRINGS":{key:"strings",supercedes:["close"],validator:e.isObject,value:{close:"Close"}}};o.CSS_PANEL="yui-panel";o.CSS_PANEL_CONTAINER="yui-panel-container";o.FOCUSABLE=["a","button","select","textarea","input","iframe"];function j(v,u){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;");}}function r(v,u,w){var z=w[0],x=w[1],y=this.cfg,A=y.getProperty("width");if(A==x){y.setProperty("width",z);}this.unsubscribe("hide",r,w);}function b(v,u){var y,x,w;if(p){y=this.cfg;x=y.getProperty("width");if(!x||x=="auto"){w=(this.element.offsetWidth+"px");y.setProperty("width",w);this.subscribe("hide",r,[(x||""),w]);}}}YAHOO.extend(o,h,{init:function(v,u){o.superclass.init.call(this,v);this.beforeInitEvent.fire(o);a.addClass(this.element,o.CSS_PANEL);this.buildWrapper();if(u){this.cfg.applyConfig(u,true);}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",j);this.subscribe("render",function(){this.setFirstLastFocusable();this.subscribe("changeContent",this.setFirstLastFocusable);});this.subscribe("show",this._focusOnShow);this.initEvent.fire(o);},_onElementFocus:function(z){if(s===this){var y=t.getTarget(z),x=document.documentElement,v=(y!==x&&y!==window);if(v&&y!==this.element&&y!==this.mask&&!a.isAncestor(this.element,y)){try{this._focusFirstModal();}catch(w){try{if(v&&y!==document.body){y.blur();}}catch(u){}}}}},_focusFirstModal:function(){var u=this.firstElement;if(u){u.focus();}else{if(this._modalFocus){this._modalFocus.focus();}else{this.innerElement.focus();}}},_addFocusHandlers:function(v,u){if(!this.firstElement){if(l.webkit||l.opera){if(!this._modalFocus){this._createHiddenFocusElement();}}else{this.innerElement.tabIndex=0;}}this._setTabLoop(this.firstElement,this.lastElement);t.onFocus(document.documentElement,this._onElementFocus,this,true);s=this;},_createHiddenFocusElement:function(){var u=document.createElement("button");
+u.style.height="1px";u.style.width="1px";u.style.position="absolute";u.style.left="-10000em";u.style.opacity=0;u.tabIndex=-1;this.innerElement.appendChild(u);this._modalFocus=u;},_removeFocusHandlers:function(v,u){t.removeFocusListener(document.documentElement,this._onElementFocus,this);if(s==this){s=null;}},_focusOnShow:function(v,u,w){if(u&&u[1]){t.stopEvent(u[1]);}if(!this.focusFirst(v,u,w)){if(this.cfg.getProperty("modal")){this._focusFirstModal();}}},focusFirst:function(w,u,z){var v=this.firstElement,y=false;if(u&&u[1]){t.stopEvent(u[1]);}if(v){try{v.focus();y=true;}catch(x){}}return y;},focusLast:function(w,u,z){var v=this.lastElement,y=false;if(u&&u[1]){t.stopEvent(u[1]);}if(v){try{v.focus();y=true;}catch(x){}}return y;},_setTabLoop:function(u,v){this.setTabLoop(u,v);},setTabLoop:function(x,z){var v=this.preventBackTab,w=this.preventTabOut,u=this.showEvent,y=this.hideEvent;if(v){v.disable();u.unsubscribe(v.enable,v);y.unsubscribe(v.disable,v);v=this.preventBackTab=null;}if(w){w.disable();u.unsubscribe(w.enable,w);y.unsubscribe(w.disable,w);w=this.preventTabOut=null;}if(x){this.preventBackTab=new k(x,{shift:true,keys:9},{fn:this.focusLast,scope:this,correctScope:true});v=this.preventBackTab;u.subscribe(v.enable,v,true);y.subscribe(v.disable,v,true);}if(z){this.preventTabOut=new k(z,{shift:false,keys:9},{fn:this.focusFirst,scope:this,correctScope:true});w=this.preventTabOut;u.subscribe(w.enable,w,true);y.subscribe(w.disable,w,true);}},getFocusableElements:function(v){v=v||this.innerElement;var x={},u=this;for(var w=0;w<o.FOCUSABLE.length;w++){x[o.FOCUSABLE[w]]=true;}return a.getElementsBy(function(y){return u._testIfFocusable(y,x);},null,v);},_testIfFocusable:function(u,v){if(u.focus&&u.type!=="hidden"&&!u.disabled&&v[u.tagName.toLowerCase()]){return true;}return false;},setFirstLastFocusable:function(){this.firstElement=null;this.lastElement=null;var u=this.getFocusableElements();this.focusableElements=u;if(u.length>0){this.firstElement=u[0];this.lastElement=u[u.length-1];}if(this.cfg.getProperty("modal")){this._setTabLoop(this.firstElement,this.lastElement);}},initEvents:function(){o.superclass.initEvents.call(this);var u=m.LIST;this.showMaskEvent=this.createEvent(d.SHOW_MASK);this.showMaskEvent.signature=u;this.beforeShowMaskEvent=this.createEvent(d.BEFORE_SHOW_MASK);this.beforeShowMaskEvent.signature=u;this.hideMaskEvent=this.createEvent(d.HIDE_MASK);this.hideMaskEvent.signature=u;this.beforeHideMaskEvent=this.createEvent(d.BEFORE_HIDE_MASK);this.beforeHideMaskEvent.signature=u;this.dragEvent=this.createEvent(d.DRAG);this.dragEvent.signature=u;},initDefaultConfig:function(){o.superclass.initDefaultConfig.call(this);this.cfg.addProperty(n.CLOSE.key,{handler:this.configClose,value:n.CLOSE.value,validator:n.CLOSE.validator,supercedes:n.CLOSE.supercedes});this.cfg.addProperty(n.DRAGGABLE.key,{handler:this.configDraggable,value:(f.DD)?true:false,validator:n.DRAGGABLE.validator,supercedes:n.DRAGGABLE.supercedes});this.cfg.addProperty(n.DRAG_ONLY.key,{value:n.DRAG_ONLY.value,validator:n.DRAG_ONLY.validator,supercedes:n.DRAG_ONLY.supercedes});this.cfg.addProperty(n.UNDERLAY.key,{handler:this.configUnderlay,value:n.UNDERLAY.value,supercedes:n.UNDERLAY.supercedes});this.cfg.addProperty(n.MODAL.key,{handler:this.configModal,value:n.MODAL.value,validator:n.MODAL.validator,supercedes:n.MODAL.supercedes});this.cfg.addProperty(n.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:n.KEY_LISTENERS.suppressEvent,supercedes:n.KEY_LISTENERS.supercedes});this.cfg.addProperty(n.STRINGS.key,{value:n.STRINGS.value,handler:this.configStrings,validator:n.STRINGS.validator,supercedes:n.STRINGS.supercedes});},configClose:function(y,v,z){var A=v[0],x=this.close,u=this.cfg.getProperty("strings"),w;if(A){if(!x){if(!c){c=document.createElement("a");c.className="container-close";c.href="#";}x=c.cloneNode(true);w=this.innerElement.firstChild;if(w){this.innerElement.insertBefore(x,w);}else{this.innerElement.appendChild(x);}x.innerHTML=(u&&u.close)?u.close:"&#160;";t.on(x,"click",this._doClose,this,true);this.close=x;}else{x.style.display="block";}}else{if(x){x.style.display="none";}}},_doClose:function(u){t.preventDefault(u);this.hide();},configDraggable:function(v,u,w){var x=u[0];if(x){if(!f.DD){this.cfg.setProperty("draggable",false);return;}if(this.header){a.setStyle(this.header,"cursor","move");this.registerDragDrop();}this.subscribe("beforeShow",b);}else{if(this.dd){this.dd.unreg();}if(this.header){a.setStyle(this.header,"cursor","auto");}this.unsubscribe("beforeShow",b);}},configUnderlay:function(D,C,z){var B=(this.platform=="mac"&&l.gecko),E=C[0].toLowerCase(),v=this.underlay,w=this.element;function x(){var F=false;if(!v){if(!q){q=document.createElement("div");q.className="underlay";}v=q.cloneNode(false);this.element.appendChild(v);this.underlay=v;if(p){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true);}if(l.webkit&&l.webkit<420){this.changeContentEvent.subscribe(this.forceUnderlayRedraw);}F=true;}}function A(){var F=x.call(this);if(!F&&p){this.sizeUnderlay();}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(A);}function y(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(A);this._underlayDeferred=false;}if(v){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.forceUnderlayRedraw);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(v);this.underlay=null;}}switch(E){case"shadow":a.removeClass(w,"matte");a.addClass(w,"shadow");break;case"matte":if(!B){y.call(this);}a.removeClass(w,"shadow");a.addClass(w,"matte");break;default:if(!B){y.call(this);
+}a.removeClass(w,"shadow");a.removeClass(w,"matte");break;}if((E=="shadow")||(B&&!v)){if(this.cfg.getProperty("visible")){var u=x.call(this);if(!u&&p){this.sizeUnderlay();}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(A);this._underlayDeferred=true;}}}},configModal:function(v,u,x){var w=u[0];if(w){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);h.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true;}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask();}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);h.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false;}}},removeMask:function(){var v=this.mask,u;if(v){this.hideMask();u=v.parentNode;if(u){u.removeChild(v);}this.mask=null;}},configKeyListeners:function(x,u,A){var w=u[0],z,y,v;if(w){if(w instanceof Array){y=w.length;for(v=0;v<y;v++){z=w[v];if(!i.alreadySubscribed(this.showEvent,z.enable,z)){this.showEvent.subscribe(z.enable,z,true);}if(!i.alreadySubscribed(this.hideEvent,z.disable,z)){this.hideEvent.subscribe(z.disable,z,true);this.destroyEvent.subscribe(z.disable,z,true);}}}else{if(!i.alreadySubscribed(this.showEvent,w.enable,w)){this.showEvent.subscribe(w.enable,w,true);}if(!i.alreadySubscribed(this.hideEvent,w.disable,w)){this.hideEvent.subscribe(w.disable,w,true);this.destroyEvent.subscribe(w.disable,w,true);}}}},configStrings:function(v,u,w){var x=e.merge(n.STRINGS.value,u[0]);this.cfg.setProperty(n.STRINGS.key,x,true);},configHeight:function(x,v,y){var u=v[0],w=this.innerElement;a.setStyle(w,"height",u);this.cfg.refireEvent("iframe");},_autoFillOnHeightChange:function(x,v,w){o.superclass._autoFillOnHeightChange.apply(this,arguments);if(p){var u=this;setTimeout(function(){u.sizeUnderlay();},0);}},configWidth:function(x,u,y){var w=u[0],v=this.innerElement;a.setStyle(v,"width",w);this.cfg.refireEvent("iframe");},configzIndex:function(v,u,x){o.superclass.configzIndex.call(this,v,u,x);if(this.mask||this.cfg.getProperty("modal")===true){var w=a.getStyle(this.element,"zIndex");if(!w||isNaN(w)){w=0;}if(w===0){this.cfg.setProperty("zIndex",1);}else{this.stackMask();}}},buildWrapper:function(){var w=this.element.parentNode,u=this.element,v=document.createElement("div");v.className=o.CSS_PANEL_CONTAINER;v.id=u.id+"_c";if(w){w.insertBefore(v,u);}v.appendChild(u);this.element=v;this.innerElement=u;a.setStyle(this.innerElement,"visibility","inherit");},sizeUnderlay:function(){var v=this.underlay,u;if(v){u=this.element;v.style.width=u.offsetWidth+"px";v.style.height=u.offsetHeight+"px";}},registerDragDrop:function(){var v=this;if(this.header){if(!f.DD){return;}var u=(this.cfg.getProperty("dragonly")===true);this.dd=new f.DD(this.element.id,this.id,{dragOnly:u});if(!this.header.id){this.header.id=this.id+"_h";}this.dd.startDrag=function(){var x,z,w,C,B,A;if(YAHOO.env.ua.ie==6){a.addClass(v.element,"drag");}if(v.cfg.getProperty("constraintoviewport")){var y=h.VIEWPORT_OFFSET;x=v.element.offsetHeight;z=v.element.offsetWidth;w=a.getViewportWidth();C=a.getViewportHeight();B=a.getDocumentScrollLeft();A=a.getDocumentScrollTop();if(x+y<C){this.minY=A+y;this.maxY=A+C-x-y;}else{this.minY=A+y;this.maxY=A+y;}if(z+y<w){this.minX=B+y;this.maxX=B+w-z-y;}else{this.minX=B+y;this.maxX=B+y;}this.constrainX=true;this.constrainY=true;}else{this.constrainX=false;this.constrainY=false;}v.dragEvent.fire("startDrag",arguments);};this.dd.onDrag=function(){v.syncPosition();v.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars();}v.dragEvent.fire("onDrag",arguments);};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){a.removeClass(v.element,"drag");}v.dragEvent.fire("endDrag",arguments);v.moveEvent.fire(v.cfg.getProperty("xy"));};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA");}},buildMask:function(){var u=this.mask;if(!u){if(!g){g=document.createElement("div");g.className="mask";g.innerHTML="&#160;";}u=g.cloneNode(true);u.id=this.id+"_mask";document.body.insertBefore(u,document.body.firstChild);this.mask=u;if(YAHOO.env.ua.gecko&&this.platform=="mac"){a.addClass(this.mask,"block-scrollbars");}this.stackMask();}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask&&this.beforeHideMaskEvent.fire()){this.mask.style.display="none";a.removeClass(document.body,"masked");this.hideMaskEvent.fire();}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask&&this.beforeShowMaskEvent.fire()){a.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire();}},sizeMask:function(){if(this.mask){var v=this.mask,w=a.getViewportWidth(),u=a.getViewportHeight();if(v.offsetHeight>u){v.style.height=u+"px";}if(v.offsetWidth>w){v.style.width=w+"px";}v.style.height=a.getDocumentHeight()+"px";v.style.width=a.getDocumentWidth()+"px";}},stackMask:function(){if(this.mask){var u=a.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(u)&&!isNaN(u)){a.setStyle(this.mask,"zIndex",u-1);}}},render:function(u){return o.superclass.render.call(this,u,this.innerElement);},_renderHeader:function(u){u=u||this.innerElement;o.superclass._renderHeader.call(this,u);},_renderBody:function(u){u=u||this.innerElement;o.superclass._renderBody.call(this,u);},_renderFooter:function(u){u=u||this.innerElement;o.superclass._renderFooter.call(this,u);},destroy:function(u){h.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){t.purgeElement(this.close);}o.superclass.destroy.call(this,u);},forceUnderlayRedraw:function(){var v=this.underlay;a.addClass(v,"yui-force-redraw");
+setTimeout(function(){a.removeClass(v,"yui-force-redraw");},0);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(j,i){YAHOO.widget.Dialog.superclass.constructor.call(this,j,i);};var b=YAHOO.util.Event,g=YAHOO.util.CustomEvent,e=YAHOO.util.Dom,a=YAHOO.widget.Dialog,f=YAHOO.lang,h={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},c={"POST_METHOD":{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTONS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};a.CSS_DIALOG="yui-dialog";function d(){var m=this._aButtons,k,l,j;if(f.isArray(m)){k=m.length;if(k>0){j=k-1;do{l=m[j];if(YAHOO.widget.Button&&l instanceof YAHOO.widget.Button){l.destroy();}else{if(l.tagName.toUpperCase()=="BUTTON"){b.purgeElement(l);b.purgeElement(l,false);}}}while(j--);}}}YAHOO.extend(a,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){a.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(c.POST_METHOD.key,{handler:this.configPostMethod,value:c.POST_METHOD.value,validator:function(i){if(i!="form"&&i!="async"&&i!="none"&&i!="manual"){return false;}else{return true;}}});this.cfg.addProperty(c.POST_DATA.key,{value:c.POST_DATA.value});this.cfg.addProperty(c.HIDEAFTERSUBMIT.key,{value:c.HIDEAFTERSUBMIT.value});this.cfg.addProperty(c.BUTTONS.key,{handler:this.configButtons,value:c.BUTTONS.value,supercedes:c.BUTTONS.supercedes});},initEvents:function(){a.superclass.initEvents.call(this);var i=g.LIST;this.beforeSubmitEvent=this.createEvent(h.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=i;this.submitEvent=this.createEvent(h.SUBMIT);this.submitEvent.signature=i;this.manualSubmitEvent=this.createEvent(h.MANUAL_SUBMIT);this.manualSubmitEvent.signature=i;this.asyncSubmitEvent=this.createEvent(h.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=i;this.formSubmitEvent=this.createEvent(h.FORM_SUBMIT);this.formSubmitEvent.signature=i;this.cancelEvent=this.createEvent(h.CANCEL);this.cancelEvent.signature=i;},init:function(j,i){a.superclass.init.call(this,j);this.beforeInitEvent.fire(a);e.addClass(this.element,a.CSS_DIALOG);this.cfg.setProperty("visible",false);if(i){this.cfg.applyConfig(i,true);}this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(a);},doSubmit:function(){var q=YAHOO.util.Connect,r=this.form,l=false,o=false,s,n,m,j;switch(this.cfg.getProperty("postmethod")){case"async":s=r.elements;n=s.length;if(n>0){m=n-1;do{if(s[m].type=="file"){l=true;break;}}while(m--);}if(l&&YAHOO.env.ua.ie&&this.isSecure){o=true;}j=this._getFormAttributes(r);q.setForm(r,l,o);var k=this.cfg.getProperty("postdata");var p=q.asyncRequest(j.method,j.action,this.callback,k);this.asyncSubmitEvent.fire(p);break;case"form":r.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},_getFormAttributes:function(k){var i={method:null,action:null};if(k){if(k.getAttributeNode){var j=k.getAttributeNode("action");var l=k.getAttributeNode("method");if(j){i.action=j.value;}if(l){i.method=l.value;}}else{i.action=k.getAttribute("action");i.method=k.getAttribute("method");}}i.method=(f.isString(i.method)?i.method:"POST").toUpperCase();i.action=f.isString(i.action)?i.action:"";return i;},registerForm:function(){var i=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==i&&e.isAncestor(this.element,this.form)){return;}else{b.purgeElement(this.form);this.form=null;}}if(!i){i=document.createElement("form");i.name="frm_"+this.id;this.body.appendChild(i);}if(i){this.form=i;b.on(i,"submit",this._submitHandler,this,true);}},_submitHandler:function(i){b.stopEvent(i);this.submit();this.form.blur();},setTabLoop:function(i,j){i=i||this.firstButton;j=j||this.lastButton;a.superclass.setTabLoop.call(this,i,j);},_setTabLoop:function(i,j){i=i||this.firstButton;j=this.lastButton||j;this.setTabLoop(i,j);},setFirstLastFocusable:function(){a.superclass.setFirstLastFocusable.call(this);var k,j,m,n=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&n&&n.length>0){j=n.length;for(k=0;k<j;++k){m=n[k];if(this.form===m.form){this.firstFormElement=m;break;}}for(k=j-1;k>=0;--k){m=n[k];if(this.form===m.form){this.lastFormElement=m;break;}}}},configClose:function(j,i,k){a.superclass.configClose.apply(this,arguments);},_doClose:function(i){b.preventDefault(i);this.cancel();},configButtons:function(t,s,n){var o=YAHOO.widget.Button,v=s[0],l=this.innerElement,u,q,k,r,p,j,m;d.call(this);this._aButtons=null;if(f.isArray(v)){p=document.createElement("span");p.className="button-group";r=v.length;this._aButtons=[];this.defaultHtmlButton=null;for(m=0;m<r;m++){u=v[m];if(o){k=new o({label:u.text,type:u.type});k.appendTo(p);q=k.get("element");if(u.isDefault){k.addClass("default");this.defaultHtmlButton=q;}if(f.isFunction(u.handler)){k.set("onclick",{fn:u.handler,obj:this,scope:this});}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){k.set("onclick",{fn:u.handler.fn,obj:((!f.isUndefined(u.handler.obj))?u.handler.obj:this),scope:(u.handler.scope||this)});}}this._aButtons[this._aButtons.length]=k;}else{q=document.createElement("button");q.setAttribute("type","button");if(u.isDefault){q.className="default";this.defaultHtmlButton=q;}q.innerHTML=u.text;if(f.isFunction(u.handler)){b.on(q,"click",u.handler,this,true);}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){b.on(q,"click",u.handler.fn,((!f.isUndefined(u.handler.obj))?u.handler.obj:this),(u.handler.scope||this));}}p.appendChild(q);this._aButtons[this._aButtons.length]=q;}u.htmlButton=q;if(m===0){this.firstButton=q;}if(m==(r-1)){this.lastButton=q;}}this.setFooter(p);j=this.footer;if(e.inDocument(this.element)&&!e.isAncestor(l,j)){l.appendChild(j);}this.buttonSpan=p;}else{p=this.buttonSpan;
+j=this.footer;if(p&&j){j.removeChild(p);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}this.changeContentEvent.fire();},getButtons:function(){return this._aButtons||null;},focusFirst:function(k,i,n){var j=this.firstFormElement,m=false;if(i&&i[1]){b.stopEvent(i[1]);if(i[0]===9&&this.firstElement){j=this.firstElement;}}if(j){try{j.focus();m=true;}catch(l){}}else{if(this.defaultHtmlButton){m=this.focusDefaultButton();}else{m=this.focusFirstButton();}}return m;},focusLast:function(k,i,n){var o=this.cfg.getProperty("buttons"),j=this.lastFormElement,m=false;if(i&&i[1]){b.stopEvent(i[1]);if(i[0]===9&&this.lastElement){j=this.lastElement;}}if(o&&f.isArray(o)){m=this.focusLastButton();}else{if(j){try{j.focus();m=true;}catch(l){}}}return m;},_getButton:function(j){var i=YAHOO.widget.Button;if(i&&j&&j.nodeName&&j.id){j=i.getButton(j.id)||j;}return j;},focusDefaultButton:function(){var i=this._getButton(this.defaultHtmlButton),k=false;if(i){try{i.focus();k=true;}catch(j){}}return k;},blurButtons:function(){var o=this.cfg.getProperty("buttons"),l,n,k,j;if(o&&f.isArray(o)){l=o.length;if(l>0){j=(l-1);do{n=o[j];if(n){k=this._getButton(n.htmlButton);if(k){try{k.blur();}catch(m){}}}}while(j--);}}},focusFirstButton:function(){var m=this.cfg.getProperty("buttons"),k,i,l=false;if(m&&f.isArray(m)){k=m[0];if(k){i=this._getButton(k.htmlButton);if(i){try{i.focus();l=true;}catch(j){}}}}return l;},focusLastButton:function(){var n=this.cfg.getProperty("buttons"),j,l,i,m=false;if(n&&f.isArray(n)){j=n.length;if(j>0){l=n[(j-1)];if(l){i=this._getButton(l.htmlButton);if(i){try{i.focus();m=true;}catch(k){}}}}}return m;},configPostMethod:function(j,i,k){this.registerForm();},validate:function(){return true;},submit:function(){if(this.validate()){if(this.beforeSubmitEvent.fire()){this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide();}return true;}else{return false;}}else{return false;}},cancel:function(){this.cancelEvent.fire();this.hide();},getData:function(){var A=this.form,k,t,w,m,u,r,q,j,x,l,y,B,p,C,o,z,v;function s(n){var i=n.tagName.toUpperCase();return((i=="INPUT"||i=="TEXTAREA"||i=="SELECT")&&n.name==m);}if(A){k=A.elements;t=k.length;w={};for(z=0;z<t;z++){m=k[z].name;u=e.getElementsBy(s,"*",A);r=u.length;if(r>0){if(r==1){u=u[0];q=u.type;j=u.tagName.toUpperCase();switch(j){case"INPUT":if(q=="checkbox"){w[m]=u.checked;}else{if(q!="radio"){w[m]=u.value;}}break;case"TEXTAREA":w[m]=u.value;break;case"SELECT":x=u.options;l=x.length;y=[];for(v=0;v<l;v++){B=x[v];if(B.selected){o=B.attributes.value;y[y.length]=(o&&o.specified)?B.value:B.text;}}w[m]=y;break;}}else{q=u[0].type;switch(q){case"radio":for(v=0;v<r;v++){p=u[v];if(p.checked){w[m]=p.value;break;}}break;case"checkbox":y=[];for(v=0;v<r;v++){C=u[v];if(C.checked){y[y.length]=C.value;}}w[m]=y;break;}}}}}return w;},destroy:function(i){d.call(this);this._aButtons=null;var j=this.element.getElementsByTagName("form"),k;if(j.length>0){k=j[0];if(k){b.purgeElement(k);if(k.parentNode){k.parentNode.removeChild(k);}this.form=null;}}a.superclass.destroy.call(this,i);},toString:function(){return"Dialog "+this.id;}});}());(function(){YAHOO.widget.SimpleDialog=function(e,d){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,e,d);};var c=YAHOO.util.Dom,b=YAHOO.widget.SimpleDialog,a={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};b.ICON_BLOCK="blckicon";b.ICON_ALARM="alrticon";b.ICON_HELP="hlpicon";b.ICON_INFO="infoicon";b.ICON_WARN="warnicon";b.ICON_TIP="tipicon";b.ICON_CSS_CLASSNAME="yui-icon";b.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(b,YAHOO.widget.Dialog,{initDefaultConfig:function(){b.superclass.initDefaultConfig.call(this);this.cfg.addProperty(a.ICON.key,{handler:this.configIcon,value:a.ICON.value,suppressEvent:a.ICON.suppressEvent});this.cfg.addProperty(a.TEXT.key,{handler:this.configText,value:a.TEXT.value,suppressEvent:a.TEXT.suppressEvent,supercedes:a.TEXT.supercedes});},init:function(e,d){b.superclass.init.call(this,e);this.beforeInitEvent.fire(b);c.addClass(this.element,b.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(d){this.cfg.applyConfig(d,true);}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(b);},registerForm:function(){b.superclass.registerForm.call(this);var e=this.form.ownerDocument,d=e.createElement("input");d.type="hidden";d.name=this.id;d.value="";this.form.appendChild(d);},configIcon:function(k,j,h){var d=j[0],e=this.body,f=b.ICON_CSS_CLASSNAME,l,i,g;if(d&&d!="none"){l=c.getElementsByClassName(f,"*",e);if(l.length===1){i=l[0];g=i.parentNode;if(g){g.removeChild(i);i=null;}}if(d.indexOf(".")==-1){i=document.createElement("span");i.className=(f+" "+d);i.innerHTML="&#160;";}else{i=document.createElement("img");i.src=(this.imageRoot+d);i.className=f;}if(i){e.insertBefore(i,e.firstChild);}}},configText:function(e,d,f){var g=d[0];if(g){this.setBody(g);this.cfg.refireEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(function(){YAHOO.widget.ContainerEffect=function(e,h,g,d,f){if(!f){f=YAHOO.util.Anim;}this.overlay=e;this.attrIn=h;this.attrOut=g;this.targetElement=d||e.element;this.animClass=f;};var b=YAHOO.util.Dom,c=YAHOO.util.CustomEvent,a=YAHOO.widget.ContainerEffect;a.FADE=function(d,f){var g=YAHOO.util.Easing,i={attributes:{opacity:{from:0,to:1}},duration:f,method:g.easeIn},e={attributes:{opacity:{to:0}},duration:f,method:g.easeOut},h=new a(d,i,e,d.element);h.handleUnderlayStart=function(){var k=this.overlay.underlay;if(k&&YAHOO.env.ua.ie){var j=(k.filters&&k.filters.length>0);if(j){b.addClass(d.element,"yui-effect-fade");}}};h.handleUnderlayComplete=function(){var j=this.overlay.underlay;if(j&&YAHOO.env.ua.ie){b.removeClass(d.element,"yui-effect-fade");}};h.handleStartAnimateIn=function(k,j,l){l.overlay._fadingIn=true;b.addClass(l.overlay.element,"hide-select");if(!l.overlay.underlay){l.overlay.cfg.refireEvent("underlay");
+}l.handleUnderlayStart();l.overlay._setDomVisibility(true);b.setStyle(l.overlay.element,"opacity",0);};h.handleCompleteAnimateIn=function(k,j,l){l.overlay._fadingIn=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateInCompleteEvent.fire();};h.handleStartAnimateOut=function(k,j,l){l.overlay._fadingOut=true;b.addClass(l.overlay.element,"hide-select");l.handleUnderlayStart();};h.handleCompleteAnimateOut=function(k,j,l){l.overlay._fadingOut=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.overlay._setDomVisibility(false);b.setStyle(l.overlay.element,"opacity",1);l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateOutCompleteEvent.fire();};h.init();return h;};a.SLIDE=function(f,d){var i=YAHOO.util.Easing,l=f.cfg.getProperty("x")||b.getX(f.element),k=f.cfg.getProperty("y")||b.getY(f.element),m=b.getClientWidth(),h=f.element.offsetWidth,j={attributes:{points:{to:[l,k]}},duration:d,method:i.easeIn},e={attributes:{points:{to:[(m+25),k]}},duration:d,method:i.easeOut},g=new a(f,j,e,f.element,YAHOO.util.Motion);g.handleStartAnimateIn=function(o,n,p){p.overlay.element.style.left=((-25)-h)+"px";p.overlay.element.style.top=k+"px";};g.handleTweenAnimateIn=function(q,p,r){var s=b.getXY(r.overlay.element),o=s[0],n=s[1];if(b.getStyle(r.overlay.element,"visibility")=="hidden"&&o<l){r.overlay._setDomVisibility(true);}r.overlay.cfg.setProperty("xy",[o,n],true);r.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateIn=function(o,n,p){p.overlay.cfg.setProperty("xy",[l,k],true);p.startX=l;p.startY=k;p.overlay.cfg.refireEvent("iframe");p.animateInCompleteEvent.fire();};g.handleStartAnimateOut=function(o,n,r){var p=b.getViewportWidth(),s=b.getXY(r.overlay.element),q=s[1];r.animOut.attributes.points.to=[(p+25),q];};g.handleTweenAnimateOut=function(p,o,q){var s=b.getXY(q.overlay.element),n=s[0],r=s[1];q.overlay.cfg.setProperty("xy",[n,r],true);q.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateOut=function(o,n,p){p.overlay._setDomVisibility(false);p.overlay.cfg.setProperty("xy",[l,k]);p.animateOutCompleteEvent.fire();};g.init();return g;};a.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=c.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=c.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=c.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=c.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateOutEvent.fire();this.animOut.animate();},lastFrameOnStop:true,_stopAnims:function(d){if(this.animOut&&this.animOut.isAnimated()){this.animOut.stop(d);}if(this.animIn&&this.animIn.isAnimated()){this.animIn.stop(d);}},handleStartAnimateIn:function(e,d,f){},handleTweenAnimateIn:function(e,d,f){},handleCompleteAnimateIn:function(e,d,f){},handleStartAnimateOut:function(e,d,f){},handleTweenAnimateOut:function(e,d,f){},handleCompleteAnimateOut:function(e,d,f){},toString:function(){var d="ContainerEffect";if(this.overlay){d+=" ["+this.overlay.toString()+"]";}return d;}};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider);})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.9.0",build:"2800"});
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2.dashboard.html	(revision 5888)
@@ -0,0 +1,129 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>oauth2</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [4,0,0,0,0,0,0,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[0,130,"<a href=\"library_oauth2_lib_OAuth2.php.html#44\">OAuth2<\/a>"],[0,4,"<a href=\"library_oauth2_lib_OAuth2AuthenticateException.php.html#11\">OAuth2AuthenticateException<\/a>"],[0,14,"<a href=\"library_oauth2_lib_OAuth2RedirectException.php.html#10\">OAuth2RedirectException<\/a>"],[0,8,"<a href=\"library_oauth2_lib_OAuth2ServerException.php.html#8\">OAuth2ServerException<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">oauth2</td></tr>
+      <tr><td><div align="center"><p><a href="library_oauth2.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#44">OAuth2</a> (17030)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#10">OAuth2RedirectException</a> (210)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#8">OAuth2ServerException</a> (72)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#11">OAuth2AuthenticateException</a> (20)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#52">OAuth2AuthenticateException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#32">OAuth2RedirectException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#30">OAuth2AuthenticateException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1358">OAuth2::validateRedirectUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1329">OAuth2::getAuthorizationHeader</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1344">OAuth2::sendJsonHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#47">OAuth2RedirectException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#66">OAuth2RedirectException::buildUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#71">OAuth2ServerException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#79">OAuth2ServerException::__toString</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib.html	(revision 5888)
@@ -0,0 +1,196 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>lib</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">lib</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_oauth2.html">oauth2</a>/<a href="library_oauth2_lib.html">lib</a> (<a href="library_oauth2_lib.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 296</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="library_oauth2_lib_OAuth2.php.html">OAuth2.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 252</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 19</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="library_oauth2_lib_OAuth2AuthenticateException.php.html">OAuth2AuthenticateException.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 11</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="library_oauth2_lib_OAuth2RedirectException.php.html">OAuth2RedirectException.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 16</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="library_oauth2_lib_OAuth2ServerException.php.html">OAuth2ServerException.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 17</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest_oauth.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest_oauth.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest_oauth.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>oauth</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">oauth</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="rest.html">rest</a>/<a href="rest_oauth.html">oauth</a> (<a href="rest_oauth.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+              <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">57 / 57</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">11 / 11</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                 <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="rest_oauth_OAuth2StorageUserCredential.php.html">OAuth2StorageUserCredential.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+              <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">57 / 57</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">11 / 11</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                 <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>rest</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">rest</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="rest.html">rest</a> (<a href="rest.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+              <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">57 / 57</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">11 / 11</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                 <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="rest_oauth.html">oauth</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+              <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">57 / 57</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">11 / 11</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                 <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_service.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_service.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_service.php.html	(revision 5888)
@@ -0,0 +1,229 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>service.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">service.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="api.html">api</a>/<a href="api_service.php.html">service.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="100.00%">
+                <div class="size snow"  style="width:100%" title="100.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerNone">100.00%</td>
+          <td class="coverNumNone">&nbsp;</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size snow"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerNone">100.00%</td>
+          <td class="coverNumNone">&nbsp;</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                      
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                            
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                :                                                                                            
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : // interface Service                                                                       
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                : // {                                                                                       
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                : // //---------------                                                                       
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                : //                                                                                         
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                : //     public function load   ( $concept, $parents = false, $id = false );                 
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                : //                                                                                         
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                : // //---------------                                                                       
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                : //                                                                                         
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                : //     public function search ( $justthese = false, $params = false, $criteria = false );  
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                : //                                                                                         
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                : // //---------------                                                                       
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                : //                                                                                         
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                : //     public function delete ( $justthese = false, $params = false, $criteria = false );  
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                : //                                                                                         
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                : // //---------------                                                                       
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                : //                                                                                         
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                : //     public function update ( $data,              $params = false, $criteria = false );  
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                : //                                                                                         
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                : // //---------------                                                                       
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                : //                                                                                         
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                : //     public function create ( $data,              $params = false );                     
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                : //                                                                                         
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                : // //---------------                                                                       
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                : //                                                                                         
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                : //     public function connect( $config );                                                 
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                : //                                                                                         
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                : //     public function close();                                                            
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                : //                                                                                         
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                : //     public function setup();                                                            
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                : //                                                                                         
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                : //     public function teardown();                                                         
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                : // }                                                                                       
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :                                                                                            
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :                                                                                            
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineCov">              1 : interface Service                                                                          </span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                : {                                                                                          
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                : //---------------                                                                          
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :                                                                                            
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :     public function find     ( $uri, $justthese = false, $criteria = false );              
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :                                                                                            
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :     public function read     ( $uri, $justthese = false/*, $criteria = false*/ );          
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :                                                                                            
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                : //---------------                                                                          
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :                                                                                            
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :     public function deleteAll( $uri, $justthese = false, $criteria = false );              
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :                                                                                            
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :     public function delete   ( $uri, $justthese = false/*, $criteria = false*/ );// avaliar
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :                                                                                            
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                : //---------------                                                                          
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :                                                                                            
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :     public function replace  ( $uri, $data, $criteria = false );                           
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :                                                                                            
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span>                :     public function update   ( $uri, $data/*, $criteria = false*/ );                       
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :                                                                                            
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                : //---------------                                                                          
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :                                                                                            
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :     public function create   ( $uri, $data/*, $criteria = false*/ );                       
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :                                                                                            
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                : //---------------                                                                          
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :                                                                                            
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :     public function open     ( $config );                                                  
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :                                                                                            
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :     public function close    ();                                                           
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :                                                                                            
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :                                                                                            
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :     public function begin     ( $uri );                                                    
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                :                                                                                            
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                :     public function commit    ( $uri );                                                    
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span>                :                                                                                            
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                :     public function rollback  ( $uri );                                                    
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span>                :                                                                                            
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :                                                                                            
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :     public function setup     ();                                                          
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :                                                                                            
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                :     public function teardown  ();                                                          
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel38": {
+          "header": "1 test covers line 38",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_config.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_config.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_config.php.html	(revision 5888)
@@ -0,0 +1,455 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>config.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">config.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="api.html">api</a>/<a href="api_config.php.html">config.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="14.29%">
+                <div class="size scarlet_red"  style="width:14.285714285714%" title="14.29%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">14.29%</td>
+          <td class="coverNumLo">1 / 7</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="40.00%">
+                <div class="size butter"  style="width:40%" title="40.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">40.00%</td>
+          <td class="coverNumMed">10 / 25</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">Config</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="14.29%">
+                <div class="size scarlet_red"  style="width:14.285714285714%" title="14.29%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">14.29%</td>
+          <td class="coverNumLo">1 / 7</td>
+          <td class="crap">116.26</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="40.00%">
+                <div class="size butter"  style="width:40%" title="40.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">40.00%</td>
+          <td class="coverNumMed">10 / 25</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#8">module($config , $module = false)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#21">me($config)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#26">service( $service , $config )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">20</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#34">get( $concept , $config = false , $module = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">3 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#43">regSet( $name , $value)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#47">regGet ($name )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#52">init( )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">4.43</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="70.00%">
+                  <div class="size chameleon"  style="width:70%" title="70.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">70.00%</td>
+          <td class="coverNumHi">7 / 10</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                           
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : class Config                                                                                                    
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : {                                                                                                               
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :     static $register;                                                                                           
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :     static $sessionStarted;                                                                                     
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :     static function module($config , $module = false)                                                           
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :         //Todo: registrar na nova api o currentapp                                                              
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span><span class="lineNoCov">              0 :         if(!$module)                                                                                            </span>
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span><span class="lineNoCov">              0 :             $module =  $_SESSION['flags']['currentapp'];                                                        </span>
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span><span class="lineNoCov">              0 :         if( !isset( $_SESSION['config'][$module] ) || !isset( $_SESSION['config'][$module][$config] ))          </span>
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span><span class="lineNoCov">              0 :             $_SESSION['config'][$module] = parse_ini_file( ROOTPATH.&quot;/config/$module.ini&quot;, true );              </span>
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span><span class="lineNoCov">              0 :         return isset($_SESSION['config'][$module][$config]) ? $_SESSION['config'][$module][$config] : false;    </span>
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :     }                                                                                                           
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :     static function me($config)                                                                                 
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span><span class="lineNoCov">              0 :         return isset($_SESSION['wallet']['user'][$config]) ? $_SESSION['wallet']['user'][$config] : false;      </span>
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :     }                                                                                                           
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :     static function service( $service , $config )                                                               
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span><span class="lineNoCov">              0 :         if( !isset( $_SESSION['wallet'][$service] ) || !isset( $_SESSION['wallet'][$service][$config] ))        </span>
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span><span class="lineNoCov">              0 :             $_SESSION['wallet'][$service] = parse_ini_file( ROOTPATH.&quot;/config/$service.srv&quot;, true );            </span>
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span><span class="lineNoCov">              0 :         return (isset($_SESSION['wallet'][$service][$config])) ? $_SESSION['wallet'][$service][$config] : false;</span>
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :     }                                                                                                           
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :     static function get( $concept , $config = false , $module = false )                                         
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span><span class="lineCov">             12 :         $load = parse_ini_file( ROOTPATH.&quot;/config/$concept.ini&quot;, true );                                        </span>
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineCov">             12 :         if($config === false) return $load;                                                                     </span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span><span class="lineCov">             12 :         return (isset($load[$config])) ? $load[$config] : false;                                                </span>
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :     }                                                                                                           
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :     static function regSet( $name , $value)                                                                     
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span><span class="lineNoCov">              0 :         self::$register[$name] = $value;                                                                        </span>
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span><span class="lineNoCov">              0 :     }                                                                                                           </span>
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :     static function regGet ($name )                                                                             
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span><span class="lineNoCov">              0 :         return (isset(self::$register[$name]) ? self::$register[$name] : false );                               </span>
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :     }                                                                                                           
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :     static function init( )                                                                                     
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span><span class="lineCov">              1 :         if( !defined( 'ROOTPATH' ) )                                                                            </span>
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span><span class="lineCov">              1 :             define( 'ROOTPATH', dirname(__FILE__).'/..' );                                                      </span>
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span><span class="lineCov">              1 :         if ( isset( $_COOKIE[ 'sessionid' ] ) )                                                                 </span>
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span><span class="lineCov">              1 :         {                                                                                                       </span>
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span><span class="lineNoCov">              0 :             session_id( $_COOKIE[ 'sessionid' ] );                                                              </span>
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span><span class="lineNoCov">              0 :             $GLOBALS['phpgw']-&gt;session-&gt;sessionid = $_COOKIE[ 'sessionid' ];                                    </span>
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span><span class="lineNoCov">              0 :         }                                                                                                       </span>
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span><span class="lineCov">              1 :     if( !self::$sessionStarted )                                                                                </span>
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span><span class="lineCov">              1 :             self::$sessionStarted = session_start();                                                            </span>
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                : //    if( $header === true )                                                                                    
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                : //    {                                                                                                         
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                : //            require_once (dirname(__FILE__).'/../../header.inc.php');                                         
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                : //            $_SESSION['wallet']['Sieve']['user']          =  $GLOBALS['phpgw_info']['user']['account_lid'];   
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span>                : //            $_SESSION['wallet']['Sieve']['password']      =  $GLOBALS['phpgw_info']['user']['passwd'];        
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span>                : //            $_SESSION['wallet']['Cyrus']['user']          =  $GLOBALS['phpgw_info']['user']['account_lid'];   
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                : //            $_SESSION['wallet']['Cyrus']['password']      =  $GLOBALS['phpgw_info']['user']['passwd'];        
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                : //            $_SESSION['wallet']['user']['uid']                =  $GLOBALS['phpgw_info']['user']['userid'];    
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                : //            $_SESSION['wallet']['user']['uidNumber']      =  $GLOBALS['phpgw_info']['user']['account_id'];    
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                : //            $_SESSION['wallet']['user']['password']       =  $GLOBALS['phpgw_info']['user']['passwd'];        
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span>                : //            $_SESSION['wallet']['user']['cn']             =  $GLOBALS['phpgw_info']['user']['cn'];            
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                : //            $_SESSION['wallet']['user']['mail']           =  $GLOBALS['phpgw_info']['user']['email'];         
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                : //            $_SESSION['wallet']['PostgreSQL']['user']     = $GLOBALS['phpgw_info']['server']['db_user'];      
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                : //            $_SESSION['wallet']['PostgreSQL']['password'] = $GLOBALS['phpgw_info']['server']['db_pass'];      
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                : //            $_SESSION['wallet']['PostgreSQL']['dbname']   = $GLOBALS['phpgw_info']['server']['db_name'];      
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span>                : //            $_SESSION['wallet']['PostgreSQL']['host']     = $GLOBALS['phpgw_info']['server']['db_host'];      
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span>                : //            $_SESSION['wallet']['OpenLDAP']['context']   =  $GLOBALS['phpgw_info']['server']['ldap_context']; 
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                : //            $_SESSION['wallet']['OpenLDAP']['host']      =  $GLOBALS['phpgw_info']['server']['ldap_host'];    
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                : //    }                                                                                                         
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span><span class="lineCov">              1 :     }                                                                                                           </span>
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                : }                                                                                                               
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :     Config::init();                                                                                             
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                : ?&gt;                                                                                                              
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel36": {
+          "header": "12 tests cover line 36",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel38": {
+          "header": "12 tests cover line 38",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel40": {
+          "header": "12 tests cover line 40",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel55": {
+          "header": "1 test covers line 55",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel56": {
+          "header": "1 test covers line 56",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel58": {
+          "header": "1 test covers line 58",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel59": {
+          "header": "1 test covers line 59",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel64": {
+          "header": "1 test covers line 64",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel65": {
+          "header": "1 test covers line 65",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel93": {
+          "header": "1 test covers line 93",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib_OAuth2.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib_OAuth2.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib_OAuth2.php.html	(revision 5888)
@@ -0,0 +1,1916 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>OAuth2.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">OAuth2.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_oauth2.html">oauth2</a>/<a href="library_oauth2_lib.html">lib</a>/<a href="library_oauth2_lib_OAuth2.php.html">OAuth2.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 19</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 252</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">OAuth2</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="5.00%">
+                <div class="size scarlet_red"  style="width:5%" title="5.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">5.00%</td>
+          <td class="coverNumLo">1 / 20</td>
+          <td class="crap">17030</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 252</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#340">__construct(IOAuth2Storage $storage, $config = array()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#353">setDefaultOptions()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 11</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#377">getVariable($name, $default = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#391">setVariable($name, $value)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#427">verifyAccessToken($token_param, $scope = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">132</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 17</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#490">getBearerToken()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">0 / 0</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#558">checkScope($required_scope, $available_scope)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 7</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#760">grantAccessToken(array $inputData = NULL, array $authHeaders = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">1980</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 100</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#971">getClientCredentials(array $inputData, array $authHeaders)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1006">getAuthorizeParams(array $inputData = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">342</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 32</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1102">finishClientAuthorization($is_authorized, $user_id = NULL, $params = array()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 15</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1144">doRedirectUriCallback($redirect_uri, $params)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1163">buildUri($uri, $params)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">132</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 16</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1228">createAccessToken($client_id, $user_id, $scope = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 14</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1270">createAuthCode($client_id, $user_id, $redirect_uri, $scope = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1288">genAccessToken()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1310">genAuthCode()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1329">getAuthorizationHeader()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1344">sendJsonHeaders()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1358">validateRedirectUri($inputUri, $storedUri)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                : require_once ROOTPATH . '/library/oauth2/lib/OAuth2ServerException.php';                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : require_once ROOTPATH . '/library/oauth2/lib/OAuth2AuthenticateException.php';                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : require_once ROOTPATH . '/library/oauth2/lib/OAuth2RedirectException.php';                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                : /**                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :  * @mainpage                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :  * OAuth 2.0 server in PHP, originally written for                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :  * &lt;a href=&quot;http://www.opendining.net/&quot;&gt; Open Dining&lt;/a&gt;. Supports                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :  * &lt;a href=&quot;http://tools.ietf.org/html/draft-ietf-oauth-v2-20&quot;&gt;IETF draft v20&lt;/a&gt;.                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :  * Source repo has sample servers implementations for                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :  * &lt;a href=&quot;http://php.net/manual/en/book.pdo.php&quot;&gt; PHP Data Objects&lt;/a&gt; and                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :  * &lt;a href=&quot;http://www.mongodb.org/&quot;&gt;MongoDB&lt;/a&gt;. Easily adaptable to other                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :  * storage engines.                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :  * PHP Data Objects supports a variety of databases, including MySQL,                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :  * Microsoft SQL Server, SQLite, and Oracle, so you can try out the sample                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :  * to see how it all works.                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :  * We're expanding the wiki to include more helpful documentation, but for                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :  * now, your best bet is to view the oauth.php source - it has lots of                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :  * comments.                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :  * @author Tim Ridgely &lt;tim.ridgely@gmail.com&gt;                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :  * @author Aaron Parecki &lt;aaron@parecki.com&gt;                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :  * @author Edison Wong &lt;hswong3i@pantarei-design.com&gt;                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :  * @author David Rochwerger &lt;catch.dave@gmail.com&gt;                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :  * @see http://code.google.com/p/oauth2-php/                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :  * @see https://github.com/quizlet/oauth2-php                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :  */                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                : /**                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :  * OAuth2.0 draft v20 server-side implementation.                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :  * @todo Add support for Message Authentication Code (MAC) token type.                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :  * @author Originally written by Tim Ridgely &lt;tim.ridgely@gmail.com&gt;.                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                :  * @author Updated to draft v10 by Aaron Parecki &lt;aaron@parecki.com&gt;.                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :  * @author Debug, coding style clean up and documented by Edison Wong &lt;hswong3i@pantarei-design.com&gt;.                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :  * @author Refactored (including separating from raw POST/GET) and updated to draft v20 by David Rochwerger &lt;catch.dave@gmail.com&gt;.                                                                                                                                                                                                                      
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :  */                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                : class OAuth2 {                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :      * Array of persistent variables stored.                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :     protected $conf = array();                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :      * Storage engine for authentication server                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :      * @var IOAuth2Storage                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span>                :     protected $storage;                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :      * Keep track of the old refresh token. So we can unset                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :      * the old refresh tokens when a new one is issued.                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :      * @var string                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :     protected $oldRefreshToken;                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :      * Default values for configuration options.                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :      * @var int                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                :      * @see OAuth2::setDefaultOptions()                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span>                :     const DEFAULT_ACCESS_TOKEN_LIFETIME = 3600;                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                :     const DEFAULT_REFRESH_TOKEN_LIFETIME = 1209600;                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span>                :     const DEFAULT_AUTH_CODE_LIFETIME = 3600;                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :     const DEFAULT_WWW_REALM = 'Service';                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                :      * Configurable options.                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span>                :      * @var string                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span>                :     const CONFIG_ACCESS_LIFETIME = 3600; // The lifetime of access token in seconds.                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                :     const CONFIG_REFRESH_LIFETIME = 3600; // The lifetime of refresh token in seconds.                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                :   const CONFIG_AUTH_LIFETIME = 3600; // The lifetime of auth code in seconds.                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                :     const CONFIG_SUPPORTED_SCOPES = 'supported_scopes'; // Array of scopes you want to support                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span>                :     const CONFIG_TOKEN_TYPE = 'token_type'; // Token type to respond with. Currently only &quot;Bearer&quot; supported.                                                                                                                                                                                                                                            
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span>                :     const CONFIG_WWW_REALM = 'realm';                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span>                :     const CONFIG_ENFORCE_INPUT_REDIRECT = 'enforce_redirect'; // Set to true to enforce redirect_uri on input for both authorize and token steps.                                                                                                                                                                                                        
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                :     const CONFIG_ENFORCE_STATE = 'enforce_state'; // Set to true to enforce state to be passed in authorization (see http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-10.12)                                                                                                                                                                    
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span>                :      * Regex to filter out the client identifier (described in Section 2 of IETF draft).                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                :      * IETF draft does not prescribe a format for these, however I've arbitrarily                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                :      * chosen alphanumeric strings with hyphens and underscores, 3-32 characters                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :      * long.                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :      * Feel free to change.                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span>                :     const CLIENT_ID_REGEXP = '/^[a-z0-9-_]{3,32}$/i';                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span>                :      * @defgroup oauth2_section_5 Accessing a Protected Resource                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                :      * @{                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span>                :      * Clients access protected resources by presenting an access token to                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span>                :      * the resource server. Access tokens act as bearer tokens, where the                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span>                :      * token string acts as a shared symmetric secret. This requires                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span>                :      * treating the access token with the same care as other secrets (e.g.                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111">     111</a> </span>                :      * end-user passwords). Access tokens SHOULD NOT be sent in the clear                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112">     112</a> </span>                :      * over an insecure channel.                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113">     113</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114">     114</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-7                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115">     115</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116">     116</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117">     117</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118">     118</a> </span>                :      * Used to define the name of the OAuth access token parameter                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119">     119</a> </span>                :      * (POST &amp; GET). This is for the &quot;bearer&quot; token type.                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120">     120</a> </span>                :      * Other token types may use different methods and names.                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121">     121</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122">     122</a> </span>                :      * IETF Draft section 2 specifies that it should be called &quot;access_token&quot;                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123">     123</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124">     124</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-06#section-2.2                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125">     125</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-06#section-2.3                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126">     126</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127">     127</a> </span>                :     const TOKEN_PARAM_NAME = 'access_token';                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128">     128</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129">     129</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130">     130</a> </span>                :      * When using the bearer token type, there is a specifc Authorization header                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131">     131</a> </span>                :      * required: &quot;Bearer&quot;                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132">     132</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133">     133</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-04#section-2.1                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134">     134</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135">     135</a> </span>                :     const TOKEN_BEARER_HEADER_NAME = 'Bearer';                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136">     136</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container137"><a name="137"></a><a href="#137" id="line137">     137</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138">     138</a> </span>                :      * @}                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139">     139</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140">     140</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141">     141</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142">     142</a> </span>                :      * @defgroup oauth2_section_4 Obtaining Authorization                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143">     143</a> </span>                :      * @{                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144">     144</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145">     145</a> </span>                :      * When the client interacts with an end-user, the end-user MUST first                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146">     146</a> </span>                :      * grant the client authorization to access its protected resources.                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147">     147</a> </span>                :      * Once obtained, the end-user authorization grant is expressed as an                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148">     148</a> </span>                :      * authorization code which the client uses to obtain an access token.                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149">     149</a> </span>                :      * To obtain an end-user authorization, the client sends the end-user to                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150">     150</a> </span>                :      * the end-user authorization endpoint.                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151">     151</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152">     152</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153">     153</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154">     154</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155">     155</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156">     156</a> </span>                :      * List of possible authentication response types.                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157">     157</a> </span>                :      * The &quot;authorization_code&quot; mechanism exclusively supports 'code'                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158">     158</a> </span>                :      * and the &quot;implicit&quot; mechanism exclusively supports 'token'.                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159">     159</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160">     160</a> </span>                :      * @var string                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161">     161</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.1                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162">     162</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.1                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163">     163</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164">     164</a> </span>                :     const RESPONSE_TYPE_AUTH_CODE = 'code';                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165">     165</a> </span>                :     const RESPONSE_TYPE_ACCESS_TOKEN = 'token';                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166">     166</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167">     167</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168">     168</a> </span>                :      * @}                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169">     169</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170">     170</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171">     171</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172">     172</a> </span>                :      * @defgroup oauth2_section_5 Obtaining an Access Token                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173">     173</a> </span>                :      * @{                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174">     174</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175">     175</a> </span>                :      * The client obtains an access token by authenticating with the                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176">     176</a> </span>                :      * authorization server and presenting its authorization grant (in the form of                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177">     177</a> </span>                :      * an authorization code, resource owner credentials, an assertion, or a                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178">     178</a> </span>                :      * refresh token).                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179">     179</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180">     180</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181">     181</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182">     182</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183">     183</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184">     184</a> </span>                :      * Grant types support by draft 20                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185">     185</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186">     186</a> </span>                :     const GRANT_TYPE_AUTH_CODE = 'authorization_code';                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187">     187</a> </span>                :     const GRANT_TYPE_IMPLICIT = 'token';                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188">     188</a> </span>                :     const GRANT_TYPE_USER_CREDENTIALS = 'password';                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189">     189</a> </span>                :     const GRANT_TYPE_CLIENT_CREDENTIALS = 'client_credentials';                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190">     190</a> </span>                :     const GRANT_TYPE_REFRESH_TOKEN = 'refresh_token';                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191">     191</a> </span>                :     const GRANT_TYPE_EXTENSIONS = 'extensions';                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192">     192</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193">     193</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194">     194</a> </span>                :      * Regex to filter out the grant type.                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195">     195</a> </span>                :      * NB: For extensibility, the grant type can be a URI                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196">     196</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.5                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197">     197</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198">     198</a> </span>                :     const GRANT_TYPE_REGEXP = '#^(authorization_code|token|password|client_credentials|refresh_token|http://.*)$#';                                                                                                                                                                                                                                      
+<span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199">     199</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200">     200</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201">     201</a> </span>                :      * @}                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202">     202</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203">     203</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204">     204</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205">     205</a> </span>                :      * Possible token types as defined by draft 20.                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container206"><a name="206"></a><a href="#206" id="line206">     206</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container207"><a name="207"></a><a href="#207" id="line207">     207</a> </span>                :      * TODO: Add support for mac (and maybe other types?)                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container208"><a name="208"></a><a href="#208" id="line208">     208</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container209"><a name="209"></a><a href="#209" id="line209">     209</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-7.1                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container210"><a name="210"></a><a href="#210" id="line210">     210</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container211"><a name="211"></a><a href="#211" id="line211">     211</a> </span>                :     const TOKEN_TYPE_BEARER = 'bearer';                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container212"><a name="212"></a><a href="#212" id="line212">     212</a> </span>                :     const TOKEN_TYPE_MAC = 'mac'; // Currently unsupported                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container213"><a name="213"></a><a href="#213" id="line213">     213</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container214"><a name="214"></a><a href="#214" id="line214">     214</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container215"><a name="215"></a><a href="#215" id="line215">     215</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container216"><a name="216"></a><a href="#216" id="line216">     216</a> </span>                :      * @defgroup self::HTTP_status HTTP status code                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container217"><a name="217"></a><a href="#217" id="line217">     217</a> </span>                :      * @{                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container218"><a name="218"></a><a href="#218" id="line218">     218</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container219"><a name="219"></a><a href="#219" id="line219">     219</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container220"><a name="220"></a><a href="#220" id="line220">     220</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container221"><a name="221"></a><a href="#221" id="line221">     221</a> </span>                :      * HTTP status codes for successful and error states as specified by draft 20.                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container222"><a name="222"></a><a href="#222" id="line222">     222</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container223"><a name="223"></a><a href="#223" id="line223">     223</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container224"><a name="224"></a><a href="#224" id="line224">     224</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container225"><a name="225"></a><a href="#225" id="line225">     225</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container226"><a name="226"></a><a href="#226" id="line226">     226</a> </span>                :     const HTTP_FOUND = '302 Found';                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container227"><a name="227"></a><a href="#227" id="line227">     227</a> </span>                :     const HTTP_BAD_REQUEST = '400 Bad Request';                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container228"><a name="228"></a><a href="#228" id="line228">     228</a> </span>                :     const HTTP_UNAUTHORIZED = '401 Unauthorized';                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container229"><a name="229"></a><a href="#229" id="line229">     229</a> </span>                :     const HTTP_FORBIDDEN = '403 Forbidden';                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container230"><a name="230"></a><a href="#230" id="line230">     230</a> </span>                :     const HTTP_UNAVAILABLE = '503 Service Unavailable';                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container231"><a name="231"></a><a href="#231" id="line231">     231</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container232"><a name="232"></a><a href="#232" id="line232">     232</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container233"><a name="233"></a><a href="#233" id="line233">     233</a> </span>                :      * @}                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container234"><a name="234"></a><a href="#234" id="line234">     234</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container235"><a name="235"></a><a href="#235" id="line235">     235</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container236"><a name="236"></a><a href="#236" id="line236">     236</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container237"><a name="237"></a><a href="#237" id="line237">     237</a> </span>                :      * @defgroup oauth2_error Error handling                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container238"><a name="238"></a><a href="#238" id="line238">     238</a> </span>                :      * @{                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container239"><a name="239"></a><a href="#239" id="line239">     239</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container240"><a name="240"></a><a href="#240" id="line240">     240</a> </span>                :      * @todo Extend for i18n.                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container241"><a name="241"></a><a href="#241" id="line241">     241</a> </span>                :      * @todo Consider moving all error related functionality into a separate class.                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container242"><a name="242"></a><a href="#242" id="line242">     242</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container243"><a name="243"></a><a href="#243" id="line243">     243</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container244"><a name="244"></a><a href="#244" id="line244">     244</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container245"><a name="245"></a><a href="#245" id="line245">     245</a> </span>                :      * The request is missing a required parameter, includes an unsupported                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container246"><a name="246"></a><a href="#246" id="line246">     246</a> </span>                :      * parameter or parameter value, or is otherwise malformed.                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container247"><a name="247"></a><a href="#247" id="line247">     247</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container248"><a name="248"></a><a href="#248" id="line248">     248</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container249"><a name="249"></a><a href="#249" id="line249">     249</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container250"><a name="250"></a><a href="#250" id="line250">     250</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container251"><a name="251"></a><a href="#251" id="line251">     251</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container252"><a name="252"></a><a href="#252" id="line252">     252</a> </span>                :     const ERROR_INVALID_REQUEST = 'invalid_request';                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container253"><a name="253"></a><a href="#253" id="line253">     253</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container254"><a name="254"></a><a href="#254" id="line254">     254</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container255"><a name="255"></a><a href="#255" id="line255">     255</a> </span>                :      * The client identifier provided is invalid.                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container256"><a name="256"></a><a href="#256" id="line256">     256</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container257"><a name="257"></a><a href="#257" id="line257">     257</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container258"><a name="258"></a><a href="#258" id="line258">     258</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container259"><a name="259"></a><a href="#259" id="line259">     259</a> </span>                :     const ERROR_INVALID_CLIENT = 'invalid_client';                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container260"><a name="260"></a><a href="#260" id="line260">     260</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container261"><a name="261"></a><a href="#261" id="line261">     261</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container262"><a name="262"></a><a href="#262" id="line262">     262</a> </span>                :      * The client is not authorized to use the requested response type.                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container263"><a name="263"></a><a href="#263" id="line263">     263</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container264"><a name="264"></a><a href="#264" id="line264">     264</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container265"><a name="265"></a><a href="#265" id="line265">     265</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container266"><a name="266"></a><a href="#266" id="line266">     266</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container267"><a name="267"></a><a href="#267" id="line267">     267</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container268"><a name="268"></a><a href="#268" id="line268">     268</a> </span>                :     const ERROR_UNAUTHORIZED_CLIENT = 'unauthorized_client';                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container269"><a name="269"></a><a href="#269" id="line269">     269</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container270"><a name="270"></a><a href="#270" id="line270">     270</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container271"><a name="271"></a><a href="#271" id="line271">     271</a> </span>                :      * The redirection URI provided does not match a pre-registered value.                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container272"><a name="272"></a><a href="#272" id="line272">     272</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container273"><a name="273"></a><a href="#273" id="line273">     273</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-3.1.2.4                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container274"><a name="274"></a><a href="#274" id="line274">     274</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container275"><a name="275"></a><a href="#275" id="line275">     275</a> </span>                :     const ERROR_REDIRECT_URI_MISMATCH = 'redirect_uri_mismatch';                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container276"><a name="276"></a><a href="#276" id="line276">     276</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container277"><a name="277"></a><a href="#277" id="line277">     277</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container278"><a name="278"></a><a href="#278" id="line278">     278</a> </span>                :      * The end-user or authorization server denied the request.                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container279"><a name="279"></a><a href="#279" id="line279">     279</a> </span>                :      * This could be returned, for example, if the resource owner decides to reject                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container280"><a name="280"></a><a href="#280" id="line280">     280</a> </span>                :      * access to the client at a later point.                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container281"><a name="281"></a><a href="#281" id="line281">     281</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container282"><a name="282"></a><a href="#282" id="line282">     282</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container283"><a name="283"></a><a href="#283" id="line283">     283</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container284"><a name="284"></a><a href="#284" id="line284">     284</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container285"><a name="285"></a><a href="#285" id="line285">     285</a> </span>                :     const ERROR_USER_DENIED = 'access_denied';                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container286"><a name="286"></a><a href="#286" id="line286">     286</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container287"><a name="287"></a><a href="#287" id="line287">     287</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container288"><a name="288"></a><a href="#288" id="line288">     288</a> </span>                :      * The requested response type is not supported by the authorization server.                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container289"><a name="289"></a><a href="#289" id="line289">     289</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container290"><a name="290"></a><a href="#290" id="line290">     290</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container291"><a name="291"></a><a href="#291" id="line291">     291</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container292"><a name="292"></a><a href="#292" id="line292">     292</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container293"><a name="293"></a><a href="#293" id="line293">     293</a> </span>                :     const ERROR_UNSUPPORTED_RESPONSE_TYPE = 'unsupported_response_type';                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container294"><a name="294"></a><a href="#294" id="line294">     294</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container295"><a name="295"></a><a href="#295" id="line295">     295</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container296"><a name="296"></a><a href="#296" id="line296">     296</a> </span>                :      * The requested scope is invalid, unknown, or malformed.                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container297"><a name="297"></a><a href="#297" id="line297">     297</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container298"><a name="298"></a><a href="#298" id="line298">     298</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container299"><a name="299"></a><a href="#299" id="line299">     299</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container300"><a name="300"></a><a href="#300" id="line300">     300</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container301"><a name="301"></a><a href="#301" id="line301">     301</a> </span>                :     const ERROR_INVALID_SCOPE = 'invalid_scope';                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container302"><a name="302"></a><a href="#302" id="line302">     302</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container303"><a name="303"></a><a href="#303" id="line303">     303</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container304"><a name="304"></a><a href="#304" id="line304">     304</a> </span>                :      * The provided authorization grant is invalid, expired,                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container305"><a name="305"></a><a href="#305" id="line305">     305</a> </span>                :      * revoked, does not match the redirection URI used in the                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container306"><a name="306"></a><a href="#306" id="line306">     306</a> </span>                :      * authorization request, or was issued to another client.                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container307"><a name="307"></a><a href="#307" id="line307">     307</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container308"><a name="308"></a><a href="#308" id="line308">     308</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container309"><a name="309"></a><a href="#309" id="line309">     309</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container310"><a name="310"></a><a href="#310" id="line310">     310</a> </span>                :     const ERROR_INVALID_GRANT = 'invalid_grant';                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container311"><a name="311"></a><a href="#311" id="line311">     311</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container312"><a name="312"></a><a href="#312" id="line312">     312</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container313"><a name="313"></a><a href="#313" id="line313">     313</a> </span>                :      * The authorization grant is not supported by the authorization server.                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container314"><a name="314"></a><a href="#314" id="line314">     314</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container315"><a name="315"></a><a href="#315" id="line315">     315</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container316"><a name="316"></a><a href="#316" id="line316">     316</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container317"><a name="317"></a><a href="#317" id="line317">     317</a> </span>                :     const ERROR_UNSUPPORTED_GRANT_TYPE = 'unsupported_grant_type';                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container318"><a name="318"></a><a href="#318" id="line318">     318</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container319"><a name="319"></a><a href="#319" id="line319">     319</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container320"><a name="320"></a><a href="#320" id="line320">     320</a> </span>                :      * The request requires higher privileges than provided by the access token.                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container321"><a name="321"></a><a href="#321" id="line321">     321</a> </span>                :      * The resource server SHOULD respond with the HTTP 403 (Forbidden) status                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container322"><a name="322"></a><a href="#322" id="line322">     322</a> </span>                :      * code and MAY include the &quot;scope&quot; attribute with the scope necessary to                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container323"><a name="323"></a><a href="#323" id="line323">     323</a> </span>                :      * access the protected resource.                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container324"><a name="324"></a><a href="#324" id="line324">     324</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container325"><a name="325"></a><a href="#325" id="line325">     325</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container326"><a name="326"></a><a href="#326" id="line326">     326</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container327"><a name="327"></a><a href="#327" id="line327">     327</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container328"><a name="328"></a><a href="#328" id="line328">     328</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container329"><a name="329"></a><a href="#329" id="line329">     329</a> </span>                :     const ERROR_INSUFFICIENT_SCOPE = 'invalid_scope';                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container330"><a name="330"></a><a href="#330" id="line330">     330</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container331"><a name="331"></a><a href="#331" id="line331">     331</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container332"><a name="332"></a><a href="#332" id="line332">     332</a> </span>                :      * @}                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container333"><a name="333"></a><a href="#333" id="line333">     333</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container334"><a name="334"></a><a href="#334" id="line334">     334</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container335"><a name="335"></a><a href="#335" id="line335">     335</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container336"><a name="336"></a><a href="#336" id="line336">     336</a> </span>                :      * Creates an OAuth2.0 server-side instance.                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container337"><a name="337"></a><a href="#337" id="line337">     337</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container338"><a name="338"></a><a href="#338" id="line338">     338</a> </span>                :      * @param $config - An associative array as below of config options. See CONFIG_* constants.                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container339"><a name="339"></a><a href="#339" id="line339">     339</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container340"><a name="340"></a><a href="#340" id="line340">     340</a> </span>                :     public function __construct(IOAuth2Storage $storage, $config = array()) {                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container341"><a name="341"></a><a href="#341" id="line341">     341</a> </span><span class="lineNoCov">              0 :         $this-&gt;storage = $storage;                                                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container342"><a name="342"></a><a href="#342" id="line342">     342</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container343"><a name="343"></a><a href="#343" id="line343">     343</a> </span>                :         // Configuration options                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container344"><a name="344"></a><a href="#344" id="line344">     344</a> </span><span class="lineNoCov">              0 :         $this-&gt;setDefaultOptions();                                                                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container345"><a name="345"></a><a href="#345" id="line345">     345</a> </span><span class="lineNoCov">              0 :         foreach ( $config as $name =&gt; $value ) {                                                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container346"><a name="346"></a><a href="#346" id="line346">     346</a> </span><span class="lineNoCov">              0 :             $this-&gt;setVariable($name, $value);                                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container347"><a name="347"></a><a href="#347" id="line347">     347</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container348"><a name="348"></a><a href="#348" id="line348">     348</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container349"><a name="349"></a><a href="#349" id="line349">     349</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container350"><a name="350"></a><a href="#350" id="line350">     350</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container351"><a name="351"></a><a href="#351" id="line351">     351</a> </span>                :      * Default configuration options are specified here.                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container352"><a name="352"></a><a href="#352" id="line352">     352</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container353"><a name="353"></a><a href="#353" id="line353">     353</a> </span>                :     protected function setDefaultOptions() {                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container354"><a name="354"></a><a href="#354" id="line354">     354</a> </span><span class="lineNoCov">              0 :         $this-&gt;conf = array(                                                                                                                                                                                                                                                                                                                             </span>
+<span class="lineNum" id="container355"><a name="355"></a><a href="#355" id="line355">     355</a> </span><span class="lineNoCov">              0 :             self::CONFIG_ACCESS_LIFETIME =&gt; self::DEFAULT_ACCESS_TOKEN_LIFETIME,                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container356"><a name="356"></a><a href="#356" id="line356">     356</a> </span><span class="lineNoCov">              0 :             self::CONFIG_REFRESH_LIFETIME =&gt; self::DEFAULT_REFRESH_TOKEN_LIFETIME,                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container357"><a name="357"></a><a href="#357" id="line357">     357</a> </span><span class="lineNoCov">              0 :             self::CONFIG_AUTH_LIFETIME =&gt; self::DEFAULT_AUTH_CODE_LIFETIME,                                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container358"><a name="358"></a><a href="#358" id="line358">     358</a> </span><span class="lineNoCov">              0 :             self::CONFIG_WWW_REALM =&gt; self::DEFAULT_WWW_REALM,                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container359"><a name="359"></a><a href="#359" id="line359">     359</a> </span><span class="lineNoCov">              0 :             self::CONFIG_TOKEN_TYPE =&gt; self::TOKEN_TYPE_BEARER,                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container360"><a name="360"></a><a href="#360" id="line360">     360</a> </span><span class="lineNoCov">              0 :             self::CONFIG_ENFORCE_INPUT_REDIRECT =&gt; FALSE,                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container361"><a name="361"></a><a href="#361" id="line361">     361</a> </span><span class="lineNoCov">              0 :             self::CONFIG_ENFORCE_STATE =&gt; FALSE,                                                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container362"><a name="362"></a><a href="#362" id="line362">     362</a> </span><span class="lineNoCov">              0 :             self::CONFIG_SUPPORTED_SCOPES =&gt; array() // This is expected to be passed in on construction. Scopes can be an aribitrary string.                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container363"><a name="363"></a><a href="#363" id="line363">     363</a> </span><span class="lineNoCov">              0 :         );                                                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container364"><a name="364"></a><a href="#364" id="line364">     364</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container365"><a name="365"></a><a href="#365" id="line365">     365</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container366"><a name="366"></a><a href="#366" id="line366">     366</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container367"><a name="367"></a><a href="#367" id="line367">     367</a> </span>                :      * Returns a persistent variable.                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container368"><a name="368"></a><a href="#368" id="line368">     368</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container369"><a name="369"></a><a href="#369" id="line369">     369</a> </span>                :      * @param $name                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container370"><a name="370"></a><a href="#370" id="line370">     370</a> </span>                :      * The name of the variable to return.                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container371"><a name="371"></a><a href="#371" id="line371">     371</a> </span>                :      * @param $default                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container372"><a name="372"></a><a href="#372" id="line372">     372</a> </span>                :      * The default value to use if this variable has never been set.                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container373"><a name="373"></a><a href="#373" id="line373">     373</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container374"><a name="374"></a><a href="#374" id="line374">     374</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container375"><a name="375"></a><a href="#375" id="line375">     375</a> </span>                :      * The value of the variable.                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container376"><a name="376"></a><a href="#376" id="line376">     376</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container377"><a name="377"></a><a href="#377" id="line377">     377</a> </span>                :     public function getVariable($name, $default = NULL) {                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container378"><a name="378"></a><a href="#378" id="line378">     378</a> </span><span class="lineNoCov">              0 :         $name = strtolower($name);                                                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container379"><a name="379"></a><a href="#379" id="line379">     379</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container380"><a name="380"></a><a href="#380" id="line380">     380</a> </span><span class="lineNoCov">              0 :         return isset($this-&gt;conf[$name]) ? $this-&gt;conf[$name] : $default;                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container381"><a name="381"></a><a href="#381" id="line381">     381</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container382"><a name="382"></a><a href="#382" id="line382">     382</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container383"><a name="383"></a><a href="#383" id="line383">     383</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container384"><a name="384"></a><a href="#384" id="line384">     384</a> </span>                :      * Sets a persistent variable.                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container385"><a name="385"></a><a href="#385" id="line385">     385</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container386"><a name="386"></a><a href="#386" id="line386">     386</a> </span>                :      * @param $name                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container387"><a name="387"></a><a href="#387" id="line387">     387</a> </span>                :      * The name of the variable to set.                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container388"><a name="388"></a><a href="#388" id="line388">     388</a> </span>                :      * @param $value                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container389"><a name="389"></a><a href="#389" id="line389">     389</a> </span>                :      * The value to set.                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container390"><a name="390"></a><a href="#390" id="line390">     390</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container391"><a name="391"></a><a href="#391" id="line391">     391</a> </span>                :     public function setVariable($name, $value) {                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container392"><a name="392"></a><a href="#392" id="line392">     392</a> </span><span class="lineNoCov">              0 :         $name = strtolower($name);                                                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container393"><a name="393"></a><a href="#393" id="line393">     393</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container394"><a name="394"></a><a href="#394" id="line394">     394</a> </span><span class="lineNoCov">              0 :         $this-&gt;conf[$name] = $value;                                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container395"><a name="395"></a><a href="#395" id="line395">     395</a> </span><span class="lineNoCov">              0 :         return $this;                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container396"><a name="396"></a><a href="#396" id="line396">     396</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container397"><a name="397"></a><a href="#397" id="line397">     397</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container398"><a name="398"></a><a href="#398" id="line398">     398</a> </span>                :     // Resource protecting (Section 5).                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container399"><a name="399"></a><a href="#399" id="line399">     399</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container400"><a name="400"></a><a href="#400" id="line400">     400</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container401"><a name="401"></a><a href="#401" id="line401">     401</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container402"><a name="402"></a><a href="#402" id="line402">     402</a> </span>                :      * Check that a valid access token has been provided.                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container403"><a name="403"></a><a href="#403" id="line403">     403</a> </span>                :      * The token is returned (as an associative array) if valid.                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container404"><a name="404"></a><a href="#404" id="line404">     404</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container405"><a name="405"></a><a href="#405" id="line405">     405</a> </span>                :      * The scope parameter defines any required scope that the token must have.                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container406"><a name="406"></a><a href="#406" id="line406">     406</a> </span>                :      * If a scope param is provided and the token does not have the required                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container407"><a name="407"></a><a href="#407" id="line407">     407</a> </span>                :      * scope, we bounce the request.                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container408"><a name="408"></a><a href="#408" id="line408">     408</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container409"><a name="409"></a><a href="#409" id="line409">     409</a> </span>                :      * Some implementations may choose to return a subset of the protected                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container410"><a name="410"></a><a href="#410" id="line410">     410</a> </span>                :      * resource (i.e. &quot;public&quot; data) if the user has not provided an access                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container411"><a name="411"></a><a href="#411" id="line411">     411</a> </span>                :      * token or if the access token is invalid or expired.                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container412"><a name="412"></a><a href="#412" id="line412">     412</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container413"><a name="413"></a><a href="#413" id="line413">     413</a> </span>                :      * The IETF spec says that we should send a 401 Unauthorized header and                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container414"><a name="414"></a><a href="#414" id="line414">     414</a> </span>                :      * bail immediately so that's what the defaults are set to. You can catch                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container415"><a name="415"></a><a href="#415" id="line415">     415</a> </span>                :      * the exception thrown and behave differently if you like (log errors, allow                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container416"><a name="416"></a><a href="#416" id="line416">     416</a> </span>                :      * public access for missing tokens, etc)                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container417"><a name="417"></a><a href="#417" id="line417">     417</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container418"><a name="418"></a><a href="#418" id="line418">     418</a> </span>                :      * @param $scope                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container419"><a name="419"></a><a href="#419" id="line419">     419</a> </span>                :      * A space-separated string of required scope(s), if you want to check                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container420"><a name="420"></a><a href="#420" id="line420">     420</a> </span>                :      * for scope.                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container421"><a name="421"></a><a href="#421" id="line421">     421</a> </span>                :      * @return array                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container422"><a name="422"></a><a href="#422" id="line422">     422</a> </span>                :      * Token                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container423"><a name="423"></a><a href="#423" id="line423">     423</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-7                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container424"><a name="424"></a><a href="#424" id="line424">     424</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container425"><a name="425"></a><a href="#425" id="line425">     425</a> </span>                :      * @ingroup oauth2_section_7                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container426"><a name="426"></a><a href="#426" id="line426">     426</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container427"><a name="427"></a><a href="#427" id="line427">     427</a> </span>                :     public function verifyAccessToken($token_param, $scope = NULL) {                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container428"><a name="428"></a><a href="#428" id="line428">     428</a> </span><span class="lineNoCov">              0 :         $tokenType = $this-&gt;getVariable(self::CONFIG_TOKEN_TYPE);                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container429"><a name="429"></a><a href="#429" id="line429">     429</a> </span><span class="lineNoCov">              0 :         $realm = $this-&gt;getVariable(self::CONFIG_WWW_REALM);                                                                                                                                                                                                                                                                                             </span>
+<span class="lineNum" id="container430"><a name="430"></a><a href="#430" id="line430">     430</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container431"><a name="431"></a><a href="#431" id="line431">     431</a> </span><span class="lineNoCov">              0 :         if (!$token_param) { // Access token was not provided                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container432"><a name="432"></a><a href="#432" id="line432">     432</a> </span><span class="lineNoCov">              0 :             throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'The request is missing a required parameter, includes an unsupported parameter or parameter value, repeats the same parameter, uses more than one method for including an access token, or is otherwise malformed.', $scope);</span>
+<span class="lineNum" id="container433"><a name="433"></a><a href="#433" id="line433">     433</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container434"><a name="434"></a><a href="#434" id="line434">     434</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container435"><a name="435"></a><a href="#435" id="line435">     435</a> </span>                :         // Get the stored token data (from the implementing subclass)                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container436"><a name="436"></a><a href="#436" id="line436">     436</a> </span><span class="lineNoCov">              0 :         $token = $this-&gt;storage-&gt;getAccessToken($token_param);                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container437"><a name="437"></a><a href="#437" id="line437">     437</a> </span><span class="lineNoCov">              0 :         if ($token === NULL) {                                                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container438"><a name="438"></a><a href="#438" id="line438">     438</a> </span><span class="lineNoCov">              0 :             throw new OAuth2AuthenticateException(self::HTTP_UNAUTHORIZED, $tokenType, $realm, self::ERROR_INVALID_GRANT, 'The access token provided is invalid.', $scope);                                                                                                                                                                              </span>
+<span class="lineNum" id="container439"><a name="439"></a><a href="#439" id="line439">     439</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container440"><a name="440"></a><a href="#440" id="line440">     440</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container441"><a name="441"></a><a href="#441" id="line441">     441</a> </span>                :         // Check we have a well formed token                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container442"><a name="442"></a><a href="#442" id="line442">     442</a> </span><span class="lineNoCov">              0 :         if (!isset($token[&quot;expires&quot;]) || !isset($token[&quot;client_id&quot;])) {                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container443"><a name="443"></a><a href="#443" id="line443">     443</a> </span><span class="lineNoCov">              0 :             throw new OAuth2AuthenticateException(self::HTTP_UNAUTHORIZED, $tokenType, $realm, self::ERROR_INVALID_GRANT, 'Malformed token (missing &quot;expires&quot; or &quot;client_id&quot;)', $scope);                                                                                                                                                                 </span>
+<span class="lineNum" id="container444"><a name="444"></a><a href="#444" id="line444">     444</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container445"><a name="445"></a><a href="#445" id="line445">     445</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container446"><a name="446"></a><a href="#446" id="line446">     446</a> </span>                :         // Check token expiration (expires is a mandatory paramter)                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container447"><a name="447"></a><a href="#447" id="line447">     447</a> </span><span class="lineNoCov">              0 :         if (isset($token[&quot;expires&quot;]) &amp;&amp; time() &gt; $token[&quot;expires&quot;]) {                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container448"><a name="448"></a><a href="#448" id="line448">     448</a> </span><span class="lineNoCov">              0 :             throw new OAuth2AuthenticateException(self::HTTP_UNAUTHORIZED, $tokenType, $realm, self::ERROR_INVALID_GRANT, 'The access token provided has expired.', $scope);                                                                                                                                                                             </span>
+<span class="lineNum" id="container449"><a name="449"></a><a href="#449" id="line449">     449</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container450"><a name="450"></a><a href="#450" id="line450">     450</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container451"><a name="451"></a><a href="#451" id="line451">     451</a> </span>                :         // Check scope, if provided                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container452"><a name="452"></a><a href="#452" id="line452">     452</a> </span>                :         // If token doesn't have a scope, it's NULL/empty, or it's insufficient, then throw an error                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container453"><a name="453"></a><a href="#453" id="line453">     453</a> </span><span class="lineNoCov">              0 :         if ($scope &amp;&amp; (!isset($token[&quot;scope&quot;]) || !$token[&quot;scope&quot;] || !$this-&gt;checkScope($scope, $token[&quot;scope&quot;]))) {                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container454"><a name="454"></a><a href="#454" id="line454">     454</a> </span><span class="lineNoCov">              0 :             throw new OAuth2AuthenticateException(self::HTTP_FORBIDDEN, $tokenType, $realm, self::ERROR_INSUFFICIENT_SCOPE, 'The request requires higher privileges than provided by the access token.', $scope);                                                                                                                                        </span>
+<span class="lineNum" id="container455"><a name="455"></a><a href="#455" id="line455">     455</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container456"><a name="456"></a><a href="#456" id="line456">     456</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container457"><a name="457"></a><a href="#457" id="line457">     457</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container458"><a name="458"></a><a href="#458" id="line458">     458</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container459"><a name="459"></a><a href="#459" id="line459">     459</a> </span><span class="lineNoCov">              0 :         session_write_close(); //Fecha session anterior                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container460"><a name="460"></a><a href="#460" id="line460">     460</a> </span><span class="lineNoCov">              0 :         session_id($token['refresh_token']); //Define o id da session o mesmo do resfresh token                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container461"><a name="461"></a><a href="#461" id="line461">     461</a> </span><span class="lineNoCov">              0 :         session_start();                                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container462"><a name="462"></a><a href="#462" id="line462">     462</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container463"><a name="463"></a><a href="#463" id="line463">     463</a> </span><span class="lineNoCov">              0 :         return $token;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container464"><a name="464"></a><a href="#464" id="line464">     464</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container465"><a name="465"></a><a href="#465" id="line465">     465</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container466"><a name="466"></a><a href="#466" id="line466">     466</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container467"><a name="467"></a><a href="#467" id="line467">     467</a> </span>                :      * This is a convenience function that can be used to get the token, which can then                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container468"><a name="468"></a><a href="#468" id="line468">     468</a> </span>                :      * be passed to verifyAccessToken(). The constraints specified by the draft are                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container469"><a name="469"></a><a href="#469" id="line469">     469</a> </span>                :      * attempted to be adheared to in this method.                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container470"><a name="470"></a><a href="#470" id="line470">     470</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container471"><a name="471"></a><a href="#471" id="line471">     471</a> </span>                :      * As per the Bearer spec (draft 8, section 2) - there are three ways for a client                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container472"><a name="472"></a><a href="#472" id="line472">     472</a> </span>                :      * to specify the bearer token, in order of preference: Authorization Header,                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container473"><a name="473"></a><a href="#473" id="line473">     473</a> </span>                :      * POST and GET.                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container474"><a name="474"></a><a href="#474" id="line474">     474</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container475"><a name="475"></a><a href="#475" id="line475">     475</a> </span>                :      * NB: Resource servers MUST accept tokens via the Authorization scheme                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container476"><a name="476"></a><a href="#476" id="line476">     476</a> </span>                :      * (http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2).                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container477"><a name="477"></a><a href="#477" id="line477">     477</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container478"><a name="478"></a><a href="#478" id="line478">     478</a> </span>                :      * @todo Should we enforce TLS/SSL in this function?                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container479"><a name="479"></a><a href="#479" id="line479">     479</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container480"><a name="480"></a><a href="#480" id="line480">     480</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2.1                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container481"><a name="481"></a><a href="#481" id="line481">     481</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2.2                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container482"><a name="482"></a><a href="#482" id="line482">     482</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2.3                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container483"><a name="483"></a><a href="#483" id="line483">     483</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container484"><a name="484"></a><a href="#484" id="line484">     484</a> </span>                :      * Old Android version bug (at least with version 2.2)                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container485"><a name="485"></a><a href="#485" id="line485">     485</a> </span>                :      * @see http://code.google.com/p/android/issues/detail?id=6684                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container486"><a name="486"></a><a href="#486" id="line486">     486</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container487"><a name="487"></a><a href="#487" id="line487">     487</a> </span>                :      * We don't want to test this functionality as it relies on superglobals and headers:                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container488"><a name="488"></a><a href="#488" id="line488">     488</a> </span>                :      * @codeCoverageIgnoreStart                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container489"><a name="489"></a><a href="#489" id="line489">     489</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container490"><a name="490"></a><a href="#490" id="line490">     490</a> </span>                :     public function getBearerToken() {                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container491"><a name="491"></a><a href="#491" id="line491">     491</a> </span>                :         if (isset($_SERVER['HTTP_AUTHORIZATION'])) {                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container492"><a name="492"></a><a href="#492" id="line492">     492</a> </span>                :             $headers = trim($_SERVER[&quot;HTTP_AUTHORIZATION&quot;]);                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container493"><a name="493"></a><a href="#493" id="line493">     493</a> </span>                :         } elseif (function_exists('apache_request_headers')) {                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container494"><a name="494"></a><a href="#494" id="line494">     494</a> </span>                :             $requestHeaders = apache_request_headers();                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container495"><a name="495"></a><a href="#495" id="line495">     495</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container496"><a name="496"></a><a href="#496" id="line496">     496</a> </span>                :             // Server-side fix for bug in old Android versions (a nice side-effect of this fix means we don't care about capitalization for Authorization)                                                                                                                                                                                               
+<span class="lineNum" id="container497"><a name="497"></a><a href="#497" id="line497">     497</a> </span>                :             $requestHeaders = array_combine(array_map('ucwords', array_keys($requestHeaders)), array_values($requestHeaders));                                                                                                                                                                                                                           
+<span class="lineNum" id="container498"><a name="498"></a><a href="#498" id="line498">     498</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container499"><a name="499"></a><a href="#499" id="line499">     499</a> </span>                :             if (isset($requestHeaders['Authorization'])) {                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container500"><a name="500"></a><a href="#500" id="line500">     500</a> </span>                :                 $headers = trim($requestHeaders['Authorization']);                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container501"><a name="501"></a><a href="#501" id="line501">     501</a> </span>                :             }                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container502"><a name="502"></a><a href="#502" id="line502">     502</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container503"><a name="503"></a><a href="#503" id="line503">     503</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container504"><a name="504"></a><a href="#504" id="line504">     504</a> </span>                :         $tokenType = $this-&gt;getVariable(self::CONFIG_TOKEN_TYPE);                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container505"><a name="505"></a><a href="#505" id="line505">     505</a> </span>                :         $realm = $this-&gt;getVariable(self::CONFIG_WWW_REALM);                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container506"><a name="506"></a><a href="#506" id="line506">     506</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container507"><a name="507"></a><a href="#507" id="line507">     507</a> </span>                :         // Check that exactly one method was used                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container508"><a name="508"></a><a href="#508" id="line508">     508</a> </span>                :         $methodsUsed = !empty($headers) + isset($_GET[self::TOKEN_PARAM_NAME]) + isset($_POST[self::TOKEN_PARAM_NAME]);                                                                                                                                                                                                                                  
+<span class="lineNum" id="container509"><a name="509"></a><a href="#509" id="line509">     509</a> </span>                :         if ($methodsUsed &gt; 1) {                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container510"><a name="510"></a><a href="#510" id="line510">     510</a> </span>                :             throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'Only one method may be used to authenticate at a time (Auth header, GET or POST).');                                                                                                                                         
+<span class="lineNum" id="container511"><a name="511"></a><a href="#511" id="line511">     511</a> </span>                :         } elseif ($methodsUsed == 0) {                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container512"><a name="512"></a><a href="#512" id="line512">     512</a> </span>                :             throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'The access token was not found.');                                                                                                                                                                                           
+<span class="lineNum" id="container513"><a name="513"></a><a href="#513" id="line513">     513</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container514"><a name="514"></a><a href="#514" id="line514">     514</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container515"><a name="515"></a><a href="#515" id="line515">     515</a> </span>                :         // HEADER: Get the access token from the header                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container516"><a name="516"></a><a href="#516" id="line516">     516</a> </span>                :         if (!empty($headers)) {                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container517"><a name="517"></a><a href="#517" id="line517">     517</a> </span>                :             if (!preg_match('/' . self::TOKEN_BEARER_HEADER_NAME . '\s(\S+)/', $headers, $matches)) {                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container518"><a name="518"></a><a href="#518" id="line518">     518</a> </span>                :                 throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'Malformed auth header');                                                                                                                                                                                                 
+<span class="lineNum" id="container519"><a name="519"></a><a href="#519" id="line519">     519</a> </span>                :             }                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container520"><a name="520"></a><a href="#520" id="line520">     520</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container521"><a name="521"></a><a href="#521" id="line521">     521</a> </span>                :             return $matches[1];                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container522"><a name="522"></a><a href="#522" id="line522">     522</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container523"><a name="523"></a><a href="#523" id="line523">     523</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container524"><a name="524"></a><a href="#524" id="line524">     524</a> </span>                :         // POST: Get the token from POST data                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container525"><a name="525"></a><a href="#525" id="line525">     525</a> </span>                :         if (isset($_POST[self::TOKEN_PARAM_NAME])) {                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container526"><a name="526"></a><a href="#526" id="line526">     526</a> </span>                :             if ($_SERVER['REQUEST_METHOD'] != 'POST') {                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container527"><a name="527"></a><a href="#527" id="line527">     527</a> </span>                :                 throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'When putting the token in the body, the method must be POST.');                                                                                                                                                          
+<span class="lineNum" id="container528"><a name="528"></a><a href="#528" id="line528">     528</a> </span>                :             }                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container529"><a name="529"></a><a href="#529" id="line529">     529</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container530"><a name="530"></a><a href="#530" id="line530">     530</a> </span>                :             // IETF specifies content-type. NB: Not all webservers populate this _SERVER variable                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container531"><a name="531"></a><a href="#531" id="line531">     531</a> </span>                :             if (isset($_SERVER['CONTENT_TYPE']) &amp;&amp; $_SERVER['CONTENT_TYPE'] != 'application/x-www-form-urlencoded') {                                                                                                                                                                                                                                    
+<span class="lineNum" id="container532"><a name="532"></a><a href="#532" id="line532">     532</a> </span>                :                 throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'The content type for POST requests must be &quot;application/x-www-form-urlencoded&quot;');                                                                                                                                        
+<span class="lineNum" id="container533"><a name="533"></a><a href="#533" id="line533">     533</a> </span>                :             }                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container534"><a name="534"></a><a href="#534" id="line534">     534</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container535"><a name="535"></a><a href="#535" id="line535">     535</a> </span>                :             return $_POST[self::TOKEN_PARAM_NAME];                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container536"><a name="536"></a><a href="#536" id="line536">     536</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container537"><a name="537"></a><a href="#537" id="line537">     537</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container538"><a name="538"></a><a href="#538" id="line538">     538</a> </span>                :         // GET method                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container539"><a name="539"></a><a href="#539" id="line539">     539</a> </span>                :         return $_GET[self::TOKEN_PARAM_NAME];                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container540"><a name="540"></a><a href="#540" id="line540">     540</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container541"><a name="541"></a><a href="#541" id="line541">     541</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container542"><a name="542"></a><a href="#542" id="line542">     542</a> </span>                :     /** @codeCoverageIgnoreEnd */                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container543"><a name="543"></a><a href="#543" id="line543">     543</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container544"><a name="544"></a><a href="#544" id="line544">     544</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container545"><a name="545"></a><a href="#545" id="line545">     545</a> </span>                :      * Check if everything in required scope is contained in available scope.                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container546"><a name="546"></a><a href="#546" id="line546">     546</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container547"><a name="547"></a><a href="#547" id="line547">     547</a> </span>                :      * @param $required_scope                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container548"><a name="548"></a><a href="#548" id="line548">     548</a> </span>                :      * Required scope to be check with.                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container549"><a name="549"></a><a href="#549" id="line549">     549</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container550"><a name="550"></a><a href="#550" id="line550">     550</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container551"><a name="551"></a><a href="#551" id="line551">     551</a> </span>                :      * TRUE if everything in required scope is contained in available scope,                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container552"><a name="552"></a><a href="#552" id="line552">     552</a> </span>                :      * and False if it isn't.                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container553"><a name="553"></a><a href="#553" id="line553">     553</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container554"><a name="554"></a><a href="#554" id="line554">     554</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-7                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container555"><a name="555"></a><a href="#555" id="line555">     555</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container556"><a name="556"></a><a href="#556" id="line556">     556</a> </span>                :      * @ingroup oauth2_section_7                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container557"><a name="557"></a><a href="#557" id="line557">     557</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container558"><a name="558"></a><a href="#558" id="line558">     558</a> </span>                :     private function checkScope($required_scope, $available_scope) {                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container559"><a name="559"></a><a href="#559" id="line559">     559</a> </span>                :         // The required scope should match or be a subset of the available scope                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container560"><a name="560"></a><a href="#560" id="line560">     560</a> </span><span class="lineNoCov">              0 :         if (!is_array($required_scope)) {                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container561"><a name="561"></a><a href="#561" id="line561">     561</a> </span><span class="lineNoCov">              0 :             $required_scope = explode(' ', trim($required_scope));                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container562"><a name="562"></a><a href="#562" id="line562">     562</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container563"><a name="563"></a><a href="#563" id="line563">     563</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container564"><a name="564"></a><a href="#564" id="line564">     564</a> </span><span class="lineNoCov">              0 :         if (!is_array($available_scope)) {                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container565"><a name="565"></a><a href="#565" id="line565">     565</a> </span><span class="lineNoCov">              0 :             $available_scope = explode(' ', trim($available_scope));                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container566"><a name="566"></a><a href="#566" id="line566">     566</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container567"><a name="567"></a><a href="#567" id="line567">     567</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container568"><a name="568"></a><a href="#568" id="line568">     568</a> </span><span class="lineNoCov">              0 :         return (count(array_diff($required_scope, $available_scope)) == 0);                                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container569"><a name="569"></a><a href="#569" id="line569">     569</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container570"><a name="570"></a><a href="#570" id="line570">     570</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container571"><a name="571"></a><a href="#571" id="line571">     571</a> </span>                :     // Access token granting (Section 4).                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container572"><a name="572"></a><a href="#572" id="line572">     572</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container573"><a name="573"></a><a href="#573" id="line573">     573</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container574"><a name="574"></a><a href="#574" id="line574">     574</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container575"><a name="575"></a><a href="#575" id="line575">     575</a> </span>                :      * Grant or deny a requested access token.                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container576"><a name="576"></a><a href="#576" id="line576">     576</a> </span>                :      * This would be called from the &quot;/token&quot; endpoint as defined in the spec.                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container577"><a name="577"></a><a href="#577" id="line577">     577</a> </span>                :      * Obviously, you can call your endpoint whatever you want.                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container578"><a name="578"></a><a href="#578" id="line578">     578</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container579"><a name="579"></a><a href="#579" id="line579">     579</a> </span>                :      * @param $inputData - The draft specifies that the parameters should be                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container580"><a name="580"></a><a href="#580" id="line580">     580</a> </span>                :      * retrieved from POST, but you can override to whatever method you like.                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container581"><a name="581"></a><a href="#581" id="line581">     581</a> </span>                :      * @throws OAuth2ServerException                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container582"><a name="582"></a><a href="#582" id="line582">     582</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container583"><a name="583"></a><a href="#583" id="line583">     583</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container584"><a name="584"></a><a href="#584" id="line584">     584</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-10.6                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container585"><a name="585"></a><a href="#585" id="line585">     585</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-4.1.3                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container586"><a name="586"></a><a href="#586" id="line586">     586</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container587"><a name="587"></a><a href="#587" id="line587">     587</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container588"><a name="588"></a><a href="#588" id="line588">     588</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container589"><a name="589"></a><a href="#589" id="line589">     589</a> </span>                : //ORIGINAL URI                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container590"><a name="590"></a><a href="#590" id="line590">     590</a> </span>                : //    public function grantAccessToken(array $inputData = NULL, array $authHeaders = NULL) {                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container591"><a name="591"></a><a href="#591" id="line591">     591</a> </span>                : //        $filters = array(                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container592"><a name="592"></a><a href="#592" id="line592">     592</a> </span>                : //            &quot;grant_type&quot; =&gt; array(&quot;filter&quot; =&gt; FILTER_VALIDATE_REGEXP, &quot;options&quot; =&gt; array(&quot;regexp&quot; =&gt; self::GRANT_TYPE_REGEXP), &quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                      
+<span class="lineNum" id="container593"><a name="593"></a><a href="#593" id="line593">     593</a> </span>                : //            &quot;scope&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container594"><a name="594"></a><a href="#594" id="line594">     594</a> </span>                : //            &quot;code&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container595"><a name="595"></a><a href="#595" id="line595">     595</a> </span>                : //            &quot;redirect_uri&quot; =&gt; array(&quot;filter&quot; =&gt; FILTER_SANITIZE_URL),                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container596"><a name="596"></a><a href="#596" id="line596">     596</a> </span>                : //            &quot;username&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container597"><a name="597"></a><a href="#597" id="line597">     597</a> </span>                : //            &quot;password&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container598"><a name="598"></a><a href="#598" id="line598">     598</a> </span>                : //            &quot;refresh_token&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container599"><a name="599"></a><a href="#599" id="line599">     599</a> </span>                : //        );                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container600"><a name="600"></a><a href="#600" id="line600">     600</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container601"><a name="601"></a><a href="#601" id="line601">     601</a> </span>                : //        // Input data by default can be either POST or GET                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container602"><a name="602"></a><a href="#602" id="line602">     602</a> </span>                : //        if (!isset($inputData)) {                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container603"><a name="603"></a><a href="#603" id="line603">     603</a> </span>                : //            $inputData = ($_SERVER['REQUEST_METHOD'] == 'POST') ? $_POST : $_GET;                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container604"><a name="604"></a><a href="#604" id="line604">     604</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container605"><a name="605"></a><a href="#605" id="line605">     605</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container606"><a name="606"></a><a href="#606" id="line606">     606</a> </span>                : //        // Basic authorization header                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container607"><a name="607"></a><a href="#607" id="line607">     607</a> </span>                : //        $authHeaders = isset($authHeaders) ? $authHeaders : $this-&gt;getAuthorizationHeader();                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container608"><a name="608"></a><a href="#608" id="line608">     608</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container609"><a name="609"></a><a href="#609" id="line609">     609</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container610"><a name="610"></a><a href="#610" id="line610">     610</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container611"><a name="611"></a><a href="#611" id="line611">     611</a> </span>                : //        // Filter input data                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container612"><a name="612"></a><a href="#612" id="line612">     612</a> </span>                : //        $input = filter_var_array($inputData, $filters);                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container613"><a name="613"></a><a href="#613" id="line613">     613</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container614"><a name="614"></a><a href="#614" id="line614">     614</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container615"><a name="615"></a><a href="#615" id="line615">     615</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container616"><a name="616"></a><a href="#616" id="line616">     616</a> </span>                : //        // Grant Type must be specified.                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container617"><a name="617"></a><a href="#617" id="line617">     617</a> </span>                : //        if (!$input[&quot;grant_type&quot;]) {                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container618"><a name="618"></a><a href="#618" id="line618">     618</a> </span>                : //            throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Invalid grant_type parameter or parameter missing');                                                                                                                                                                                                 
+<span class="lineNum" id="container619"><a name="619"></a><a href="#619" id="line619">     619</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container620"><a name="620"></a><a href="#620" id="line620">     620</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container621"><a name="621"></a><a href="#621" id="line621">     621</a> </span>                : //        // Authorize the client                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container622"><a name="622"></a><a href="#622" id="line622">     622</a> </span>                : //        $client = $this-&gt;getClientCredentials($inputData, $authHeaders);                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container623"><a name="623"></a><a href="#623" id="line623">     623</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container624"><a name="624"></a><a href="#624" id="line624">     624</a> </span>                : //        if ($this-&gt;storage-&gt;checkClientCredentials($client[0], $client[1]) === FALSE) {                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container625"><a name="625"></a><a href="#625" id="line625">     625</a> </span>                : //            throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client credentials are invalid');                                                                                                                                                                                                                 
+<span class="lineNum" id="container626"><a name="626"></a><a href="#626" id="line626">     626</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container627"><a name="627"></a><a href="#627" id="line627">     627</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container628"><a name="628"></a><a href="#628" id="line628">     628</a> </span>                : //        if (!$this-&gt;storage-&gt;checkRestrictedGrantType($client[0], $input[&quot;grant_type&quot;])) {                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container629"><a name="629"></a><a href="#629" id="line629">     629</a> </span>                : //            throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNAUTHORIZED_CLIENT, 'The grant type is unauthorized for this client_id');                                                                                                                                                                                             
+<span class="lineNum" id="container630"><a name="630"></a><a href="#630" id="line630">     630</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container631"><a name="631"></a><a href="#631" id="line631">     631</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container632"><a name="632"></a><a href="#632" id="line632">     632</a> </span>                : //        // Do the granting                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container633"><a name="633"></a><a href="#633" id="line633">     633</a> </span>                : //        //                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container634"><a name="634"></a><a href="#634" id="line634">     634</a> </span>                : //        switch ($input[&quot;grant_type&quot;]) {                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container635"><a name="635"></a><a href="#635" id="line635">     635</a> </span>                : //            case self::GRANT_TYPE_AUTH_CODE:                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container636"><a name="636"></a><a href="#636" id="line636">     636</a> </span>                : //                if (!($this-&gt;storage instanceof IOAuth2GrantCode)) {                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container637"><a name="637"></a><a href="#637" id="line637">     637</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                       
+<span class="lineNum" id="container638"><a name="638"></a><a href="#638" id="line638">     638</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container639"><a name="639"></a><a href="#639" id="line639">     639</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container640"><a name="640"></a><a href="#640" id="line640">     640</a> </span>                : //                if (!$input[&quot;code&quot;]) {                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container641"><a name="641"></a><a href="#641" id="line641">     641</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Missing parameter. &quot;code&quot; is required');                                                                                                                                                                                                     
+<span class="lineNum" id="container642"><a name="642"></a><a href="#642" id="line642">     642</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container643"><a name="643"></a><a href="#643" id="line643">     643</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container644"><a name="644"></a><a href="#644" id="line644">     644</a> </span>                : //                if ($this-&gt;getVariable(self::CONFIG_ENFORCE_INPUT_REDIRECT) &amp;&amp; !$input[&quot;redirect_uri&quot;]) {                                                                                                                                                                                                                                              
+<span class="lineNum" id="container645"><a name="645"></a><a href="#645" id="line645">     645</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, &quot;The redirect URI parameter is required.&quot;);                                                                                                                                                                                                   
+<span class="lineNum" id="container646"><a name="646"></a><a href="#646" id="line646">     646</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container647"><a name="647"></a><a href="#647" id="line647">     647</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container648"><a name="648"></a><a href="#648" id="line648">     648</a> </span>                : //                $stored = $this-&gt;storage-&gt;getAuthCode($input[&quot;code&quot;]);                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container649"><a name="649"></a><a href="#649" id="line649">     649</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container650"><a name="650"></a><a href="#650" id="line650">     650</a> </span>                : //                // Check the code exists                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container651"><a name="651"></a><a href="#651" id="line651">     651</a> </span>                : //                if ($stored === NULL || $client[0] != $stored[&quot;client_id&quot;]) {                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container652"><a name="652"></a><a href="#652" id="line652">     652</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, &quot;Refresh token doesn't exist or is invalid for the client&quot;);                                                                                                                                                                                    
+<span class="lineNum" id="container653"><a name="653"></a><a href="#653" id="line653">     653</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container654"><a name="654"></a><a href="#654" id="line654">     654</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container655"><a name="655"></a><a href="#655" id="line655">     655</a> </span>                : //                // Validate the redirect URI. If a redirect URI has been provided on input, it must be validated                                                                                                                                                                                                                                       
+<span class="lineNum" id="container656"><a name="656"></a><a href="#656" id="line656">     656</a> </span>                : //                if ($input[&quot;redirect_uri&quot;] &amp;&amp; !$this-&gt;validateRedirectUri($input[&quot;redirect_uri&quot;], $stored[&quot;redirect_uri&quot;])) {                                                                                                                                                                                                                          
+<span class="lineNum" id="container657"><a name="657"></a><a href="#657" id="line657">     657</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, &quot;The redirect URI is missing or do not match&quot;);                                                                                                                                                                                         
+<span class="lineNum" id="container658"><a name="658"></a><a href="#658" id="line658">     658</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container659"><a name="659"></a><a href="#659" id="line659">     659</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container660"><a name="660"></a><a href="#660" id="line660">     660</a> </span>                : //                if ($stored[&quot;expires&quot;] &lt; time()) {                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container661"><a name="661"></a><a href="#661" id="line661">     661</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, &quot;The authorization code has expired&quot;);                                                                                                                                                                                                          
+<span class="lineNum" id="container662"><a name="662"></a><a href="#662" id="line662">     662</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container663"><a name="663"></a><a href="#663" id="line663">     663</a> </span>                : //                break;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container664"><a name="664"></a><a href="#664" id="line664">     664</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container665"><a name="665"></a><a href="#665" id="line665">     665</a> </span>                : //            case self::GRANT_TYPE_USER_CREDENTIALS:                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container666"><a name="666"></a><a href="#666" id="line666">     666</a> </span>                : //                if (!($this-&gt;storage instanceof IOAuth2GrantUser)) {                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container667"><a name="667"></a><a href="#667" id="line667">     667</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                       
+<span class="lineNum" id="container668"><a name="668"></a><a href="#668" id="line668">     668</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container669"><a name="669"></a><a href="#669" id="line669">     669</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container670"><a name="670"></a><a href="#670" id="line670">     670</a> </span>                : //                if (!$input[&quot;username&quot;] || !$input[&quot;password&quot;]) {                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container671"><a name="671"></a><a href="#671" id="line671">     671</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Missing parameters. &quot;username&quot; and &quot;password&quot; required');                                                                                                                                                                                    
+<span class="lineNum" id="container672"><a name="672"></a><a href="#672" id="line672">     672</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container673"><a name="673"></a><a href="#673" id="line673">     673</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container674"><a name="674"></a><a href="#674" id="line674">     674</a> </span>                : //                $stored = $this-&gt;storage-&gt;checkUserCredentials($client[0], $input[&quot;username&quot;], $input[&quot;password&quot;]);                                                                                                                                                                                                                                    
+<span class="lineNum" id="container675"><a name="675"></a><a href="#675" id="line675">     675</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container676"><a name="676"></a><a href="#676" id="line676">     676</a> </span>                : //                if ($stored === FALSE) {                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container677"><a name="677"></a><a href="#677" id="line677">     677</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT);                                                                                                                                                                                                                                                
+<span class="lineNum" id="container678"><a name="678"></a><a href="#678" id="line678">     678</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container679"><a name="679"></a><a href="#679" id="line679">     679</a> </span>                : //                break;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container680"><a name="680"></a><a href="#680" id="line680">     680</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container681"><a name="681"></a><a href="#681" id="line681">     681</a> </span>                : //            case self::GRANT_TYPE_CLIENT_CREDENTIALS:                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container682"><a name="682"></a><a href="#682" id="line682">     682</a> </span>                : //                if (!($this-&gt;storage instanceof IOAuth2GrantClient)) {                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container683"><a name="683"></a><a href="#683" id="line683">     683</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                       
+<span class="lineNum" id="container684"><a name="684"></a><a href="#684" id="line684">     684</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container685"><a name="685"></a><a href="#685" id="line685">     685</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container686"><a name="686"></a><a href="#686" id="line686">     686</a> </span>                : //                if (empty($client[1])) {                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container687"><a name="687"></a><a href="#687" id="line687">     687</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client_secret is mandatory for the &quot;client_credentials&quot; grant type');                                                                                                                                                                     
+<span class="lineNum" id="container688"><a name="688"></a><a href="#688" id="line688">     688</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container689"><a name="689"></a><a href="#689" id="line689">     689</a> </span>                : //                // NB: We don't need to check for $stored==false, because it was checked above already                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container690"><a name="690"></a><a href="#690" id="line690">     690</a> </span>                : //                $stored = $this-&gt;storage-&gt;checkClientCredentialsGrant($client[0], $client[1]);                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container691"><a name="691"></a><a href="#691" id="line691">     691</a> </span>                : //                break;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container692"><a name="692"></a><a href="#692" id="line692">     692</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container693"><a name="693"></a><a href="#693" id="line693">     693</a> </span>                : //            case self::GRANT_TYPE_REFRESH_TOKEN:                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container694"><a name="694"></a><a href="#694" id="line694">     694</a> </span>                : //                if (!($this-&gt;storage instanceof IOAuth2RefreshTokens)) {                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container695"><a name="695"></a><a href="#695" id="line695">     695</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                       
+<span class="lineNum" id="container696"><a name="696"></a><a href="#696" id="line696">     696</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container697"><a name="697"></a><a href="#697" id="line697">     697</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container698"><a name="698"></a><a href="#698" id="line698">     698</a> </span>                : //                if (!$input[&quot;refresh_token&quot;]) {                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container699"><a name="699"></a><a href="#699" id="line699">     699</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'No &quot;refresh_token&quot; parameter found');                                                                                                                                                                                                        
+<span class="lineNum" id="container700"><a name="700"></a><a href="#700" id="line700">     700</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container701"><a name="701"></a><a href="#701" id="line701">     701</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container702"><a name="702"></a><a href="#702" id="line702">     702</a> </span>                : //                $stored = $this-&gt;storage-&gt;getRefreshToken($input[&quot;refresh_token&quot;]);                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container703"><a name="703"></a><a href="#703" id="line703">     703</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container704"><a name="704"></a><a href="#704" id="line704">     704</a> </span>                : //                if ($stored === NULL || $client[0] != $stored[&quot;client_id&quot;]) {                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container705"><a name="705"></a><a href="#705" id="line705">     705</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, 'Invalid refresh token');                                                                                                                                                                                                                       
+<span class="lineNum" id="container706"><a name="706"></a><a href="#706" id="line706">     706</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container707"><a name="707"></a><a href="#707" id="line707">     707</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container708"><a name="708"></a><a href="#708" id="line708">     708</a> </span>                : //                if ($stored[&quot;expires&quot;] &lt; time()) {                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container709"><a name="709"></a><a href="#709" id="line709">     709</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, 'Refresh token has expired');                                                                                                                                                                                                                   
+<span class="lineNum" id="container710"><a name="710"></a><a href="#710" id="line710">     710</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container711"><a name="711"></a><a href="#711" id="line711">     711</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container712"><a name="712"></a><a href="#712" id="line712">     712</a> </span>                : //                // store the refresh token locally so we can delete it when a new refresh token is generated                                                                                                                                                                                                                                           
+<span class="lineNum" id="container713"><a name="713"></a><a href="#713" id="line713">     713</a> </span>                : //                $this-&gt;oldRefreshToken = $stored[&quot;refresh_token&quot;];                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container714"><a name="714"></a><a href="#714" id="line714">     714</a> </span>                : //                break;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container715"><a name="715"></a><a href="#715" id="line715">     715</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container716"><a name="716"></a><a href="#716" id="line716">     716</a> </span>                : //            case self::GRANT_TYPE_IMPLICIT:                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container717"><a name="717"></a><a href="#717" id="line717">     717</a> </span>                : //                /* TODO: NOT YET IMPLEMENTED */                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container718"><a name="718"></a><a href="#718" id="line718">     718</a> </span>                : //                throw new OAuth2ServerException('501 Not Implemented', 'This OAuth2 library is not yet complete. This functionality is not implemented yet.');                                                                                                                                                                                         
+<span class="lineNum" id="container719"><a name="719"></a><a href="#719" id="line719">     719</a> </span>                : //                if (!($this-&gt;storage instanceof IOAuth2GrantImplicit)) {                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container720"><a name="720"></a><a href="#720" id="line720">     720</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                       
+<span class="lineNum" id="container721"><a name="721"></a><a href="#721" id="line721">     721</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container722"><a name="722"></a><a href="#722" id="line722">     722</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container723"><a name="723"></a><a href="#723" id="line723">     723</a> </span>                : //                break;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container724"><a name="724"></a><a href="#724" id="line724">     724</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container725"><a name="725"></a><a href="#725" id="line725">     725</a> </span>                : //            // Extended grant types:                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container726"><a name="726"></a><a href="#726" id="line726">     726</a> </span>                : //            case filter_var($input[&quot;grant_type&quot;], FILTER_VALIDATE_URL):                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container727"><a name="727"></a><a href="#727" id="line727">     727</a> </span>                : //                if (!($this-&gt;storage instanceof IOAuth2GrantExtension)) {                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container728"><a name="728"></a><a href="#728" id="line728">     728</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                       
+<span class="lineNum" id="container729"><a name="729"></a><a href="#729" id="line729">     729</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container730"><a name="730"></a><a href="#730" id="line730">     730</a> </span>                : //                $uri = filter_var($input[&quot;grant_type&quot;], FILTER_VALIDATE_URL);                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container731"><a name="731"></a><a href="#731" id="line731">     731</a> </span>                : //                $stored = $this-&gt;storage-&gt;checkGrantExtension($uri, $inputData, $authHeaders);                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container732"><a name="732"></a><a href="#732" id="line732">     732</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container733"><a name="733"></a><a href="#733" id="line733">     733</a> </span>                : //                if ($stored === FALSE) {                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container734"><a name="734"></a><a href="#734" id="line734">     734</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT);                                                                                                                                                                                                                                                
+<span class="lineNum" id="container735"><a name="735"></a><a href="#735" id="line735">     735</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container736"><a name="736"></a><a href="#736" id="line736">     736</a> </span>                : //                break;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container737"><a name="737"></a><a href="#737" id="line737">     737</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container738"><a name="738"></a><a href="#738" id="line738">     738</a> </span>                : //            default :                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container739"><a name="739"></a><a href="#739" id="line739">     739</a> </span>                : //                throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Invalid grant_type parameter or parameter missing');                                                                                                                                                                                             
+<span class="lineNum" id="container740"><a name="740"></a><a href="#740" id="line740">     740</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container741"><a name="741"></a><a href="#741" id="line741">     741</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container742"><a name="742"></a><a href="#742" id="line742">     742</a> </span>                : //        if (!isset($stored[&quot;scope&quot;])) {                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container743"><a name="743"></a><a href="#743" id="line743">     743</a> </span>                : //            $stored[&quot;scope&quot;] = NULL;                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container744"><a name="744"></a><a href="#744" id="line744">     744</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container745"><a name="745"></a><a href="#745" id="line745">     745</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container746"><a name="746"></a><a href="#746" id="line746">     746</a> </span>                : //        // Check scope, if provided                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container747"><a name="747"></a><a href="#747" id="line747">     747</a> </span>                : //        if ($input[&quot;scope&quot;] &amp;&amp; (!is_array($stored) || !isset($stored[&quot;scope&quot;]) || !$this-&gt;checkScope($input[&quot;scope&quot;], $stored[&quot;scope&quot;]))) {                                                                                                                                                                                                            
+<span class="lineNum" id="container748"><a name="748"></a><a href="#748" id="line748">     748</a> </span>                : //            throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_SCOPE, 'An unsupported scope was requested.');                                                                                                                                                                                                                 
+<span class="lineNum" id="container749"><a name="749"></a><a href="#749" id="line749">     749</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container750"><a name="750"></a><a href="#750" id="line750">     750</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container751"><a name="751"></a><a href="#751" id="line751">     751</a> </span>                : //        $user_id = isset($stored['user_id']) ? $stored['user_id'] : null;                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container752"><a name="752"></a><a href="#752" id="line752">     752</a> </span>                : //        $token = $this-&gt;createAccessToken($client[0], $user_id, $stored['scope']);                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container753"><a name="753"></a><a href="#753" id="line753">     753</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container754"><a name="754"></a><a href="#754" id="line754">     754</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container755"><a name="755"></a><a href="#755" id="line755">     755</a> </span>                : //        // Send response                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container756"><a name="756"></a><a href="#756" id="line756">     756</a> </span>                : //        $this-&gt;sendJsonHeaders();                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container757"><a name="757"></a><a href="#757" id="line757">     757</a> </span>                : //        echo json_encode($token);                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container758"><a name="758"></a><a href="#758" id="line758">     758</a> </span>                : //    }                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container759"><a name="759"></a><a href="#759" id="line759">     759</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container760"><a name="760"></a><a href="#760" id="line760">     760</a> </span>                :     public function grantAccessToken(array $inputData = NULL, array $authHeaders = NULL) {                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container761"><a name="761"></a><a href="#761" id="line761">     761</a> </span>                :         $filters = array(                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container762"><a name="762"></a><a href="#762" id="line762">     762</a> </span><span class="lineNoCov">              0 :             &quot;grant_type&quot; =&gt; array(&quot;filter&quot; =&gt; FILTER_VALIDATE_REGEXP, &quot;options&quot; =&gt; array(&quot;regexp&quot; =&gt; self::GRANT_TYPE_REGEXP), &quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                        </span>
+<span class="lineNum" id="container763"><a name="763"></a><a href="#763" id="line763">     763</a> </span><span class="lineNoCov">              0 :             &quot;scope&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container764"><a name="764"></a><a href="#764" id="line764">     764</a> </span><span class="lineNoCov">              0 :             &quot;code&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container765"><a name="765"></a><a href="#765" id="line765">     765</a> </span><span class="lineNoCov">              0 :             &quot;redirect_uri&quot; =&gt; array(&quot;filter&quot; =&gt; FILTER_SANITIZE_URL),                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container766"><a name="766"></a><a href="#766" id="line766">     766</a> </span><span class="lineNoCov">              0 :             &quot;username&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container767"><a name="767"></a><a href="#767" id="line767">     767</a> </span><span class="lineNoCov">              0 :             &quot;password&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container768"><a name="768"></a><a href="#768" id="line768">     768</a> </span><span class="lineNoCov">              0 :             &quot;refresh_token&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container769"><a name="769"></a><a href="#769" id="line769">     769</a> </span><span class="lineNoCov">              0 :         );                                                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container770"><a name="770"></a><a href="#770" id="line770">     770</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container771"><a name="771"></a><a href="#771" id="line771">     771</a> </span>                :         // Input data by default can be either POST or GET                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container772"><a name="772"></a><a href="#772" id="line772">     772</a> </span><span class="lineNoCov">              0 :         if (!isset($inputData)) {                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container773"><a name="773"></a><a href="#773" id="line773">     773</a> </span><span class="lineNoCov">              0 :             $inputData = ($_SERVER['REQUEST_METHOD'] == 'POST') ? $_POST : $_GET;                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container774"><a name="774"></a><a href="#774" id="line774">     774</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container775"><a name="775"></a><a href="#775" id="line775">     775</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container776"><a name="776"></a><a href="#776" id="line776">     776</a> </span>                :         // Basic authorization header                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container777"><a name="777"></a><a href="#777" id="line777">     777</a> </span><span class="lineNoCov">              0 :         $authHeaders = isset($authHeaders) ? $authHeaders : $this-&gt;getAuthorizationHeader();                                                                                                                                                                                                                                                             </span>
+<span class="lineNum" id="container778"><a name="778"></a><a href="#778" id="line778">     778</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container779"><a name="779"></a><a href="#779" id="line779">     779</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container780"><a name="780"></a><a href="#780" id="line780">     780</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container781"><a name="781"></a><a href="#781" id="line781">     781</a> </span>                :         // Filter input data                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container782"><a name="782"></a><a href="#782" id="line782">     782</a> </span><span class="lineNoCov">              0 :         $input = filter_var_array($inputData, $filters);                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container783"><a name="783"></a><a href="#783" id="line783">     783</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container784"><a name="784"></a><a href="#784" id="line784">     784</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container785"><a name="785"></a><a href="#785" id="line785">     785</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container786"><a name="786"></a><a href="#786" id="line786">     786</a> </span>                :         // Grant Type must be specified.                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container787"><a name="787"></a><a href="#787" id="line787">     787</a> </span><span class="lineNoCov">              0 :         if (!$input[&quot;grant_type&quot;]) {                                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container788"><a name="788"></a><a href="#788" id="line788">     788</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Invalid grant_type parameter or parameter missing');                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container789"><a name="789"></a><a href="#789" id="line789">     789</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container790"><a name="790"></a><a href="#790" id="line790">     790</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container791"><a name="791"></a><a href="#791" id="line791">     791</a> </span>                :         // Authorize the client                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container792"><a name="792"></a><a href="#792" id="line792">     792</a> </span><span class="lineNoCov">              0 :         $client = $this-&gt;getClientCredentials($inputData, $authHeaders);                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container793"><a name="793"></a><a href="#793" id="line793">     793</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container794"><a name="794"></a><a href="#794" id="line794">     794</a> </span><span class="lineNoCov">              0 :         if ($this-&gt;storage-&gt;checkClientCredentials($client[0], $client[1]) === FALSE) {                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container795"><a name="795"></a><a href="#795" id="line795">     795</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client credentials are invalid');                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container796"><a name="796"></a><a href="#796" id="line796">     796</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container797"><a name="797"></a><a href="#797" id="line797">     797</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container798"><a name="798"></a><a href="#798" id="line798">     798</a> </span><span class="lineNoCov">              0 :         if (!$this-&gt;storage-&gt;checkRestrictedGrantType($client[0], $input[&quot;grant_type&quot;])) {                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container799"><a name="799"></a><a href="#799" id="line799">     799</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNAUTHORIZED_CLIENT, 'The grant type is unauthorized for this client_id');                                                                                                                                                                                               </span>
+<span class="lineNum" id="container800"><a name="800"></a><a href="#800" id="line800">     800</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container801"><a name="801"></a><a href="#801" id="line801">     801</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container802"><a name="802"></a><a href="#802" id="line802">     802</a> </span>                :         // Do the granting                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container803"><a name="803"></a><a href="#803" id="line803">     803</a> </span>                :         //                                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container804"><a name="804"></a><a href="#804" id="line804">     804</a> </span><span class="lineNoCov">              0 :         switch ($input[&quot;grant_type&quot;]) {                                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container805"><a name="805"></a><a href="#805" id="line805">     805</a> </span><span class="lineNoCov">              0 :             case self::GRANT_TYPE_AUTH_CODE:                                                                                                                                                                                                                                                                                                             </span>
+<span class="lineNum" id="container806"><a name="806"></a><a href="#806" id="line806">     806</a> </span><span class="lineNoCov">              0 :                 if (!($this-&gt;storage instanceof IOAuth2GrantCode)) {                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container807"><a name="807"></a><a href="#807" id="line807">     807</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container808"><a name="808"></a><a href="#808" id="line808">     808</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container809"><a name="809"></a><a href="#809" id="line809">     809</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container810"><a name="810"></a><a href="#810" id="line810">     810</a> </span><span class="lineNoCov">              0 :                 if (!$input[&quot;code&quot;]) {                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container811"><a name="811"></a><a href="#811" id="line811">     811</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Missing parameter. &quot;code&quot; is required');                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container812"><a name="812"></a><a href="#812" id="line812">     812</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container813"><a name="813"></a><a href="#813" id="line813">     813</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container814"><a name="814"></a><a href="#814" id="line814">     814</a> </span><span class="lineNoCov">              0 :                 if ($this-&gt;getVariable(self::CONFIG_ENFORCE_INPUT_REDIRECT) &amp;&amp; !$input[&quot;redirect_uri&quot;]) {                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container815"><a name="815"></a><a href="#815" id="line815">     815</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, &quot;The redirect URI parameter is required.&quot;);                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container816"><a name="816"></a><a href="#816" id="line816">     816</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container817"><a name="817"></a><a href="#817" id="line817">     817</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container818"><a name="818"></a><a href="#818" id="line818">     818</a> </span><span class="lineNoCov">              0 :                 $stored = $this-&gt;storage-&gt;getAuthCode($input[&quot;code&quot;]);                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container819"><a name="819"></a><a href="#819" id="line819">     819</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container820"><a name="820"></a><a href="#820" id="line820">     820</a> </span>                :                 // Check the code exists                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container821"><a name="821"></a><a href="#821" id="line821">     821</a> </span><span class="lineNoCov">              0 :                 if ($stored === NULL || $client[0] != $stored[&quot;client_id&quot;]) {                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container822"><a name="822"></a><a href="#822" id="line822">     822</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, &quot;Refresh token doesn't exist or is invalid for the client&quot;);                                                                                                                                                                                      </span>
+<span class="lineNum" id="container823"><a name="823"></a><a href="#823" id="line823">     823</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container824"><a name="824"></a><a href="#824" id="line824">     824</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container825"><a name="825"></a><a href="#825" id="line825">     825</a> </span>                :                 // Validate the redirect URI. If a redirect URI has been provided on input, it must be validated                                                                                                                                                                                                                                         
+<span class="lineNum" id="container826"><a name="826"></a><a href="#826" id="line826">     826</a> </span><span class="lineNoCov">              0 :                 if ($input[&quot;redirect_uri&quot;] &amp;&amp; !$this-&gt;validateRedirectUri($input[&quot;redirect_uri&quot;], $stored[&quot;redirect_uri&quot;])) {                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container827"><a name="827"></a><a href="#827" id="line827">     827</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, &quot;The redirect URI is missing or do not match&quot;);                                                                                                                                                                                           </span>
+<span class="lineNum" id="container828"><a name="828"></a><a href="#828" id="line828">     828</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container829"><a name="829"></a><a href="#829" id="line829">     829</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container830"><a name="830"></a><a href="#830" id="line830">     830</a> </span><span class="lineNoCov">              0 :                 if ($stored[&quot;expires&quot;] &lt; time()) {                                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container831"><a name="831"></a><a href="#831" id="line831">     831</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, &quot;The authorization code has expired&quot;);                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container832"><a name="832"></a><a href="#832" id="line832">     832</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container833"><a name="833"></a><a href="#833" id="line833">     833</a> </span><span class="lineNoCov">              0 :                 break;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container834"><a name="834"></a><a href="#834" id="line834">     834</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container835"><a name="835"></a><a href="#835" id="line835">     835</a> </span><span class="lineNoCov">              0 :             case self::GRANT_TYPE_USER_CREDENTIALS:                                                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container836"><a name="836"></a><a href="#836" id="line836">     836</a> </span><span class="lineNoCov">              0 :                 if (!($this-&gt;storage instanceof IOAuth2GrantUser)) {                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container837"><a name="837"></a><a href="#837" id="line837">     837</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container838"><a name="838"></a><a href="#838" id="line838">     838</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container839"><a name="839"></a><a href="#839" id="line839">     839</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container840"><a name="840"></a><a href="#840" id="line840">     840</a> </span><span class="lineNoCov">              0 :                 if (!$input[&quot;username&quot;] || !$input[&quot;password&quot;]) {                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container841"><a name="841"></a><a href="#841" id="line841">     841</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Missing parameters. &quot;username&quot; and &quot;password&quot; required');                                                                                                                                                                                      </span>
+<span class="lineNum" id="container842"><a name="842"></a><a href="#842" id="line842">     842</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container843"><a name="843"></a><a href="#843" id="line843">     843</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container844"><a name="844"></a><a href="#844" id="line844">     844</a> </span><span class="lineNoCov">              0 :                 $stored = $this-&gt;storage-&gt;checkUserCredentials($client[0], $input[&quot;username&quot;], $input[&quot;password&quot;]);                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container845"><a name="845"></a><a href="#845" id="line845">     845</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container846"><a name="846"></a><a href="#846" id="line846">     846</a> </span><span class="lineNoCov">              0 :                 if ($stored === FALSE) {                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container847"><a name="847"></a><a href="#847" id="line847">     847</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT);                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container848"><a name="848"></a><a href="#848" id="line848">     848</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container849"><a name="849"></a><a href="#849" id="line849">     849</a> </span><span class="lineNoCov">              0 :                 break;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container850"><a name="850"></a><a href="#850" id="line850">     850</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container851"><a name="851"></a><a href="#851" id="line851">     851</a> </span><span class="lineNoCov">              0 :             case self::GRANT_TYPE_CLIENT_CREDENTIALS:                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container852"><a name="852"></a><a href="#852" id="line852">     852</a> </span><span class="lineNoCov">              0 :                 if (!($this-&gt;storage instanceof IOAuth2GrantClient)) {                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container853"><a name="853"></a><a href="#853" id="line853">     853</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container854"><a name="854"></a><a href="#854" id="line854">     854</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container855"><a name="855"></a><a href="#855" id="line855">     855</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container856"><a name="856"></a><a href="#856" id="line856">     856</a> </span><span class="lineNoCov">              0 :                 if (empty($client[1])) {                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container857"><a name="857"></a><a href="#857" id="line857">     857</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client_secret is mandatory for the &quot;client_credentials&quot; grant type');                                                                                                                                                                       </span>
+<span class="lineNum" id="container858"><a name="858"></a><a href="#858" id="line858">     858</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container859"><a name="859"></a><a href="#859" id="line859">     859</a> </span>                :                 // NB: We don't need to check for $stored==false, because it was checked above already                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container860"><a name="860"></a><a href="#860" id="line860">     860</a> </span><span class="lineNoCov">              0 :                 $stored = $this-&gt;storage-&gt;checkClientCredentialsGrant($client[0], $client[1]);                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container861"><a name="861"></a><a href="#861" id="line861">     861</a> </span><span class="lineNoCov">              0 :                 break;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container862"><a name="862"></a><a href="#862" id="line862">     862</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container863"><a name="863"></a><a href="#863" id="line863">     863</a> </span><span class="lineNoCov">              0 :             case self::GRANT_TYPE_REFRESH_TOKEN:                                                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container864"><a name="864"></a><a href="#864" id="line864">     864</a> </span><span class="lineNoCov">              0 :                 if (!($this-&gt;storage instanceof IOAuth2RefreshTokens)) {                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container865"><a name="865"></a><a href="#865" id="line865">     865</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container866"><a name="866"></a><a href="#866" id="line866">     866</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container867"><a name="867"></a><a href="#867" id="line867">     867</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container868"><a name="868"></a><a href="#868" id="line868">     868</a> </span><span class="lineNoCov">              0 :                 if (!$input[&quot;refresh_token&quot;]) {                                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container869"><a name="869"></a><a href="#869" id="line869">     869</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'No &quot;refresh_token&quot; parameter found');                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container870"><a name="870"></a><a href="#870" id="line870">     870</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container871"><a name="871"></a><a href="#871" id="line871">     871</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container872"><a name="872"></a><a href="#872" id="line872">     872</a> </span><span class="lineNoCov">              0 :                 $stored = $this-&gt;storage-&gt;getRefreshToken($input[&quot;refresh_token&quot;]);                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container873"><a name="873"></a><a href="#873" id="line873">     873</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container874"><a name="874"></a><a href="#874" id="line874">     874</a> </span><span class="lineNoCov">              0 :                 if ($stored === NULL || $client[0] != $stored[&quot;client_id&quot;]) {                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container875"><a name="875"></a><a href="#875" id="line875">     875</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, 'Invalid refresh token');                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container876"><a name="876"></a><a href="#876" id="line876">     876</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container877"><a name="877"></a><a href="#877" id="line877">     877</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container878"><a name="878"></a><a href="#878" id="line878">     878</a> </span><span class="lineNoCov">              0 :                 if ($stored[&quot;expires&quot;] &lt; time()) {                                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container879"><a name="879"></a><a href="#879" id="line879">     879</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, 'Refresh token has expired');                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container880"><a name="880"></a><a href="#880" id="line880">     880</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container881"><a name="881"></a><a href="#881" id="line881">     881</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container882"><a name="882"></a><a href="#882" id="line882">     882</a> </span>                :                 // store the refresh token locally so we can delete it when a new refresh token is generated                                                                                                                                                                                                                                             
+<span class="lineNum" id="container883"><a name="883"></a><a href="#883" id="line883">     883</a> </span><span class="lineNoCov">              0 :                 $this-&gt;oldRefreshToken = $stored[&quot;refresh_token&quot;];                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container884"><a name="884"></a><a href="#884" id="line884">     884</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container885"><a name="885"></a><a href="#885" id="line885">     885</a> </span><span class="lineNoCov">              0 :                 session_write_close(); //Fecha session anterior                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container886"><a name="886"></a><a href="#886" id="line886">     886</a> </span><span class="lineNoCov">              0 :                 session_id($stored['refresh_token']); //Define o id da session o mesmo do resfresh token                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container887"><a name="887"></a><a href="#887" id="line887">     887</a> </span><span class="lineNoCov">              0 :                 session_start();                                                                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container888"><a name="888"></a><a href="#888" id="line888">     888</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container889"><a name="889"></a><a href="#889" id="line889">     889</a> </span><span class="lineNoCov">              0 :                 break;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container890"><a name="890"></a><a href="#890" id="line890">     890</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container891"><a name="891"></a><a href="#891" id="line891">     891</a> </span><span class="lineNoCov">              0 :             case self::GRANT_TYPE_IMPLICIT:                                                                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container892"><a name="892"></a><a href="#892" id="line892">     892</a> </span>                :                 /* TODO: NOT YET IMPLEMENTED */                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container893"><a name="893"></a><a href="#893" id="line893">     893</a> </span><span class="lineNoCov">              0 :                 throw new OAuth2ServerException('501 Not Implemented', 'This OAuth2 library is not yet complete. This functionality is not implemented yet.');                                                                                                                                                                                           </span>
+<span class="lineNum" id="container894"><a name="894"></a><a href="#894" id="line894">     894</a> </span>                :                 if (!($this-&gt;storage instanceof IOAuth2GrantImplicit)) {                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container895"><a name="895"></a><a href="#895" id="line895">     895</a> </span>                :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                         
+<span class="lineNum" id="container896"><a name="896"></a><a href="#896" id="line896">     896</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container897"><a name="897"></a><a href="#897" id="line897">     897</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container898"><a name="898"></a><a href="#898" id="line898">     898</a> </span>                :                 break;                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container899"><a name="899"></a><a href="#899" id="line899">     899</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container900"><a name="900"></a><a href="#900" id="line900">     900</a> </span>                :             // Extended grant types:                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container901"><a name="901"></a><a href="#901" id="line901">     901</a> </span><span class="lineNoCov">              0 :             case filter_var($input[&quot;grant_type&quot;], FILTER_VALIDATE_URL):                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container902"><a name="902"></a><a href="#902" id="line902">     902</a> </span><span class="lineNoCov">              0 :                 if (!($this-&gt;storage instanceof IOAuth2GrantExtension)) {                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container903"><a name="903"></a><a href="#903" id="line903">     903</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container904"><a name="904"></a><a href="#904" id="line904">     904</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container905"><a name="905"></a><a href="#905" id="line905">     905</a> </span><span class="lineNoCov">              0 :                 $uri = filter_var($input[&quot;grant_type&quot;], FILTER_VALIDATE_URL);                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container906"><a name="906"></a><a href="#906" id="line906">     906</a> </span><span class="lineNoCov">              0 :                 $stored = $this-&gt;storage-&gt;checkGrantExtension($uri, $inputData, $authHeaders);                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container907"><a name="907"></a><a href="#907" id="line907">     907</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container908"><a name="908"></a><a href="#908" id="line908">     908</a> </span><span class="lineNoCov">              0 :                 if ($stored === FALSE) {                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container909"><a name="909"></a><a href="#909" id="line909">     909</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT);                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container910"><a name="910"></a><a href="#910" id="line910">     910</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container911"><a name="911"></a><a href="#911" id="line911">     911</a> </span><span class="lineNoCov">              0 :                 break;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container912"><a name="912"></a><a href="#912" id="line912">     912</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container913"><a name="913"></a><a href="#913" id="line913">     913</a> </span><span class="lineNoCov">              0 :             default :                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container914"><a name="914"></a><a href="#914" id="line914">     914</a> </span><span class="lineNoCov">              0 :                 throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Invalid grant_type parameter or parameter missing');                                                                                                                                                                                               </span>
+<span class="lineNum" id="container915"><a name="915"></a><a href="#915" id="line915">     915</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container916"><a name="916"></a><a href="#916" id="line916">     916</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container917"><a name="917"></a><a href="#917" id="line917">     917</a> </span><span class="lineNoCov">              0 :         if (!isset($stored[&quot;scope&quot;])) {                                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container918"><a name="918"></a><a href="#918" id="line918">     918</a> </span><span class="lineNoCov">              0 :             $stored[&quot;scope&quot;] = NULL;                                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container919"><a name="919"></a><a href="#919" id="line919">     919</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container920"><a name="920"></a><a href="#920" id="line920">     920</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container921"><a name="921"></a><a href="#921" id="line921">     921</a> </span>                :         // Check scope, if provided                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container922"><a name="922"></a><a href="#922" id="line922">     922</a> </span><span class="lineNoCov">              0 :         if ($input[&quot;scope&quot;] &amp;&amp; (!is_array($stored) || !isset($stored[&quot;scope&quot;]) || !$this-&gt;checkScope($input[&quot;scope&quot;], $stored[&quot;scope&quot;]))) {                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container923"><a name="923"></a><a href="#923" id="line923">     923</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_SCOPE, 'An unsupported scope was requested.');                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container924"><a name="924"></a><a href="#924" id="line924">     924</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container925"><a name="925"></a><a href="#925" id="line925">     925</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container926"><a name="926"></a><a href="#926" id="line926">     926</a> </span><span class="lineNoCov">              0 :         $user_id = isset($stored['user_id']) ? $stored['user_id'] : null;                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container927"><a name="927"></a><a href="#927" id="line927">     927</a> </span><span class="lineNoCov">              0 :         $token = $this-&gt;createAccessToken($client[0], $user_id, $stored['scope']);                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container928"><a name="928"></a><a href="#928" id="line928">     928</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container929"><a name="929"></a><a href="#929" id="line929">     929</a> </span>                :         //Gerando Session Para o refresh_token                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container930"><a name="930"></a><a href="#930" id="line930">     930</a> </span><span class="lineNoCov">              0 :         session_write_close(); //Fecha session anterior                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container931"><a name="931"></a><a href="#931" id="line931">     931</a> </span><span class="lineNoCov">              0 :         session_start();                                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container932"><a name="932"></a><a href="#932" id="line932">     932</a> </span><span class="lineNoCov">              0 :         session_id($token['refresh_token']); //Define o id da session o mesmo do resfresh token                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container933"><a name="933"></a><a href="#933" id="line933">     933</a> </span><span class="lineNoCov">              0 :         session_cache_expire(self::CONFIG_REFRESH_LIFETIME); //Define o tempo da session o mesmo do Refresh token                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container934"><a name="934"></a><a href="#934" id="line934">     934</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container935"><a name="935"></a><a href="#935" id="line935">     935</a> </span><span class="lineNoCov">              0 :         if(isset($input[&quot;username&quot;]) &amp;&amp; isset($input[&quot;password&quot;]))                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container936"><a name="936"></a><a href="#936" id="line936">     936</a> </span><span class="lineNoCov">              0 :         {                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container937"><a name="937"></a><a href="#937" id="line937">     937</a> </span><span class="lineNoCov">              0 :             $_SESSION['wallet']['user']['uid'] =     $input[&quot;username&quot;];                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container938"><a name="938"></a><a href="#938" id="line938">     938</a> </span><span class="lineNoCov">              0 :             $_SESSION['wallet']['user']['password']       =  $input[&quot;password&quot;];                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container939"><a name="939"></a><a href="#939" id="line939">     939</a> </span><span class="lineNoCov">              0 :             $_SESSION['wallet']['user']['uidNumber']       =  $user_id;                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container940"><a name="940"></a><a href="#940" id="line940">     940</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container941"><a name="941"></a><a href="#941" id="line941">     941</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container942"><a name="942"></a><a href="#942" id="line942">     942</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container943"><a name="943"></a><a href="#943" id="line943">     943</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container944"><a name="944"></a><a href="#944" id="line944">     944</a> </span>                :         //session_write_close(); //Fecha nova session                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container945"><a name="945"></a><a href="#945" id="line945">     945</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container946"><a name="946"></a><a href="#946" id="line946">     946</a> </span>                :         // Send response                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container947"><a name="947"></a><a href="#947" id="line947">     947</a> </span><span class="lineNoCov">              0 :         $this-&gt;sendJsonHeaders();                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container948"><a name="948"></a><a href="#948" id="line948">     948</a> </span><span class="lineNoCov">              0 :         echo json_encode($token);                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container949"><a name="949"></a><a href="#949" id="line949">     949</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container950"><a name="950"></a><a href="#950" id="line950">     950</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container951"><a name="951"></a><a href="#951" id="line951">     951</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container952"><a name="952"></a><a href="#952" id="line952">     952</a> </span>                :      * Internal function used to get the client credentials from HTTP basic                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container953"><a name="953"></a><a href="#953" id="line953">     953</a> </span>                :      * auth or POST data.                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container954"><a name="954"></a><a href="#954" id="line954">     954</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container955"><a name="955"></a><a href="#955" id="line955">     955</a> </span>                :      * According to the spec (draft 20), the client_id can be provided in                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container956"><a name="956"></a><a href="#956" id="line956">     956</a> </span>                :      * the Basic Authorization header (recommended) or via GET/POST.                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container957"><a name="957"></a><a href="#957" id="line957">     957</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container958"><a name="958"></a><a href="#958" id="line958">     958</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container959"><a name="959"></a><a href="#959" id="line959">     959</a> </span>                :      * A list containing the client identifier and password, for example                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container960"><a name="960"></a><a href="#960" id="line960">     960</a> </span>                :      * @code                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container961"><a name="961"></a><a href="#961" id="line961">     961</a> </span>                :      * return array(                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container962"><a name="962"></a><a href="#962" id="line962">     962</a> </span>                :      * CLIENT_ID,                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container963"><a name="963"></a><a href="#963" id="line963">     963</a> </span>                :      * CLIENT_SECRET                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container964"><a name="964"></a><a href="#964" id="line964">     964</a> </span>                :      * );                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container965"><a name="965"></a><a href="#965" id="line965">     965</a> </span>                :      * @endcode                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container966"><a name="966"></a><a href="#966" id="line966">     966</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container967"><a name="967"></a><a href="#967" id="line967">     967</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-2.4.1                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container968"><a name="968"></a><a href="#968" id="line968">     968</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container969"><a name="969"></a><a href="#969" id="line969">     969</a> </span>                :      * @ingroup oauth2_section_2                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container970"><a name="970"></a><a href="#970" id="line970">     970</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container971"><a name="971"></a><a href="#971" id="line971">     971</a> </span>                :     protected function getClientCredentials(array $inputData, array $authHeaders) {                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container972"><a name="972"></a><a href="#972" id="line972">     972</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container973"><a name="973"></a><a href="#973" id="line973">     973</a> </span>                :         // Basic Authentication is used                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container974"><a name="974"></a><a href="#974" id="line974">     974</a> </span><span class="lineNoCov">              0 :         if (!empty($authHeaders['PHP_AUTH_USER'])) {                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container975"><a name="975"></a><a href="#975" id="line975">     975</a> </span><span class="lineNoCov">              0 :             return array($authHeaders['PHP_AUTH_USER'], $authHeaders['PHP_AUTH_PW']);                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container976"><a name="976"></a><a href="#976" id="line976">     976</a> </span><span class="lineNoCov">              0 :         } elseif (empty($inputData['client_id'])) { // No credentials were specified                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container977"><a name="977"></a><a href="#977" id="line977">     977</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'Client id was not found in the headers or body');                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container978"><a name="978"></a><a href="#978" id="line978">     978</a> </span>                :         } else {                                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container979"><a name="979"></a><a href="#979" id="line979">     979</a> </span>                :             // This method is not recommended, but is supported by specification                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container980"><a name="980"></a><a href="#980" id="line980">     980</a> </span><span class="lineNoCov">              0 :             return array($inputData['client_id'], $inputData['client_secret']);                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container981"><a name="981"></a><a href="#981" id="line981">     981</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container982"><a name="982"></a><a href="#982" id="line982">     982</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container983"><a name="983"></a><a href="#983" id="line983">     983</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container984"><a name="984"></a><a href="#984" id="line984">     984</a> </span>                :     // End-user/client Authorization (Section 2 of IETF Draft).                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container985"><a name="985"></a><a href="#985" id="line985">     985</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container986"><a name="986"></a><a href="#986" id="line986">     986</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container987"><a name="987"></a><a href="#987" id="line987">     987</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container988"><a name="988"></a><a href="#988" id="line988">     988</a> </span>                :      * Pull the authorization request data out of the HTTP request.                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container989"><a name="989"></a><a href="#989" id="line989">     989</a> </span>                :      * - The redirect_uri is OPTIONAL as per draft 20. But your implementation can enforce it                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container990"><a name="990"></a><a href="#990" id="line990">     990</a> </span>                :      * by setting CONFIG_ENFORCE_INPUT_REDIRECT to true.                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container991"><a name="991"></a><a href="#991" id="line991">     991</a> </span>                :      * - The state is OPTIONAL but recommended to enforce CSRF. Draft 21 states, however, that                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container992"><a name="992"></a><a href="#992" id="line992">     992</a> </span>                :      * CSRF protection is MANDATORY. You can enforce this by setting the CONFIG_ENFORCE_STATE to true.                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container993"><a name="993"></a><a href="#993" id="line993">     993</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container994"><a name="994"></a><a href="#994" id="line994">     994</a> </span>                :      * @param $inputData - The draft specifies that the parameters should be                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container995"><a name="995"></a><a href="#995" id="line995">     995</a> </span>                :      * retrieved from GET, but you can override to whatever method you like.                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container996"><a name="996"></a><a href="#996" id="line996">     996</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container997"><a name="997"></a><a href="#997" id="line997">     997</a> </span>                :      * The authorization parameters so the authorization server can prompt                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container998"><a name="998"></a><a href="#998" id="line998">     998</a> </span>                :      * the user for approval if valid.                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container999"><a name="999"></a><a href="#999" id="line999">     999</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1000"><a name="1000"></a><a href="#1000" id="line1000">    1000</a> </span>                :      * @throws OAuth2ServerException                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container1001"><a name="1001"></a><a href="#1001" id="line1001">    1001</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.1                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1002"><a name="1002"></a><a href="#1002" id="line1002">    1002</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-10.12                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1003"><a name="1003"></a><a href="#1003" id="line1003">    1003</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1004"><a name="1004"></a><a href="#1004" id="line1004">    1004</a> </span>                :      * @ingroup oauth2_section_3                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1005"><a name="1005"></a><a href="#1005" id="line1005">    1005</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1006"><a name="1006"></a><a href="#1006" id="line1006">    1006</a> </span>                :     public function getAuthorizeParams(array $inputData = NULL) {                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container1007"><a name="1007"></a><a href="#1007" id="line1007">    1007</a> </span>                :         $filters = array(                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1008"><a name="1008"></a><a href="#1008" id="line1008">    1008</a> </span><span class="lineNoCov">              0 :             &quot;client_id&quot; =&gt; array(&quot;filter&quot; =&gt; FILTER_VALIDATE_REGEXP, &quot;options&quot; =&gt; array(&quot;regexp&quot; =&gt; self::CLIENT_ID_REGEXP), &quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1009"><a name="1009"></a><a href="#1009" id="line1009">    1009</a> </span><span class="lineNoCov">              0 :             &quot;response_type&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1010"><a name="1010"></a><a href="#1010" id="line1010">    1010</a> </span><span class="lineNoCov">              0 :             &quot;redirect_uri&quot; =&gt; array(&quot;filter&quot; =&gt; FILTER_SANITIZE_URL),                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1011"><a name="1011"></a><a href="#1011" id="line1011">    1011</a> </span><span class="lineNoCov">              0 :             &quot;state&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1012"><a name="1012"></a><a href="#1012" id="line1012">    1012</a> </span><span class="lineNoCov">              0 :             &quot;scope&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR)                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container1013"><a name="1013"></a><a href="#1013" id="line1013">    1013</a> </span><span class="lineNoCov">              0 :         );                                                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1014"><a name="1014"></a><a href="#1014" id="line1014">    1014</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1015"><a name="1015"></a><a href="#1015" id="line1015">    1015</a> </span><span class="lineNoCov">              0 :         if (!isset($inputData)) {                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1016"><a name="1016"></a><a href="#1016" id="line1016">    1016</a> </span><span class="lineNoCov">              0 :             $inputData = $_GET;                                                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1017"><a name="1017"></a><a href="#1017" id="line1017">    1017</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1018"><a name="1018"></a><a href="#1018" id="line1018">    1018</a> </span><span class="lineNoCov">              0 :         $input = filter_var_array($inputData, $filters);                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container1019"><a name="1019"></a><a href="#1019" id="line1019">    1019</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1020"><a name="1020"></a><a href="#1020" id="line1020">    1020</a> </span>                :         // Make sure a valid client id was supplied (we can not redirect because we were unable to verify the URI)                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1021"><a name="1021"></a><a href="#1021" id="line1021">    1021</a> </span><span class="lineNoCov">              0 :         if (!$input[&quot;client_id&quot;]) {                                                                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container1022"><a name="1022"></a><a href="#1022" id="line1022">    1022</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, &quot;No client id supplied&quot;); // We don't have a good URI to use                                                                                                                                                                                             </span>
+<span class="lineNum" id="container1023"><a name="1023"></a><a href="#1023" id="line1023">    1023</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1024"><a name="1024"></a><a href="#1024" id="line1024">    1024</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1025"><a name="1025"></a><a href="#1025" id="line1025">    1025</a> </span>                :         // Get client details                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container1026"><a name="1026"></a><a href="#1026" id="line1026">    1026</a> </span><span class="lineNoCov">              0 :         $stored = $this-&gt;storage-&gt;getClientDetails($input[&quot;client_id&quot;]);                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container1027"><a name="1027"></a><a href="#1027" id="line1027">    1027</a> </span><span class="lineNoCov">              0 :         if ($stored === FALSE) {                                                                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container1028"><a name="1028"></a><a href="#1028" id="line1028">    1028</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, &quot;Client id does not exist&quot;);                                                                                                                                                                                                                             </span>
+<span class="lineNum" id="container1029"><a name="1029"></a><a href="#1029" id="line1029">    1029</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1030"><a name="1030"></a><a href="#1030" id="line1030">    1030</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1031"><a name="1031"></a><a href="#1031" id="line1031">    1031</a> </span>                :         // Make sure a valid redirect_uri was supplied. If specified, it must match the stored URI.                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1032"><a name="1032"></a><a href="#1032" id="line1032">    1032</a> </span>                :         // @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-3.1.2                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1033"><a name="1033"></a><a href="#1033" id="line1033">    1033</a> </span>                :         // @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container1034"><a name="1034"></a><a href="#1034" id="line1034">    1034</a> </span>                :         // @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container1035"><a name="1035"></a><a href="#1035" id="line1035">    1035</a> </span><span class="lineNoCov">              0 :         if (!$input[&quot;redirect_uri&quot;] &amp;&amp; !$stored[&quot;redirect_uri&quot;]) {                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container1036"><a name="1036"></a><a href="#1036" id="line1036">    1036</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, 'No redirect URL was supplied or stored.');                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container1037"><a name="1037"></a><a href="#1037" id="line1037">    1037</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1038"><a name="1038"></a><a href="#1038" id="line1038">    1038</a> </span><span class="lineNoCov">              0 :         if ($this-&gt;getVariable(self::CONFIG_ENFORCE_INPUT_REDIRECT) &amp;&amp; !$input[&quot;redirect_uri&quot;]) {                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1039"><a name="1039"></a><a href="#1039" id="line1039">    1039</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, 'The redirect URI is mandatory and was not supplied.');                                                                                                                                                                                           </span>
+<span class="lineNum" id="container1040"><a name="1040"></a><a href="#1040" id="line1040">    1040</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1041"><a name="1041"></a><a href="#1041" id="line1041">    1041</a> </span>                :         // Only need to validate if redirect_uri provided on input and stored.                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1042"><a name="1042"></a><a href="#1042" id="line1042">    1042</a> </span><span class="lineNoCov">              0 :         if ($stored[&quot;redirect_uri&quot;] &amp;&amp; $input[&quot;redirect_uri&quot;] &amp;&amp; !$this-&gt;validateRedirectUri($input[&quot;redirect_uri&quot;], $stored[&quot;redirect_uri&quot;])) {                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container1043"><a name="1043"></a><a href="#1043" id="line1043">    1043</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, 'The redirect URI provided is missing or does not match');                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1044"><a name="1044"></a><a href="#1044" id="line1044">    1044</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1045"><a name="1045"></a><a href="#1045" id="line1045">    1045</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1046"><a name="1046"></a><a href="#1046" id="line1046">    1046</a> </span>                :         // Select the redirect URI                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1047"><a name="1047"></a><a href="#1047" id="line1047">    1047</a> </span><span class="lineNoCov">              0 :         $input[&quot;redirect_uri&quot;] = isset($input[&quot;redirect_uri&quot;]) ? $input[&quot;redirect_uri&quot;] : $stored[&quot;redirect_uri&quot;];                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container1048"><a name="1048"></a><a href="#1048" id="line1048">    1048</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1049"><a name="1049"></a><a href="#1049" id="line1049">    1049</a> </span>                :         // type and client_id are required                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1050"><a name="1050"></a><a href="#1050" id="line1050">    1050</a> </span><span class="lineNoCov">              0 :         if (!$input[&quot;response_type&quot;]) {                                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1051"><a name="1051"></a><a href="#1051" id="line1051">    1051</a> </span><span class="lineNoCov">              0 :             throw new OAuth2RedirectException($input[&quot;redirect_uri&quot;], self::ERROR_INVALID_REQUEST, 'Invalid or missing response type.', $input[&quot;state&quot;]);                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1052"><a name="1052"></a><a href="#1052" id="line1052">    1052</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1053"><a name="1053"></a><a href="#1053" id="line1053">    1053</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1054"><a name="1054"></a><a href="#1054" id="line1054">    1054</a> </span>                :         // Check requested auth response type against interfaces of storage engine                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1055"><a name="1055"></a><a href="#1055" id="line1055">    1055</a> </span><span class="lineNoCov">              0 :         $reflect = new ReflectionClass($this-&gt;storage);                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1056"><a name="1056"></a><a href="#1056" id="line1056">    1056</a> </span><span class="lineNoCov">              0 :         if (!$reflect-&gt;hasConstant('RESPONSE_TYPE_' . strtoupper($input['response_type']))) {                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1057"><a name="1057"></a><a href="#1057" id="line1057">    1057</a> </span><span class="lineNoCov">              0 :             throw new OAuth2RedirectException($input[&quot;redirect_uri&quot;], self::ERROR_UNSUPPORTED_RESPONSE_TYPE, NULL, $input[&quot;state&quot;]);                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container1058"><a name="1058"></a><a href="#1058" id="line1058">    1058</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1059"><a name="1059"></a><a href="#1059" id="line1059">    1059</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1060"><a name="1060"></a><a href="#1060" id="line1060">    1060</a> </span>                :         // Validate that the requested scope is supported                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1061"><a name="1061"></a><a href="#1061" id="line1061">    1061</a> </span><span class="lineNoCov">              0 :         if ($input[&quot;scope&quot;] &amp;&amp; !$this-&gt;checkScope($input[&quot;scope&quot;], $this-&gt;getVariable(self::CONFIG_SUPPORTED_SCOPES))) {                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container1062"><a name="1062"></a><a href="#1062" id="line1062">    1062</a> </span><span class="lineNoCov">              0 :             throw new OAuth2RedirectException($input[&quot;redirect_uri&quot;], self::ERROR_INVALID_SCOPE, 'An unsupported scope was requested.', $input[&quot;state&quot;]);                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1063"><a name="1063"></a><a href="#1063" id="line1063">    1063</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1064"><a name="1064"></a><a href="#1064" id="line1064">    1064</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1065"><a name="1065"></a><a href="#1065" id="line1065">    1065</a> </span>                :         // Validate state parameter exists (if configured to enforce this)                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1066"><a name="1066"></a><a href="#1066" id="line1066">    1066</a> </span><span class="lineNoCov">              0 :         if ($this-&gt;getVariable(self::CONFIG_ENFORCE_STATE) &amp;&amp; !$input[&quot;state&quot;]) {                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1067"><a name="1067"></a><a href="#1067" id="line1067">    1067</a> </span><span class="lineNoCov">              0 :             throw new OAuth2RedirectException($input[&quot;redirect_uri&quot;], self::ERROR_INVALID_REQUEST, &quot;The state parameter is required.&quot;);                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1068"><a name="1068"></a><a href="#1068" id="line1068">    1068</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1069"><a name="1069"></a><a href="#1069" id="line1069">    1069</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1070"><a name="1070"></a><a href="#1070" id="line1070">    1070</a> </span>                :         // Return retrieved client details together with input                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1071"><a name="1071"></a><a href="#1071" id="line1071">    1071</a> </span><span class="lineNoCov">              0 :         return ($input + $stored);                                                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container1072"><a name="1072"></a><a href="#1072" id="line1072">    1072</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1073"><a name="1073"></a><a href="#1073" id="line1073">    1073</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1074"><a name="1074"></a><a href="#1074" id="line1074">    1074</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1075"><a name="1075"></a><a href="#1075" id="line1075">    1075</a> </span>                :      * Redirect the user appropriately after approval.                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1076"><a name="1076"></a><a href="#1076" id="line1076">    1076</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1077"><a name="1077"></a><a href="#1077" id="line1077">    1077</a> </span>                :      * After the user has approved or denied the access request the                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1078"><a name="1078"></a><a href="#1078" id="line1078">    1078</a> </span>                :      * authorization server should call this function to redirect the user                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1079"><a name="1079"></a><a href="#1079" id="line1079">    1079</a> </span>                :      * appropriately.                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1080"><a name="1080"></a><a href="#1080" id="line1080">    1080</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1081"><a name="1081"></a><a href="#1081" id="line1081">    1081</a> </span>                :      * @param $is_authorized                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container1082"><a name="1082"></a><a href="#1082" id="line1082">    1082</a> </span>                :      * TRUE or FALSE depending on whether the user authorized the access.                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1083"><a name="1083"></a><a href="#1083" id="line1083">    1083</a> </span>                :      * @param $user_id                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1084"><a name="1084"></a><a href="#1084" id="line1084">    1084</a> </span>                :      * Identifier of user who authorized the client                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1085"><a name="1085"></a><a href="#1085" id="line1085">    1085</a> </span>                :      * @param $params                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1086"><a name="1086"></a><a href="#1086" id="line1086">    1086</a> </span>                :      * An associative array as below:                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1087"><a name="1087"></a><a href="#1087" id="line1087">    1087</a> </span>                :      * - response_type: The requested response: an access token, an                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1088"><a name="1088"></a><a href="#1088" id="line1088">    1088</a> </span>                :      * authorization code, or both.                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1089"><a name="1089"></a><a href="#1089" id="line1089">    1089</a> </span>                :      * - client_id: The client identifier as described in Section 2.                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container1090"><a name="1090"></a><a href="#1090" id="line1090">    1090</a> </span>                :      * - redirect_uri: An absolute URI to which the authorization server                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1091"><a name="1091"></a><a href="#1091" id="line1091">    1091</a> </span>                :      * will redirect the user-agent to when the end-user authorization                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1092"><a name="1092"></a><a href="#1092" id="line1092">    1092</a> </span>                :      * step is completed.                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1093"><a name="1093"></a><a href="#1093" id="line1093">    1093</a> </span>                :      * - scope: (optional) The scope of the access request expressed as a                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1094"><a name="1094"></a><a href="#1094" id="line1094">    1094</a> </span>                :      * list of space-delimited strings.                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1095"><a name="1095"></a><a href="#1095" id="line1095">    1095</a> </span>                :      * - state: (optional) An opaque value used by the client to maintain                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1096"><a name="1096"></a><a href="#1096" id="line1096">    1096</a> </span>                :      * state between the request and callback.                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1097"><a name="1097"></a><a href="#1097" id="line1097">    1097</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1098"><a name="1098"></a><a href="#1098" id="line1098">    1098</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1099"><a name="1099"></a><a href="#1099" id="line1099">    1099</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1100"><a name="1100"></a><a href="#1100" id="line1100">    1100</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1101"><a name="1101"></a><a href="#1101" id="line1101">    1101</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1102"><a name="1102"></a><a href="#1102" id="line1102">    1102</a> </span>                :     public function finishClientAuthorization($is_authorized, $user_id = NULL, $params = array()) {                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1103"><a name="1103"></a><a href="#1103" id="line1103">    1103</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1104"><a name="1104"></a><a href="#1104" id="line1104">    1104</a> </span>                :         // We repeat this, because we need to re-validate. In theory, this could be POSTed                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1105"><a name="1105"></a><a href="#1105" id="line1105">    1105</a> </span>                :         // by a 3rd-party (because we are not internally enforcing NONCEs, etc)                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1106"><a name="1106"></a><a href="#1106" id="line1106">    1106</a> </span><span class="lineNoCov">              0 :         $params = $this-&gt;getAuthorizeParams($params);                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1107"><a name="1107"></a><a href="#1107" id="line1107">    1107</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1108"><a name="1108"></a><a href="#1108" id="line1108">    1108</a> </span><span class="lineNoCov">              0 :         $params += array('scope' =&gt; NULL, 'state' =&gt; NULL);                                                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container1109"><a name="1109"></a><a href="#1109" id="line1109">    1109</a> </span><span class="lineNoCov">              0 :         extract($params);                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1110"><a name="1110"></a><a href="#1110" id="line1110">    1110</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1111"><a name="1111"></a><a href="#1111" id="line1111">    1111</a> </span><span class="lineNoCov">              0 :         if ($state !== NULL) {                                                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container1112"><a name="1112"></a><a href="#1112" id="line1112">    1112</a> </span><span class="lineNoCov">              0 :             $result[&quot;query&quot;][&quot;state&quot;] = $state;                                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1113"><a name="1113"></a><a href="#1113" id="line1113">    1113</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1114"><a name="1114"></a><a href="#1114" id="line1114">    1114</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1115"><a name="1115"></a><a href="#1115" id="line1115">    1115</a> </span><span class="lineNoCov">              0 :         if ($is_authorized === FALSE) {                                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1116"><a name="1116"></a><a href="#1116" id="line1116">    1116</a> </span><span class="lineNoCov">              0 :             throw new OAuth2RedirectException($redirect_uri, self::ERROR_USER_DENIED, &quot;The user denied access to your application&quot;, $state);                                                                                                                                                                                                             </span>
+<span class="lineNum" id="container1117"><a name="1117"></a><a href="#1117" id="line1117">    1117</a> </span>                :         } else {                                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1118"><a name="1118"></a><a href="#1118" id="line1118">    1118</a> </span><span class="lineNoCov">              0 :             if ($response_type == self::RESPONSE_TYPE_AUTH_CODE) {                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container1119"><a name="1119"></a><a href="#1119" id="line1119">    1119</a> </span><span class="lineNoCov">              0 :                 $result[&quot;query&quot;][&quot;code&quot;] = $this-&gt;createAuthCode($client_id, $user_id, $redirect_uri, $scope);                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container1120"><a name="1120"></a><a href="#1120" id="line1120">    1120</a> </span><span class="lineNoCov">              0 :             } elseif ($response_type == self::RESPONSE_TYPE_ACCESS_TOKEN) {                                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container1121"><a name="1121"></a><a href="#1121" id="line1121">    1121</a> </span><span class="lineNoCov">              0 :                 $result[&quot;fragment&quot;] = $this-&gt;createAccessToken($client_id, $user_id, $scope);                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1122"><a name="1122"></a><a href="#1122" id="line1122">    1122</a> </span><span class="lineNoCov">              0 :             }                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1123"><a name="1123"></a><a href="#1123" id="line1123">    1123</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1124"><a name="1124"></a><a href="#1124" id="line1124">    1124</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1125"><a name="1125"></a><a href="#1125" id="line1125">    1125</a> </span><span class="lineNoCov">              0 :         $this-&gt;doRedirectUriCallback($redirect_uri, $result);                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1126"><a name="1126"></a><a href="#1126" id="line1126">    1126</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1127"><a name="1127"></a><a href="#1127" id="line1127">    1127</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1128"><a name="1128"></a><a href="#1128" id="line1128">    1128</a> </span>                :     // Other/utility functions.                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1129"><a name="1129"></a><a href="#1129" id="line1129">    1129</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1130"><a name="1130"></a><a href="#1130" id="line1130">    1130</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1131"><a name="1131"></a><a href="#1131" id="line1131">    1131</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1132"><a name="1132"></a><a href="#1132" id="line1132">    1132</a> </span>                :      * Redirect the user agent.                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1133"><a name="1133"></a><a href="#1133" id="line1133">    1133</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1134"><a name="1134"></a><a href="#1134" id="line1134">    1134</a> </span>                :      * Handle both redirect for success or error response.                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1135"><a name="1135"></a><a href="#1135" id="line1135">    1135</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1136"><a name="1136"></a><a href="#1136" id="line1136">    1136</a> </span>                :      * @param $redirect_uri                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1137"><a name="1137"></a><a href="#1137" id="line1137">    1137</a> </span>                :      * An absolute URI to which the authorization server will redirect                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1138"><a name="1138"></a><a href="#1138" id="line1138">    1138</a> </span>                :      * the user-agent to when the end-user authorization step is completed.                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1139"><a name="1139"></a><a href="#1139" id="line1139">    1139</a> </span>                :      * @param $params                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1140"><a name="1140"></a><a href="#1140" id="line1140">    1140</a> </span>                :      * Parameters to be pass though buildUri().                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1141"><a name="1141"></a><a href="#1141" id="line1141">    1141</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1142"><a name="1142"></a><a href="#1142" id="line1142">    1142</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1143"><a name="1143"></a><a href="#1143" id="line1143">    1143</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1144"><a name="1144"></a><a href="#1144" id="line1144">    1144</a> </span>                :     private function doRedirectUriCallback($redirect_uri, $params) {                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container1145"><a name="1145"></a><a href="#1145" id="line1145">    1145</a> </span><span class="lineNoCov">              0 :         header(&quot;HTTP/1.1 &quot; . self::HTTP_FOUND);                                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1146"><a name="1146"></a><a href="#1146" id="line1146">    1146</a> </span><span class="lineNoCov">              0 :         header(&quot;Location: &quot; . $this-&gt;buildUri($redirect_uri, $params));                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1147"><a name="1147"></a><a href="#1147" id="line1147">    1147</a> </span><span class="lineNoCov">              0 :         exit();                                                                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1148"><a name="1148"></a><a href="#1148" id="line1148">    1148</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1149"><a name="1149"></a><a href="#1149" id="line1149">    1149</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1150"><a name="1150"></a><a href="#1150" id="line1150">    1150</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1151"><a name="1151"></a><a href="#1151" id="line1151">    1151</a> </span>                :      * Build the absolute URI based on supplied URI and parameters.                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1152"><a name="1152"></a><a href="#1152" id="line1152">    1152</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1153"><a name="1153"></a><a href="#1153" id="line1153">    1153</a> </span>                :      * @param $uri                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1154"><a name="1154"></a><a href="#1154" id="line1154">    1154</a> </span>                :      * An absolute URI.                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1155"><a name="1155"></a><a href="#1155" id="line1155">    1155</a> </span>                :      * @param $params                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1156"><a name="1156"></a><a href="#1156" id="line1156">    1156</a> </span>                :      * Parameters to be append as GET.                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1157"><a name="1157"></a><a href="#1157" id="line1157">    1157</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1158"><a name="1158"></a><a href="#1158" id="line1158">    1158</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1159"><a name="1159"></a><a href="#1159" id="line1159">    1159</a> </span>                :      * An absolute URI with supplied parameters.                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1160"><a name="1160"></a><a href="#1160" id="line1160">    1160</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1161"><a name="1161"></a><a href="#1161" id="line1161">    1161</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1162"><a name="1162"></a><a href="#1162" id="line1162">    1162</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1163"><a name="1163"></a><a href="#1163" id="line1163">    1163</a> </span>                :     private function buildUri($uri, $params) {                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1164"><a name="1164"></a><a href="#1164" id="line1164">    1164</a> </span><span class="lineNoCov">              0 :         $parse_url = parse_url($uri);                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1165"><a name="1165"></a><a href="#1165" id="line1165">    1165</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1166"><a name="1166"></a><a href="#1166" id="line1166">    1166</a> </span>                :         // Add our params to the parsed uri                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1167"><a name="1167"></a><a href="#1167" id="line1167">    1167</a> </span><span class="lineNoCov">              0 :         foreach ( $params as $k =&gt; $v ) {                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1168"><a name="1168"></a><a href="#1168" id="line1168">    1168</a> </span><span class="lineNoCov">              0 :             if (isset($parse_url[$k])) {                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container1169"><a name="1169"></a><a href="#1169" id="line1169">    1169</a> </span><span class="lineNoCov">              0 :                 $parse_url[$k] .= &quot;&amp;&quot; . http_build_query($v);                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1170"><a name="1170"></a><a href="#1170" id="line1170">    1170</a> </span><span class="lineNoCov">              0 :             } else {                                                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container1171"><a name="1171"></a><a href="#1171" id="line1171">    1171</a> </span><span class="lineNoCov">              0 :                 $parse_url[$k] = http_build_query($v);                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container1172"><a name="1172"></a><a href="#1172" id="line1172">    1172</a> </span>                :             }                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container1173"><a name="1173"></a><a href="#1173" id="line1173">    1173</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1174"><a name="1174"></a><a href="#1174" id="line1174">    1174</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1175"><a name="1175"></a><a href="#1175" id="line1175">    1175</a> </span>                :         // Put humpty dumpty back together                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1176"><a name="1176"></a><a href="#1176" id="line1176">    1176</a> </span>                :         return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1177"><a name="1177"></a><a href="#1177" id="line1177">    1177</a> </span><span class="lineNoCov">              0 :             ((isset($parse_url[&quot;scheme&quot;])) ? $parse_url[&quot;scheme&quot;] . &quot;://&quot; : &quot;&quot;)                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1178"><a name="1178"></a><a href="#1178" id="line1178">    1178</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;user&quot;])) ? $parse_url[&quot;user&quot;]                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1179"><a name="1179"></a><a href="#1179" id="line1179">    1179</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;pass&quot;])) ? &quot;:&quot; . $parse_url[&quot;pass&quot;] : &quot;&quot;) . &quot;@&quot; : &quot;&quot;)                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1180"><a name="1180"></a><a href="#1180" id="line1180">    1180</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;host&quot;])) ? $parse_url[&quot;host&quot;] : &quot;&quot;)                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1181"><a name="1181"></a><a href="#1181" id="line1181">    1181</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;port&quot;])) ? &quot;:&quot; . $parse_url[&quot;port&quot;] : &quot;&quot;)                                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container1182"><a name="1182"></a><a href="#1182" id="line1182">    1182</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;path&quot;])) ? $parse_url[&quot;path&quot;] : &quot;&quot;)                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1183"><a name="1183"></a><a href="#1183" id="line1183">    1183</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;query&quot;])) ? &quot;?&quot; . $parse_url[&quot;query&quot;] : &quot;&quot;)                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1184"><a name="1184"></a><a href="#1184" id="line1184">    1184</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;fragment&quot;])) ? &quot;#&quot; . $parse_url[&quot;fragment&quot;] : &quot;&quot;)                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container1185"><a name="1185"></a><a href="#1185" id="line1185">    1185</a> </span><span class="lineNoCov">              0 :         ;                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1186"><a name="1186"></a><a href="#1186" id="line1186">    1186</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1187"><a name="1187"></a><a href="#1187" id="line1187">    1187</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1188"><a name="1188"></a><a href="#1188" id="line1188">    1188</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1189"><a name="1189"></a><a href="#1189" id="line1189">    1189</a> </span>                :      * Handle the creation of access token, also issue refresh token if support.                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1190"><a name="1190"></a><a href="#1190" id="line1190">    1190</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1191"><a name="1191"></a><a href="#1191" id="line1191">    1191</a> </span>                :      * This belongs in a separate factory, but to keep it simple, I'm just                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1192"><a name="1192"></a><a href="#1192" id="line1192">    1192</a> </span>                :      * keeping it here.                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1193"><a name="1193"></a><a href="#1193" id="line1193">    1193</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1194"><a name="1194"></a><a href="#1194" id="line1194">    1194</a> </span>                :      * @param $client_id                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1195"><a name="1195"></a><a href="#1195" id="line1195">    1195</a> </span>                :      * Client identifier related to the access token.                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1196"><a name="1196"></a><a href="#1196" id="line1196">    1196</a> </span>                :      * @param $scope                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container1197"><a name="1197"></a><a href="#1197" id="line1197">    1197</a> </span>                :      * (optional) Scopes to be stored in space-separated string.                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1198"><a name="1198"></a><a href="#1198" id="line1198">    1198</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1199"><a name="1199"></a><a href="#1199" id="line1199">    1199</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1200"><a name="1200"></a><a href="#1200" id="line1200">    1200</a> </span>                :      * @ingroup oauth2_section_5                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1201"><a name="1201"></a><a href="#1201" id="line1201">    1201</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1202"><a name="1202"></a><a href="#1202" id="line1202">    1202</a> </span>                : // FunÃ§Ã£o ORIGINAL;                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1203"><a name="1203"></a><a href="#1203" id="line1203">    1203</a> </span>                : //    protected function createAccessToken($client_id, $user_id, $scope = NULL) {                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container1204"><a name="1204"></a><a href="#1204" id="line1204">    1204</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1205"><a name="1205"></a><a href="#1205" id="line1205">    1205</a> </span>                : //        $token = array(                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1206"><a name="1206"></a><a href="#1206" id="line1206">    1206</a> </span>                : //            &quot;access_token&quot; =&gt; $this-&gt;genAccessToken(),                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1207"><a name="1207"></a><a href="#1207" id="line1207">    1207</a> </span>                : //            &quot;expires_in&quot; =&gt; $this-&gt;getVariable(self::CONFIG_ACCESS_LIFETIME),                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1208"><a name="1208"></a><a href="#1208" id="line1208">    1208</a> </span>                : //            &quot;token_type&quot; =&gt; $this-&gt;getVariable(self::CONFIG_TOKEN_TYPE),                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1209"><a name="1209"></a><a href="#1209" id="line1209">    1209</a> </span>                : //            &quot;scope&quot; =&gt; $scope                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1210"><a name="1210"></a><a href="#1210" id="line1210">    1210</a> </span>                : //        );                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container1211"><a name="1211"></a><a href="#1211" id="line1211">    1211</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1212"><a name="1212"></a><a href="#1212" id="line1212">    1212</a> </span>                : //        $this-&gt;storage-&gt;setAccessToken($token[&quot;access_token&quot;], $client_id, $user_id, time() + $this-&gt;getVariable(self::CONFIG_ACCESS_LIFETIME), $scope);                                                                                                                                                                                               
+<span class="lineNum" id="container1213"><a name="1213"></a><a href="#1213" id="line1213">    1213</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1214"><a name="1214"></a><a href="#1214" id="line1214">    1214</a> </span>                : //        // Issue a refresh token also, if we support them                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1215"><a name="1215"></a><a href="#1215" id="line1215">    1215</a> </span>                : //        if ($this-&gt;storage instanceof IOAuth2RefreshTokens) {                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1216"><a name="1216"></a><a href="#1216" id="line1216">    1216</a> </span>                : //            $token[&quot;refresh_token&quot;] = $this-&gt;genAccessToken();                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1217"><a name="1217"></a><a href="#1217" id="line1217">    1217</a> </span>                : //            $this-&gt;storage-&gt;setRefreshToken($token[&quot;refresh_token&quot;], $client_id, $user_id, time() + $this-&gt;getVariable(self::CONFIG_REFRESH_LIFETIME), $scope);                                                                                                                                                                                        
+<span class="lineNum" id="container1218"><a name="1218"></a><a href="#1218" id="line1218">    1218</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1219"><a name="1219"></a><a href="#1219" id="line1219">    1219</a> </span>                : //            // If we've granted a new refresh token, expire the old one                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1220"><a name="1220"></a><a href="#1220" id="line1220">    1220</a> </span>                : //            if ($this-&gt;oldRefreshToken) {                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1221"><a name="1221"></a><a href="#1221" id="line1221">    1221</a> </span>                : //                $this-&gt;storage-&gt;unsetRefreshToken($this-&gt;oldRefreshToken);                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container1222"><a name="1222"></a><a href="#1222" id="line1222">    1222</a> </span>                : //                unset($this-&gt;oldRefreshToken);                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1223"><a name="1223"></a><a href="#1223" id="line1223">    1223</a> </span>                : //            }                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1224"><a name="1224"></a><a href="#1224" id="line1224">    1224</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1225"><a name="1225"></a><a href="#1225" id="line1225">    1225</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1226"><a name="1226"></a><a href="#1226" id="line1226">    1226</a> </span>                : //        return $token;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1227"><a name="1227"></a><a href="#1227" id="line1227">    1227</a> </span>                : //    }                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1228"><a name="1228"></a><a href="#1228" id="line1228">    1228</a> </span>                :     protected function createAccessToken($client_id, $user_id, $scope = NULL) {                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1229"><a name="1229"></a><a href="#1229" id="line1229">    1229</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1230"><a name="1230"></a><a href="#1230" id="line1230">    1230</a> </span>                :         $token = array(                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1231"><a name="1231"></a><a href="#1231" id="line1231">    1231</a> </span><span class="lineNoCov">              0 :             &quot;access_token&quot; =&gt; $this-&gt;genAccessToken(),                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container1232"><a name="1232"></a><a href="#1232" id="line1232">    1232</a> </span><span class="lineNoCov">              0 :             &quot;expires_in&quot; =&gt; $this-&gt;getVariable(self::CONFIG_ACCESS_LIFETIME),                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1233"><a name="1233"></a><a href="#1233" id="line1233">    1233</a> </span><span class="lineNoCov">              0 :             &quot;token_type&quot; =&gt; $this-&gt;getVariable(self::CONFIG_TOKEN_TYPE),                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container1234"><a name="1234"></a><a href="#1234" id="line1234">    1234</a> </span>                :             &quot;scope&quot; =&gt; $scope                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container1235"><a name="1235"></a><a href="#1235" id="line1235">    1235</a> </span><span class="lineNoCov">              0 :         );                                                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1236"><a name="1236"></a><a href="#1236" id="line1236">    1236</a> </span><span class="lineNoCov">              0 :         $token[&quot;refresh_token&quot;] = $this-&gt;genAccessToken();                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1237"><a name="1237"></a><a href="#1237" id="line1237">    1237</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1238"><a name="1238"></a><a href="#1238" id="line1238">    1238</a> </span><span class="lineNoCov">              0 :         $this-&gt;storage-&gt;setAccessToken($token[&quot;access_token&quot;], $client_id, $user_id, time() + $this-&gt;getVariable(self::CONFIG_ACCESS_LIFETIME), $scope , $token['refresh_token']);                                                                                                                                                                       </span>
+<span class="lineNum" id="container1239"><a name="1239"></a><a href="#1239" id="line1239">    1239</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1240"><a name="1240"></a><a href="#1240" id="line1240">    1240</a> </span>                :         // Issue a refresh token also, if we support them                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1241"><a name="1241"></a><a href="#1241" id="line1241">    1241</a> </span><span class="lineNoCov">              0 :         if ($this-&gt;storage instanceof IOAuth2RefreshTokens) {                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1242"><a name="1242"></a><a href="#1242" id="line1242">    1242</a> </span><span class="lineNoCov">              0 :             $this-&gt;storage-&gt;setRefreshToken($token[&quot;refresh_token&quot;], $client_id, $user_id, time() + $this-&gt;getVariable(self::CONFIG_REFRESH_LIFETIME), $scope);                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1243"><a name="1243"></a><a href="#1243" id="line1243">    1243</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1244"><a name="1244"></a><a href="#1244" id="line1244">    1244</a> </span>                :             // If we've granted a new refresh token, expire the old one                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1245"><a name="1245"></a><a href="#1245" id="line1245">    1245</a> </span><span class="lineNoCov">              0 :             if ($this-&gt;oldRefreshToken) {                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1246"><a name="1246"></a><a href="#1246" id="line1246">    1246</a> </span><span class="lineNoCov">              0 :                 $this-&gt;storage-&gt;unsetRefreshToken($this-&gt;oldRefreshToken);                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1247"><a name="1247"></a><a href="#1247" id="line1247">    1247</a> </span><span class="lineNoCov">              0 :                 unset($this-&gt;oldRefreshToken);                                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container1248"><a name="1248"></a><a href="#1248" id="line1248">    1248</a> </span><span class="lineNoCov">              0 :             }                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1249"><a name="1249"></a><a href="#1249" id="line1249">    1249</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1250"><a name="1250"></a><a href="#1250" id="line1250">    1250</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1251"><a name="1251"></a><a href="#1251" id="line1251">    1251</a> </span><span class="lineNoCov">              0 :         return $token;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container1252"><a name="1252"></a><a href="#1252" id="line1252">    1252</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1253"><a name="1253"></a><a href="#1253" id="line1253">    1253</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1254"><a name="1254"></a><a href="#1254" id="line1254">    1254</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1255"><a name="1255"></a><a href="#1255" id="line1255">    1255</a> </span>                :      * Handle the creation of auth code.                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1256"><a name="1256"></a><a href="#1256" id="line1256">    1256</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1257"><a name="1257"></a><a href="#1257" id="line1257">    1257</a> </span>                :      * This belongs in a separate factory, but to keep it simple, I'm just                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1258"><a name="1258"></a><a href="#1258" id="line1258">    1258</a> </span>                :      * keeping it here.                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1259"><a name="1259"></a><a href="#1259" id="line1259">    1259</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1260"><a name="1260"></a><a href="#1260" id="line1260">    1260</a> </span>                :      * @param $client_id                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1261"><a name="1261"></a><a href="#1261" id="line1261">    1261</a> </span>                :      * Client identifier related to the access token.                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1262"><a name="1262"></a><a href="#1262" id="line1262">    1262</a> </span>                :      * @param $redirect_uri                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1263"><a name="1263"></a><a href="#1263" id="line1263">    1263</a> </span>                :      * An absolute URI to which the authorization server will redirect the                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1264"><a name="1264"></a><a href="#1264" id="line1264">    1264</a> </span>                :      * user-agent to when the end-user authorization step is completed.                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1265"><a name="1265"></a><a href="#1265" id="line1265">    1265</a> </span>                :      * @param $scope                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container1266"><a name="1266"></a><a href="#1266" id="line1266">    1266</a> </span>                :      * (optional) Scopes to be stored in space-separated string.                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1267"><a name="1267"></a><a href="#1267" id="line1267">    1267</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1268"><a name="1268"></a><a href="#1268" id="line1268">    1268</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1269"><a name="1269"></a><a href="#1269" id="line1269">    1269</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1270"><a name="1270"></a><a href="#1270" id="line1270">    1270</a> </span>                :     private function createAuthCode($client_id, $user_id, $redirect_uri, $scope = NULL) {                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1271"><a name="1271"></a><a href="#1271" id="line1271">    1271</a> </span><span class="lineNoCov">              0 :         $code = $this-&gt;genAuthCode();                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1272"><a name="1272"></a><a href="#1272" id="line1272">    1272</a> </span><span class="lineNoCov">              0 :         $this-&gt;storage-&gt;setAuthCode($code, $client_id, $user_id, $redirect_uri, time() + $this-&gt;getVariable(self::CONFIG_AUTH_LIFETIME), $scope);                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1273"><a name="1273"></a><a href="#1273" id="line1273">    1273</a> </span><span class="lineNoCov">              0 :         return $code;                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1274"><a name="1274"></a><a href="#1274" id="line1274">    1274</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1275"><a name="1275"></a><a href="#1275" id="line1275">    1275</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1276"><a name="1276"></a><a href="#1276" id="line1276">    1276</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1277"><a name="1277"></a><a href="#1277" id="line1277">    1277</a> </span>                :      * Generates an unique access token.                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1278"><a name="1278"></a><a href="#1278" id="line1278">    1278</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1279"><a name="1279"></a><a href="#1279" id="line1279">    1279</a> </span>                :      * Implementing classes may want to override this function to implement                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1280"><a name="1280"></a><a href="#1280" id="line1280">    1280</a> </span>                :      * other access token generation schemes.                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container1281"><a name="1281"></a><a href="#1281" id="line1281">    1281</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1282"><a name="1282"></a><a href="#1282" id="line1282">    1282</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1283"><a name="1283"></a><a href="#1283" id="line1283">    1283</a> </span>                :      * An unique access token.                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1284"><a name="1284"></a><a href="#1284" id="line1284">    1284</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1285"><a name="1285"></a><a href="#1285" id="line1285">    1285</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1286"><a name="1286"></a><a href="#1286" id="line1286">    1286</a> </span>                :      * @see OAuth2::genAuthCode()                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container1287"><a name="1287"></a><a href="#1287" id="line1287">    1287</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1288"><a name="1288"></a><a href="#1288" id="line1288">    1288</a> </span>                :     protected function genAccessToken() {                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1289"><a name="1289"></a><a href="#1289" id="line1289">    1289</a> </span><span class="lineNoCov">              0 :         $tokenLen = 40;                                                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1290"><a name="1290"></a><a href="#1290" id="line1290">    1290</a> </span><span class="lineNoCov">              0 :         if (file_exists('/dev/urandom')) { // Get 100 bytes of random data                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1291"><a name="1291"></a><a href="#1291" id="line1291">    1291</a> </span><span class="lineNoCov">              0 :             $randomData = file_get_contents('/dev/urandom', false, null, 0, 100) . uniqid(mt_rand(), true);                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container1292"><a name="1292"></a><a href="#1292" id="line1292">    1292</a> </span><span class="lineNoCov">              0 :         } else {                                                                                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container1293"><a name="1293"></a><a href="#1293" id="line1293">    1293</a> </span><span class="lineNoCov">              0 :             $randomData = mt_rand() . mt_rand() . mt_rand() . mt_rand() . microtime(true) . uniqid(mt_rand(), true);                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container1294"><a name="1294"></a><a href="#1294" id="line1294">    1294</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1295"><a name="1295"></a><a href="#1295" id="line1295">    1295</a> </span><span class="lineNoCov">              0 :         return substr(hash('sha512', $randomData), 0, $tokenLen);                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1296"><a name="1296"></a><a href="#1296" id="line1296">    1296</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1297"><a name="1297"></a><a href="#1297" id="line1297">    1297</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1298"><a name="1298"></a><a href="#1298" id="line1298">    1298</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1299"><a name="1299"></a><a href="#1299" id="line1299">    1299</a> </span>                :      * Generates an unique auth code.                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1300"><a name="1300"></a><a href="#1300" id="line1300">    1300</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1301"><a name="1301"></a><a href="#1301" id="line1301">    1301</a> </span>                :      * Implementing classes may want to override this function to implement                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1302"><a name="1302"></a><a href="#1302" id="line1302">    1302</a> </span>                :      * other auth code generation schemes.                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1303"><a name="1303"></a><a href="#1303" id="line1303">    1303</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1304"><a name="1304"></a><a href="#1304" id="line1304">    1304</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1305"><a name="1305"></a><a href="#1305" id="line1305">    1305</a> </span>                :      * An unique auth code.                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1306"><a name="1306"></a><a href="#1306" id="line1306">    1306</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1307"><a name="1307"></a><a href="#1307" id="line1307">    1307</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1308"><a name="1308"></a><a href="#1308" id="line1308">    1308</a> </span>                :      * @see OAuth2::genAccessToken()                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container1309"><a name="1309"></a><a href="#1309" id="line1309">    1309</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1310"><a name="1310"></a><a href="#1310" id="line1310">    1310</a> </span>                :     protected function genAuthCode() {                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1311"><a name="1311"></a><a href="#1311" id="line1311">    1311</a> </span><span class="lineNoCov">              0 :         return $this-&gt;genAccessToken(); // let's reuse the same scheme for token generation                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container1312"><a name="1312"></a><a href="#1312" id="line1312">    1312</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1313"><a name="1313"></a><a href="#1313" id="line1313">    1313</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1314"><a name="1314"></a><a href="#1314" id="line1314">    1314</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1315"><a name="1315"></a><a href="#1315" id="line1315">    1315</a> </span>                :      * Pull out the Authorization HTTP header and return it.                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container1316"><a name="1316"></a><a href="#1316" id="line1316">    1316</a> </span>                :      * According to draft 20, standard basic authorization is the only                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1317"><a name="1317"></a><a href="#1317" id="line1317">    1317</a> </span>                :      * header variable required (this does not apply to extended grant types).                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1318"><a name="1318"></a><a href="#1318" id="line1318">    1318</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1319"><a name="1319"></a><a href="#1319" id="line1319">    1319</a> </span>                :      * Implementing classes may need to override this function if need be.                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1320"><a name="1320"></a><a href="#1320" id="line1320">    1320</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1321"><a name="1321"></a><a href="#1321" id="line1321">    1321</a> </span>                :      * @todo We may need to re-implement pulling out apache headers to support extended grant types                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1322"><a name="1322"></a><a href="#1322" id="line1322">    1322</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1323"><a name="1323"></a><a href="#1323" id="line1323">    1323</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1324"><a name="1324"></a><a href="#1324" id="line1324">    1324</a> </span>                :      * An array of the basic username and password provided.                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container1325"><a name="1325"></a><a href="#1325" id="line1325">    1325</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1326"><a name="1326"></a><a href="#1326" id="line1326">    1326</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-2.4.1                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1327"><a name="1327"></a><a href="#1327" id="line1327">    1327</a> </span>                :      * @ingroup oauth2_section_2                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1328"><a name="1328"></a><a href="#1328" id="line1328">    1328</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1329"><a name="1329"></a><a href="#1329" id="line1329">    1329</a> </span>                :     protected function getAuthorizationHeader() {                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container1330"><a name="1330"></a><a href="#1330" id="line1330">    1330</a> </span>                :         return array(                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1331"><a name="1331"></a><a href="#1331" id="line1331">    1331</a> </span><span class="lineNoCov">              0 :             'PHP_AUTH_USER' =&gt; isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : '',                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1332"><a name="1332"></a><a href="#1332" id="line1332">    1332</a> </span><span class="lineNoCov">              0 :             'PHP_AUTH_PW' =&gt; isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1333"><a name="1333"></a><a href="#1333" id="line1333">    1333</a> </span><span class="lineNoCov">              0 :         );                                                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1334"><a name="1334"></a><a href="#1334" id="line1334">    1334</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1335"><a name="1335"></a><a href="#1335" id="line1335">    1335</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1336"><a name="1336"></a><a href="#1336" id="line1336">    1336</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1337"><a name="1337"></a><a href="#1337" id="line1337">    1337</a> </span>                :      * Send out HTTP headers for JSON.                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1338"><a name="1338"></a><a href="#1338" id="line1338">    1338</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1339"><a name="1339"></a><a href="#1339" id="line1339">    1339</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.1                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1340"><a name="1340"></a><a href="#1340" id="line1340">    1340</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1341"><a name="1341"></a><a href="#1341" id="line1341">    1341</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1342"><a name="1342"></a><a href="#1342" id="line1342">    1342</a> </span>                :      * @ingroup oauth2_section_5                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1343"><a name="1343"></a><a href="#1343" id="line1343">    1343</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1344"><a name="1344"></a><a href="#1344" id="line1344">    1344</a> </span>                :     private function sendJsonHeaders() {                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1345"><a name="1345"></a><a href="#1345" id="line1345">    1345</a> </span><span class="lineNoCov">              0 :         if (php_sapi_name() === 'cli' || headers_sent()) {                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1346"><a name="1346"></a><a href="#1346" id="line1346">    1346</a> </span><span class="lineNoCov">              0 :             return;                                                                                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container1347"><a name="1347"></a><a href="#1347" id="line1347">    1347</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1348"><a name="1348"></a><a href="#1348" id="line1348">    1348</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1349"><a name="1349"></a><a href="#1349" id="line1349">    1349</a> </span><span class="lineNoCov">              0 :         header(&quot;Content-Type: application/json&quot;);                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1350"><a name="1350"></a><a href="#1350" id="line1350">    1350</a> </span><span class="lineNoCov">              0 :         header(&quot;Cache-Control: no-store&quot;);                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1351"><a name="1351"></a><a href="#1351" id="line1351">    1351</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1352"><a name="1352"></a><a href="#1352" id="line1352">    1352</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1353"><a name="1353"></a><a href="#1353" id="line1353">    1353</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1354"><a name="1354"></a><a href="#1354" id="line1354">    1354</a> </span>                :      * Internal method for validating redirect URI supplied                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1355"><a name="1355"></a><a href="#1355" id="line1355">    1355</a> </span>                :      * @param string $inputUri                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1356"><a name="1356"></a><a href="#1356" id="line1356">    1356</a> </span>                :      * @param string $storedUri                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1357"><a name="1357"></a><a href="#1357" id="line1357">    1357</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1358"><a name="1358"></a><a href="#1358" id="line1358">    1358</a> </span>                :     protected function validateRedirectUri($inputUri, $storedUri) {                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1359"><a name="1359"></a><a href="#1359" id="line1359">    1359</a> </span><span class="lineNoCov">              0 :         if (!$inputUri || !$storedUri) {                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container1360"><a name="1360"></a><a href="#1360" id="line1360">    1360</a> </span><span class="lineNoCov">              0 :             return false; // if either one is missing, assume INVALID                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1361"><a name="1361"></a><a href="#1361" id="line1361">    1361</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1362"><a name="1362"></a><a href="#1362" id="line1362">    1362</a> </span><span class="lineNoCov">              0 :         return strcasecmp(substr($inputUri, 0, strlen($storedUri)), $storedUri) === 0;                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container1363"><a name="1363"></a><a href="#1363" id="line1363">    1363</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1364"><a name="1364"></a><a href="#1364" id="line1364">    1364</a> </span>                : }                                                                                                                                                                                                                                                                                                                                                        
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib_OAuth2RedirectException.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib_OAuth2RedirectException.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib_OAuth2RedirectException.php.html	(revision 5888)
@@ -0,0 +1,308 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>OAuth2RedirectException.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">OAuth2RedirectException.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_oauth2.html">oauth2</a>/<a href="library_oauth2_lib.html">lib</a>/<a href="library_oauth2_lib_OAuth2RedirectException.php.html">OAuth2RedirectException.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 16</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">OAuth2RedirectException</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+          <td class="crap">210</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 16</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#32">__construct($redirect_uri, $error, $error_description = NULL, $state = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#47">sendHeaders()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#66">buildUri($uri, $params)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">132</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 7</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : /**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                :  * Redirect the end-user's user agent with error message.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :  * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :  * @ingroup oauth2_error                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :  */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                : class OAuth2RedirectException extends OAuth2ServerException {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :     protected $redirectUri;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :      * @param $redirect_uri                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :      * An absolute URI to which the authorization server will redirect the                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :      * user-agent to when the end-user authorization step is completed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :      * @param $error                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :      * A single error code as described in Section 4.1.2.1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :      * @param $error_description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :      * (optional) A human-readable text providing additional information,                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :      * used to assist in the understanding and resolution of the error                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :      * occurred.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :      * @param $state                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :      * (optional) REQUIRED if the &quot;state&quot; parameter was present in the client                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :      * authorization request. Set to the exact value received from the client.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :      * @ingroup oauth2_error                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :     public function __construct($redirect_uri, $error, $error_description = NULL, $state = NULL) {                                                                                                                                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span><span class="lineNoCov">              0 :         parent::__construct(OAuth2::HTTP_FOUND, $error, $error_description);                                                                                                                                                                                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span><span class="lineNoCov">              0 :         $this-&gt;redirectUri = $redirect_uri;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span><span class="lineNoCov">              0 :         if ($state) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span><span class="lineNoCov">              0 :             $this-&gt;errorData['state'] = $state;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :      * Redirect the user agent.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :     protected function sendHeaders() {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span><span class="lineNoCov">              0 :         $params = array('query' =&gt; $this-&gt;errorData);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span><span class="lineNoCov">              0 :         header(&quot;Location: &quot; . $this-&gt;buildUri($this-&gt;redirectUri, $params));                                                                                                                                                                                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span><span class="lineNoCov">              0 :         exit(); // No point in printing out data if we're redirecting                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :      * Build the absolute URI based on supplied URI and parameters.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span>                :      * @param $uri                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :      * An absolute URI.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                :      * @param $params                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :      * Parameters to be append as GET.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :      * An absolute URI with supplied parameters.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :     protected function buildUri($uri, $params) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span><span class="lineNoCov">              0 :         $parse_url = parse_url($uri);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :         // Add our params to the parsed uri                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span><span class="lineNoCov">              0 :         foreach ( $params as $k =&gt; $v ) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span><span class="lineNoCov">              0 :             if (isset($parse_url[$k]))                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span><span class="lineNoCov">              0 :                 $parse_url[$k] .= &quot;&amp;&quot; . http_build_query($v);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                :             else                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span><span class="lineNoCov">              0 :                 $parse_url[$k] = http_build_query($v);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :         // Put humpty dumpty back together                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span><span class="lineNoCov">              0 :         return ((isset($parse_url[&quot;scheme&quot;])) ? $parse_url[&quot;scheme&quot;] . &quot;://&quot; : &quot;&quot;) . ((isset($parse_url[&quot;user&quot;])) ? $parse_url[&quot;user&quot;] . ((isset($parse_url[&quot;pass&quot;])) ? &quot;:&quot; . $parse_url[&quot;pass&quot;] : &quot;&quot;) . &quot;@&quot; : &quot;&quot;) . ((isset($parse_url[&quot;host&quot;])) ? $parse_url[&quot;host&quot;] : &quot;&quot;) . ((isset($parse_url[&quot;port&quot;])) ? &quot;:&quot; . $parse_url[&quot;port&quot;] : &quot;&quot;) . ((isset($parse_url[&quot;path&quot;])) ? $parse_url[&quot;path&quot;] : &quot;&quot;) . ((isset($parse_url[&quot;query&quot;])) ? &quot;?&quot; . $parse_url[&quot;query&quot;] : &quot;&quot;) . ((isset($parse_url[&quot;fragment&quot;])) ? &quot;#&quot; . $parse_url[&quot;fragment&quot;] : &quot;&quot;);</span>
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar.dashboard.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>calendar</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [1,0,1,0,0,0,0,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[0,7,"<a href=\"modules_calendar_interceptors_Helpers.php.html#3\">Helpers<\/a>"],[19.354838709677,4,"<a href=\"modules_calendar_interceptors_LDAPMapping.php.html#5\">LDAPMapping<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">calendar</td></tr>
+      <tr><td><div align="center"><p><a href="modules_calendar.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#3">Helpers</a> (56)</li>
+              <li><a href="modules_calendar_interceptors_LDAPMapping.php.html#5">LDAPMapping</a> (12)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#43">Helpers::lg</a> (0%)</li>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#38">Helpers::getOrganizer</a> (0%)</li>
+              <li><a href="modules_calendar_interceptors_Helpers.php.html#5">Helpers::futureEvent</a> (0%)</li>
+              <li><a href="modules_calendar_interceptors_LDAPMapping.php.html#7">LDAPMapping::encodeFindUser</a> (19%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/services_OpenLDAP.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/services_OpenLDAP.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/services_OpenLDAP.php.html	(revision 5888)
@@ -0,0 +1,1117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>OpenLDAP.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">OpenLDAP.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="services.html">services</a>/<a href="services_OpenLDAP.php.html">OpenLDAP.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="26.32%">
+                <div class="size scarlet_red"  style="width:26.315789473684%" title="26.32%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">26.32%</td>
+          <td class="coverNumLo">5 / 19</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="78.12%">
+                <div class="size chameleon"  style="width:78.125%" title="78.12%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">78.12%</td>
+          <td class="coverNumHi">75 / 96</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">OpenLDAP</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="26.32%">
+                <div class="size scarlet_red"  style="width:26.315789473684%" title="26.32%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">26.32%</td>
+          <td class="coverNumLo">5 / 19</td>
+          <td class="crap">78.23</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="78.12%">
+                <div class="size chameleon"  style="width:78.125%" title="78.12%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">78.12%</td>
+          <td class="coverNumHi">75 / 96</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#9">find  ( $uri, $justthese = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">8 / 8</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#25">read ( $uri, $justthese = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 7</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#42">deleteAll( $uri, $justthese = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#44">delete   ( $uri, $justthese = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#49">replace  ( $uri, $data, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#51">update   ( $uri, $data )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#53">create   ( $uri, $data )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#55">open ( $config )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">6 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#69">close()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#74">setup()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#76">teardown()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#78">begin( $uri )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#82">commit( $uri )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#86">rollback( $uri )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#89">_formatEntries ( $pEntries , &amp;$map )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">10</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="96.00%">
+                  <div class="size chameleon"  style="width:96%" title="96.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">96.00%</td>
+          <td class="coverNumHi">24 / 25</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#129">parseCriteria( $criteria  , &amp;$map)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">6 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#153">parseFilter( $filter , &amp;$map)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">5.01</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="94.12%">
+                  <div class="size chameleon"  style="width:94.117647058824%" title="94.12%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">94.12%</td>
+          <td class="coverNumHi">16 / 17</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#180">parseOperator( $op )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">7</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">8 / 8</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#194">parseJustthese($justthese , &amp;$map)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">7 / 7</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                                                    
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : class OpenLDAP implements Service                                                                                                                                        
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : {                                                                                                                                                                        
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :     var $con;                                                                                                                                                            
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :     var $config;                                                                                                                                                         
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :     var $limit = 10;                                                                                                                                                     
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :     public function find  ( $uri, $justthese = false, $criteria = false )                                                                                                
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :     {                                                                                                                                                                    
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span><span class="lineCov">              2 :     $map = Config::get($uri['concept'], 'OpenLDAP.mapping');                                                                                                             </span>
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span><span class="lineCov">              2 :     if( !isset($criteria[&quot;limit&quot;]) )                                                                                                                                     </span>
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span><span class="lineCov">              2 :         $criteria[&quot;limit&quot;] = $this-&gt;limit;                                                                                                                               </span>
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span><span class="lineCov">              2 :     $sr =  ldap_search( $this-&gt;con , $this-&gt;config['context'] , self::parseCriteria($criteria , $map) , self::parseJustthese($justthese, $map) , 0 , $criteria[&quot;limit&quot;]);</span>
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span><span class="lineCov">              2 :     if(!$sr) return false;                                                                                                                                               </span>
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span><span class="lineCov">              2 :     if( isset($criteria[&quot;order&quot;]) )                                                                                                                                      </span>
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span><span class="lineCov">              2 :         ldap_sort( $this-&gt;con, $sr, $criteria[&quot;order&quot;] );                                                                                                                </span>
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span><span class="lineCov">              2 :     return  self::_formatEntries( ldap_get_entries( $this-&gt;con, $sr ) , $map);                                                                                           </span>
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :     }                                                                                                                                                                    
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :     public function read ( $uri, $justthese = false )                                                                                                                    
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :     {                                                                                                                                                                    
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span><span class="lineNoCov">              0 :         $map = Config::get($uri['concept'], 'OpenLDAP.mapping');                                                                                                         </span>
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span><span class="lineNoCov">              0 :     if( $justthese === false || $justthese === null )                                                                                                                    </span>
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span><span class="lineNoCov">              0 :         $sr =  ldap_search( $this-&gt;con, $this-&gt;config['context'], '('.$this-&gt;config['idAtribute'].'='.$uri['id'].')' );                                                  </span>
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :     else                                                                                                                                                                 
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span><span class="lineNoCov">              0 :         $sr =  ldap_search( $this-&gt;con, $this-&gt;config['context'], '('.$this-&gt;config['idAtribute'].'='.$uri['id'].')', self::parseJustthese($justthese, $map) );          </span>
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span><span class="lineNoCov">              0 :     if(!$sr) return false;                                                                                                                                               </span>
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span><span class="lineNoCov">              0 :     $return =  self::_formatEntries( ldap_get_entries( $this-&gt;con, $sr ) , $map );                                                                                       </span>
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineNoCov">              0 :     return isset($return[0]) ? $return[0] : array();                                                                                                                     </span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                :     }                                                                                                                                                                    
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span><span class="lineNoCov">              0 :     public function deleteAll( $uri, $justthese = false, $criteria = false ){}                                                                                           </span>
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :     public function delete   ( $uri, $justthese = false )                                                                                                                
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :     {                                                                                                                                                                    
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                : //        return ldap_delete ($this-&gt;con , $this-&gt;config['context'].','.$uri['id'] );                                                                                    
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                    </span>
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span><span class="lineNoCov">              0 :     public function replace  ( $uri, $data, $criteria = false ){}                                                                                                        </span>
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span><span class="lineNoCov">              0 :     public function update   ( $uri, $data ){}                                                                                                                           </span>
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span><span class="lineNoCov">              0 :     public function create   ( $uri, $data ){}                                                                                                                           </span>
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :     public function open ( $config )                                                                                                                                     
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span>                :     {                                                                                                                                                                    
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span><span class="lineCov">              1 :     $this-&gt;config = $config;                                                                                                                                             </span>
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span><span class="lineCov">              1 :     $this-&gt;con = ldap_connect( $config['host'] );                                                                                                                        </span>
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span><span class="lineCov">              1 :     ldap_set_option( $this-&gt;con,LDAP_OPT_PROTOCOL_VERSION,3 );                                                                                                           </span>
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span><span class="lineCov">              1 :     if( isset( $config['user'] ) &amp;&amp; isset( $config['password'] ) )                                                                                                       </span>
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span><span class="lineCov">              1 :         ldap_bind( $this-&gt;con, $config['user'], $config['password'] );                                                                                                   </span>
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span><span class="lineCov">              1 :     return( $this-&gt;con );                                                                                                                                                </span>
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :     }                                                                                                                                                                    
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :     public function close()                                                                                                                                              
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                :     {                                                                                                                                                                    
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span><span class="lineNoCov">              0 :     ldap_close($this-&gt;con);                                                                                                                                              </span>
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                    </span>
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span><span class="lineNoCov">              0 :     public function setup(){}                                                                                                                                            </span>
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span><span class="lineNoCov">              0 :     public function teardown(){}                                                                                                                                         </span>
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                :     public function begin( $uri ){                                                                                                                                       
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                    </span>
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span>                :     public function commit( $uri ){                                                                                                                                      
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span><span class="lineNoCov">              0 :     return( true );                                                                                                                                                      </span>
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                :     }                                                                                                                                                                    
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span>                :     public function rollback( $uri ){                                                                                                                                    
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                    </span>
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                :     private static function _formatEntries ( $pEntries , &amp;$map )                                                                                                         
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                :     {                                                                                                                                                                    
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span><span class="lineCov">              2 :     if( !$pEntries ) return( false );                                                                                                                                    </span>
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span><span class="lineCov">              2 :         $newMap = array();                                                                                                                                               </span>
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span><span class="lineCov">              2 :         foreach ($map as $i =&gt; &amp;$v)                                                                                                                                      </span>
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span><span class="lineCov">              2 :             $newMap[strtolower($v)] = $i;                                                                                                                                </span>
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span><span class="lineCov">              2 :     $return = array();                                                                                                                                                   </span>
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span><span class="lineCov">              2 :     for ($i=0; $i &lt; $pEntries[&quot;count&quot;]; $i++)                                                                                                                            </span>
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :     {                                                                                                                                                                    
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span><span class="lineCov">              1 :           $entrieTmp = array();                                                                                                                                          </span>
+<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span><span class="lineCov">              1 :           foreach ($pEntries[$i] as $index =&gt; $value)                                                                                                                    </span>
+<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span>                :           {                                                                                                                                                              
+<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span><span class="lineCov">              1 :                   if(isset($newMap[$index]))                                                                                                                             </span>
+<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span><span class="lineCov">              1 :           {                                                                                                                                                              </span>
+<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span><span class="lineCov">              1 :               if(is_array($value))                                                                                                                                       </span>
+<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span><span class="lineCov">              1 :               {                                                                                                                                                          </span>
+<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span><span class="lineCov">              1 :               if(count($value) == 2)                                                                                                                                     </span>
+<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span><span class="lineCov">              1 :                   $entrieTmp[$newMap[$index]] = $value['0'];                                                                                                             </span>
+<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span>                :               else                                                                                                                                                       
+<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span>                :               {                                                                                                                                                          
+<span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111">     111</a> </span><span class="lineCov">              1 :                   foreach ($value as $index2 =&gt;$value2)                                                                                                                  </span>
+<span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112">     112</a> </span>                :                   {                                                                                                                                                      
+<span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113">     113</a> </span><span class="lineCov">              1 :                   if($index2 != 'count')                                                                                                                                 </span>
+<span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114">     114</a> </span><span class="lineCov">              1 :                       $entrieTmp[$newMap[$index]][$index2] = $value2;                                                                                                    </span>
+<span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115">     115</a> </span><span class="lineCov">              1 :                   }                                                                                                                                                      </span>
+<span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116">     116</a> </span>                :               }                                                                                                                                                          
+<span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117">     117</a> </span><span class="lineCov">              1 :               }                                                                                                                                                          </span>
+<span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118">     118</a> </span>                :               else                                                                                                                                                       
+<span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119">     119</a> </span><span class="lineNoCov">              0 :               $entrieTmp[$newMap[$index]] = $value;                                                                                                                      </span>
+<span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120">     120</a> </span><span class="lineCov">              1 :           }                                                                                                                                                              </span>
+<span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121">     121</a> </span><span class="lineCov">              1 :           }                                                                                                                                                              </span>
+<span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122">     122</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123">     123</a> </span><span class="lineCov">              1 :           $return[] = $entrieTmp;                                                                                                                                        </span>
+<span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124">     124</a> </span><span class="lineCov">              1 :     }                                                                                                                                                                    </span>
+<span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125">     125</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126">     126</a> </span><span class="lineCov">              2 :     return( $return );                                                                                                                                                   </span>
+<span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127">     127</a> </span>                :     }                                                                                                                                                                    
+<span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128">     128</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129">     129</a> </span>                :     private static function parseCriteria( $criteria  , &amp;$map)                                                                                                           
+<span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130">     130</a> </span>                :     {                                                                                                                                                                    
+<span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131">     131</a> </span><span class="lineCov">              2 :     $result = &quot;&quot;;                                                                                                                                                        </span>
+<span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132">     132</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133">     133</a> </span><span class="lineCov">              2 :     if( isset($criteria[&quot;filter&quot;]) )                                                                                                                                     </span>
+<span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134">     134</a> </span><span class="lineCov">              2 :     {                                                                                                                                                                    </span>
+<span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135">     135</a> </span>                :         /*                                                                                                                                                               
+<span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136">     136</a> </span>                :           * ex: array   (                                                                                                                                                
+<span class="lineNum" id="container137"><a name="137"></a><a href="#137" id="line137">     137</a> </span>                :           *          [0] 'OR',                                                                                                                                           
+<span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138">     138</a> </span>                :           *          [1] array( 'OR', array( array( '=', 'campo', 'valor' ) ),                                                                                           
+<span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139">     139</a> </span>                :           *          [2] array( '=', 'campo' , 'valor' ),                                                                                                                
+<span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140">     140</a> </span>                :           *          [3] array( 'IN', 'campo', array( '1' , '2' , '3' ) )                                                                                                
+<span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141">     141</a> </span>                :           *        )                                                                                                                                                     
+<span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142">     142</a> </span>                :           * OR                                                                                                                                                           
+<span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143">     143</a> </span>                :           *        array( '=' , 'campo' , 'valor' )                                                                                                                      
+<span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144">     144</a> </span>                :         */                                                                                                                                                               
+<span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145">     145</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146">     146</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147">     147</a> </span><span class="lineCov">              2 :         $result .= self::parseFilter( $criteria['filter'] , $map);                                                                                                       </span>
+<span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148">     148</a> </span><span class="lineCov">              2 :     }                                                                                                                                                                    </span>
+<span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149">     149</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150">     150</a> </span><span class="lineCov">              2 :     return $result;                                                                                                                                                      </span>
+<span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151">     151</a> </span>                :     }                                                                                                                                                                    
+<span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152">     152</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153">     153</a> </span>                :     private static function parseFilter( $filter , &amp;$map)                                                                                                                
+<span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154">     154</a> </span>                :     {                                                                                                                                                                    
+<span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155">     155</a> </span><span class="lineCov">              2 :     $result = '';                                                                                                                                                        </span>
+<span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156">     156</a> </span><span class="lineCov">              2 :         $as = array_shift( $filter );                                                                                                                                    </span>
+<span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157">     157</a> </span><span class="lineCov">              2 :     $op = self::parseOperator( $as );                                                                                                                                    </span>
+<span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158">     158</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159">     159</a> </span><span class="lineCov">              2 :     if( is_array($filter[0]) )                                                                                                                                           </span>
+<span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160">     160</a> </span><span class="lineCov">              2 :     {                                                                                                                                                                    </span>
+<span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161">     161</a> </span><span class="lineCov">              2 :         $nested = '';                                                                                                                                                    </span>
+<span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162">     162</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163">     163</a> </span><span class="lineCov">              2 :         foreach( $filter as $i =&gt; $f )                                                                                                                                   </span>
+<span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164">     164</a> </span><span class="lineCov">              2 :         $nested .= self::parseFilter($f , $map);                                                                                                                         </span>
+<span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165">     165</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166">     166</a> </span><span class="lineCov">              2 :         $fil =  $op.$nested;                                                                                                                                             </span>
+<span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167">     167</a> </span><span class="lineCov">              2 :     }                                                                                                                                                                    </span>
+<span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168">     168</a> </span><span class="lineCov">              2 :     else  if( isset($map[$filter[0]]) )                                                                                                                                  </span>
+<span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169">     169</a> </span><span class="lineCov">              2 :         {                                                                                                                                                                </span>
+<span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170">     170</a> </span><span class="lineCov">              2 :             if($as === '*') $filter[1] = str_replace (' ', '* *', $filter[1]);                                                                                           </span>
+<span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171">     171</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172">     172</a> </span><span class="lineCov">              2 :             $fil = $op[0].$map[$filter[0]].$op[1].$filter[1].$op[2];                                                                                                     </span>
+<span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173">     173</a> </span><span class="lineCov">              2 :         }                                                                                                                                                                </span>
+<span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174">     174</a> </span>                :         else                                                                                                                                                             
+<span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175">     175</a> </span><span class="lineNoCov">              0 :             return '';                                                                                                                                                   </span>
+<span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176">     176</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177">     177</a> </span><span class="lineCov">              2 :     return '('.$fil.')';                                                                                                                                                 </span>
+<span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178">     178</a> </span>                :     }                                                                                                                                                                    
+<span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179">     179</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180">     180</a> </span>                :     private static function parseOperator( $op )                                                                                                                         
+<span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181">     181</a> </span>                :     {                                                                                                                                                                    
+<span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182">     182</a> </span>                :     switch( $op )                                                                                                                                                        
+<span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183">     183</a> </span>                :     {                                                                                                                                                                    
+<span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184">     184</a> </span><span class="lineCov">              2 :         case 'AND': return '&amp;';                                                                                                                                          </span>
+<span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185">     185</a> </span><span class="lineCov">              2 :         case 'OR': return '|';                                                                                                                                           </span>
+<span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186">     186</a> </span><span class="lineCov">              2 :         case '^': return array('', '=*', ''  );                                                                                                                          </span>
+<span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187">     187</a> </span><span class="lineCov">              2 :         case '$': return array('', '=' , '*' );                                                                                                                          </span>
+<span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188">     188</a> </span><span class="lineCov">              2 :         case '*': return array('', '=*', '*' );                                                                                                                          </span>
+<span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189">     189</a> </span><span class="lineCov">              2 :             case '!': return array('!(', '=', ')', );                                                                                                                    </span>
+<span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190">     190</a> </span><span class="lineCov">              2 :         default : return array('', $op , '' );                                                                                                                           </span>
+<span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191">     191</a> </span><span class="lineCov">              2 :     }                                                                                                                                                                    </span>
+<span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192">     192</a> </span>                :     }                                                                                                                                                                    
+<span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193">     193</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194">     194</a> </span>                :     private static function parseJustthese($justthese , &amp;$map)                                                                                                           
+<span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195">     195</a> </span>                :     {                                                                                                                                                                    
+<span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196">     196</a> </span><span class="lineCov">              2 :         if(!is_array($justthese)) //Caso seja um full select pegar todas as keys                                                                                         </span>
+<span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197">     197</a> </span><span class="lineCov">              2 :             $justthese = array_keys($map);                                                                                                                               </span>
+<span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198">     198</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199">     199</a> </span><span class="lineCov">              2 :         $return = array();                                                                                                                                               </span>
+<span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200">     200</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201">     201</a> </span><span class="lineCov">              2 :         foreach ($justthese as &amp;$value)                                                                                                                                  </span>
+<span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202">     202</a> </span><span class="lineCov">              2 :             if(isset($map[$value]))                                                                                                                                      </span>
+<span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203">     203</a> </span><span class="lineCov">              2 :                 $return[] = $map[$value];                                                                                                                                </span>
+<span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204">     204</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205">     205</a> </span><span class="lineCov">              2 :         return $return;                                                                                                                                                  </span>
+<span class="lineNum" id="container206"><a name="206"></a><a href="#206" id="line206">     206</a> </span>                :     }                                                                                                                                                                    
+<span class="lineNum" id="container207"><a name="207"></a><a href="#207" id="line207">     207</a> </span>                : }                                                                                                                                                                        
+<span class="lineNum" id="container208"><a name="208"></a><a href="#208" id="line208">     208</a> </span>                :                                                                                                                                                                          
+<span class="lineNum" id="container209"><a name="209"></a><a href="#209" id="line209">     209</a> </span>                : ?&gt;                                                                                                                                                                       
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel11": {
+          "header": "2 tests cover line 11",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel13": {
+          "header": "2 tests cover line 13",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel14": {
+          "header": "2 tests cover line 14",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel16": {
+          "header": "2 tests cover line 16",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel17": {
+          "header": "2 tests cover line 17",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel19": {
+          "header": "2 tests cover line 19",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel20": {
+          "header": "2 tests cover line 20",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel22": {
+          "header": "2 tests cover line 22",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel57": {
+          "header": "1 test covers line 57",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel59": {
+          "header": "1 test covers line 59",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel61": {
+          "header": "1 test covers line 61",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel63": {
+          "header": "1 test covers line 63",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel64": {
+          "header": "1 test covers line 64",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel66": {
+          "header": "1 test covers line 66",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel91": {
+          "header": "2 tests cover line 91",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel93": {
+          "header": "2 tests cover line 93",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel94": {
+          "header": "2 tests cover line 94",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel95": {
+          "header": "2 tests cover line 95",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel97": {
+          "header": "2 tests cover line 97",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel98": {
+          "header": "2 tests cover line 98",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel100": {
+          "header": "1 test covers line 100",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel101": {
+          "header": "1 test covers line 101",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel103": {
+          "header": "1 test covers line 103",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel104": {
+          "header": "1 test covers line 104",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel105": {
+          "header": "1 test covers line 105",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel106": {
+          "header": "1 test covers line 106",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel107": {
+          "header": "1 test covers line 107",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel108": {
+          "header": "1 test covers line 108",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel111": {
+          "header": "1 test covers line 111",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel113": {
+          "header": "1 test covers line 113",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel114": {
+          "header": "1 test covers line 114",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel115": {
+          "header": "1 test covers line 115",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel117": {
+          "header": "1 test covers line 117",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel120": {
+          "header": "1 test covers line 120",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel121": {
+          "header": "1 test covers line 121",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel123": {
+          "header": "1 test covers line 123",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel124": {
+          "header": "1 test covers line 124",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel126": {
+          "header": "2 tests cover line 126",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel131": {
+          "header": "2 tests cover line 131",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel133": {
+          "header": "2 tests cover line 133",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel134": {
+          "header": "2 tests cover line 134",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel147": {
+          "header": "2 tests cover line 147",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel148": {
+          "header": "2 tests cover line 148",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel150": {
+          "header": "2 tests cover line 150",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel155": {
+          "header": "2 tests cover line 155",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel156": {
+          "header": "2 tests cover line 156",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel157": {
+          "header": "2 tests cover line 157",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel159": {
+          "header": "2 tests cover line 159",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel160": {
+          "header": "2 tests cover line 160",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel161": {
+          "header": "2 tests cover line 161",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel163": {
+          "header": "2 tests cover line 163",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel164": {
+          "header": "2 tests cover line 164",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel166": {
+          "header": "2 tests cover line 166",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel167": {
+          "header": "2 tests cover line 167",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel168": {
+          "header": "2 tests cover line 168",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel169": {
+          "header": "2 tests cover line 169",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel170": {
+          "header": "2 tests cover line 170",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel172": {
+          "header": "2 tests cover line 172",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel173": {
+          "header": "2 tests cover line 173",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel177": {
+          "header": "2 tests cover line 177",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel184": {
+          "header": "2 tests cover line 184",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel185": {
+          "header": "2 tests cover line 185",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel186": {
+          "header": "2 tests cover line 186",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel187": {
+          "header": "2 tests cover line 187",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel188": {
+          "header": "2 tests cover line 188",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel189": {
+          "header": "2 tests cover line 189",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel190": {
+          "header": "2 tests cover line 190",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel191": {
+          "header": "2 tests cover line 191",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel196": {
+          "header": "2 tests cover line 196",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel197": {
+          "header": "2 tests cover line 197",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel199": {
+          "header": "2 tests cover line 199",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel201": {
+          "header": "2 tests cover line 201",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel202": {
+          "header": "2 tests cover line 202",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel203": {
+          "header": "2 tests cover line 203",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel205": {
+          "header": "2 tests cover line 205",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_cache.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_cache.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_cache.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>cache</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">cache</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="api.html">api</a>/<a href="api_cache.html">cache</a> (<a href="api_cache.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.00%">
+              <div class="size butter"  style="width:50%" title="50.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.00%</td>
+          <td class="coverNumMed">3 / 6</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="40.00%">
+                <div class="size butter"  style="width:40%" title="40.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">40.00%</td>
+          <td class="coverNumMed">2 / 5</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="api_cache_MemoryCache.php.html">MemoryCache.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.00%">
+              <div class="size butter"  style="width:50%" title="50.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.00%</td>
+          <td class="coverNumMed">3 / 6</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="40.00%">
+                <div class="size butter"  style="width:40%" title="40.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">40.00%</td>
+          <td class="coverNumMed">2 / 5</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/highcharts.js
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/highcharts.js	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/highcharts.js	(revision 5888)
@@ -0,0 +1,170 @@
+/*
+ Highcharts JS v2.1.6 (2011-07-08)
+
+ (c) 2009-2011 Torstein H?nsi
+
+ License: www.highcharts.com/license
+*/
+(function(){function pa(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function ja(a,b){return parseInt(a,b||10)}function Pb(a){return typeof a==="string"}function Lb(a){return typeof a==="object"}function dc(a){return typeof a==="number"}function qc(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function M(a){return a!==Va&&a!==null}function Ea(a,b,c){var d,e;if(Pb(b))if(M(c))a.setAttribute(b,c);else{if(a&&a.getAttribute)e=a.getAttribute(b)}else if(M(b)&&Lb(b))for(d in b)a.setAttribute(d,
+b[d]);return e}function rc(a){if(!a||a.constructor!==Array)a=[a];return a}function C(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++){c=a[b];if(typeof c!=="undefined"&&c!==null)return c}}function Na(a,b){if(Bc)if(b&&b.opacity!==Va)b.filter="alpha(opacity="+b.opacity*100+")";pa(a.style,b)}function ib(a,b,c,d,e){a=wa.createElement(a);b&&pa(a,b);e&&Na(a,{padding:0,border:jb,margin:0});c&&Na(a,c);d&&d.appendChild(a);return a}function yb(a,b){var c=function(){};c.prototype=new a;pa(c.prototype,b);return c}
+function zd(a,b,c,d){var e=Wa.lang;a=a;var f=isNaN(b=$a(b))?2:b;b=c===undefined?e.decimalPoint:c;d=d===undefined?e.thousandsSep:d;e=a<0?"-":"";c=String(ja(a=$a(+a||0).toFixed(f)));var g=c.length>3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+$a(a-c).toFixed(f).slice(2):"")}function Ad(){this.symbol=this.color=0}function ec(a,b){Cc=C(a,b.animation)}function Bd(){var a=Wa.global.useUTC;Dc=a?Date.UTC:function(b,c,d,e,f,g){return(new Date(b,c,C(d,1),C(e,
+0),C(f,0),C(g,0))).getTime()};bd=a?"getUTCMinutes":"getMinutes";cd=a?"getUTCHours":"getHours";dd=a?"getUTCDay":"getDay";sc=a?"getUTCDate":"getDate";Ec=a?"getUTCMonth":"getMonth";Fc=a?"getUTCFullYear":"getFullYear";Cd=a?"setUTCMinutes":"setMinutes";Dd=a?"setUTCHours":"setHours";ed=a?"setUTCDate":"setDate";Ed=a?"setUTCMonth":"setMonth";Fd=a?"setUTCFullYear":"setFullYear"}function Gc(a){Hc||(Hc=ib(Qb));a&&Hc.appendChild(a);Hc.innerHTML=""}function Ic(){}function Gd(a,b){function c(m,i){function y(k,
+o){this.pos=k;this.minor=o;this.isNew=true;o||this.addLabel()}function x(k){if(k){this.options=k;this.id=k.id}return this}function Q(k,o,r){this.isNegative=o;this.options=k;this.x=r;this.alignOptions={align:k.align||(qa?o?"left":"right":"center"),verticalAlign:k.verticalAlign||(qa?"middle":o?"bottom":"top"),y:C(k.y,qa?4:o?14:-6),x:C(k.x,qa?o?-6:6:0)};this.textAlign=k.textAlign||(qa?o?"right":"left":"center")}function na(){var k=[],o=[],r;T=ra=null;Fa=[];u(Ia,function(q){r=false;u(["xAxis","yAxis"],
+function(ma){if(q.isCartesian&&(ma==="xAxis"&&Ga||ma==="yAxis"&&!Ga)&&(q.options[ma]===i.index||q.options[ma]===Va&&i.index===0)){q[ma]=v;Fa.push(q);r=true}});if(!q.visible&&w.ignoreHiddenSeries)r=false;if(r){var A,U,G,V,Ba;if(!Ga){A=q.options.stacking;Jc=A==="percent";if(A){V=q.type+C(q.options.stack,"");Ba="-"+V;q.stackKey=V;U=k[V]||[];k[V]=U;G=o[Ba]||[];o[Ba]=G}if(Jc){T=0;ra=99}}if(q.isCartesian){u(q.data,function(ma){var s=ma.x,W=ma.y,ba=W<0,ia=ba?G:U,zb=ba?Ba:V;if(T===null)T=ra=ma[$];if(Ga)if(s>
+ra)ra=s;else{if(s<T)T=s}else if(M(W)){if(A)ia[s]=M(ia[s])?ia[s]+W:W;W=ia?ia[s]:W;ma=C(ma.low,W);if(!Jc)if(W>ra)ra=W;else if(ma<T)T=ma;if(A){t[zb]||(t[zb]={});t[zb][s]||(t[zb][s]=new Q(i.stackLabels,ba,s));t[zb][s].setTotal(W)}}});if(/(area|column|bar)/.test(q.type)&&!Ga)if(T>=0){T=0;Hd=true}else if(ra<0){ra=0;Id=true}}}})}function O(k,o){var r,q;Fb=o?1:sa.pow(10,kb(sa.log(k)/sa.LN10));r=k/Fb;if(!o){o=[1,2,2.5,5,10];if(i.allowDecimals===false||H)if(Fb===1)o=[1,2,5,10];else if(Fb<=0.1)o=[1/Fb]}for(q=
+0;q<o.length;q++){k=o[q];if(r<=(o[q]+(o[q+1]||o[q]))/2)break}k*=Fb;return k}function ea(k){var o;o=k;Fb=C(Fb,sa.pow(10,kb(sa.log(Ta)/sa.LN10)));if(Fb<1){o=X(1/Fb)*10;o=X(k*o)/o}return o}function Ma(){var k,o,r,q,A=i.tickInterval,U=i.tickPixelInterval;k=i.maxZoom||(Ga&&!M(i.min)&&!M(i.max)?qb(m.smallestInterval*5,ra-T):null);oa=z?Ca:xa;if(Rb){r=m[Ga?"xAxis":"yAxis"][i.linkedTo];q=r.getExtremes();ca=C(q.min,q.dataMin);fa=C(q.max,q.dataMax)}else{ca=C(Ja,i.min,T);fa=C(Oa,i.max,ra)}if(H){ca=sa.log(ca)/
+sa.LN10;fa=sa.log(fa)/sa.LN10}if(fa-ca<k){q=(k-fa+ca)/2;ca=Ha(ca-q,C(i.min,ca-q),T);fa=qb(ca+k,C(i.max,ca+k),ra)}if(!Xa&&!Jc&&!Rb&&M(ca)&&M(fa)){k=fa-ca||1;if(!M(i.min)&&!M(Ja)&&Jd&&(T<0||!Hd))ca-=k*Jd;if(!M(i.max)&&!M(Oa)&&Kd&&(ra>0||!Id))fa+=k*Kd}Ta=ca===fa?1:Rb&&!A&&U===r.options.tickPixelInterval?r.tickInterval:C(A,Xa?1:(fa-ca)*U/oa);if(!F&&!M(i.tickInterval))Ta=O(Ta);v.tickInterval=Ta;Kc=i.minorTickInterval==="auto"&&Ta?Ta/5:i.minorTickInterval;if(F){ta=[];A=Wa.global.useUTC;var G=1E3/rb,V=6E4/
+rb,Ba=36E5/rb;U=864E5/rb;k=6048E5/rb;q=2592E6/rb;var ma=31556952E3/rb,s=[["second",G,[1,2,5,10,15,30]],["minute",V,[1,2,5,10,15,30]],["hour",Ba,[1,2,3,4,6,8,12]],["day",U,[1,2]],["week",k,[1,2]],["month",q,[1,2,3,4,6]],["year",ma,null]],W=s[6],ba=W[1],ia=W[2];for(r=0;r<s.length;r++){W=s[r];ba=W[1];ia=W[2];if(s[r+1])if(Ta<=(ba*ia[ia.length-1]+s[r+1][1])/2)break}if(ba===ma&&Ta<5*ba)ia=[1,2,5];s=O(Ta/ba,ia);ia=new Date(ca*rb);ia.setMilliseconds(0);if(ba>=G)ia.setSeconds(ba>=V?0:s*kb(ia.getSeconds()/
+s));if(ba>=V)ia[Cd](ba>=Ba?0:s*kb(ia[bd]()/s));if(ba>=Ba)ia[Dd](ba>=U?0:s*kb(ia[cd]()/s));if(ba>=U)ia[ed](ba>=q?1:s*kb(ia[sc]()/s));if(ba>=q){ia[Ed](ba>=ma?0:s*kb(ia[Ec]()/s));o=ia[Fc]()}if(ba>=ma){o-=o%s;ia[Fd](o)}ba===k&&ia[ed](ia[sc]()-ia[dd]()+i.startOfWeek);r=1;o=ia[Fc]();G=ia.getTime()/rb;V=ia[Ec]();for(Ba=ia[sc]();G<fa&&r<Ca;){ta.push(G);if(ba===ma)G=Dc(o+r*s,0)/rb;else if(ba===q)G=Dc(o,V+r*s)/rb;else if(!A&&(ba===U||ba===k))G=Dc(o,V,Ba+r*s*(ba===U?1:7));else G+=ba*s;r++}ta.push(G);Lc=i.dateTimeLabelFormats[W[0]]}else{r=
+ea(kb(ca/Ta)*Ta);o=ea(fd(fa/Ta)*Ta);ta=[];for(r=ea(r);r<=o;){ta.push(r);r=ea(r+Ta)}}if(!Rb){if(Xa||Ga&&m.hasColumn){o=(Xa?1:Ta)*0.5;if(Xa||!M(C(i.min,Ja)))ca-=o;if(Xa||!M(C(i.max,Oa)))fa+=o}o=ta[0];r=ta[ta.length-1];if(i.startOnTick)ca=o;else ca>o&&ta.shift();if(i.endOnTick)fa=r;else fa<r&&ta.pop();Mb||(Mb={x:0,y:0});if(!F&&ta.length>Mb[$])Mb[$]=ta.length}}function Aa(){var k,o;Gb=ca;Ld=fa;na();Ma();fb=ua;ua=oa/(fa-ca||1);if(!Ga)for(k in t)for(o in t[k])t[k][o].cum=t[k][o].total;if(!v.isDirty)v.isDirty=
+ca!==Gb||fa!==Ld}function Qa(k){k=(new x(k)).render();Sb.push(k);return k}function Ra(){var k=i.title,o=i.stackLabels,r=i.alternateGridColor,q=i.lineWidth,A,U,G=m.hasRendered,V=G&&M(Gb)&&!isNaN(Gb);A=Fa.length&&M(ca)&&M(fa);oa=z?Ca:xa;ua=oa/(fa-ca||1);eb=z?Y:sb;if(A||Rb){if(Kc&&!Xa)for(A=ca+(ta[0]-ca)%Kc;A<=fa;A+=Kc){Zb[A]||(Zb[A]=new y(A,true));V&&Zb[A].isNew&&Zb[A].render(null,true);Zb[A].isActive=true;Zb[A].render()}u(ta,function(s,W){if(!Rb||s>=ca&&s<=fa){V&&tb[s].isNew&&tb[s].render(W,true);
+tb[s].isActive=true;tb[s].render(W)}});r&&u(ta,function(s,W){if(W%2===0&&s<fa){fc[s]||(fc[s]=new x);fc[s].options={from:s,to:ta[W+1]!==Va?ta[W+1]:fa,color:r};fc[s].render();fc[s].isActive=true}});G||u((i.plotLines||[]).concat(i.plotBands||[]),function(s){Sb.push((new x(s)).render())})}u([tb,Zb,fc],function(s){for(var W in s)if(s[W].isActive)s[W].isActive=false;else{s[W].destroy();delete s[W]}});if(q){A=Y+(Ka?Ca:0)+P;U=Ua-sb-(Ka?xa:0)+P;A=ga.crispLine([ab,z?Y:A,z?U:ha,La,z?Ya-Hb:A,z?U:Ua-sb],q);if(ka)ka.animate({d:A});
+else ka=ga.path(A).attr({stroke:i.lineColor,"stroke-width":q,zIndex:7}).add()}if(v.axisTitle){A=z?Y:ha;q=ja(k.style.fontSize||12);A={low:A+(z?0:oa),middle:A+oa/2,high:A+(z?oa:0)}[k.align];q=(z?ha+xa:Y)+(z?1:-1)*(Ka?-1:1)*gd+(Z===2?q:0);v.axisTitle[G?"animate":"attr"]({x:z?A:q+(Ka?Ca:0)+P+(k.x||0),y:z?q-(Ka?xa:0)+P:A+(k.y||0)})}if(o&&o.enabled){var Ba,ma;o=v.stackTotalGroup;if(!o)v.stackTotalGroup=o=ga.g("stack-labels").attr({visibility:Ab,zIndex:6}).translate(Y,ha).add();for(Ba in t){k=t[Ba];for(ma in k)k[ma].render(o)}}v.isDirty=
+false}function Za(k){for(var o=Sb.length;o--;)Sb[o].id===k&&Sb[o].destroy()}var Ga=i.isX,Ka=i.opposite,z=qa?!Ga:Ga,Z=z?Ka?0:2:Ka?1:3,t={};i=va(Ga?Mc:hd,[Xd,Yd,Md,Zd][Z],i);var v=this,N=i.type,F=N==="datetime",H=N==="logarithmic",P=i.offset||0,$=Ga?"x":"y",oa,ua,fb,eb=z?Y:sb,Ib,Tb,gc,L,ka,T,ra,Fa,Ja,Oa,fa=null,ca=null,Gb,Ld,Jd=i.minPadding,Kd=i.maxPadding,Rb=M(i.linkedTo),Hd,Id,Jc;N=i.events;var id,Sb=[],Ta,Kc,Fb,ta,tb={},Zb={},fc={},hc,ic,gd,Lc,Xa=i.categories,$d=i.labels.formatter||function(){var k=
+this.value;return Lc?Nc(Lc,k):Ta%1E6===0?k/1E6+"M":Ta%1E3===0?k/1E3+"k":!Xa&&k>=1E3?zd(k,0):k},Oc=z&&i.labels.staggerLines,$b=i.reversed,ac=Xa&&i.tickmarkPlacement==="between"?0.5:0;y.prototype={addLabel:function(){var k=this.pos,o=i.labels,r=!(k===ca&&!C(i.showFirstLabel,1)||k===fa&&!C(i.showLastLabel,0)),q=Xa&&z&&Xa.length&&!o.step&&!o.staggerLines&&!o.rotation&&Ca/Xa.length||!z&&Ca/2,A=this.label;k=$d.call({isFirst:k===ta[0],isLast:k===ta[ta.length-1],dateTimeLabelFormat:Lc,value:Xa&&Xa[k]?Xa[k]:
+k});q=q&&{width:Ha(1,X(q-2*(o.padding||10)))+bb};q=pa(q,o.style);if(A===Va)this.label=M(k)&&r&&o.enabled?ga.text(k,0,0).attr({align:o.align,rotation:o.rotation}).css(q).add(gc):null;else A&&A.attr({text:k}).css(q)},getLabelSize:function(){var k=this.label;return k?(this.labelBBox=k.getBBox())[z?"height":"width"]:0},render:function(k,o){var r=!this.minor,q=this.label,A=this.pos,U=i.labels,G=this.gridLine,V=r?i.gridLineWidth:i.minorGridLineWidth,Ba=r?i.gridLineColor:i.minorGridLineColor,ma=r?i.gridLineDashStyle:
+i.minorGridLineDashStyle,s=this.mark,W=r?i.tickLength:i.minorTickLength,ba=r?i.tickWidth:i.minorTickWidth||0,ia=r?i.tickColor:i.minorTickColor,zb=r?i.tickPosition:i.minorTickPosition;r=U.step;var lb=o&&Pc||Ua,Nb;Nb=z?Ib(A+ac,null,null,o)+eb:Y+P+(Ka?(o&&jd||Ya)-Hb-Y:0);lb=z?lb-sb+P-(Ka?xa:0):lb-Ib(A+ac,null,null,o)-eb;if(V){A=Tb(A+ac,V,o);if(G===Va){G={stroke:Ba,"stroke-width":V};if(ma)G.dashstyle=ma;this.gridLine=G=V?ga.path(A).attr(G).add(L):null}G&&A&&G.animate({d:A})}if(ba){if(zb==="inside")W=
+-W;if(Ka)W=-W;V=ga.crispLine([ab,Nb,lb,La,Nb+(z?0:-W),lb+(z?W:0)],ba);if(s)s.animate({d:V});else this.mark=ga.path(V).attr({stroke:ia,"stroke-width":ba}).add(gc)}if(q&&!isNaN(Nb)){Nb=Nb+U.x-(ac&&z?ac*ua*($b?-1:1):0);lb=lb+U.y-(ac&&!z?ac*ua*($b?1:-1):0);M(U.y)||(lb+=ja(q.styles.lineHeight)*0.9-q.getBBox().height/2);if(Oc)lb+=k/(r||1)%Oc*16;if(r)q[k%r?"hide":"show"]();q[this.isNew?"attr":"animate"]({x:Nb,y:lb})}this.isNew=false},destroy:function(){for(var k in this)this[k]&&this[k].destroy&&this[k].destroy()}};
+x.prototype={render:function(){var k=this,o=k.options,r=o.label,q=k.label,A=o.width,U=o.to,G,V=o.from,Ba=o.dashStyle,ma=k.svgElem,s=[],W,ba,ia=o.color;ba=o.zIndex;var zb=o.events;if(A){s=Tb(o.value,A);o={stroke:ia,"stroke-width":A};if(Ba)o.dashstyle=Ba}else if(M(V)&&M(U)){V=Ha(V,ca);U=qb(U,fa);G=Tb(U);if((s=Tb(V))&&G)s.push(G[4],G[5],G[1],G[2]);else s=null;o={fill:ia}}else return;if(M(ba))o.zIndex=ba;if(ma)if(s)ma.animate({d:s},null,ma.onGetPath);else{ma.hide();ma.onGetPath=function(){ma.show()}}else if(s&&
+s.length){k.svgElem=ma=ga.path(s).attr(o).add();if(zb){Ba=function(lb){ma.on(lb,function(Nb){zb[lb].apply(k,[Nb])})};for(W in zb)Ba(W)}}if(r&&M(r.text)&&s&&s.length&&Ca>0&&xa>0){r=va({align:z&&G&&"center",x:z?!G&&4:10,verticalAlign:!z&&G&&"middle",y:z?G?16:10:G?6:-4,rotation:z&&!G&&90},r);if(!q)k.label=q=ga.text(r.text,0,0).attr({align:r.textAlign||r.align,rotation:r.rotation,zIndex:ba}).css(r.style).add();G=[s[1],s[4],C(s[6],s[1])];s=[s[2],s[5],C(s[7],s[2])];W=qb.apply(sa,G);ba=qb.apply(sa,s);q.align(r,
+false,{x:W,y:ba,width:Ha.apply(sa,G)-W,height:Ha.apply(sa,s)-ba});q.show()}else q&&q.hide();return k},destroy:function(){for(var k in this){this[k]&&this[k].destroy&&this[k].destroy();delete this[k]}qc(Sb,this)}};Q.prototype={setTotal:function(k){this.cum=this.total=k},render:function(k){var o=this.options.formatter.call(this);if(this.label)this.label.attr({text:o,visibility:ub});else this.label=m.renderer.text(o,0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation,
+visibility:ub}).add(k)},setOffset:function(k,o){var r=this.isNegative,q=v.translate(this.total),A=v.translate(0);A=$a(q-A);var U=m.xAxis[0].translate(this.x)+k,G=m.plotHeight;r={x:qa?r?q:q-A:U,y:qa?G-U-o:r?G-q-A:G-q,width:qa?A:o,height:qa?o:A};this.label&&this.label.align(this.alignOptions,null,r).attr({visibility:Ab})}};Ib=function(k,o,r,q,A){var U=1,G=0,V=q?fb:ua;q=q?Gb:ca;V||(V=ua);if(r){U*=-1;G=oa}if($b){U*=-1;G-=U*oa}if(o){if($b)k=oa-k;k=k/V+q;if(H&&A)k=sa.pow(10,k)}else{if(H&&A)k=sa.log(k)/
+sa.LN10;k=U*(k-q)*V+G}return k};Tb=function(k,o,r){var q,A,U;k=Ib(k,null,null,r);var G=r&&Pc||Ua,V=r&&jd||Ya,Ba;r=A=X(k+eb);q=U=X(G-k-eb);if(isNaN(k))Ba=true;else if(z){q=ha;U=G-sb;if(r<Y||r>Y+Ca)Ba=true}else{r=Y;A=V-Hb;if(q<ha||q>ha+xa)Ba=true}return Ba?null:ga.crispLine([ab,r,q,La,A,U],o||0)};if(qa&&Ga&&$b===Va)$b=true;pa(v,{addPlotBand:Qa,addPlotLine:Qa,adjustTickAmount:function(){if(Mb&&!F&&!Xa&&!Rb){var k=hc,o=ta.length;hc=Mb[$];if(o<hc){for(;ta.length<hc;)ta.push(ea(ta[ta.length-1]+Ta));ua*=
+(o-1)/(hc-1);fa=ta[ta.length-1]}if(M(k)&&hc!==k)v.isDirty=true}},categories:Xa,getExtremes:function(){return{min:ca,max:fa,dataMin:T,dataMax:ra,userMin:Ja,userMax:Oa}},getPlotLinePath:Tb,getThreshold:function(k){if(ca>k)k=ca;else if(fa<k)k=fa;return Ib(k,0,1)},isXAxis:Ga,options:i,plotLinesAndBands:Sb,getOffset:function(){var k=Fa.length&&M(ca)&&M(fa),o=0,r=0,q=i.title,A=i.labels,U=[-1,1,1,-1][Z],G;if(!gc){gc=ga.g("axis").attr({zIndex:7}).add();L=ga.g("grid").attr({zIndex:1}).add()}ic=0;if(k||Rb){u(ta,
+function(V){if(tb[V])tb[V].addLabel();else tb[V]=new y(V);if(Z===0||Z===2||{1:"left",3:"right"}[Z]===A.align)ic=Ha(tb[V].getLabelSize(),ic)});if(Oc)ic+=(Oc-1)*16}else for(G in tb){tb[G].destroy();delete tb[G]}if(q&&q.text){if(!v.axisTitle)v.axisTitle=ga.text(q.text,0,0).attr({zIndex:7,rotation:q.rotation||0,align:q.textAlign||{low:"left",middle:"center",high:"right"}[q.align]}).css(q.style).add();o=v.axisTitle.getBBox()[z?"height":"width"];r=C(q.margin,z?5:10)}P=U*(i.offset||Ub[Z]);gd=ic+(Z!==2&&
+ic&&U*i.labels[z?"y":"x"])+r;Ub[Z]=Ha(Ub[Z],gd+o+U*P)},render:Ra,setCategories:function(k,o){v.categories=Xa=k;u(Fa,function(r){r.translate();r.setTooltipPoints(true)});v.isDirty=true;C(o,true)&&m.redraw()},setExtremes:function(k,o,r,q){r=C(r,true);Pa(v,"setExtremes",{min:k,max:o},function(){Ja=k;Oa=o;r&&m.redraw(q)})},setScale:Aa,setTickPositions:Ma,translate:Ib,redraw:function(){jc.resetTracker&&jc.resetTracker();Ra();u(Sb,function(k){k.render()});u(Fa,function(k){k.isDirty=true})},removePlotBand:Za,
+removePlotLine:Za,reversed:$b,stacks:t});for(id in N)Sa(v,id,N[id]);Aa()}function d(){var m={};return{add:function(i,y,x,Q){if(!m[i]){y=ga.text(y,0,0).css(a.toolbar.itemStyle).align({align:"right",x:-Hb-20,y:ha+30}).on("click",Q).attr({align:"right",zIndex:20}).add();m[i]=y}},remove:function(i){Gc(m[i].element);m[i]=null}}}function e(m){function i(){var F=this.points||rc(this),H=F[0].series.xAxis,P=this.x;H=H&&H.options.type==="datetime";var $=Pb(P)||H,oa;oa=$?['<span style="font-size: 10px">'+(H?
+Nc("%A, %b %e, %Y",P):P)+"</span>"]:[];u(F,function(ua){oa.push(ua.point.tooltipFormatter($))});return oa.join("<br/>")}function y(F,H){z=Za?F:(2*z+F)/3;Z=Za?H:(Z+H)/2;t.translate(z,Z);kd=$a(F-z)>1||$a(H-Z)>1?function(){y(F,H)}:null}function x(){if(!Za){var F=p.hoverPoints;t.hide();u(ea,function(H){H&&H.hide()});F&&u(F,function(H){H.setState()});p.hoverPoints=null;Za=true}}var Q,na=m.borderWidth,O=m.crosshairs,ea=[],Ma=m.style,Aa=m.shared,Qa=ja(Ma.padding),Ra=na+Qa,Za=true,Ga,Ka,z=0,Z=0;Ma.padding=
+0;var t=ga.g("tooltip").attr({zIndex:8}).add(),v=ga.rect(Ra,Ra,0,0,m.borderRadius,na).attr({fill:m.backgroundColor,"stroke-width":na}).add(t).shadow(m.shadow),N=ga.text("",Qa+Ra,ja(Ma.fontSize)+Qa+Ra).attr({zIndex:1}).css(Ma).add(t);t.hide();return{shared:Aa,refresh:function(F){var H,P,$,oa=0,ua={},fb=[];$=F.tooltipPos;H=m.formatter||i;ua=p.hoverPoints;if(Aa){ua&&u(ua,function(eb){eb.setState()});p.hoverPoints=F;u(F,function(eb){eb.setState(Bb);oa+=eb.plotY;fb.push(eb.getLabelConfig())});P=F[0].plotX;
+oa=X(oa)/F.length;ua={x:F[0].category};ua.points=fb;F=F[0]}else ua=F.getLabelConfig();ua=H.call(ua);Q=F.series;P=Aa?P:F.plotX;oa=Aa?oa:F.plotY;H=X($?$[0]:qa?Ca-oa:P);P=X($?$[1]:qa?xa-P:oa);$=Aa||!F.series.isCartesian||kc(H,P);if(ua===false||!$)x();else{if(Za){t.show();Za=false}N.attr({text:ua});$=N.getBBox();Ga=$.width+2*Qa;Ka=$.height+2*Qa;v.attr({width:Ga,height:Ka,stroke:m.borderColor||F.color||Q.color||"#606060"});$=H-Ga+Y-25;P=P-Ka+ha+10;if($<7)$=Y+H+15;if(P<5)P=5;else if(P+Ka>Ua)P=Ua-Ka-5;y(X($-
+Ra),X(P-Ra))}if(O){O=rc(O);for(H=O.length;H--;){P=F.series[H?"yAxis":"xAxis"];if(O[H]&&P){P=P.getPlotLinePath(F[H?"y":"x"],1);if(ea[H])ea[H].attr({d:P,visibility:Ab});else{$={"stroke-width":O[H].width||1,stroke:O[H].color||"#C0C0C0",zIndex:2};if(O[H].dashStyle)$.dashstyle=O[H].dashStyle;ea[H]=ga.path(P).attr($).add()}}}}},hide:x}}function f(m,i){function y(z){var Z,t=Nd&&wa.width/wa.documentElement.clientWidth-1,v,N,F;z=z||cb.event;if(!z.target)z.target=z.srcElement;Z=z.touches?z.touches.item(0):
+z;if(z.type!=="mousemove"||cb.opera||t){v=ya;N={left:v.offsetLeft,top:v.offsetTop};for(v=v.offsetParent;v;){N.left+=v.offsetLeft;N.top+=v.offsetTop;if(v!==wa.body&&v!==wa.documentElement){N.left-=v.scrollLeft;N.top-=v.scrollTop}v=v.offsetParent}tc=N;v=tc.left;N=tc.top}if(Bc){F=z.x;Z=z.y}else if(Z.layerX===Va){F=Z.pageX-v;Z=Z.pageY-N}else{F=z.layerX;Z=z.layerY}if(t){F+=X((t+1)*v-v);Z+=X((t+1)*N-N)}return pa(z,{chartX:F,chartY:Z})}function x(z){var Z={xAxis:[],yAxis:[]};u(db,function(t){var v=t.translate,
+N=t.isXAxis;Z[N?"xAxis":"yAxis"].push({axis:t,value:v((qa?!N:N)?z.chartX-Y:xa-z.chartY+ha,true)})});return Z}function Q(){var z=m.hoverSeries,Z=m.hoverPoint;Z&&Z.onMouseOut();z&&z.onMouseOut();uc&&uc.hide();ld=null}function na(){if(Aa){var z={xAxis:[],yAxis:[]},Z=Aa.getBBox(),t=Z.x-Y,v=Z.y-ha;if(Ma){u(db,function(N){var F=N.translate,H=N.isXAxis,P=qa?!H:H,$=F(P?t:xa-v-Z.height,true,0,0,1);F=F(P?t+Z.width:xa-v,true,0,0,1);z[H?"xAxis":"yAxis"].push({axis:N,min:qb($,F),max:Ha($,F)})});Pa(m,"selection",
+z,md)}Aa=Aa.destroy()}m.mouseIsDown=nd=Ma=false;Cb(wa,Jb?"touchend":"mouseup",na)}var O,ea,Ma,Aa,Qa=w.zoomType,Ra=/x/.test(Qa),Za=/y/.test(Qa),Ga=Ra&&!qa||Za&&qa,Ka=Za&&!qa||Ra&&qa;Qc=function(){if(Rc){Rc.translate(Y,ha);qa&&Rc.attr({width:m.plotWidth,height:m.plotHeight}).invert()}else m.trackerGroup=Rc=ga.g("tracker").attr({zIndex:9}).add()};Qc();if(i.enabled)m.tooltip=uc=e(i);(function(){var z=true;ya.onmousedown=function(t){t=y(t);!Jb&&t.preventDefault&&t.preventDefault();m.mouseIsDown=nd=true;
+O=t.chartX;ea=t.chartY;Sa(wa,Jb?"touchend":"mouseup",na)};var Z=function(t){if(!(t&&t.touches&&t.touches.length>1)){t=y(t);if(!Jb)t.returnValue=false;var v=t.chartX,N=t.chartY,F=!kc(v-Y,N-ha);if(Jb&&t.type==="touchstart")if(Ea(t.target,"isTracker"))m.runTrackerClick||t.preventDefault();else!ae&&!F&&t.preventDefault();if(F){z||Q();if(v<Y)v=Y;else if(v>Y+Ca)v=Y+Ca;if(N<ha)N=ha;else if(N>ha+xa)N=ha+xa}if(nd&&t.type!=="touchstart"){Ma=Math.sqrt(Math.pow(O-v,2)+Math.pow(ea-N,2));if(Ma>10){if(lc&&(Ra||
+Za)&&kc(O-Y,ea-ha))Aa||(Aa=ga.rect(Y,ha,Ga?1:Ca,Ka?1:xa,0).attr({fill:"rgba(69,114,167,0.25)",zIndex:7}).add());if(Aa&&Ga){v=v-O;Aa.attr({width:$a(v),x:(v>0?0:v)+O})}if(Aa&&Ka){N=N-ea;Aa.attr({height:$a(N),y:(N>0?0:N)+ea})}}}else if(!F){var H;N=m.hoverPoint;v=m.hoverSeries;var P,$,oa=Ya,ua=qa?t.chartY:t.chartX-Y;if(uc&&i.shared){H=[];P=Ia.length;for($=0;$<P;$++)if(Ia[$].visible&&Ia[$].tooltipPoints.length){t=Ia[$].tooltipPoints[ua];t._dist=$a(ua-t.plotX);oa=qb(oa,t._dist);H.push(t)}for(P=H.length;P--;)H[P]._dist>
+oa&&H.splice(P,1);if(H.length&&H[0].plotX!==ld){uc.refresh(H);ld=H[0].plotX}}if(v&&v.tracker)(t=v.tooltipPoints[ua])&&t!==N&&t.onMouseOver()}return(z=F)||!lc}};ya.onmousemove=Z;Sa(ya,"mouseleave",Q);ya.ontouchstart=function(t){if(Ra||Za)ya.onmousedown(t);Z(t)};ya.ontouchmove=Z;ya.ontouchend=function(){Ma&&Q()};ya.onclick=function(t){var v=m.hoverPoint;t=y(t);t.cancelBubble=true;if(!Ma)if(v&&Ea(t.target,"isTracker")){var N=v.plotX,F=v.plotY;pa(v,{pageX:tc.left+Y+(qa?Ca-F:N),pageY:tc.top+ha+(qa?xa-
+N:F)});Pa(v.series,"click",pa(t,{point:v}));v.firePointEvent("click",t)}else{pa(t,x(t));kc(t.chartX-Y,t.chartY-ha)&&Pa(m,"click",t)}Ma=false}})();Od=setInterval(function(){kd&&kd()},32);pa(this,{zoomX:Ra,zoomY:Za,resetTracker:Q})}function g(m){var i=m.type||w.type||w.defaultSeriesType,y=vb[i],x=p.hasRendered;if(x)if(qa&&i==="column")y=vb.bar;else if(!qa&&i==="bar")y=vb.column;i=new y;i.init(p,m);if(!x&&i.inverted)qa=true;if(i.isCartesian)lc=i.isCartesian;Ia.push(i);return i}function h(){w.alignTicks!==
+false&&u(db,function(m){m.adjustTickAmount()});Mb=null}function j(m){var i=p.isDirtyLegend,y,x=p.isDirtyBox,Q=Ia.length,na=Q,O=p.clipRect;for(ec(m,p);na--;){m=Ia[na];if(m.isDirty&&m.options.stacking){y=true;break}}if(y)for(na=Q;na--;){m=Ia[na];if(m.options.stacking)m.isDirty=true}u(Ia,function(ea){if(ea.isDirty){ea.cleanData();ea.getSegments();if(ea.options.legendType==="point")i=true}});if(i&&od.renderLegend){od.renderLegend();p.isDirtyLegend=false}if(lc){if(!Sc){Mb=null;u(db,function(ea){ea.setScale()})}h();
+vc();u(db,function(ea){if(ea.isDirty||x){ea.redraw();x=true}})}if(x){pd();Qc();if(O){Tc(O);O.animate({width:p.plotSizeX,height:p.plotSizeY})}}u(Ia,function(ea){if(ea.isDirty&&ea.visible&&(!ea.isCartesian||ea.xAxis))ea.redraw()});jc&&jc.resetTracker&&jc.resetTracker();Pa(p,"redraw")}function l(){var m=a.xAxis||{},i=a.yAxis||{},y;m=rc(m);u(m,function(x,Q){x.index=Q;x.isX=true});i=rc(i);u(i,function(x,Q){x.index=Q});db=m.concat(i);p.xAxis=[];p.yAxis=[];db=mc(db,function(x){y=new c(p,x);p[y.isXAxis?"xAxis":
+"yAxis"].push(y);return y});h()}function n(m,i){Kb=va(a.title,m);wc=va(a.subtitle,i);u([["title",m,Kb],["subtitle",i,wc]],function(y){var x=y[0],Q=p[x],na=y[1];y=y[2];if(Q&&na){Q.destroy();Q=null}if(y&&y.text&&!Q)p[x]=ga.text(y.text,0,0).attr({align:y.align,"class":"highcharts-"+x,zIndex:1}).css(y.style).add().align(y,false,Ob)})}function J(){mb=w.renderTo;Pd=nc+qd++;if(Pb(mb))mb=wa.getElementById(mb);mb.innerHTML="";if(!mb.offsetWidth){Vb=mb.cloneNode(0);Na(Vb,{position:oc,top:"-9999px",display:""});
+wa.body.appendChild(Vb)}Uc=(Vb||mb).offsetWidth;xc=(Vb||mb).offsetHeight;p.chartWidth=Ya=w.width||Uc||600;p.chartHeight=Ua=w.height||(xc>19?xc:400);p.container=ya=ib(Qb,{className:"highcharts-container"+(w.className?" "+w.className:""),id:Pd},pa({position:Qd,overflow:ub,width:Ya+bb,height:Ua+bb,textAlign:"left"},w.style),Vb||mb);p.renderer=ga=w.forExport?new Vc(ya,Ya,Ua,true):new Wc(ya,Ya,Ua);var m,i;if(Rd&&ya.getBoundingClientRect){m=function(){Na(ya,{left:0,top:0});i=ya.getBoundingClientRect();
+Na(ya,{left:-(i.left-ja(i.left))+bb,top:-(i.top-ja(i.top))+bb})};m();Sa(cb,"resize",m);Sa(p,"destroy",function(){Cb(cb,"resize",m)})}}function D(){function m(){var y=w.width||mb.offsetWidth,x=w.height||mb.offsetHeight;if(y&&x){if(y!==Uc||x!==xc){clearTimeout(i);i=setTimeout(function(){rd(y,x,false)},100)}Uc=y;xc=x}}var i;Sa(cb,"resize",m);Sa(p,"destroy",function(){Cb(cb,"resize",m)})}function aa(){var m=a.labels,i=a.credits,y;n();od=p.legend=new be(p);vc();u(db,function(x){x.setTickPositions(true)});
+h();vc();pd();lc&&u(db,function(x){x.render()});if(!p.seriesGroup)p.seriesGroup=ga.g("series-group").attr({zIndex:3}).add();u(Ia,function(x){x.translate();x.setTooltipPoints();x.render()});m.items&&u(m.items,function(){var x=pa(m.style,this.style),Q=ja(x.left)+Y,na=ja(x.top)+ha+12;delete x.left;delete x.top;ga.text(this.html,Q,na).attr({zIndex:2}).css(x).add()});if(!p.toolbar)p.toolbar=d(p);if(i.enabled&&!p.credits){y=i.href;ga.text(i.text,0,0).on("click",function(){if(y)location.href=y}).attr({align:i.position.align,
+zIndex:8}).css(i.style).add().align(i.position)}Qc();p.hasRendered=true;if(Vb){mb.appendChild(ya);Gc(Vb)}}function E(){var m=Ia.length,i=ya&&ya.parentNode;Pa(p,"destroy");Cb(cb,"unload",E);Cb(p);for(u(db,function(y){Cb(y)});m--;)Ia[m].destroy();if(ya){ya.innerHTML="";Cb(ya);i&&i.removeChild(ya);ya=null}if(ga)ga.alignedObjects=null;clearInterval(Od);for(m in p)delete p[m]}function da(){if(!yc&&cb==cb.top&&wa.readyState!=="complete")wa.attachEvent("onreadystatechange",function(){wa.detachEvent("onreadystatechange",
+da);wa.readyState==="complete"&&da()});else{J();sd();td();u(a.series||[],function(m){g(m)});p.inverted=qa=C(qa,a.chart.inverted);l();p.render=aa;p.tracker=jc=new f(p,a.tooltip);aa();Pa(p,"load");b&&b.apply(p,[p]);u(p.callbacks,function(m){m.apply(p,[p])})}}Mc=va(Mc,Wa.xAxis);hd=va(hd,Wa.yAxis);Wa.xAxis=Wa.yAxis=null;a=va(Wa,a);var w=a.chart,R=w.margin;R=Lb(R)?R:[R,R,R,R];var B=C(w.marginTop,R[0]),K=C(w.marginRight,R[1]),S=C(w.marginBottom,R[2]),I=C(w.marginLeft,R[3]),za=w.spacingTop,Da=w.spacingRight,
+gb=w.spacingBottom,wb=w.spacingLeft,Ob,Kb,wc,ha,Hb,sb,Y,Ub,mb,Vb,ya,Pd,Uc,xc,Ya,Ua,jd,Pc,Xc,ud,vd,Yc,p=this,ae=(R=w.events)&&!!R.click,wd,kc,uc,nd,bc,Sd,xd,xa,Ca,jc,Rc,Qc,od,Wb,Xb,tc,lc=w.showAxes,Sc=0,db=[],Mb,Ia=[],qa,ga,kd,Od,ld,pd,vc,sd,td,rd,md,Td,be=function(m){function i(L,ka){var T=L.legendItem,ra=L.legendLine,Fa=L.legendSymbol,Ja=Ka.color,Oa=ka?O.itemStyle.color:Ja,fa=ka?L.color:Ja;Ja=ka?L.pointAttr[hb]:{stroke:Ja,fill:Ja};T&&T.css({fill:Oa});ra&&ra.attr({stroke:fa});Fa&&Fa.attr(Ja)}function y(L,
+ka,T){var ra=L.legendItem,Fa=L.legendLine,Ja=L.legendSymbol;L=L.checkbox;ra&&ra.attr({x:ka,y:T});Fa&&Fa.translate(ka,T-4);Ja&&Ja.attr({x:ka+Ja.xOff,y:T+Ja.yOff});if(L){L.x=ka;L.y=T}}function x(){u(Qa,function(L){var ka=L.checkbox,T=fb.alignAttr;ka&&Na(ka,{left:T.translateX+L.legendItemWidth+ka.x-40+bb,top:T.translateY+ka.y-11+bb})})}function Q(L){var ka,T,ra,Fa,Ja=L.legendItem;Fa=L.series||L;var Oa=Fa.options,fa=Oa&&Oa.borderWidth||0;if(!Ja){Fa=/^(bar|pie|area|column)$/.test(Fa.type);L.legendItem=
+Ja=ga.text(O.labelFormatter.call(L),0,0).css(L.visible?Za:Ka).on("mouseover",function(){L.setState(Bb);Ja.css(Ga)}).on("mouseout",function(){Ja.css(L.visible?Za:Ka);L.setState()}).on("click",function(){var Gb=function(){L.setVisible()};L.firePointEvent?L.firePointEvent("legendItemClick",null,Gb):Pa(L,"legendItemClick",null,Gb)}).attr({zIndex:2}).add(fb);if(!Fa&&Oa&&Oa.lineWidth){var ca={"stroke-width":Oa.lineWidth,zIndex:2};if(Oa.dashStyle)ca.dashstyle=Oa.dashStyle;L.legendLine=ga.path([ab,-Ma-Aa,
+0,La,-Aa,0]).attr(ca).add(fb)}if(Fa)ka=ga.rect(T=-Ma-Aa,ra=-11,Ma,12,2).attr({zIndex:3}).add(fb);else if(Oa&&Oa.marker&&Oa.marker.enabled)ka=ga.symbol(L.symbol,T=-Ma/2-Aa,ra=-4,Oa.marker.radius).attr({zIndex:3}).add(fb);if(ka){ka.xOff=T+fa%2/2;ka.yOff=ra+fa%2/2}L.legendSymbol=ka;i(L,L.visible);if(Oa&&Oa.showCheckbox){L.checkbox=ib("input",{type:"checkbox",checked:L.selected,defaultChecked:L.selected},O.itemCheckboxStyle,ya);Sa(L.checkbox,"click",function(Gb){Pa(L,"checkboxClick",{checked:Gb.target.checked},
+function(){L.select()})})}}ka=Ja.getBBox();T=L.legendItemWidth=O.itemWidth||Ma+Aa+ka.width+Z;P=ka.height;if(ea&&N-v+T>(Ib||Ya-2*z-v)){N=v;F+=P}H=F;y(L,N,F);if(ea)N+=T;else F+=P;eb=Ib||Ha(ea?N-v:T,eb)}function na(){N=v;F=t;H=eb=0;fb||(fb=ga.g("legend").attr({zIndex:7}).add());Qa=[];u(Tb,function(ra){var Fa=ra.options;if(Fa.showInLegend)Qa=Qa.concat(Fa.legendType==="point"?ra.data:ra)});Qa.sort(function(ra,Fa){return(ra.options.legendIndex||0)-(Fa.options.legendIndex||0)});gc&&Qa.reverse();u(Qa,Q);
+Wb=Ib||eb;Xb=H-t+P;if(oa||ua){Wb+=2*z;Xb+=2*z;if($)Wb>0&&Xb>0&&$.animate($.crisp(null,null,null,Wb,Xb));else $=ga.rect(0,0,Wb,Xb,O.borderRadius,oa||0).attr({stroke:O.borderColor,"stroke-width":oa||0,fill:ua||jb}).add(fb).shadow(O.shadow);$[Qa.length?"show":"hide"]()}for(var L=["left","right","top","bottom"],ka,T=4;T--;){ka=L[T];if(Ra[ka]&&Ra[ka]!=="auto"){O[T<2?"align":"verticalAlign"]=ka;O[T<2?"x":"y"]=ja(Ra[ka])*(T%2?-1:1)}}fb.align(pa(O,{width:Wb,height:Xb}),true,Ob);Sc||x()}var O=m.options.legend;
+if(O.enabled){var ea=O.layout==="horizontal",Ma=O.symbolWidth,Aa=O.symbolPadding,Qa,Ra=O.style,Za=O.itemStyle,Ga=O.itemHoverStyle,Ka=O.itemHiddenStyle,z=ja(Ra.padding),Z=20,t=18,v=4+z+Ma+Aa,N,F,H,P=0,$,oa=O.borderWidth,ua=O.backgroundColor,fb,eb,Ib=O.width,Tb=m.series,gc=O.reversed;na();Sa(m,"endResize",x);return{colorizeItem:i,destroyItem:function(L){var ka=L.checkbox;u(["legendItem","legendLine","legendSymbol"],function(T){L[T]&&L[T].destroy()});ka&&Gc(L.checkbox)},renderLegend:na}}};kc=function(m,
+i){return m>=0&&m<=Ca&&i>=0&&i<=xa};Td=function(){Pa(p,"selection",{resetSelection:true},md);p.toolbar.remove("zoom")};md=function(m){var i=Wa.lang,y=p.pointCount<100;p.toolbar.add("zoom",i.resetZoom,i.resetZoomTitle,Td);!m||m.resetSelection?u(db,function(x){x.setExtremes(null,null,false,y)}):u(m.xAxis.concat(m.yAxis),function(x){var Q=x.axis;if(p.tracker[Q.isXAxis?"zoomX":"zoomY"])Q.setExtremes(x.min,x.max,false,y)});j()};vc=function(){var m=a.legend,i=C(m.margin,10),y=m.x,x=m.y,Q=m.align,na=m.verticalAlign,
+O;sd();if((p.title||p.subtitle)&&!M(B))if(O=Ha(p.title&&!Kb.floating&&!Kb.verticalAlign&&Kb.y||0,p.subtitle&&!wc.floating&&!wc.verticalAlign&&wc.y||0))ha=Ha(ha,O+C(Kb.margin,15)+za);if(m.enabled&&!m.floating)if(Q==="right")M(K)||(Hb=Ha(Hb,Wb-y+i+Da));else if(Q==="left")M(I)||(Y=Ha(Y,Wb+y+i+wb));else if(na==="top")M(B)||(ha=Ha(ha,Xb+x+i+za));else if(na==="bottom")M(S)||(sb=Ha(sb,Xb-x+i+gb));lc&&u(db,function(ea){ea.getOffset()});M(I)||(Y+=Ub[3]);M(B)||(ha+=Ub[0]);M(S)||(sb+=Ub[2]);M(K)||(Hb+=Ub[1]);
+td()};rd=function(m,i,y){var x=p.title,Q=p.subtitle;Sc+=1;ec(y,p);Pc=Ua;jd=Ya;p.chartWidth=Ya=X(m);p.chartHeight=Ua=X(i);Na(ya,{width:Ya+bb,height:Ua+bb});ga.setSize(Ya,Ua,y);Ca=Ya-Y-Hb;xa=Ua-ha-sb;Mb=null;u(db,function(na){na.isDirty=true;na.setScale()});u(Ia,function(na){na.isDirty=true});p.isDirtyLegend=true;p.isDirtyBox=true;vc();x&&x.align(null,null,Ob);Q&&Q.align(null,null,Ob);j(y);Pc=null;Pa(p,"resize");setTimeout(function(){Pa(p,"endResize",null,function(){Sc-=1})},Cc&&Cc.duration||500)};
+td=function(){p.plotLeft=Y=X(Y);p.plotTop=ha=X(ha);p.plotWidth=Ca=X(Ya-Y-Hb);p.plotHeight=xa=X(Ua-ha-sb);p.plotSizeX=qa?xa:Ca;p.plotSizeY=qa?Ca:xa;Ob={x:wb,y:za,width:Ya-wb-Da,height:Ua-za-gb}};sd=function(){ha=C(B,za);Hb=C(K,Da);sb=C(S,gb);Y=C(I,wb);Ub=[0,0,0,0]};pd=function(){var m=w.borderWidth||0,i=w.backgroundColor,y=w.plotBackgroundColor,x=w.plotBackgroundImage,Q,na={x:Y,y:ha,width:Ca,height:xa};Q=m+(w.shadow?8:0);if(m||i)if(Xc)Xc.animate(Xc.crisp(null,null,null,Ya-Q,Ua-Q));else Xc=ga.rect(Q/
+2,Q/2,Ya-Q,Ua-Q,w.borderRadius,m).attr({stroke:w.borderColor,"stroke-width":m,fill:i||jb}).add().shadow(w.shadow);if(y)if(ud)ud.animate(na);else ud=ga.rect(Y,ha,Ca,xa,0).attr({fill:y}).add().shadow(w.plotShadow);if(x)if(vd)vd.animate(na);else vd=ga.image(x,Y,ha,Ca,xa).add();if(w.plotBorderWidth)if(Yc)Yc.animate(Yc.crisp(null,Y,ha,Ca,xa));else Yc=ga.rect(Y,ha,Ca,xa,0,w.plotBorderWidth).attr({stroke:w.plotBorderColor,"stroke-width":w.plotBorderWidth,zIndex:4}).add();p.isDirtyBox=false};Sa(cb,"unload",
+E);w.reflow!==false&&Sa(p,"load",D);if(R)for(wd in R)Sa(p,wd,R[wd]);p.options=a;p.series=Ia;p.addSeries=function(m,i,y){var x;if(m){ec(y,p);i=C(i,true);Pa(p,"addSeries",{options:m},function(){x=g(m);x.isDirty=true;p.isDirtyLegend=true;i&&p.redraw()})}return x};p.animation=C(w.animation,true);p.destroy=E;p.get=function(m){var i,y,x;for(i=0;i<db.length;i++)if(db[i].options.id===m)return db[i];for(i=0;i<Ia.length;i++)if(Ia[i].options.id===m)return Ia[i];for(i=0;i<Ia.length;i++){x=Ia[i].data;for(y=0;y<
+x.length;y++)if(x[y].id===m)return x[y]}return null};p.getSelectedPoints=function(){var m=[];u(Ia,function(i){m=m.concat(yd(i.data,function(y){return y.selected}))});return m};p.getSelectedSeries=function(){return yd(Ia,function(m){return m.selected})};p.hideLoading=function(){Zc(bc,{opacity:0},{duration:a.loading.hideDuration,complete:function(){Na(bc,{display:jb})}});xd=false};p.isInsidePlot=kc;p.redraw=j;p.setSize=rd;p.setTitle=n;p.showLoading=function(m){var i=a.loading;if(!bc){bc=ib(Qb,{className:"highcharts-loading"},
+pa(i.style,{left:Y+bb,top:ha+bb,width:Ca+bb,height:xa+bb,zIndex:10,display:jb}),ya);Sd=ib("span",null,i.labelStyle,bc)}Sd.innerHTML=m||a.lang.loading;if(!xd){Na(bc,{opacity:0,display:""});Zc(bc,{opacity:i.style.opacity},{duration:i.showDuration});xd=true}};p.pointCount=0;p.counters=new Ad;da()}var wa=document,cb=window,sa=Math,X=sa.round,kb=sa.floor,fd=sa.ceil,Ha=sa.max,qb=sa.min,$a=sa.abs,nb=sa.cos,Db=sa.sin,cc=sa.PI,Ud=cc*2/360,pc=navigator.userAgent,Bc=/msie/i.test(pc)&&!cb.opera,zc=wa.documentMode===
+8,Nd=/AppleWebKit/.test(pc),Rd=/Firefox/.test(pc),yc=!!wa.createElementNS&&!!wa.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,Wc,Jb=wa.documentElement.ontouchstart!==undefined,Vd={},qd=0,rb=1,Hc,Wa,Nc,Cc,$c,Va,Qb="div",oc="absolute",Qd="relative",ub="hidden",nc="highcharts-",Ab="visible",bb="px",jb="none",ab="M",La="L",Wd="rgba(192,192,192,"+(yc?1.0E-6:0.0020)+")",hb="",Bb="hover",Dc,bd,cd,dd,sc,Ec,Fc,Cd,Dd,ed,Ed,Fd,la=cb.HighchartsAdapter,Eb=la||{},u=Eb.each,yd=Eb.grep,mc=Eb.map,
+va=Eb.merge,Sa=Eb.addEvent,Cb=Eb.removeEvent,Pa=Eb.fireEvent,Zc=Eb.animate,Tc=Eb.stop,vb={};Nc=function(a,b,c){function d(D){return D.toString().replace(/^([0-9])$/,"0$1")}if(!M(b)||isNaN(b))return"Invalid date";a=C(a,"%Y-%m-%d %H:%M:%S");b=new Date(b*rb);var e,f=b[cd](),g=b[dd](),h=b[sc](),j=b[Ec](),l=b[Fc](),n=Wa.lang,J=n.weekdays;n=n.months;b={a:J[g].substr(0,3),A:J[g],d:d(h),e:h,b:n[j].substr(0,3),B:n[j],m:d(j+1),y:l.toString().substr(2,2),Y:l,H:d(f),I:d(f%12||12),l:f%12||12,M:d(b[bd]()),p:f<
+12?"AM":"PM",P:f<12?"am":"pm",S:d(b.getSeconds())};for(e in b)a=a.replace("%"+e,b[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};Ad.prototype={wrapColor:function(a){if(this.color>=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};la&&la.init&&la.init();if(!la&&cb.jQuery){var ob=jQuery;u=function(a,b){for(var c=0,d=a.length;c<d;c++)if(b.call(a[c],a[c],c,a)===false)return c};yd=ob.grep;mc=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)c[d]=b.call(a[d],a[d],d,a);return c};
+va=function(){var a=arguments;return ob.extend(true,null,a[0],a[1],a[2],a[3])};Sa=function(a,b,c){ob(a).bind(b,c)};Cb=function(a,b,c){var d=wa.removeEventListener?"removeEventListener":"detachEvent";if(wa[d]&&!a[d])a[d]=function(){};ob(a).unbind(b,c)};Pa=function(a,b,c,d){var e=ob.Event(b),f="detached"+b;pa(e,c);if(a[b]){a[f]=a[b];a[b]=null}ob(a).trigger(e);if(a[f]){a[b]=a[f];a[f]=null}d&&!e.isDefaultPrevented()&&d(e)};Zc=function(a,b,c){var d=ob(a);if(b.d){a.toD=b.d;b.d=1}d.stop();d.animate(b,c)};
+Tc=function(a){ob(a).stop()};ob.extend(ob.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});var ce=jQuery.fx.step._default,de=jQuery.fx.prototype.cur;ob.fx.step._default=function(a){var b=a.elem;b.attr?b.attr(a.prop,a.now):ce.apply(this,arguments)};ob.fx.step.d=function(a){var b=a.elem;if(!a.started){var c=$c.init(b,b.d,b.toD);a.start=c[0];a.end=c[1];a.started=true}b.attr("d",$c.step(a.start,a.end,a.pos,b.toD))};ob.fx.prototype.cur=function(){var a=this.elem;return a.attr?a.attr(this.prop):
+de.apply(this,arguments)}}$c={init:function(a,b,c){b=b||"";var d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g;b=b.split(" ");c=[].concat(c);var h,j,l=function(n){for(g=n.length;g--;)n[g]===ab&&n.splice(g+1,0,n[g+1],n[g+2],n[g+1],n[g+2])};if(e){l(b);l(c)}if(a.isArea){h=b.splice(b.length-6,6);j=c.splice(c.length-6,6)}if(d){c=[].concat(c).splice(0,f).concat(c);a.shift=false}if(b.length)for(a=c.length;b.length<a;){d=[].concat(b).splice(b.length-f,f);if(e){d[f-6]=d[f-2];d[f-5]=d[f-1]}b=b.concat(d)}if(h){b=b.concat(h);
+c=c.concat(j)}return[b,c]},step:function(a,b,c,d){var e=[],f=a.length;if(c===1)e=d;else if(f===b.length&&c<1)for(;f--;){d=parseFloat(a[f]);e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d}else e=b;return e}};la={enabled:true,align:"center",x:0,y:15,style:{color:"#666",fontSize:"11px",lineHeight:"14px"}};Wa={colors:["#4572A7","#AA4643","#89A54E","#80699B","#3D96AE","#DB843D","#92A8CD","#A47D7C","#B5CA92"],symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January",
+"February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:true},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:true,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',
+fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0"},title:{text:"Chart title",align:"center",y:15,style:{color:"#3E576F",fontSize:"16px"}},subtitle:{text:"",align:"center",y:30,style:{color:"#6D869F"}},plotOptions:{line:{allowPointSelect:false,showCheckbox:false,animation:{duration:1E3},events:{},lineWidth:2,shadow:true,marker:{enabled:true,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:va(la,
+{enabled:false,y:-6,formatter:function(){return this.y}}),showInLegend:true,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:true}},labels:{style:{position:oc,color:"#3E576F"}},legend:{enabled:true,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,shadow:false,style:{padding:"5px"},itemStyle:{cursor:"pointer",color:"#3E576F"},itemHoverStyle:{cursor:"pointer",color:"#000000"},itemHiddenStyle:{color:"#C0C0C0"},
+itemCheckboxStyle:{position:oc,width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0},loading:{hideDuration:100,labelStyle:{fontWeight:"bold",position:Qd,top:"1em"},showDuration:100,style:{position:oc,backgroundColor:"white",opacity:0.5,textAlign:"center"}},tooltip:{enabled:true,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:2,borderRadius:5,shadow:true,snap:Jb?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},toolbar:{itemStyle:{color:"#4572A7",
+cursor:"pointer"}},credits:{enabled:true,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var Mc={dateTimeLabelFormats:{second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:false,gridLineColor:"#C0C0C0",labels:la,lineColor:"#C0D0E0",lineWidth:1,max:null,min:null,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",
+minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:false,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#6D869F",fontWeight:"bold"}},type:"linear"},hd=va(Mc,{endOnTick:true,gridLineWidth:1,tickPixelInterval:72,showLastLabel:true,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:true,tickWidth:0,
+title:{rotation:270,text:"Y-values"},stackLabels:{enabled:false,formatter:function(){return this.total},style:la.style}}),Zd={labels:{align:"right",x:-8,y:null},title:{rotation:270}},Yd={labels:{align:"left",x:8,y:null},title:{rotation:90}},Md={labels:{align:"center",x:0,y:14},title:{rotation:0}},Xd=va(Md,{labels:{y:-5}}),xb=Wa.plotOptions;la=xb.line;xb.spline=va(la);xb.scatter=va(la,{lineWidth:0,states:{hover:{lineWidth:0}}});xb.area=va(la,{});xb.areaspline=va(xb.area);xb.column=va(la,{borderColor:"#FFFFFF",
+borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,states:{hover:{brightness:0.1,shadow:false},select:{color:"#C0C0C0",borderColor:"#000000",shadow:false}},dataLabels:{y:null,verticalAlign:null}});xb.bar=va(xb.column,{dataLabels:{align:"left",x:5,y:0}});xb.pie=va(la,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:true,dataLabels:{distance:30,enabled:true,formatter:function(){return this.point.name},y:5},legendType:"point",marker:null,
+size:"75%",showInLegend:false,slicedOffset:10,states:{hover:{brightness:0.1,shadow:false}}});Bd();var Yb=function(a){var b=[],c;(function(d){if(c=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(d))b=[ja(c[1]),ja(c[2]),ja(c[3]),parseFloat(c[4],10)];else if(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(d))b=[ja(c[1],16),ja(c[2],16),ja(c[3],16),1]})(a);return{get:function(d){return b&&!isNaN(b[0])?d==="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+
+")":d==="a"?b[3]:"rgba("+b.join(",")+")":a},brighten:function(d){if(dc(d)&&d!==0){var e;for(e=0;e<3;e++){b[e]+=ja(d*255);if(b[e]<0)b[e]=0;if(b[e]>255)b[e]=255}}return this},setOpacity:function(d){b[3]=d;return this}}};Ic.prototype={init:function(a,b){this.element=wa.createElementNS("http://www.w3.org/2000/svg",b);this.renderer=a},animate:function(a,b,c){if(b=C(b,Cc,true)){b=va(b);if(c)b.complete=c;Zc(this,a,b)}else{this.attr(a);c&&c()}},attr:function(a,b){var c,d,e,f,g=this.element,h=g.nodeName,j=
+this.renderer,l,n=this.shadows,J,D=this;if(Pb(a)&&M(b)){c=a;a={};a[c]=b}if(Pb(a)){c=a;if(h==="circle")c={x:"cx",y:"cy"}[c]||c;else if(c==="strokeWidth")c="stroke-width";D=Ea(g,c)||this[c]||0;if(c!=="d"&&c!=="visibility")D=parseFloat(D)}else for(c in a){l=false;d=a[c];if(c==="d"){if(d&&d.join)d=d.join(" ");if(/(NaN| {2}|^$)/.test(d))d="M 0 0";this.d=d}else if(c==="x"&&h==="text"){for(e=0;e<g.childNodes.length;e++){f=g.childNodes[e];Ea(f,"x")===Ea(g,"x")&&Ea(f,"x",d)}if(this.rotation)Ea(g,"transform",
+"rotate("+this.rotation+" "+d+" "+ja(a.y||Ea(g,"y"))+")")}else if(c==="fill")d=j.color(d,g,c);else if(h==="circle"&&(c==="x"||c==="y"))c={x:"cx",y:"cy"}[c]||c;else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="verticalAlign"){this[c]=d;this.updateTransform();l=true}else if(c==="stroke")d=j.color(d,g,c);else if(c==="dashstyle"){c="stroke-dasharray";d=d&&d.toLowerCase();if(d==="solid")d=jb;else if(d){d=d.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot",
+"1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=d.length;e--;)d[e]=ja(d[e])*a["stroke-width"];d=d.join(",")}}else if(c==="isTracker")this[c]=d;else if(c==="width")d=ja(d);else if(c==="align"){c="text-anchor";d={left:"start",center:"middle",right:"end"}[d]}if(c==="strokeWidth")c="stroke-width";if(Nd&&c==="stroke-width"&&d===0)d=1.0E-6;if(this.symbolName&&/^(x|y|r|start|end|innerR)/.test(c)){if(!J){this.symbolAttr(a);
+J=true}l=true}if(n&&/^(width|height|visibility|x|y|d)$/.test(c))for(e=n.length;e--;)Ea(n[e],c,d);if((c==="width"||c==="height")&&h==="rect"&&d<0)d=0;if(c==="text"){this.textStr=d;this.added&&j.buildText(this)}else l||Ea(g,c,d)}return D},symbolAttr:function(a){var b=this;u(["x","y","r","start","end","width","height","innerR"],function(c){b[c]=C(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](X(b.x*2)/2,X(b.y*2)/2,b.r,{start:b.start,end:b.end,width:b.width,height:b.height,innerR:b.innerR})})},
+clip:function(a){return this.attr("clip-path","url("+this.renderer.url+"#"+a.id+")")},crisp:function(a,b,c,d,e){var f,g={},h={},j;a=a||this.strokeWidth||0;j=a%2/2;h.x=kb(b||this.x||0)+j;h.y=kb(c||this.y||0)+j;h.width=kb((d||this.width||0)-2*j);h.height=kb((e||this.height||0)-2*j);h.strokeWidth=a;for(f in h)if(this[f]!==h[f])this[f]=g[f]=h[f];return g},css:function(a){var b=this.element;b=a&&a.width&&b.nodeName==="text";var c,d="",e=function(f,g){return"-"+g.toLowerCase()};if(a&&a.color)a.fill=a.color;
+this.styles=a=pa(this.styles,a);if(Bc&&!yc){b&&delete a.width;Na(this.element,a)}else{for(c in a)d+=c.replace(/([A-Z])/g,e)+":"+a[c]+";";this.attr({style:d})}b&&this.added&&this.renderer.buildText(this);return this},on:function(a,b){var c=b;if(Jb&&a==="click"){a="touchstart";c=function(d){d.preventDefault();b()}}this.element["on"+a]=c;return this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(){this.inverted=true;this.updateTransform();return this},updateTransform:function(){var a=
+this.translateX||0,b=this.translateY||0,c=this.inverted,d=this.rotation,e=[];if(c){a+=this.attr("width");b+=this.attr("height")}if(a||b)e.push("translate("+a+","+b+")");if(c)e.push("rotate(90) scale(-1,1)");else d&&e.push("rotate("+d+" "+this.x+" "+this.y+")");e.length&&Ea(this.element,"transform",e.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){if(a){this.alignOptions=a;this.alignByTranslate=b;c||this.renderer.alignedObjects.push(this)}else{a=
+this.alignOptions;b=this.alignByTranslate}c=C(c,this.renderer);var d=a.align,e=a.verticalAlign,f=(c.x||0)+(a.x||0),g=(c.y||0)+(a.y||0),h={};if(/^(right|center)$/.test(d))f+=(c.width-(a.width||0))/{right:1,center:2}[d];h[b?"translateX":"x"]=X(f);if(/^(bottom|middle)$/.test(e))g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1);h[b?"translateY":"y"]=X(g);this[this.placed?"animate":"attr"](h);this.placed=true;this.alignAttr=h;return this},getBBox:function(){var a,b,c,d=this.rotation,e=d*Ud;try{a=
+pa({},this.element.getBBox())}catch(f){a={width:0,height:0}}b=a.width;c=a.height;if(d){a.width=$a(c*Db(e))+$a(b*nb(e));a.height=$a(c*nb(e))+$a(b*Db(e))}return a},show:function(){return this.attr({visibility:Ab})},hide:function(){return this.attr({visibility:ub})},add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=d.childNodes,f=this.element,g=Ea(f,"zIndex");this.parentInverted=a&&a.inverted;this.textStr!==undefined&&b.buildText(this);if(g){c.handleZ=true;g=ja(g)}if(c.handleZ)for(c=0;c<
+e.length;c++){a=e[c];b=Ea(a,"zIndex");if(a!==f&&(ja(b)>g||!M(g)&&M(b))){d.insertBefore(f,a);return this}}d.appendChild(f);this.added=true;return this},destroy:function(){var a=this.element||{},b=this.shadows,c=a.parentNode,d;a.onclick=a.onmouseout=a.onmouseover=a.onmousemove=null;Tc(this);c&&c.removeChild(a);b&&u(b,function(e){(c=e.parentNode)&&c.removeChild(e)});qc(this.renderer.alignedObjects,this);for(d in this)delete this[d];return null},empty:function(){for(var a=this.element,b=a.childNodes,
+c=b.length;c--;)a.removeChild(b[c])},shadow:function(a,b){var c=[],d,e,f=this.element,g=this.parentInverted?"(-1,-1)":"(1,1)";if(a){for(d=1;d<=3;d++){e=f.cloneNode(0);Ea(e,{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":0.05*d,"stroke-width":7-2*d,transform:"translate"+g,fill:jb});b?b.element.appendChild(e):f.parentNode.insertBefore(e,f);c.push(e)}this.shadows=c}return this}};var Vc=function(){this.init.apply(this,arguments)};Vc.prototype={Element:Ic,init:function(a,b,c,d){var e=location,
+f;f=this.createElement("svg").attr({xmlns:"http://www.w3.org/2000/svg",version:"1.1"});a.appendChild(f.element);this.box=f.element;this.boxWrapper=f;this.alignedObjects=[];this.url=Bc?"":e.href.replace(/#.*?$/,"");this.defs=this.createElement("defs").add();this.forExport=d;this.setSize(b,c,false)},createElement:function(a){var b=new this.Element;b.init(this,a);return b},buildText:function(a){for(var b=a.element,c=C(a.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,
+'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g),d=b.childNodes,e=/style="([^"]+)"/,f=/href="([^"]+)"/,g=Ea(b,"x"),h=a.styles,j=Rd&&h&&h.HcDirection==="rtl"&&!this.forExport&&ja(pc.split("Firefox/")[1])<4,l,n=h&&ja(h.width),J=h&&h.lineHeight,D,aa=d.length;aa--;)b.removeChild(d[aa]);n&&!a.added&&this.box.appendChild(b);u(c,function(E,da){var w,R=0,B;E=E.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");w=E.split("|||");
+u(w,function(K){if(K!==""||w.length===1){var S={},I=wa.createElementNS("http://www.w3.org/2000/svg","tspan");e.test(K)&&Ea(I,"style",K.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"));if(f.test(K)){Ea(I,"onclick",'location.href="'+K.match(f)[1]+'"');Na(I,{cursor:"pointer"})}K=(K.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"<").replace(/&gt;/g,">");if(j){l=[];for(aa=K.length;aa--;)l.push(K.charAt(aa));K=l.join("")}I.appendChild(wa.createTextNode(K));if(R)S.dx=3;else S.x=g;if(!R){if(da){!yc&&
+a.renderer.forExport&&Na(I,{display:"block"});B=cb.getComputedStyle&&ja(cb.getComputedStyle(D,null).getPropertyValue("line-height"));if(!B||isNaN(B))B=J||D.offsetHeight||18;Ea(I,"dy",B)}D=I}Ea(I,S);b.appendChild(I);R++;if(n){K=K.replace(/-/g,"- ").split(" ");for(var za,Da=[];K.length||Da.length;){za=b.getBBox().width;S=za>n;if(!S||K.length===1){K=Da;Da=[];if(K.length){I=wa.createElementNS("http://www.w3.org/2000/svg","tspan");Ea(I,{dy:J||16,x:g});b.appendChild(I);if(za>n)n=za}}else{I.removeChild(I.firstChild);
+Da.unshift(K.pop())}K.length&&I.appendChild(wa.createTextNode(K.join(" ").replace(/- /g,"-")))}}}})})},crispLine:function(a,b){if(a[1]===a[4])a[1]=a[4]=X(a[1])+b%2/2;if(a[2]===a[5])a[2]=a[5]=X(a[2])+b%2/2;return a},path:function(a){return this.createElement("path").attr({d:a,fill:jb})},circle:function(a,b,c){a=Lb(a)?a:{x:a,y:b,r:c};return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){if(Lb(a)){b=a.y;c=a.r;d=a.innerR;e=a.start;f=a.end;a=a.x}return this.symbol("arc",a||0,b||0,c||0,
+{innerR:d||0,start:e||0,end:f||0})},rect:function(a,b,c,d,e,f){if(Lb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;a=a.x}e=this.createElement("rect").attr({rx:e,ry:e,fill:jb});return e.attr(e.crisp(f,a,b,Ha(c,0),Ha(d,0)))},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[C(c,true)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){return this.createElement("g").attr(M(a)&&{"class":nc+a})},image:function(a,b,c,d,
+e){var f={preserveAspectRatio:jb};arguments.length>1&&pa(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e){var f,g=this.symbols[a];g=g&&g(X(b),X(c),d,e);var h=/^url\((.*?)\)$/,j;if(g){f=this.path(g);pa(f,{symbolName:a,x:b,y:c,r:d});e&&pa(f,e)}else if(h.test(a)){var l=function(n,J){n.attr({width:J[0],height:J[1]}).translate(-X(J[0]/
+2),-X(J[1]/2))};j=a.match(h)[1];a=Vd[j];f=this.image(j).attr({x:b,y:c});if(a)l(f,a);else{f.attr({width:0,height:0});ib("img",{onload:function(){l(f,Vd[j]=[this.width,this.height])},src:j})}}else f=this.circle(b,c,d);return f},symbols:{square:function(a,b,c){c=0.707*c;return[ab,a-c,b-c,La,a+c,b-c,a+c,b+c,a-c,b+c,"Z"]},triangle:function(a,b,c){return[ab,a,b-1.33*c,La,a+c,b+0.67*c,a-c,b+0.67*c,"Z"]},"triangle-down":function(a,b,c){return[ab,a,b+1.33*c,La,a-c,b-0.67*c,a+c,b-0.67*c,"Z"]},diamond:function(a,
+b,c){return[ab,a,b-c,La,a+c,b,a,b+c,a-c,b,"Z"]},arc:function(a,b,c,d){var e=d.start,f=d.end-1.0E-6,g=d.innerR,h=nb(e),j=Db(e),l=nb(f);f=Db(f);d=d.end-e<cc?0:1;return[ab,a+c*h,b+c*j,"A",c,c,0,d,1,a+c*l,b+c*f,La,a+g*l,b+g*f,"A",g,g,0,d,0,a+g*h,b+g*j,"Z"]}},clipRect:function(a,b,c,d){var e=nc+qd++,f=this.createElement("clipPath").attr({id:e}).add(this.defs);a=this.rect(a,b,c,d,0).add(f);a.id=e;return a},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f=this;b=a.linearGradient;c=nc+
+qd++;var g,h,j;g=f.createElement("linearGradient").attr({id:c,gradientUnits:"userSpaceOnUse",x1:b[0],y1:b[1],x2:b[2],y2:b[3]}).add(f.defs);u(a.stops,function(l){if(e.test(l[1])){d=Yb(l[1]);h=d.get("rgb");j=d.get("a")}else{h=l[1];j=1}f.createElement("stop").attr({offset:l[0],"stop-color":h,"stop-opacity":j}).add(g)});return"url("+this.url+"#"+c+")"}else if(e.test(a)){d=Yb(a);Ea(b,c+"-opacity",d.get("a"));return d.get("rgb")}else return a},text:function(a,b,c){var d=Wa.chart.style;b=X(C(b,0));c=X(C(c,
+0));a=this.createElement("text").attr({x:b,y:c,text:a}).css({fontFamily:d.fontFamily,fontSize:d.fontSize});a.x=b;a.y=c;return a}};Wc=Vc;if(!yc){Eb=yb(Ic,{init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ",oc,";"];if(b==="shape"||b===Qb)d.push("left:0;top:0;width:10px;height:10px;");if(zc)d.push("visibility: ",b===Qb?ub:Ab);c.push(' style="',d.join(""),'"/>');if(b){c=b===Qb||b==="span"||b==="img"?c.join(""):a.prepVML(c);this.element=ib(c)}this.renderer=a},add:function(a){var b=
+this.renderer,c=this.element,d=b.box;d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);zc&&d.gVis===ub&&Na(c,{visibility:ub});d.appendChild(c);this.added=true;this.alignOnAdd&&this.updateTransform();return this},attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,h=f.nodeName,j=this.renderer,l=this.symbolName,n,J,D=this.shadows,aa=this;if(Pb(a)&&M(b)){c=a;a={};a[c]=b}if(Pb(a)){c=a;aa=c==="strokeWidth"||c==="stroke-width"?this.strokeweight:this[c]}else for(c in a){d=a[c];n=false;if(l&&/^(x|y|r|start|end|width|height|innerR)/.test(c)){if(!J){this.symbolAttr(a);
+J=true}n=true}else if(c==="d"){d=d||[];this.d=d.join(" ");e=d.length;for(n=[];e--;)n[e]=dc(d[e])?X(d[e]*10)-5:d[e]==="Z"?"x":d[e];d=n.join(" ")||"x";f.path=d;if(D)for(e=D.length;e--;)D[e].path=d;n=true}else if(c==="zIndex"||c==="visibility"){if(zc&&c==="visibility"&&h==="DIV"){f.gVis=d;n=f.childNodes;for(e=n.length;e--;)Na(n[e],{visibility:d});if(d===Ab)d=null}if(d)g[c]=d;n=true}else if(/^(width|height)$/.test(c)){if(this.updateClipping){this[c]=d;this.updateClipping()}else g[c]=d;n=true}else if(/^(x|y)$/.test(c)){this[c]=
+d;if(f.tagName==="SPAN")this.updateTransform();else g[{x:"left",y:"top"}[c]]=d}else if(c==="class")f.className=d;else if(c==="stroke"){d=j.color(d,f,c);c="strokecolor"}else if(c==="stroke-width"||c==="strokeWidth"){f.stroked=d?true:false;c="strokeweight";this[c]=d;if(dc(d))d+=bb}else if(c==="dashstyle"){(f.getElementsByTagName("stroke")[0]||ib(j.prepVML(["<stroke/>"]),null,null,f))[c]=d||"solid";this.dashstyle=d;n=true}else if(c==="fill")if(h==="SPAN")g.color=d;else{f.filled=d!==jb?true:false;d=j.color(d,
+f,c);c="fillcolor"}else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="align"){if(c==="align")c="textAlign";this[c]=d;this.updateTransform();n=true}else if(c==="text"){this.bBox=null;f.innerHTML=d;n=true}if(D&&c==="visibility")for(e=D.length;e--;)D[e].style[c]=d;if(!n)if(zc)f[c]=d;else Ea(f,c,d)}return aa},clip:function(a){var b=this,c=a.members;c.push(b);b.destroyClip=function(){qc(c,b)};return b.css(a.getCSS(b.inverted))},css:function(a){var b=this.element;if(b=a&&b.tagName==="SPAN"&&
+a.width){delete a.width;this.textWidth=b;this.updateTransform()}this.styles=pa(this.styles,a);Na(this.element,a);return this},destroy:function(){this.destroyClip&&this.destroyClip();Ic.prototype.destroy.apply(this)},empty:function(){for(var a=this.element.childNodes,b=a.length,c;b--;){c=a[b];c.parentNode.removeChild(c)}},getBBox:function(){var a=this.element,b=this.bBox;if(!b){if(a.nodeName==="text")a.style.position=oc;b=this.bBox={x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}}return b},
+on:function(a,b){this.element["on"+a]=function(){var c=cb.event;c.target=c.srcElement;b(c)};return this},updateTransform:function(){if(this.added){var a=this,b=a.element,c=a.translateX||0,d=a.translateY||0,e=a.x||0,f=a.y||0,g=a.textAlign||"left",h={left:0,center:0.5,right:1}[g],j=g&&g!=="left";if(c||d)a.css({marginLeft:c,marginTop:d});a.inverted&&u(b.childNodes,function(R){a.renderer.invertChild(R,b)});if(b.tagName==="SPAN"){var l,n;c=a.rotation;var J;l=0;d=1;var D=0,aa;J=ja(a.textWidth);var E=a.xCorr||
+0,da=a.yCorr||0,w=[c,g,b.innerHTML,a.textWidth].join(",");if(w!==a.cTT){if(M(c)){l=c*Ud;d=nb(l);D=Db(l);Na(b,{filter:c?["progid:DXImageTransform.Microsoft.Matrix(M11=",d,", M12=",-D,", M21=",D,", M22=",d,", sizingMethod='auto expand')"].join(""):jb})}l=b.offsetWidth;n=b.offsetHeight;if(l>J){Na(b,{width:J+bb,display:"block",whiteSpace:"normal"});l=J}J=X((ja(b.style.fontSize)||12)*1.2);E=d<0&&-l;da=D<0&&-n;aa=d*D<0;E+=D*J*(aa?1-h:h);da-=d*J*(c?aa?h:1-h:1);if(j){E-=l*h*(d<0?-1:1);if(c)da-=n*h*(D<0?-1:
+1);Na(b,{textAlign:g})}a.xCorr=E;a.yCorr=da}Na(b,{left:e+E,top:f+da});a.cTT=w}}else this.alignOnAdd=true},shadow:function(a,b){var c=[],d,e=this.element,f=this.renderer,g,h=e.style,j,l=e.path;if(l&&typeof l.value!=="string")l="x";if(a){for(d=1;d<=3;d++){j=['<shape isShadow="true" strokeweight="',7-2*d,'" filled="false" path="',l,'" coordsize="100,100" style="',e.style.cssText,'" />'];g=ib(f.prepVML(j),null,{left:ja(h.left)+1,top:ja(h.top)+1});j=['<stroke color="black" opacity="',0.05*d,'"/>'];ib(f.prepVML(j),
+null,null,g);b?b.element.appendChild(g):e.parentNode.insertBefore(g,e);c.push(g)}this.shadows=c}return this}});la=function(){this.init.apply(this,arguments)};la.prototype=va(Vc.prototype,{Element:Eb,isIE8:pc.indexOf("MSIE 8.0")>-1,init:function(a,b,c){var d;this.alignedObjects=[];d=this.createElement(Qb);a.appendChild(d.element);this.box=d.element;this.boxWrapper=d;this.setSize(b,c,false);if(!wa.namespaces.hcv){wa.namespaces.add("hcv","urn:schemas-microsoft-com:vml");wa.createStyleSheet().cssText=
+"hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}},clipRect:function(a,b,c,d){var e=this.createElement();return pa(e,{members:[],left:a,top:b,width:c,height:d,getCSS:function(f){var g=this.top,h=this.left,j=h+this.width,l=g+this.height;g={clip:"rect("+X(f?h:g)+"px,"+X(f?l:j)+"px,"+X(f?j:l)+"px,"+X(f?g:h)+"px)"};!f&&zc&&pa(g,{width:j+bb,height:l+bb});return g},updateClipping:function(){u(e.members,function(f){f.css(e.getCSS(f.inverted))})}})},
+color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f,g,h=a.linearGradient,j,l,n,J;u(a.stops,function(D,aa){if(e.test(D[1])){d=Yb(D[1]);f=d.get("rgb");g=d.get("a")}else{f=D[1];g=1}if(aa){n=f;J=g}else{j=f;l=g}});a=90-sa.atan((h[3]-h[1])/(h[2]-h[0]))*180/cc;c=["<",c,' colors="0% ',j,",100% ",n,'" angle="',a,'" opacity="',J,'" o:opacity2="',l,'" type="gradient" focus="100%" />'];ib(this.prepVML(c),null,null,b)}else if(e.test(a)&&b.tagName!=="IMG"){d=Yb(a);c=["<",c,' opacity="',d.get("a"),
+'"/>'];ib(this.prepVML(c),null,null,b);return d.get("rgb")}else return a},prepVML:function(a){var b=this.isIE8;a=a.join("");if(b){a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />');a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')}else a=a.replace("<","<hcv:");return a},text:function(a,b,c){var d=Wa.chart.style;return this.createElement("span").attr({text:a,
+x:X(b),y:X(c)}).css({whiteSpace:"nowrap",fontFamily:d.fontFamily,fontSize:d.fontSize})},path:function(a){return this.createElement("shape").attr({coordsize:"100 100",d:a})},circle:function(a,b,c){return this.symbol("circle").attr({x:a,y:b,r:c})},g:function(a){var b;if(a)b={className:nc+a,"class":nc+a};return this.createElement(Qb).attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});arguments.length>1&&f.css({left:b,top:c,width:d,height:e});return f},rect:function(a,b,
+c,d,e,f){if(Lb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;a=a.x}var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,Ha(c,0),Ha(d,0)))},invertChild:function(a,b){var c=b.style;Na(a,{flip:"x",left:ja(c.width)-10,top:ja(c.height)-10,rotation:-90})},symbols:{arc:function(a,b,c,d){var e=d.start,f=d.end,g=nb(e),h=Db(e),j=nb(f),l=Db(f);d=d.innerR;var n=0.07/c,J=d&&0.1/d||0;if(f-e===0)return["x"];else if(2*cc-f+e<n)j=-n;else if(f-e<J)j=nb(e+J);return["wa",a-c,b-c,a+c,b+c,a+c*g,b+c*h,a+c*
+j,b+c*l,"at",a-d,b-d,a+d,b+d,a+d*j,b+d*l,a+d*g,b+d*h,"x","e"]},circle:function(a,b,c){return["wa",a-c,b-c,a+c,b+c,a+c,b,a+c,b,"e"]},rect:function(a,b,c,d){if(!M(d))return[];var e=d.width;d=d.height;var f=a+e,g=b+d;c=qb(c,e,d);return[ab,a+c,b,La,f-c,b,"wa",f-2*c,b,f,b+2*c,f-c,b,f,b+c,La,f,g-c,"wa",f-2*c,g-2*c,f,g,f,g-c,f-c,g,La,a+c,g,"wa",a,g-2*c,a+2*c,g,a+c,g,a,g-c,La,a,b+c,"wa",a,b,a+2*c,b+2*c,a,b+c,a+c,b,"x","e"]}}});Wc=la}Gd.prototype.callbacks=[];var Ac=function(){};Ac.prototype={init:function(a,
+b){var c=a.chart.counters,d;this.series=a;this.applyOptions(b);this.pointAttr={};if(a.options.colorByPoint){d=a.chart.options.colors;if(!this.options)this.options={};this.color=this.options.color=this.color||d[c.color++];c.wrapColor(d.length)}a.chart.pointCount++;return this},applyOptions:function(a){var b=this.series;this.config=a;if(dc(a)||a===null)this.y=a;else if(Lb(a)&&!dc(a.length)){pa(this,a);this.options=a}else if(Pb(a[0])){this.name=a[0];this.y=a[1]}else if(dc(a[0])){this.x=a[0];this.y=a[1]}if(this.x===
+Va)this.x=b.autoIncrement()},destroy:function(){var a=this,b=a.series,c;b.chart.pointCount--;a===b.chart.hoverPoint&&a.onMouseOut();b.chart.hoverPoints=null;Cb(a);u(["graphic","tracker","group","dataLabel","connector"],function(d){a[d]&&a[d].destroy()});a.legendItem&&a.series.chart.legend.destroyItem(a);for(c in a)a[c]=null},getLabelConfig:function(){return{x:this.category,y:this.y,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},select:function(a,b){var c=
+this,d=c.series.chart;c.selected=a=C(a,!c.selected);c.firePointEvent(a?"select":"unselect");c.setState(a&&"select");b||u(d.getSelectedPoints(),function(e){if(e.selected&&e!==c){e.selected=false;e.setState(hb);e.firePointEvent("unselect")}})},onMouseOver:function(){var a=this.series.chart,b=a.tooltip,c=a.hoverPoint;c&&c!==this&&c.onMouseOut();this.firePointEvent("mouseOver");b&&!b.shared&&b.refresh(this);this.setState(Bb);a.hoverPoint=this},onMouseOut:function(){this.firePointEvent("mouseOut");this.setState();
+this.series.chart.hoverPoint=null},tooltipFormatter:function(a){var b=this.series;return['<span style="color:'+b.color+'">',this.name||b.name,"</span>: ",!a?"<b>x = "+(this.name||this.x)+",</b> ":"","<b>",!a?"y = ":"",this.y,"</b>"].join("")},update:function(a,b,c){var d=this,e=d.series,f=d.graphic,g=e.chart;b=C(b,true);d.firePointEvent("update",{options:a},function(){d.applyOptions(a);if(Lb(a)){e.getAttribs();f&&f.attr(d.pointAttr[e.state])}e.isDirty=true;b&&g.redraw(c)})},remove:function(a,b){var c=
+this,d=c.series,e=d.chart,f=d.data;ec(b,e);a=C(a,true);c.firePointEvent("remove",null,function(){qc(f,c);c.destroy();d.isDirty=true;a&&e.redraw()})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;if(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])this.importEvents();if(a==="click"&&e.allowPointSelect)c=function(f){d.select(null,f.ctrlKey||f.metaKey||f.shiftKey)};Pa(this,a,b,c)},importEvents:function(){if(!this.hasImportedEvents){var a=va(this.series.options.point,
+this.options).events,b;this.events=a;for(b in a)Sa(this,b,a[b]);this.hasImportedEvents=true}},setState:function(a){var b=this.series,c=b.options.states,d=xb[b.type].marker&&b.options.marker,e=d&&!d.enabled,f=(d=d&&d.states[a])&&d.enabled===false,g=b.stateMarkerGraphic,h=b.chart,j=this.pointAttr;a=a||hb;if(!(a===this.state||this.selected&&a!=="select"||c[a]&&c[a].enabled===false||a&&(f||e&&!d.enabled))){if(this.graphic)this.graphic.attr(j[a]);else{if(a){if(!g)b.stateMarkerGraphic=g=h.renderer.circle(0,
+0,j[a].r).attr(j[a]).add(b.group);g.translate(this.plotX,this.plotY)}if(g)g[a?"show":"hide"]()}this.state=a}}};var pb=function(){};pb.prototype={isCartesian:true,type:"line",pointClass:Ac,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},init:function(a,b){var c,d;d=a.series.length;this.chart=a;b=this.setOptions(b);pa(this,{index:d,options:b,name:b.name||"Series "+(d+1),state:hb,pointAttr:{},visible:b.visible!==false,selected:b.selected===true});d=b.events;
+for(c in d)Sa(this,c,d[c]);if(d&&d.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=true;this.getColor();this.getSymbol();this.setData(b.data,false)},autoIncrement:function(){var a=this.options,b=this.xIncrement;b=C(b,a.pointStart,0);this.pointInterval=C(this.pointInterval,a.pointInterval,1);this.xIncrement=b+this.pointInterval;return b},cleanData:function(){var a=this.chart,b=this.data,c,d,e=a.smallestInterval,f,g;b.sort(function(h,j){return h.x-j.x});if(this.options.connectNulls)for(g=
+b.length-1;g>=0;g--)b[g].y===null&&b[g-1]&&b[g+1]&&b.splice(g,1);for(g=b.length-1;g>=0;g--)if(b[g-1]){f=b[g].x-b[g-1].x;if(f>0&&(d===Va||f<d)){d=f;c=g}}if(e===Va||d<e)a.smallestInterval=d;this.closestPoints=c},getSegments:function(){var a=-1,b=[],c=this.data;u(c,function(d,e){if(d.y===null){e>a+1&&b.push(c.slice(a+1,e));a=e}else e===c.length-1&&b.push(c.slice(a+1,e+1))});this.segments=b},setOptions:function(a){var b=this.chart.options.plotOptions;return va(b[this.type],b.series,a)},getColor:function(){var a=
+this.chart.options.colors,b=this.chart.counters;this.color=this.options.color||a[b.color++]||"#0000ff";b.wrapColor(a.length)},getSymbol:function(){var a=this.chart.options.symbols,b=this.chart.counters;this.symbol=this.options.marker.symbol||a[b.symbol++];b.wrapSymbol(a.length)},addPoint:function(a,b,c,d){var e=this.data,f=this.graph,g=this.area,h=this.chart;a=(new this.pointClass).init(this,a);ec(d,h);if(f&&c)f.shift=c;if(g){g.shift=c;g.isArea=true}b=C(b,true);e.push(a);c&&e[0].remove(false);this.getAttribs();
+this.isDirty=true;b&&h.redraw()},setData:function(a,b){var c=this,d=c.data,e=c.initialColor,f=c.chart,g=d&&d.length||0;c.xIncrement=null;if(M(e))f.counters.color=e;for(a=mc(rc(a||[]),function(h){return(new c.pointClass).init(c,h)});g--;)d[g].destroy();c.data=a;c.cleanData();c.getSegments();c.getAttribs();c.isDirty=true;f.isDirtyBox=true;C(b,true)&&f.redraw(false)},remove:function(a,b){var c=this,d=c.chart;a=C(a,true);if(!c.isRemoving){c.isRemoving=true;Pa(c,"remove",null,function(){c.destroy();d.isDirtyLegend=
+d.isDirtyBox=true;a&&d.redraw(b)})}c.isRemoving=false},translate:function(){for(var a=this.chart,b=this.options.stacking,c=this.xAxis.categories,d=this.yAxis,e=this.data,f=e.length;f--;){var g=e[f],h=g.x,j=g.y,l=g.low,n=d.stacks[(j<0?"-":"")+this.stackKey];g.plotX=this.xAxis.translate(h);if(b&&this.visible&&n&&n[h]){l=n[h];h=l.total;l.cum=l=l.cum-j;j=l+j;if(b==="percent"){l=h?l*100/h:0;j=h?j*100/h:0}g.percentage=h?g.y*100/h:0;g.stackTotal=h}if(M(l))g.yBottom=d.translate(l,0,1,0,1);if(j!==null)g.plotY=
+d.translate(j,0,1,0,1);g.clientX=a.inverted?a.plotHeight-g.plotX:g.plotX;g.category=c&&c[g.x]!==Va?c[g.x]:g.x}},setTooltipPoints:function(a){var b=this.chart,c=b.inverted,d=[],e=X((c?b.plotTop:b.plotLeft)+b.plotSizeX),f,g,h=[];if(a)this.tooltipPoints=null;u(this.segments,function(j){d=d.concat(j)});if(this.xAxis&&this.xAxis.reversed)d=d.reverse();u(d,function(j,l){f=d[l-1]?d[l-1]._high+1:0;for(g=j._high=d[l+1]?kb((j.plotX+(d[l+1]?d[l+1].plotX:e))/2):e;f<=g;)h[c?e-f++:f++]=j});this.tooltipPoints=h},
+onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(!(!Jb&&a.mouseIsDown)){b&&b!==this&&b.onMouseOut();this.options.events.mouseOver&&Pa(this,"mouseOver");this.tracker&&this.tracker.toFront();this.setState(Bb);a.hoverSeries=this}},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;d&&d.onMouseOut();this&&a.events.mouseOut&&Pa(this,"mouseOut");c&&!a.stickyTracking&&c.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this.chart,c=this.clipRect,
+d=this.options.animation;if(d&&!Lb(d))d={};if(a){if(!c.isAnimating){c.attr("width",0);c.isAnimating=true}}else{c.animate({width:b.plotSizeX},d);this.animate=null}},drawPoints:function(){var a,b=this.data,c=this.chart,d,e,f,g,h,j;if(this.options.marker.enabled)for(f=b.length;f--;){g=b[f];d=g.plotX;e=g.plotY;j=g.graphic;if(e!==Va&&!isNaN(e)){a=g.pointAttr[g.selected?"select":hb];h=a.r;if(j)j.animate({x:d,y:e,r:h});else g.graphic=c.renderer.symbol(C(g.marker&&g.marker.symbol,this.symbol),d,e,h).attr(a).add(this.group)}}},
+convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={};a=a||{};b=b||{};c=c||{};d=d||{};for(f in e){g=e[f];h[f]=C(a[g],b[f],c[f],d[f])}return h},getAttribs:function(){var a=this,b=xb[a.type].marker?a.options.marker:a.options,c=b.states,d=c[Bb],e,f=a.color,g={stroke:f,fill:f},h=a.data,j=[],l,n=a.pointAttrToOptions,J;if(a.options.marker){d.radius=d.radius||b.radius+2;d.lineWidth=d.lineWidth||b.lineWidth+1}else d.color=d.color||Yb(d.color||f).brighten(d.brightness).get();j[hb]=a.convertAttribs(b,
+g);u([Bb,"select"],function(D){j[D]=a.convertAttribs(c[D],j[hb])});a.pointAttr=j;for(f=h.length;f--;){g=h[f];if((b=g.options&&g.options.marker||g.options)&&b.enabled===false)b.radius=0;e=false;if(g.options)for(J in n)if(M(b[n[J]]))e=true;if(e){l=[];c=b.states||{};e=c[Bb]=c[Bb]||{};if(!a.options.marker)e.color=Yb(e.color||g.options.color).brighten(e.brightness||d.brightness).get();l[hb]=a.convertAttribs(b,j[hb]);l[Bb]=a.convertAttribs(c[Bb],j[Bb],l[hb]);l.select=a.convertAttribs(c.select,j.select,
+l[hb])}else l=j;g.pointAttr=l}},destroy:function(){var a=this,b=a.chart,c=/\/5[0-9\.]+ (Safari|Mobile)\//.test(pc),d,e;Pa(a,"destroy");Cb(a);a.legendItem&&a.chart.legend.destroyItem(a);u(a.data,function(f){f.destroy()});u(["area","graph","dataLabelsGroup","group","tracker"],function(f){if(a[f]){d=c&&f==="group"?"hide":"destroy";a[f][d]()}});if(b.hoverSeries===a)b.hoverSeries=null;qc(b.series,a);for(e in a)delete a[e]},drawDataLabels:function(){if(this.options.dataLabels.enabled){var a=this,b,c,d=
+a.data,e=a.options.dataLabels,f,g=a.dataLabelsGroup,h=a.chart,j=h.inverted,l=a.type,n;n=a.options.stacking;var J=l==="column"||l==="bar",D=e.verticalAlign===null,aa=e.y===null;if(J)if(n){if(D)e=va(e,{verticalAlign:"middle"});if(aa)e=va(e,{y:{top:14,middle:4,bottom:-6}[e.verticalAlign]})}else if(D)e=va(e,{verticalAlign:"top"});if(!g)g=a.dataLabelsGroup=h.renderer.g("data-labels").attr({visibility:a.visible?Ab:ub,zIndex:6}).translate(h.plotLeft,h.plotTop).add();n=e.color;if(n==="auto")n=null;e.style.color=
+C(n,a.color);u(d,function(E){var da=E.barX,w=da&&da+E.barW/2||E.plotX||-999,R=C(E.plotY,-999),B=E.dataLabel,K=e.align,S=aa?E.y>0?-6:12:e.y;f=e.formatter.call(E.getLabelConfig());b=(j?h.plotWidth-R:w)+e.x;c=(j?h.plotHeight-w:R)+S;if(l==="column")b+={left:-1,right:1}[K]*E.barW/2||0;if(j&&E.y<0){K="right";b-=10}if(B){if(j&&!e.y)c=c+ja(B.styles.lineHeight)*0.9-B.getBBox().height/2;B.attr({text:f}).animate({x:b,y:c})}else if(M(f)){B=E.dataLabel=h.renderer.text(f,b,c).attr({align:K,rotation:e.rotation,
+zIndex:1}).css(e.style).add(g);j&&!e.y&&B.attr({y:c+ja(B.styles.lineHeight)*0.9-B.getBBox().height/2})}if(J&&a.options.stacking){w=E.barY;R=E.barW;E=E.barH;B.align(e,null,{x:j?h.plotWidth-w-E:da,y:j?h.plotHeight-da-R:w,width:j?E:R,height:j?R:E})}})}},drawGraph:function(){var a=this,b=a.options,c=a.graph,d=[],e,f=a.area,g=a.group,h=b.lineColor||a.color,j=b.lineWidth,l=b.dashStyle,n,J=a.chart.renderer,D=a.yAxis.getThreshold(b.threshold||0),aa=/^area/.test(a.type),E=[],da=[];u(a.segments,function(w){n=
+[];u(w,function(S,I){if(a.getPointSpline)n.push.apply(n,a.getPointSpline(w,S,I));else{n.push(I?La:ab);I&&b.step&&n.push(S.plotX,w[I-1].plotY);n.push(S.plotX,S.plotY)}});if(w.length>1)d=d.concat(n);else E.push(w[0]);if(aa){var R=[],B,K=n.length;for(B=0;B<K;B++)R.push(n[B]);K===3&&R.push(La,n[1],n[2]);if(b.stacking&&a.type!=="areaspline")for(B=w.length-1;B>=0;B--)R.push(w[B].plotX,w[B].yBottom);else R.push(La,w[w.length-1].plotX,D,La,w[0].plotX,D);da=da.concat(R)}});a.graphPath=d;a.singlePoints=E;if(aa){e=
+C(b.fillColor,Yb(a.color).setOpacity(b.fillOpacity||0.75).get());if(f)f.animate({d:da});else a.area=a.chart.renderer.path(da).attr({fill:e}).add(g)}if(c)c.animate({d:d});else if(j){c={stroke:h,"stroke-width":j};if(l)c.dashstyle=l;a.graph=J.path(d).attr(c).add(g).shadow(b.shadow)}},render:function(){var a=this,b=a.chart,c,d,e=a.options,f=e.animation,g=f&&a.animate;f=g?f&&f.duration||500:0;var h=a.clipRect,j=b.renderer;if(!h){h=a.clipRect=!b.hasRendered&&b.clipRect?b.clipRect:j.clipRect(0,0,b.plotSizeX,
+b.plotSizeY);if(!b.clipRect)b.clipRect=h}if(!a.group){c=a.group=j.g("series");if(b.inverted){d=function(){c.attr({width:b.plotWidth,height:b.plotHeight}).invert()};d();Sa(b,"resize",d);Sa(a,"destroy",function(){Cb(b,"resize",d)})}c.clip(a.clipRect).attr({visibility:a.visible?Ab:ub,zIndex:e.zIndex}).translate(b.plotLeft,b.plotTop).add(b.seriesGroup)}a.drawDataLabels();g&&a.animate(true);a.drawGraph&&a.drawGraph();a.drawPoints();a.options.enableMouseTracking!==false&&a.drawTracker();g&&a.animate();
+setTimeout(function(){h.isAnimating=false;if((c=a.group)&&h!==b.clipRect&&h.renderer){c.clip(a.clipRect=b.clipRect);h.destroy()}},f);a.isDirty=false},redraw:function(){var a=this.chart,b=this.group;if(b){a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight});b.animate({translateX:a.plotLeft,translateY:a.plotTop})}this.translate();this.setTooltipPoints(true);this.render()},setState:function(a){var b=this.options,c=this.graph,d=b.states;b=b.lineWidth;a=a||hb;if(this.state!==a){this.state=a;if(!(d[a]&&
+d[a].enabled===false)){if(a)b=d[a].lineWidth||b+1;if(c&&!c.dashstyle)c.attr({"stroke-width":b},a?0:500)}}},setVisible:function(a,b){var c=this.chart,d=this.legendItem,e=this.group,f=this.tracker,g=this.dataLabelsGroup,h,j=this.data,l=c.options.chart.ignoreHiddenSeries;h=this.visible;h=(this.visible=a=a===Va?!h:a)?"show":"hide";e&&e[h]();if(f)f[h]();else for(e=j.length;e--;){f=j[e];f.tracker&&f.tracker[h]()}g&&g[h]();d&&c.legend.colorizeItem(this,a);this.isDirty=true;this.options.stacking&&u(c.series,
+function(n){if(n.options.stacking&&n.visible)n.isDirty=true});if(l)c.isDirtyBox=true;b!==false&&c.redraw();Pa(this,h)},show:function(){this.setVisible(true)},hide:function(){this.setVisible(false)},select:function(a){this.selected=a=a===Va?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;Pa(this,a?"select":"unselect")},drawTracker:function(){var a=this,b=a.options,c=[].concat(a.graphPath),d=c.length,e=a.chart,f=e.options.tooltip.snap,g=a.tracker,h=b.cursor;h=h&&{cursor:h};var j=a.singlePoints,
+l;if(d)for(l=d+1;l--;){c[l]===ab&&c.splice(l+1,0,c[l+1]-f,c[l+2],La);if(l&&c[l]===ab||l===d)c.splice(l,0,La,c[l-2]+f,c[l-1])}for(l=0;l<j.length;l++){d=j[l];c.push(ab,d.plotX-f,d.plotY,La,d.plotX+f,d.plotY)}if(g)g.attr({d:c});else a.tracker=e.renderer.path(c).attr({isTracker:true,stroke:Wd,fill:jb,"stroke-width":b.lineWidth+2*f,visibility:a.visible?Ab:ub,zIndex:1}).on(Jb?"touchstart":"mouseover",function(){e.hoverSeries!==a&&a.onMouseOver()}).on("mouseout",function(){b.stickyTracking||a.onMouseOut()}).css(h).add(e.trackerGroup)}};
+la=yb(pb);vb.line=la;la=yb(pb,{type:"area"});vb.area=la;la=yb(pb,{type:"spline",getPointSpline:function(a,b,c){var d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1],h,j,l,n;if(c&&c<a.length-1){a=f.plotY;l=g.plotX;g=g.plotY;var J;h=(1.5*d+f.plotX)/2.5;j=(1.5*e+a)/2.5;l=(1.5*d+l)/2.5;n=(1.5*e+g)/2.5;J=(n-j)*(l-d)/(l-h)+e-n;j+=J;n+=J;if(j>a&&j>e){j=Ha(a,e);n=2*e-j}else if(j<a&&j<e){j=qb(a,e);n=2*e-j}if(n>g&&n>e){n=Ha(g,e);j=2*e-n}else if(n<g&&n<e){n=qb(g,e);j=2*e-n}b.rightContX=l;b.rightContY=n}if(c){b=["C",f.rightContX||
+f.plotX,f.rightContY||f.plotY,h||d,j||e,d,e];f.rightContX=f.rightContY=null}else b=[ab,d,e];return b}});vb.spline=la;la=yb(la,{type:"areaspline"});vb.areaspline=la;var ad=yb(pb,{type:"column",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},init:function(){pb.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasColumn=true;b.hasRendered&&u(b.series,function(c){if(c.type===a.type)c.isDirty=true})},translate:function(){var a=this,b=a.chart,
+c=a.options,d=c.stacking,e=c.borderWidth,f=0,g=a.xAxis.reversed,h=a.xAxis.categories,j={},l,n;pb.prototype.translate.apply(a);u(b.series,function(S){if(S.type===a.type&&S.visible){if(S.options.stacking){l=S.stackKey;if(j[l]===Va)j[l]=f++;n=j[l]}else n=f++;S.columnIndex=n}});var J=a.data,D=a.closestPoints;h=$a(J[1]?J[D].plotX-J[D-1].plotX:b.plotSizeX/(h&&h.length||1));D=h*c.groupPadding;var aa=(h-2*D)/f,E=c.pointWidth,da=M(E)?(aa-E)/2:aa*c.pointPadding,w=Ha(C(E,aa-2*da),1),R=da+(D+((g?f-a.columnIndex:
+a.columnIndex)||0)*aa-h/2)*(g?-1:1),B=a.yAxis.getThreshold(c.threshold||0),K=C(c.minPointLength,5);u(J,function(S){var I=S.plotY,za=S.yBottom||B,Da=S.plotX+R,gb=fd(qb(I,za)),wb=fd(Ha(I,za)-gb),Ob=a.yAxis.stacks[(S.y<0?"-":"")+a.stackKey],Kb;d&&a.visible&&Ob&&Ob[S.x]&&Ob[S.x].setOffset(R,w);if($a(wb)<K){if(K){wb=K;gb=$a(gb-B)>K?za-K:B-(I<=B?K:0)}Kb=gb-3}pa(S,{barX:Da,barY:gb,barW:w,barH:wb});S.shapeType="rect";I=pa(b.renderer.Element.prototype.crisp.apply({},[e,Da,gb,w,wb]),{r:c.borderRadius});if(e%
+2){I.y-=1;I.height+=1}S.shapeArgs=I;S.trackerArgs=M(Kb)&&va(S.shapeArgs,{height:Ha(6,wb+3),y:Kb})})},getSymbol:function(){},drawGraph:function(){},drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer,d,e;u(a.data,function(f){var g=f.plotY;if(g!==Va&&!isNaN(g)&&f.y!==null){d=f.graphic;e=f.shapeArgs;if(d){Tc(d);d.animate(e)}else f.graphic=c[f.shapeType](e).attr(f.pointAttr[f.selected?"select":hb]).add(a.group).shadow(b.shadow)}})},drawTracker:function(){var a=this,b=a.chart,c=b.renderer,
+d,e,f=+new Date,g=a.options.cursor,h=g&&{cursor:g},j;u(a.data,function(l){e=l.tracker;d=l.trackerArgs||l.shapeArgs;delete d.strokeWidth;if(l.y!==null)if(e)e.attr(d);else l.tracker=c[l.shapeType](d).attr({isTracker:f,fill:Wd,visibility:a.visible?Ab:ub,zIndex:1}).on(Jb?"touchstart":"mouseover",function(n){j=n.relatedTarget||n.fromElement;b.hoverSeries!==a&&Ea(j,"isTracker")!==f&&a.onMouseOver();l.onMouseOver()}).on("mouseout",function(n){if(!a.options.stickyTracking){j=n.relatedTarget||n.toElement;
+Ea(j,"isTracker")!==f&&a.onMouseOut()}}).css(h).add(l.group||b.trackerGroup)})},animate:function(a){var b=this,c=b.data;if(!a){u(c,function(d){var e=d.graphic;d=d.shapeArgs;if(e){e.attr({height:0,y:b.yAxis.translate(0,0,1)});e.animate({height:d.height,y:d.y},b.options.animation)}});b.animate=null}},remove:function(){var a=this,b=a.chart;b.hasRendered&&u(b.series,function(c){if(c.type===a.type)c.isDirty=true});pb.prototype.remove.apply(a,arguments)}});vb.column=ad;la=yb(ad,{type:"bar",init:function(a){a.inverted=
+this.inverted=true;ad.prototype.init.apply(this,arguments)}});vb.bar=la;la=yb(pb,{type:"scatter",translate:function(){var a=this;pb.prototype.translate.apply(a);u(a.data,function(b){b.shapeType="circle";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){var a=this,b=a.options.cursor,c=b&&{cursor:b},d;u(a.data,function(e){(d=e.graphic)&&d.attr({isTracker:true}).on("mouseover",function(){a.onMouseOver();e.onMouseOver()}).on("mouseout",function(){a.options.stickyTracking||
+a.onMouseOut()}).css(c)})},cleanData:function(){}});vb.scatter=la;la=yb(Ac,{init:function(){Ac.prototype.init.apply(this,arguments);var a=this,b;pa(a,{visible:a.visible!==false,name:C(a.name,"Slice")});b=function(){a.slice()};Sa(a,"select",b);Sa(a,"unselect",b);return a},setVisible:function(a){var b=this.series.chart,c=this.tracker,d=this.dataLabel,e=this.connector,f=this.shadowGroup,g;g=(this.visible=a=a===Va?!this.visible:a)?"show":"hide";this.group[g]();c&&c[g]();d&&d[g]();e&&e[g]();f&&f[g]();
+this.legendItem&&b.legend.colorizeItem(this,a)},slice:function(a,b,c){var d=this.series.chart,e=this.slicedTranslation;ec(c,d);C(b,true);a=this.sliced=M(a)?a:!this.sliced;a={translateX:a?e[0]:d.plotLeft,translateY:a?e[1]:d.plotTop};this.group.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}});la=yb(pb,{type:"pie",isCartesian:false,pointClass:la,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=this.chart.counters.color},
+animate:function(){var a=this;u(a.data,function(b){var c=b.graphic;b=b.shapeArgs;var d=-cc/2;if(c){c.attr({r:0,start:d,end:d});c.animate({r:b.r,start:b.start,end:b.end},a.options.animation)}});a.animate=null},translate:function(){var a=0,b=this,c=-0.25,d=b.options,e=d.slicedOffset,f=e+d.borderWidth,g=d.center.concat([d.size,d.innerSize||0]),h=b.chart,j=h.plotWidth,l=h.plotHeight,n,J,D,aa=b.data,E=2*cc,da,w=qb(j,l),R,B,K,S=d.dataLabels.distance;g=mc(g,function(I,za){return(R=/%$/.test(I))?[j,l,w,w][za]*
+ja(I)/100:I});b.getX=function(I,za){D=sa.asin((I-g[1])/(g[2]/2+S));return g[0]+(za?-1:1)*nb(D)*(g[2]/2+S)};b.center=g;u(aa,function(I){a+=I.y});u(aa,function(I){da=a?I.y/a:0;n=X(c*E*1E3)/1E3;c+=da;J=X(c*E*1E3)/1E3;I.shapeType="arc";I.shapeArgs={x:g[0],y:g[1],r:g[2]/2,innerR:g[3]/2,start:n,end:J};D=(J+n)/2;I.slicedTranslation=mc([nb(D)*e+h.plotLeft,Db(D)*e+h.plotTop],X);B=nb(D)*g[2]/2;b.radiusY=K=Db(D)*g[2]/2;I.tooltipPos=[g[0]+B*0.7,g[1]+K*0.7];I.labelPos=[g[0]+B+nb(D)*S,g[1]+K+Db(D)*S,g[0]+B+nb(D)*
+f,g[1]+K+Db(D)*f,g[0]+B,g[1]+K,S<0?"center":D<E/4?"left":"right",D];I.percentage=da*100;I.total=a});this.setTooltipPoints()},render:function(){this.drawPoints();this.options.enableMouseTracking!==false&&this.drawTracker();this.drawDataLabels();this.options.animation&&this.animate&&this.animate();this.isDirty=false},drawPoints:function(){var a=this.chart,b=a.renderer,c,d,e,f=this.options.shadow,g,h;u(this.data,function(j){d=j.graphic;h=j.shapeArgs;e=j.group;g=j.shadowGroup;if(f&&!g)g=j.shadowGroup=
+b.g("shadow").attr({zIndex:4}).add();if(!e)e=j.group=b.g("point").attr({zIndex:5}).add();c=j.sliced?j.slicedTranslation:[a.plotLeft,a.plotTop];e.translate(c[0],c[1]);g&&g.translate(c[0],c[1]);if(d)d.animate(h);else j.graphic=b.arc(h).attr(pa(j.pointAttr[hb],{"stroke-linejoin":"round"})).add(j.group).shadow(f,g);j.visible===false&&j.setVisible(false)})},drawDataLabels:function(){var a=this.data,b,c=this.chart,d=this.options.dataLabels,e=C(d.connectorPadding,10),f=C(d.connectorWidth,1),g,h,j=d.distance,
+l=this.radiusY,n=j>0,J=this.center[1],D=[[],[]],aa,E,da,w,R=2,B;if(d.enabled){pb.prototype.drawDataLabels.apply(this);u(a,function(gb){D[gb.labelPos[7]<cc/2?0:1].push(gb)});D[1].reverse();w=function(gb,wb){return wb.y-gb.y};for(a=D[0][0]&&D[0][0].dataLabel&&ja(D[0][0].dataLabel.styles.lineHeight);R--;){var K=[],S=[],I=D[R],za=I.length,Da;for(B=J+l-j;B<=J-l+j;B+=a)K.push(B);da=K.length;if(za>da){h=[].concat(I);h.sort(w);for(B=za;B--;)h[B].rank=B;for(B=za;B--;)I[B].rank>=da&&I.splice(B,1);za=I.length}for(B=
+0;B<za;B++){b=I[B];h=b.labelPos;b=9999;for(E=0;E<da;E++){g=$a(K[E]-h[1]);if(g<b){b=g;Da=E}}if(Da<B&&K[B]!==null)Da=B;else if(da<za-B+Da&&K[B]!==null)Da=da-za+B;else for(;K[Da]===null;)Da++;S.push({i:Da,y:K[Da]});K[Da]=null}S.sort(w);for(B=0;B<za;B++){b=I[B];h=b.labelPos;g=b.dataLabel;E=S.pop();aa=h[1];da=b.visible===false?ub:Ab;Da=E.i;E=E.y;if(aa>E&&K[Da+1]!==null||aa<E&&K[Da-1]!==null)E=aa;aa=this.getX(E,R);g.attr({visibility:da,align:h[6]})[g.moved?"animate":"attr"]({x:aa+d.x+({left:e,right:-e}[h[6]]||
+0),y:E+d.y});g.moved=true;if(n&&f){g=b.connector;h=[ab,aa+(h[6]==="left"?5:-5),E,La,aa,E,La,h[2],h[3],La,h[4],h[5]];if(g){g.animate({d:h});g.attr("visibility",da)}else b.connector=g=this.chart.renderer.path(h).attr({"stroke-width":f,stroke:d.connectorColor||"#606060",visibility:da,zIndex:3}).translate(c.plotLeft,c.plotTop).add()}}}}},drawTracker:ad.prototype.drawTracker,getSymbol:function(){}});vb.pie=la;cb.Highcharts={Chart:Gd,dateFormat:Nc,pathAnim:$c,getOptions:function(){return Wa},numberFormat:zd,
+Point:Ac,Color:Yb,Renderer:Wc,seriesTypes:vb,setOptions:function(a){Wa=va(Wa,a);Bd();return Wa},Series:pb,addEvent:Sa,createElement:ib,discardElement:Gc,css:Na,each:u,extend:pa,map:mc,merge:va,pick:C,extendClass:yb,product:"Highcharts",version:"2.1.6"}})();
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_cache_MemoryCache.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_cache_MemoryCache.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_cache_MemoryCache.php.html	(revision 5888)
@@ -0,0 +1,392 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>MemoryCache.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">MemoryCache.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="api.html">api</a>/<a href="api_cache.html">cache</a>/<a href="api_cache_MemoryCache.php.html">MemoryCache.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="40.00%">
+                <div class="size butter"  style="width:40%" title="40.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">40.00%</td>
+          <td class="coverNumMed">2 / 5</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.00%">
+                <div class="size butter"  style="width:50%" title="50.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.00%</td>
+          <td class="coverNumMed">3 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">MemoryCache</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="40.00%">
+                <div class="size butter"  style="width:40%" title="40.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">40.00%</td>
+          <td class="coverNumMed">2 / 5</td>
+          <td class="crap">8.12</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.00%">
+                <div class="size butter"  style="width:50%" title="50.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.00%</td>
+          <td class="coverNumMed">3 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#43">__construct($conf=Null)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#67">put($id, $data, $expire=0, $compressed=false)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#83">get($id)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">2 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#97">clear($id)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#105">clearAll()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                             
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                : /**                                                                                               
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                :  * DooMemCache class file.                                                                        
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                :  *                                                                                                
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :  * @author Leng Sheng Hong &lt;darkredz@gmail.com&gt;                                                   
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :  * @link http://www.doophp.com/                                                                   
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :  * @copyright Copyright &amp;copy; 2009 Leng Sheng Hong                                               
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :  * @license http://www.doophp.com/license                                                         
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :  */                                                                                               
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :                                                                                                   
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                :                                                                                                   
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                : /**                                                                                               
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :  * DooMemCache provides caching methods utilizing the Memcache extension.                         
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :  *                                                                                                
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :  * If you have multiple servers for memcache, you would have to set it up in common.conf.php      
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :  * &lt;code&gt;                                                                                         
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :  * // host, port, persistent, weight                                                              
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :  * $config['MEMCACHE'] = array(                                                                   
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :  *                       array('192.168.1.31', '11211', true, 40),                                
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :  *                       array('192.168.1.23', '11211', true, 80)                                 
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :  *                     );                                                                         
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :  * &lt;/code&gt;                                                                                        
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :  *                                                                                                
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :  * @author Leng Sheng Hong &lt;darkredz@gmail.com&gt;                                                   
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :  * @version $Id: DooMemCache.php 1000 2009-08-22 19:36:10                                         
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :  * @package doo.cache                                                                             
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :  * @since 1.1                                                                                     
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :  */                                                                                               
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :                                                                                                   
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                : class MemoryCache{                                                                                
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :     /**                                                                                           
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :      * Memcached connection                                                                       
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :      * @var Memcache                                                                              
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :      */                                                                                           
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :     protected $_memcache;                                                                         
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :                                                                                                   
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :     /**                                                                                           
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span>                :      * Configurations of the connections                                                          
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :      * @var array                                                                                 
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                :      */                                                                                           
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :     protected $_config;                                                                           
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :                                                                                                   
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :     public function  __construct($conf=Null) {                                                    
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :         //$this-&gt;_memcache = new Memcache();                                                      
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                : //        $this-&gt;_config = $conf;                                                                 
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :                                                                                                   
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :         // host, port, persistent, weight                                                         
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                : //        if($conf!==Null){                                                                       
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                : //            foreach ($conf as $c){                                                              
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                : //                $result = $this-&gt;_memcache-&gt;addServer($c[0], $c[1], $c[2], $c[3]);              
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                : //            }                                                                                   
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                : //        }                                                                                       
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                : //        else{                                                                                   
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                : //            $this-&gt;_memcache-&gt;addServer('localhost', 11211);                                    
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                : //        }                                                                                       
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span><span class="lineNoCov">              0 :     }                                                                                             </span>
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :                                                                                                   
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                :     /**                                                                                           
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :      * Adds a cache with an unique Id.                                                            
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :      *                                                                                            
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :      * @param string $id Cache Id                                                                 
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :      * @param mixed $data Data to be stored                                                       
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :      * @param int $expire Seconds to expired                                                      
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :      * @param int $compressed To store the data in Zlib compressed format                         
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :      * @return bool True if success                                                               
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :      */                                                                                           
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :     public function put($id, $data, $expire=0, $compressed=false){                                
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :                                                                                                   
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :                                                                                                   
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                : //         if($compressed)                                                                        
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                : //             return $this-&gt;_memcache-&gt;set($id, $data, MEMCACHE_COMPRESSED, $expire);            
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span>                : //         else                                                                                   
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                : //             return $this-&gt;_memcache-&gt;set($id, $data, 0, $expire);                              
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span><span class="lineCov">              2 :     return false;                                                                                 </span>
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :     }                                                                                             
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :                                                                                                   
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :     /**                                                                                           
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                :      * Retrieves a value from cache with an Id.                                                   
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :      *                                                                                            
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span>                :      * @param string $id A unique key identifying the cache                                       
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                :      * @return mixed The value stored in cache. Return false if no cache found or already expired.
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span>                :      */                                                                                           
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                :     public function get($id){                                                                     
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                :                                                                                                   
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                : //         $return = $this-&gt;_memcache-&gt;get($id);                                                  
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span><span class="lineCov">              2 :       $return = false;                                                                            </span>
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span>                :                                                                                                   
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span><span class="lineCov">              2 :     return( $return );                                                                            </span>
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                :     }                                                                                             
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                :                                                                                                   
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                :     /**                                                                                           
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :      * Deletes an APC data cache with an identifying Id                                           
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span>                :      *                                                                                            
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span>                :      * @param string $id Id of the cache                                                          
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                :      * @return bool True if success                                                               
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                :      */                                                                                           
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :     public function clear($id){                                                                   
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span><span class="lineNoCov">              0 :         return $this-&gt;_memcache-&gt;delete($id);                                                     </span>
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :     }                                                                                             
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                :                                                                                                   
+<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span>                :     /**                                                                                           
+<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span>                :      * Deletes all data cache                                                                     
+<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span>                :      * @return bool True if success                                                               
+<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span>                :      */                                                                                           
+<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                :     public function clearAll(){                                                                   
+<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span><span class="lineNoCov">              0 :         return $this-&gt;_memcache-&gt;flush();                                                         </span>
+<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span>                :     }                                                                                             
+<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span>                :                                                                                                   
+<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span>                : }                                                                                                 
+<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span>                :                                                                                                   
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel74": {
+          "header": "2 tests cover line 74",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel86": {
+          "header": "2 tests cover line 86",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel88": {
+          "header": "2 tests cover line 88",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library_oauth2_lib.dashboard.html	(revision 5888)
@@ -0,0 +1,129 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>lib</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [4,0,0,0,0,0,0,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[0,130,"<a href=\"library_oauth2_lib_OAuth2.php.html#44\">OAuth2<\/a>"],[0,4,"<a href=\"library_oauth2_lib_OAuth2AuthenticateException.php.html#11\">OAuth2AuthenticateException<\/a>"],[0,14,"<a href=\"library_oauth2_lib_OAuth2RedirectException.php.html#10\">OAuth2RedirectException<\/a>"],[0,8,"<a href=\"library_oauth2_lib_OAuth2ServerException.php.html#8\">OAuth2ServerException<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">lib</td></tr>
+      <tr><td><div align="center"><p><a href="library_oauth2_lib.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#44">OAuth2</a> (17030)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#10">OAuth2RedirectException</a> (210)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#8">OAuth2ServerException</a> (72)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#11">OAuth2AuthenticateException</a> (20)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#52">OAuth2AuthenticateException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#32">OAuth2RedirectException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#30">OAuth2AuthenticateException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1358">OAuth2::validateRedirectUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1329">OAuth2::getAuthorizationHeader</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1344">OAuth2::sendJsonHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#47">OAuth2RedirectException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#66">OAuth2RedirectException::buildUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#71">OAuth2ServerException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#79">OAuth2ServerException::__toString</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_controller.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_controller.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api_controller.php.html	(revision 5888)
@@ -0,0 +1,2604 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>controller.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">controller.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="api.html">api</a>/<a href="api_controller.php.html">controller.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="32.50%">
+                <div class="size scarlet_red"  style="width:32.5%" title="32.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">32.50%</td>
+          <td class="coverNumLo">13 / 40</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="56.68%">
+                <div class="size butter"  style="width:56.676557863501%" title="56.68%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">56.68%</td>
+          <td class="coverNumMed">191 / 337</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">Controller</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="32.50%">
+                <div class="size scarlet_red"  style="width:32.5%" title="32.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">32.50%</td>
+          <td class="coverNumLo">13 / 40</td>
+          <td class="crap">3157.44</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="56.68%">
+                <div class="size butter"  style="width:56.676557863501%" title="56.68%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">56.68%</td>
+          <td class="coverNumMed">191 / 337</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#33">__destruct()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#41">closeAll()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">20</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#49">clearAll()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#54">clear( $id )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#59">check( $id )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#64">store( $id, $data, $expires, $compressed )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#69">find( $URI, $params = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">3 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#77">read( $URI, $params = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#85">deleteAll( $URI, $params = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">3 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#93">delete( $URI, $params = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">3.33</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="66.67%">
+                  <div class="size butter"  style="width:66.666666666667%" title="66.67%"></div>
+              </div>
+          </td>
+          <td class="coverPerMed">66.67%</td>
+          <td class="coverNumMed">2 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#101">replace( $URI, $params, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#109">update( $URI, $params, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#117">create( $URI, $params, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#122">begin( $URI, $params = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#127">commit( $URI, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#132">rollback( $URI, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#137">format( $URI, $params, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#142">parse( $URI, $data, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#147">URI( $className, $id = false, $service = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#155">links( $concept = false, $linkage = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">156</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#203">isConcept( $concept, $linkName )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#211">hasOne( $concept, $linkName )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#219">getConcept( $concept, $moduleName = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#227">loadCache( $cacheType = 'Memory' )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#234">loadConfig( $className, $isService = false)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">8 / 8</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#250">import( $path, $ext = &quot;.php&quot; )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">6 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#261">load( $path, $class = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">14 / 14</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#284">wallet( $serviceName )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">7 / 7</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#299">connect( $service, $config )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">4 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#309">configure( $config, $newConfig )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">3 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#317">dispatch( $dispatcher, $data, $optionsMap = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#331">service( $serviceName, $concept = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">23 / 23</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#369">interceptor( $method, $concept = false, $serviceName = false, $isService = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">13</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">23 / 23</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#407">interceptorCommit( $eventType, $commitList, $isService = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">7 / 7</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#422">fire( $eventType, $method, &amp;$params, $original, $isService = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">9</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">14 / 14</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#461">serviceName( $URI, $original = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">11.35</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="85.71%">
+                  <div class="size chameleon"  style="width:85.714285714286%" title="85.71%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">85.71%</td>
+          <td class="coverNumHi">12 / 14</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#485">call( $method, $URI, $properties = false, $options = false, $service = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">47.02</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="88.41%">
+                  <div class="size chameleon"  style="width:88.405797101449%" title="88.41%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">88.41%</td>
+          <td class="coverNumHi">61 / 69</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#598">fallback( $exception )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#604">put( $URI, $data, $txIds = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">600</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 62</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#710">get()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                                             
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : if( !defined( 'ROOTPATH' ) )                                                                                                                                      
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :     define( 'ROOTPATH', dirname(__FILE__).'/..' );                                                                                                                
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                : require_once(ROOTPATH.'/api/config.php');                                                                                                                         
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                : /**                                                                                                                                                               
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                : TODO list:                                                                                                                                                        
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :   * definir de forma centralizada os caminhos e as constantes necessÃ¡rias;                                                                                       
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :   * criar um User Agent detect e um OS server detect para customizaÃ§Ãµes espeÃ§Ã­ficas de cada browser / servidor;                                               
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :   * criar um registrador para fallback handlers;                                                                                                                  
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :   * criar um dependency manager na configuraÃ§Ã£o dos serviÃ§os, para poder gerenciar os imports corretamente                                                     
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :   * criar um login e a recuperaÃ§Ã£o da sessÃ£o;                                                                                                                  
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                : */                                                                                                                                                                
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                : class Controller {                                                                                                                                                
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :     static $cache;                                                                                                                                                
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :     static $services = array();                                                                                                                                   
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :     static $interceptors = array();                                                                                                                               
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :     static $config = array();                                                                                                                                     
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :     static $includes = array();                                                                                                                                   
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :     static $tx = array();                                                                                                                                         
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :     static $isConcept = array();                                                                                                                                  
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :     static $hasOne = array();                                                                                                                                     
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :     static $txID = 0;                                                                                                                                             
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :     static $wallet;                                                                                                                                               
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :     public function __destruct()                                                                                                                                  
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                : //         if( $this-&gt;service )                                                                                                                                   
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                : //         $this-&gt;service-&gt;close();                                                                                                                               
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                : //         else                                                                                                                                                   
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineNoCov">              0 :         self::closeAll();                                                                                                                                         </span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                             </span>
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :     public static function closeAll()                                                                                                                             
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span><span class="lineNoCov">              0 :         if( self::$services )                                                                                                                                     </span>
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span><span class="lineNoCov">              0 :         foreach( self::$services as $serviceName =&gt; $service )                                                                                                    </span>
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span><span class="lineNoCov">              0 :             if( self::$config[ $serviceName ]['type'] === 'service' )                                                                                             </span>
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span><span class="lineNoCov">              0 :               $service-&gt;close();                                                                                                                                  </span>
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                             </span>
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :     public static function clearAll()                                                                                                                             
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span><span class="lineNoCov">              0 :         return self::$cache-&gt;clearAll();                                                                                                                          </span>
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :     public static function clear( $id )                                                                                                                           
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span><span class="lineNoCov">              0 :         return self::$cache-&gt;clear( $id );                                                                                                                        </span>
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :     public static function check( $id )                                                                                                                           
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span><span class="lineNoCov">              0 :         return self::$cache-&gt;get( $id );                                                                                                                          </span>
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :     public static function store( $id, $data, $expires, $compressed )                                                                                             
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span><span class="lineNoCov">              0 :         return self::$cache-&gt;put( $id, $data, $expires, $compressed );                                                                                            </span>
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :     public static function find( $URI, $params = false, $criteria = false )                                                                                       
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span><span class="lineCov">             10 :         if( isset($URI['id']) &amp;&amp; $URI['id'] )                                                                                                                     </span>
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span><span class="lineCov">             10 :         return self::read( $URI, $params, $criteria );                                                                                                            </span>
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span><span class="lineCov">             10 :         return self::call( 'find', $URI, $params, $criteria );                                                                                                    </span>
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :     public static function read( $URI, $params = false, $criteria = false )                                                                                       
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span><span class="lineNoCov">              0 :         if( !isset($URI['id']) || !$URI['id'] )                                                                                                                   </span>
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span><span class="lineNoCov">              0 :         return self::find( $URI, $params, $criteria );                                                                                                            </span>
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span><span class="lineNoCov">              0 :         return self::call( 'read', $URI, $params, $criteria );                                                                                                    </span>
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                :     public static function deleteAll( $URI, $params = false, $criteria = false )                                                                                  
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span><span class="lineCov">             12 :         if( isset($URI['id']) &amp;&amp; $URI['id'] )                                                                                                                     </span>
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span><span class="lineCov">             12 :         return self::delete( $URI, $params, $criteria );                                                                                                          </span>
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span><span class="lineCov">             12 :         return self::call( 'deleteAll', $URI, $params, $criteria );                                                                                               </span>
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span>                :     public static function delete( $URI, $params = false, $criteria = false )                                                                                     
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span><span class="lineCov">             12 :         if( !isset($URI['id']) || !$URI['id'] )                                                                                                                   </span>
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span><span class="lineCov">             12 :         return self::deleteAll( $URI, $params, $criteria );                                                                                                       </span>
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span><span class="lineNoCov">              0 :         return self::call( 'delete', $URI, $params, $criteria );                                                                                                  </span>
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span>                :     public static function replace( $URI, $params, $criteria = false )                                                                                            
+<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span><span class="lineNoCov">              0 :         if( isset($URI['id']) &amp;&amp; $URI['id'] )                                                                                                                     </span>
+<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span><span class="lineNoCov">              0 :         return self::update( $URI, $params, $criteria );                                                                                                          </span>
+<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span><span class="lineNoCov">              0 :         return self::call( 'replace', $URI, $params, $criteria );                                                                                                 </span>
+<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span>                :     public static function update( $URI, $params, $criteria = false )                                                                                             
+<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111">     111</a> </span><span class="lineNoCov">              0 :         if( !isset($URI['id']) || !$URI['id'] )                                                                                                                   </span>
+<span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112">     112</a> </span><span class="lineNoCov">              0 :         return self::replace( $URI, $params, $criteria );                                                                                                         </span>
+<span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113">     113</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114">     114</a> </span><span class="lineNoCov">              0 :         return self::call( 'update', $URI, $params, $criteria );                                                                                                  </span>
+<span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115">     115</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116">     116</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117">     117</a> </span>                :     public static function create( $URI, $params, $criteria = false )                                                                                             
+<span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118">     118</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119">     119</a> </span><span class="lineCov">             12 :         return self::call( 'create', $URI, $params, $criteria );                                                                                                  </span>
+<span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120">     120</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121">     121</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122">     122</a> </span>                :     public static function begin( $URI, $params = false, $criteria = false )                                                                                      
+<span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123">     123</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124">     124</a> </span><span class="lineNoCov">              0 :         return self::call( 'begin', $URI, $params, $criteria );                                                                                                   </span>
+<span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125">     125</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126">     126</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127">     127</a> </span>                :     public static function commit( $URI, $criteria = false )                                                                                                      
+<span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128">     128</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129">     129</a> </span><span class="lineNoCov">              0 :         return self::call( 'commit', $URI, false, $criteria );                                                                                                    </span>
+<span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130">     130</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131">     131</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132">     132</a> </span>                :     public static function rollback( $URI, $criteria = false )                                                                                                    
+<span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133">     133</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134">     134</a> </span><span class="lineNoCov">              0 :         return self::call( 'rollback', $URI, false, $criteria );                                                                                                  </span>
+<span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135">     135</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136">     136</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container137"><a name="137"></a><a href="#137" id="line137">     137</a> </span>                :     public static function format( $URI, $params, $criteria = false )                                                                                             
+<span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138">     138</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139">     139</a> </span><span class="lineNoCov">              0 :         return self::call( 'format', $URI, $params, $criteria );                                                                                                  </span>
+<span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140">     140</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141">     141</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142">     142</a> </span>                :     public static function parse( $URI, $data, $criteria = false )                                                                                                
+<span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143">     143</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144">     144</a> </span><span class="lineNoCov">              0 :         return self::call( 'parse', $URI, $data, $criteria );                                                                                                     </span>
+<span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145">     145</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146">     146</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147">     147</a> </span>                :     public static function URI( $className, $id = false, $service = false )                                                                                       
+<span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148">     148</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149">     149</a> </span><span class="lineNoCov">              0 :         return array( 'concept' =&gt; $className,                                                                                                                    </span>
+<span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150">     150</a> </span><span class="lineNoCov">              0 :               'service' =&gt; $service ? $service : false,                                                                                                           </span>
+<span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151">     151</a> </span><span class="lineNoCov">              0 :               'id' =&gt; $id ? $id : '' );                                                                                                                           </span>
+<span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152">     152</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153">     153</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154">     154</a> </span>                :     //TODO: Compatibilizar as configs relativas aos modulos, adicionando os mesmo nos parametros passados                                                         
+<span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155">     155</a> </span>                :     public static function links( $concept = false, $linkage = false )                                                                                            
+<span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156">     156</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157">     157</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158">     158</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159">     159</a> </span><span class="lineNoCov">              0 :         if( !isset(self::$config[ $concept ]) )                                                                                                                   </span>
+<span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160">     160</a> </span><span class="lineNoCov">              0 :           self::$config[ $concept ] = self::loadConfig( $concept );                                                                                               </span>
+<span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161">     161</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162">     162</a> </span><span class="lineNoCov">              0 :         $links = array();                                                                                                                                         </span>
+<span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163">     163</a> </span><span class="lineNoCov">              0 :         self::$isConcept[ $concept ] = array();                                                                                                                   </span>
+<span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164">     164</a> </span><span class="lineNoCov">              0 :         self::$hasOne[ $concept ] = array();                                                                                                                      </span>
+<span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165">     165</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166">     166</a> </span><span class="lineNoCov">              0 :         if( isset(self::$config[ $concept ][ 'model.hasOne' ]) )                                                                                                  </span>
+<span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167">     167</a> </span><span class="lineNoCov">              0 :         foreach( self::$config[ $concept ][ 'model.hasOne' ] as $linkName =&gt; $linkTarget )                                                                        </span>
+<span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168">     168</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169">     169</a> </span><span class="lineNoCov">              0 :             list( $target, $link ) = explode( '.', $linkTarget );                                                                                                 </span>
+<span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170">     170</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171">     171</a> </span><span class="lineNoCov">              0 :             if( $linkage === $linkName )                                                                                                                          </span>
+<span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172">     172</a> </span><span class="lineNoCov">              0 :             $return = $link;                                                                                                                                      </span>
+<span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173">     173</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174">     174</a> </span><span class="lineNoCov">              0 :             $links[$linkName] = $target;                                                                                                                          </span>
+<span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175">     175</a> </span><span class="lineNoCov">              0 :             self::$hasOne[ $concept ][ $linkName ] = true;                                                                                                        </span>
+<span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176">     176</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177">     177</a> </span><span class="lineNoCov">              0 :         if( isset(self::$config[ $concept ][ 'model.depends' ]) )                                                                                                 </span>
+<span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178">     178</a> </span><span class="lineNoCov">              0 :         foreach( self::$config[ $concept ][ 'model.depends' ] as $linkName =&gt; $linkTarget )                                                                       </span>
+<span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179">     179</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180">     180</a> </span><span class="lineNoCov">              0 :             list( $target, $link ) = explode( '.', $linkTarget );                                                                                                 </span>
+<span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181">     181</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182">     182</a> </span><span class="lineNoCov">              0 :              if( $linkage === $linkName )                                                                                                                         </span>
+<span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183">     183</a> </span><span class="lineNoCov">              0 :             $return = $link;                                                                                                                                      </span>
+<span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184">     184</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185">     185</a> </span><span class="lineNoCov">              0 :             $links[$linkName] = $target;                                                                                                                          </span>
+<span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186">     186</a> </span><span class="lineNoCov">              0 :             self::$hasOne[ $concept ][ $linkName ] = true;                                                                                                        </span>
+<span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187">     187</a> </span><span class="lineNoCov">              0 :             self::$isConcept[ $concept ][ $linkName ] = true;                                                                                                     </span>
+<span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188">     188</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189">     189</a> </span><span class="lineNoCov">              0 :         if( isset(self::$config[ $concept ][ 'model.hasMany' ]) )                                                                                                 </span>
+<span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190">     190</a> </span><span class="lineNoCov">              0 :         foreach( self::$config[ $concept ][ 'model.hasMany' ] as $linkName =&gt; $linkTarget )                                                                       </span>
+<span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191">     191</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192">     192</a> </span><span class="lineNoCov">              0 :             list( $target, $link ) = explode( '.', $linkTarget );                                                                                                 </span>
+<span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193">     193</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194">     194</a> </span><span class="lineNoCov">              0 :              if( $linkage === $linkName )                                                                                                                         </span>
+<span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195">     195</a> </span><span class="lineNoCov">              0 :             $return = $link;                                                                                                                                      </span>
+<span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196">     196</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197">     197</a> </span><span class="lineNoCov">              0 :             $links[$linkName] = $target;                                                                                                                          </span>
+<span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198">     198</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199">     199</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200">     200</a> </span><span class="lineNoCov">              0 :         return( isset($return) ? $return : $links );                                                                                                              </span>
+<span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201">     201</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202">     202</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203">     203</a> </span>                :     public static function isConcept( $concept, $linkName )                                                                                                       
+<span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204">     204</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205">     205</a> </span><span class="lineNoCov">              0 :         if( !isset( self::$isConcept[ $concept ] ) )                                                                                                              </span>
+<span class="lineNum" id="container206"><a name="206"></a><a href="#206" id="line206">     206</a> </span><span class="lineNoCov">              0 :         self::links( $concept );                                                                                                                                  </span>
+<span class="lineNum" id="container207"><a name="207"></a><a href="#207" id="line207">     207</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container208"><a name="208"></a><a href="#208" id="line208">     208</a> </span><span class="lineNoCov">              0 :         return( isset(self::$isConcept[ $concept ][ $linkName ]) );                                                                                               </span>
+<span class="lineNum" id="container209"><a name="209"></a><a href="#209" id="line209">     209</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container210"><a name="210"></a><a href="#210" id="line210">     210</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container211"><a name="211"></a><a href="#211" id="line211">     211</a> </span>                :     public static function hasOne( $concept, $linkName )                                                                                                          
+<span class="lineNum" id="container212"><a name="212"></a><a href="#212" id="line212">     212</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container213"><a name="213"></a><a href="#213" id="line213">     213</a> </span><span class="lineNoCov">              0 :         if( !isset( self::$hasOne[ $concept ] ) )                                                                                                                 </span>
+<span class="lineNum" id="container214"><a name="214"></a><a href="#214" id="line214">     214</a> </span><span class="lineNoCov">              0 :         self::links( $concept );                                                                                                                                  </span>
+<span class="lineNum" id="container215"><a name="215"></a><a href="#215" id="line215">     215</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container216"><a name="216"></a><a href="#216" id="line216">     216</a> </span><span class="lineNoCov">              0 :         return( isset(self::$hasOne[ $concept ][ $linkName ]) );                                                                                                  </span>
+<span class="lineNum" id="container217"><a name="217"></a><a href="#217" id="line217">     217</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container218"><a name="218"></a><a href="#218" id="line218">     218</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container219"><a name="219"></a><a href="#219" id="line219">     219</a> </span>                :     public static function getConcept( $concept, $moduleName = false )                                                                                            
+<span class="lineNum" id="container220"><a name="220"></a><a href="#220" id="line220">     220</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container221"><a name="221"></a><a href="#221" id="line221">     221</a> </span><span class="lineNoCov">              0 :         if( isset( self::$config[ $concept ] ) )                                                                                                                  </span>
+<span class="lineNum" id="container222"><a name="222"></a><a href="#222" id="line222">     222</a> </span><span class="lineNoCov">              0 :         return( self::$config[ $concept ] );                                                                                                                      </span>
+<span class="lineNum" id="container223"><a name="223"></a><a href="#223" id="line223">     223</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container224"><a name="224"></a><a href="#224" id="line224">     224</a> </span><span class="lineNoCov">              0 :         return( self::$config[ $concept ] = self::loadConfig( $concept, $moduleName ) );                                                                          </span>
+<span class="lineNum" id="container225"><a name="225"></a><a href="#225" id="line225">     225</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container226"><a name="226"></a><a href="#226" id="line226">     226</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container227"><a name="227"></a><a href="#227" id="line227">     227</a> </span>                :     public static function loadCache( $cacheType = 'Memory' )                                                                                                     
+<span class="lineNum" id="container228"><a name="228"></a><a href="#228" id="line228">     228</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container229"><a name="229"></a><a href="#229" id="line229">     229</a> </span><span class="lineNoCov">              0 :         include_once( &quot;cache/MemoryCache.php&quot; );                                                                                                                  </span>
+<span class="lineNum" id="container230"><a name="230"></a><a href="#230" id="line230">     230</a> </span><span class="lineNoCov">              0 :         return new MemoryCache();                                                                                                                                 </span>
+<span class="lineNum" id="container231"><a name="231"></a><a href="#231" id="line231">     231</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container232"><a name="232"></a><a href="#232" id="line232">     232</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container233"><a name="233"></a><a href="#233" id="line233">     233</a> </span>                :     //TODO: Compatibilizar as configs relativas aos modulos, adicionando os mesmo nos parametros passados                                                         
+<span class="lineNum" id="container234"><a name="234"></a><a href="#234" id="line234">     234</a> </span>                :     public static function loadConfig( $className, $isService = false)                                                                                            
+<span class="lineNum" id="container235"><a name="235"></a><a href="#235" id="line235">     235</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container236"><a name="236"></a><a href="#236" id="line236">     236</a> </span><span class="lineCov">              2 :         $fileName = $className.'.'.($isService ? 'srv' : 'ini');                                                                                                  </span>
+<span class="lineNum" id="container237"><a name="237"></a><a href="#237" id="line237">     237</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container238"><a name="238"></a><a href="#238" id="line238">     238</a> </span><span class="lineCov">              2 :         $config = self::$cache-&gt;get( $fileName );                                                                                                                 </span>
+<span class="lineNum" id="container239"><a name="239"></a><a href="#239" id="line239">     239</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container240"><a name="240"></a><a href="#240" id="line240">     240</a> </span><span class="lineCov">              2 :         if( !$config )                                                                                                                                            </span>
+<span class="lineNum" id="container241"><a name="241"></a><a href="#241" id="line241">     241</a> </span><span class="lineCov">              2 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container242"><a name="242"></a><a href="#242" id="line242">     242</a> </span><span class="lineCov">              2 :                 $config = parse_ini_file( ROOTPATH.'/config/'.$fileName, true );                                                                                  </span>
+<span class="lineNum" id="container243"><a name="243"></a><a href="#243" id="line243">     243</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container244"><a name="244"></a><a href="#244" id="line244">     244</a> </span><span class="lineCov">              2 :         self::$cache-&gt;put( $fileName, $config );                                                                                                                  </span>
+<span class="lineNum" id="container245"><a name="245"></a><a href="#245" id="line245">     245</a> </span><span class="lineCov">              2 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container246"><a name="246"></a><a href="#246" id="line246">     246</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container247"><a name="247"></a><a href="#247" id="line247">     247</a> </span><span class="lineCov">              2 :         return( $config );                                                                                                                                        </span>
+<span class="lineNum" id="container248"><a name="248"></a><a href="#248" id="line248">     248</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container249"><a name="249"></a><a href="#249" id="line249">     249</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container250"><a name="250"></a><a href="#250" id="line250">     250</a> </span>                :     public static function import( $path, $ext = &quot;.php&quot; )                                                                                                         
+<span class="lineNum" id="container251"><a name="251"></a><a href="#251" id="line251">     251</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container252"><a name="252"></a><a href="#252" id="line252">     252</a> </span><span class="lineCov">              1 :         if( !isset(self::$includes[$path]) )                                                                                                                      </span>
+<span class="lineNum" id="container253"><a name="253"></a><a href="#253" id="line253">     253</a> </span><span class="lineCov">              1 :     {                                                                                                                                                             </span>
+<span class="lineNum" id="container254"><a name="254"></a><a href="#254" id="line254">     254</a> </span><span class="lineCov">              1 :         require_once( ROOTPATH.'/'.$path.$ext );                                                                                                                  </span>
+<span class="lineNum" id="container255"><a name="255"></a><a href="#255" id="line255">     255</a> </span><span class="lineCov">              1 :         self::$includes[$path] = false;                                                                                                                           </span>
+<span class="lineNum" id="container256"><a name="256"></a><a href="#256" id="line256">     256</a> </span><span class="lineCov">              1 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container257"><a name="257"></a><a href="#257" id="line257">     257</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container258"><a name="258"></a><a href="#258" id="line258">     258</a> </span><span class="lineCov">              1 :         return( self::$includes[$path] );                                                                                                                         </span>
+<span class="lineNum" id="container259"><a name="259"></a><a href="#259" id="line259">     259</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container260"><a name="260"></a><a href="#260" id="line260">     260</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container261"><a name="261"></a><a href="#261" id="line261">     261</a> </span>                :     public static function load( $path, $class = false )                                                                                                          
+<span class="lineNum" id="container262"><a name="262"></a><a href="#262" id="line262">     262</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container263"><a name="263"></a><a href="#263" id="line263">     263</a> </span><span class="lineCov">              1 :             if( $return = self::import( $path, &quot;&quot; ) )                                                                                                             </span>
+<span class="lineNum" id="container264"><a name="264"></a><a href="#264" id="line264">     264</a> </span><span class="lineCov">              1 :         return( $return );                                                                                                                                        </span>
+<span class="lineNum" id="container265"><a name="265"></a><a href="#265" id="line265">     265</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container266"><a name="266"></a><a href="#266" id="line266">     266</a> </span><span class="lineCov">              1 :         if( !$class ){                                                                                                                                            </span>
+<span class="lineNum" id="container267"><a name="267"></a><a href="#267" id="line267">     267</a> </span><span class="lineCov">              1 :         preg_match( '/^\/?.*\/([^\/]+).php$/', $path, $class );                                                                                                   </span>
+<span class="lineNum" id="container268"><a name="268"></a><a href="#268" id="line268">     268</a> </span><span class="lineCov">              1 :         $class = $class[1];                                                                                                                                       </span>
+<span class="lineNum" id="container269"><a name="269"></a><a href="#269" id="line269">     269</a> </span><span class="lineCov">              1 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container270"><a name="270"></a><a href="#270" id="line270">     270</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container271"><a name="271"></a><a href="#271" id="line271">     271</a> </span><span class="lineCov">              1 :         $object =  self::$cache-&gt;get( $class );                                                                                                                   </span>
+<span class="lineNum" id="container272"><a name="272"></a><a href="#272" id="line272">     272</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container273"><a name="273"></a><a href="#273" id="line273">     273</a> </span><span class="lineCov">              1 :         if( !$object )                                                                                                                                            </span>
+<span class="lineNum" id="container274"><a name="274"></a><a href="#274" id="line274">     274</a> </span><span class="lineCov">              1 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container275"><a name="275"></a><a href="#275" id="line275">     275</a> </span><span class="lineCov">              1 :         $object = new $class();                                                                                                                                   </span>
+<span class="lineNum" id="container276"><a name="276"></a><a href="#276" id="line276">     276</a> </span><span class="lineCov">              1 :          self::$cache-&gt;put( $class, $object );                                                                                                                    </span>
+<span class="lineNum" id="container277"><a name="277"></a><a href="#277" id="line277">     277</a> </span><span class="lineCov">              1 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container278"><a name="278"></a><a href="#278" id="line278">     278</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container279"><a name="279"></a><a href="#279" id="line279">     279</a> </span><span class="lineCov">              1 :         self::$includes[$path] = $object;                                                                                                                         </span>
+<span class="lineNum" id="container280"><a name="280"></a><a href="#280" id="line280">     280</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container281"><a name="281"></a><a href="#281" id="line281">     281</a> </span><span class="lineCov">              1 :         return( $object );                                                                                                                                        </span>
+<span class="lineNum" id="container282"><a name="282"></a><a href="#282" id="line282">     282</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container283"><a name="283"></a><a href="#283" id="line283">     283</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container284"><a name="284"></a><a href="#284" id="line284">     284</a> </span>                :     public static function wallet( $serviceName )                                                                                                                 
+<span class="lineNum" id="container285"><a name="285"></a><a href="#285" id="line285">     285</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container286"><a name="286"></a><a href="#286" id="line286">     286</a> </span><span class="lineCov">              1 :         if( !isset( self::$wallet ) )                                                                                                                             </span>
+<span class="lineNum" id="container287"><a name="287"></a><a href="#287" id="line287">     287</a> </span><span class="lineCov">              1 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container288"><a name="288"></a><a href="#288" id="line288">     288</a> </span>                :         //// Hack //// TODO: passar o init da sessÃ£o no login do expresso                                                                                        
+<span class="lineNum" id="container289"><a name="289"></a><a href="#289" id="line289">     289</a> </span><span class="lineCov">              1 :         Config::init();                                                                                                                                           </span>
+<span class="lineNum" id="container290"><a name="290"></a><a href="#290" id="line290">     290</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container291"><a name="291"></a><a href="#291" id="line291">     291</a> </span><span class="lineCov">              1 :                 if(isset($_SESSION['wallet']))                                                                                                                    </span>
+<span class="lineNum" id="container292"><a name="292"></a><a href="#292" id="line292">     292</a> </span><span class="lineCov">              1 :                     self::$wallet = $_SESSION['wallet'];                                                                                                          </span>
+<span class="lineNum" id="container293"><a name="293"></a><a href="#293" id="line293">     293</a> </span>                :         /////////////                                                                                                                                             
+<span class="lineNum" id="container294"><a name="294"></a><a href="#294" id="line294">     294</a> </span><span class="lineCov">              1 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container295"><a name="295"></a><a href="#295" id="line295">     295</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container296"><a name="296"></a><a href="#296" id="line296">     296</a> </span><span class="lineCov">              1 :         return isset( self::$wallet[ $serviceName ] )? self::$wallet[ $serviceName ] : false;                                                                     </span>
+<span class="lineNum" id="container297"><a name="297"></a><a href="#297" id="line297">     297</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container298"><a name="298"></a><a href="#298" id="line298">     298</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container299"><a name="299"></a><a href="#299" id="line299">     299</a> </span>                :     public static function connect( $service, $config )                                                                                                           
+<span class="lineNum" id="container300"><a name="300"></a><a href="#300" id="line300">     300</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container301"><a name="301"></a><a href="#301" id="line301">     301</a> </span><span class="lineCov">              1 :         $result = $service-&gt;open( $config );                                                                                                                      </span>
+<span class="lineNum" id="container302"><a name="302"></a><a href="#302" id="line302">     302</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container303"><a name="303"></a><a href="#303" id="line303">     303</a> </span><span class="lineCov">              1 :         if( is_string( $result ) )                                                                                                                                </span>
+<span class="lineNum" id="container304"><a name="304"></a><a href="#304" id="line304">     304</a> </span><span class="lineCov">              1 :         throw new Exception( $result );                                                                                                                           </span>
+<span class="lineNum" id="container305"><a name="305"></a><a href="#305" id="line305">     305</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container306"><a name="306"></a><a href="#306" id="line306">     306</a> </span><span class="lineCov">              1 :         return( true );                                                                                                                                           </span>
+<span class="lineNum" id="container307"><a name="307"></a><a href="#307" id="line307">     307</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container308"><a name="308"></a><a href="#308" id="line308">     308</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container309"><a name="309"></a><a href="#309" id="line309">     309</a> </span>                :     public static function configure( $config, $newConfig )                                                                                                       
+<span class="lineNum" id="container310"><a name="310"></a><a href="#310" id="line310">     310</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container311"><a name="311"></a><a href="#311" id="line311">     311</a> </span><span class="lineCov">              1 :         foreach( $newConfig as $key =&gt; $value )                                                                                                                   </span>
+<span class="lineNum" id="container312"><a name="312"></a><a href="#312" id="line312">     312</a> </span><span class="lineCov">              1 :         $config[$key] = $value;                                                                                                                                   </span>
+<span class="lineNum" id="container313"><a name="313"></a><a href="#313" id="line313">     313</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container314"><a name="314"></a><a href="#314" id="line314">     314</a> </span><span class="lineCov">              1 :         return( $config );                                                                                                                                        </span>
+<span class="lineNum" id="container315"><a name="315"></a><a href="#315" id="line315">     315</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container316"><a name="316"></a><a href="#316" id="line316">     316</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container317"><a name="317"></a><a href="#317" id="line317">     317</a> </span>                :     public static function dispatch( $dispatcher, $data, $optionsMap = false )                                                                                    
+<span class="lineNum" id="container318"><a name="318"></a><a href="#318" id="line318">     318</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container319"><a name="319"></a><a href="#319" id="line319">     319</a> </span>                : //         if( $mappedTo )                                                                                                                                        
+<span class="lineNum" id="container320"><a name="320"></a><a href="#320" id="line320">     320</a> </span>                : //         $data = array( $mappedTo =&gt; $data );                                                                                                                   
+<span class="lineNum" id="container321"><a name="321"></a><a href="#321" id="line321">     321</a> </span>                : //                                                                                                                                                                
+<span class="lineNum" id="container322"><a name="322"></a><a href="#322" id="line322">     322</a> </span>                : //         foreach( $data as $method =&gt; $params )                                                                                                                 
+<span class="lineNum" id="container323"><a name="323"></a><a href="#323" id="line323">     323</a> </span>                : //         {                                                                                                                                                      
+<span class="lineNum" id="container324"><a name="324"></a><a href="#324" id="line324">     324</a> </span>                : // //         foreach( $data[ $method ] as $name =&gt; $value )                                                                                                      
+<span class="lineNum" id="container325"><a name="325"></a><a href="#325" id="line325">     325</a> </span>                : //         }                                                                                                                                                      
+<span class="lineNum" id="container326"><a name="326"></a><a href="#326" id="line326">     326</a> </span>                : //                                                                                                                                                                
+<span class="lineNum" id="container327"><a name="327"></a><a href="#327" id="line327">     327</a> </span>                : //         self::import( &quot;$dispatcher.php&quot; );                                                                                                                     
+<span class="lineNum" id="container328"><a name="328"></a><a href="#328" id="line328">     328</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                             </span>
+<span class="lineNum" id="container329"><a name="329"></a><a href="#329" id="line329">     329</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container330"><a name="330"></a><a href="#330" id="line330">     330</a> </span>                :     //TODO: Compatibilizar as configs relativas aos modulos, adicionando os mesmo nos parametros passados                                                         
+<span class="lineNum" id="container331"><a name="331"></a><a href="#331" id="line331">     331</a> </span>                :     public static function service( $serviceName, $concept = false )                                                                                              
+<span class="lineNum" id="container332"><a name="332"></a><a href="#332" id="line332">     332</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container333"><a name="333"></a><a href="#333" id="line333">     333</a> </span><span class="lineCov">             12 :         if( isset( self::$services[ $serviceName ] ) )                                                                                                            </span>
+<span class="lineNum" id="container334"><a name="334"></a><a href="#334" id="line334">     334</a> </span><span class="lineCov">             12 :         return self::$services[ $serviceName ];                                                                                                                   </span>
+<span class="lineNum" id="container335"><a name="335"></a><a href="#335" id="line335">     335</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container336"><a name="336"></a><a href="#336" id="line336">     336</a> </span><span class="lineCov">              1 :         if( !isset(self::$config[ $serviceName ]) )                                                                                                               </span>
+<span class="lineNum" id="container337"><a name="337"></a><a href="#337" id="line337">     337</a> </span><span class="lineCov">              1 :          self::$config[ $serviceName ] = self::loadConfig( $serviceName, true );                                                                                  </span>
+<span class="lineNum" id="container338"><a name="338"></a><a href="#338" id="line338">     338</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container339"><a name="339"></a><a href="#339" id="line339">     339</a> </span><span class="lineCov">              1 :         if( !isset(self::$config[ $serviceName ]) )                                                                                                               </span>
+<span class="lineNum" id="container340"><a name="340"></a><a href="#340" id="line340">     340</a> </span><span class="lineCov">              1 :         return( false );                                                                                                                                          </span>
+<span class="lineNum" id="container341"><a name="341"></a><a href="#341" id="line341">     341</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container342"><a name="342"></a><a href="#342" id="line342">     342</a> </span><span class="lineCov">              1 :         if( !isset(self::$config[ $serviceName ]['type']) )                                                                                                       </span>
+<span class="lineNum" id="container343"><a name="343"></a><a href="#343" id="line343">     343</a> </span><span class="lineCov">              1 :         self::$config[ $serviceName ]['type'] = 'service';                                                                                                        </span>
+<span class="lineNum" id="container344"><a name="344"></a><a href="#344" id="line344">     344</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container345"><a name="345"></a><a href="#345" id="line345">     345</a> </span><span class="lineCov">              1 :         self::import( 'api/'.self::$config[ $serviceName ]['type'] );   //TODO: Item 4                                                                            </span>
+<span class="lineNum" id="container346"><a name="346"></a><a href="#346" id="line346">     346</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container347"><a name="347"></a><a href="#347" id="line347">     347</a> </span><span class="lineCov">              1 :         $service = self::load( self::$config[ $serviceName ]['path'],                                                                                             </span>
+<span class="lineNum" id="container348"><a name="348"></a><a href="#348" id="line348">     348</a> </span><span class="lineCov">              1 :                    self::$config[ $serviceName ]['class'] );                                                                                                      </span>
+<span class="lineNum" id="container349"><a name="349"></a><a href="#349" id="line349">     349</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container350"><a name="350"></a><a href="#350" id="line350">     350</a> </span><span class="lineCov">              1 :           $srvConfig = array();                                                                                                                                   </span>
+<span class="lineNum" id="container351"><a name="351"></a><a href="#351" id="line351">     351</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container352"><a name="352"></a><a href="#352" id="line352">     352</a> </span><span class="lineCov">              1 :         if( isset(self::$config[ $serviceName ][ 'config' ]) )                                                                                                    </span>
+<span class="lineNum" id="container353"><a name="353"></a><a href="#353" id="line353">     353</a> </span><span class="lineCov">              1 :         $srvConfig = self::configure( $srvConfig, self::$config[ $serviceName ][ 'config' ] );                                                                    </span>
+<span class="lineNum" id="container354"><a name="354"></a><a href="#354" id="line354">     354</a> </span><span class="lineCov">              1 :         if( $wallet = self::wallet( $serviceName ) )                                                                                                              </span>
+<span class="lineNum" id="container355"><a name="355"></a><a href="#355" id="line355">     355</a> </span><span class="lineCov">              1 :         $srvConfig = self::configure( $srvConfig, $wallet );                                                                                                      </span>
+<span class="lineNum" id="container356"><a name="356"></a><a href="#356" id="line356">     356</a> </span><span class="lineCov">              1 :         if( $concept &amp;&amp; isset(self::$config[ $concept ]['service.config']) )                                                                                      </span>
+<span class="lineNum" id="container357"><a name="357"></a><a href="#357" id="line357">     357</a> </span><span class="lineCov">              1 :         $srvConfig = self::configure( $srvConfig, self::$config[ $concept ]['service.config'] );                                                                  </span>
+<span class="lineNum" id="container358"><a name="358"></a><a href="#358" id="line358">     358</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container359"><a name="359"></a><a href="#359" id="line359">     359</a> </span><span class="lineCov">              1 :         if( empty( $srvConfig ) )                                                                                                                                 </span>
+<span class="lineNum" id="container360"><a name="360"></a><a href="#360" id="line360">     360</a> </span><span class="lineCov">              1 :         $srvConfig = false;                                                                                                                                       </span>
+<span class="lineNum" id="container361"><a name="361"></a><a href="#361" id="line361">     361</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container362"><a name="362"></a><a href="#362" id="line362">     362</a> </span><span class="lineCov">              1 :         if( $service &amp;&amp; self::$config[ $serviceName ]['type'] === 'service' )                                                                                     </span>
+<span class="lineNum" id="container363"><a name="363"></a><a href="#363" id="line363">     363</a> </span><span class="lineCov">              1 :         self::connect( $service, $srvConfig );                                                                                                                    </span>
+<span class="lineNum" id="container364"><a name="364"></a><a href="#364" id="line364">     364</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container365"><a name="365"></a><a href="#365" id="line365">     365</a> </span><span class="lineCov">              1 :         return( self::$services[ $serviceName ] = $service );                                                                                                     </span>
+<span class="lineNum" id="container366"><a name="366"></a><a href="#366" id="line366">     366</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container367"><a name="367"></a><a href="#367" id="line367">     367</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container368"><a name="368"></a><a href="#368" id="line368">     368</a> </span>                :     //TODO: Compatibilizar as configs relativas aos modulos, adicionando os mesmo nos parametros passados                                                         
+<span class="lineNum" id="container369"><a name="369"></a><a href="#369" id="line369">     369</a> </span>                :     public static function interceptor( $method, $concept = false, $serviceName = false, $isService = false )                                                     
+<span class="lineNum" id="container370"><a name="370"></a><a href="#370" id="line370">     370</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container371"><a name="371"></a><a href="#371" id="line371">     371</a> </span><span class="lineCov">             12 :         if( $concept &amp;&amp; !isset(self::$config[ $concept ]) )                                                                                                       </span>
+<span class="lineNum" id="container372"><a name="372"></a><a href="#372" id="line372">     372</a> </span><span class="lineCov">             12 :           self::$config[ $concept ] = self::loadConfig( $concept );                                                                                               </span>
+<span class="lineNum" id="container373"><a name="373"></a><a href="#373" id="line373">     373</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container374"><a name="374"></a><a href="#374" id="line374">     374</a> </span><span class="lineCov">             12 :         if( !$concept ) $concept = 'global';                                                                                                                      </span>
+<span class="lineNum" id="container375"><a name="375"></a><a href="#375" id="line375">     375</a> </span><span class="lineCov">             12 :         if( !$isService || !$serviceName ) $serviceName = 'global';                                                                                               </span>
+<span class="lineNum" id="container376"><a name="376"></a><a href="#376" id="line376">     376</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container377"><a name="377"></a><a href="#377" id="line377">     377</a> </span><span class="lineCov">             12 :         if( !isset( self::$interceptors[ $concept ] ) )                                                                                                           </span>
+<span class="lineNum" id="container378"><a name="378"></a><a href="#378" id="line378">     378</a> </span><span class="lineCov">             12 :         self::$interceptors[ $concept ] = array();                                                                                                                </span>
+<span class="lineNum" id="container379"><a name="379"></a><a href="#379" id="line379">     379</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container380"><a name="380"></a><a href="#380" id="line380">     380</a> </span><span class="lineCov">             12 :         if( !isset( self::$interceptors[ $concept ][ $serviceName ] ) )                                                                                           </span>
+<span class="lineNum" id="container381"><a name="381"></a><a href="#381" id="line381">     381</a> </span><span class="lineCov">             12 :         self::$interceptors[ $concept ][ $serviceName ] = array();                                                                                                </span>
+<span class="lineNum" id="container382"><a name="382"></a><a href="#382" id="line382">     382</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container383"><a name="383"></a><a href="#383" id="line383">     383</a> </span><span class="lineCov">             12 :         if( !isset( self::$interceptors[ $concept ][ $serviceName ][ $method ] ) )                                                                                </span>
+<span class="lineNum" id="container384"><a name="384"></a><a href="#384" id="line384">     384</a> </span><span class="lineCov">             12 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container385"><a name="385"></a><a href="#385" id="line385">     385</a> </span><span class="lineCov">              4 :         $events = array( 'before', 'after' );                                                                                                                     </span>
+<span class="lineNum" id="container386"><a name="386"></a><a href="#386" id="line386">     386</a> </span><span class="lineCov">              4 :         $interceptors = array();                                                                                                                                  </span>
+<span class="lineNum" id="container387"><a name="387"></a><a href="#387" id="line387">     387</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container388"><a name="388"></a><a href="#388" id="line388">     388</a> </span><span class="lineCov">              4 :         $prefix = ( $isService )? &quot;$serviceName.&quot; : &quot;&quot;;                                                                                                           </span>
+<span class="lineNum" id="container389"><a name="389"></a><a href="#389" id="line389">     389</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container390"><a name="390"></a><a href="#390" id="line390">     390</a> </span><span class="lineCov">              4 :         foreach( $events as $i =&gt; $event )                                                                                                                        </span>
+<span class="lineNum" id="container391"><a name="391"></a><a href="#391" id="line391">     391</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container392"><a name="392"></a><a href="#392" id="line392">     392</a> </span><span class="lineCov">              4 :             $interceptors[$event] = array();                                                                                                                      </span>
+<span class="lineNum" id="container393"><a name="393"></a><a href="#393" id="line393">     393</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container394"><a name="394"></a><a href="#394" id="line394">     394</a> </span><span class="lineCov">              4 :             if( !isset(self::$config[$concept][&quot;$prefix$event.$method&quot;]) )                                                                                        </span>
+<span class="lineNum" id="container395"><a name="395"></a><a href="#395" id="line395">     395</a> </span><span class="lineCov">              4 :               continue;                                                                                                                                           </span>
+<span class="lineNum" id="container396"><a name="396"></a><a href="#396" id="line396">     396</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container397"><a name="397"></a><a href="#397" id="line397">     397</a> </span><span class="lineCov">              1 :             foreach( self::$config[$concept][&quot;$prefix$event.$method&quot;] as $intercept =&gt; $interceptor )                                                             </span>
+<span class="lineNum" id="container398"><a name="398"></a><a href="#398" id="line398">     398</a> </span><span class="lineCov">              1 :                 $interceptors[$event][$intercept] = self::load( $interceptor );                                                                                   </span>
+<span class="lineNum" id="container399"><a name="399"></a><a href="#399" id="line399">     399</a> </span><span class="lineCov">              4 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container400"><a name="400"></a><a href="#400" id="line400">     400</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container401"><a name="401"></a><a href="#401" id="line401">     401</a> </span><span class="lineCov">              4 :         self::$interceptors[ $concept ][ $serviceName ][ $method ] = $interceptors;                                                                               </span>
+<span class="lineNum" id="container402"><a name="402"></a><a href="#402" id="line402">     402</a> </span><span class="lineCov">              4 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container403"><a name="403"></a><a href="#403" id="line403">     403</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container404"><a name="404"></a><a href="#404" id="line404">     404</a> </span><span class="lineCov">             12 :         return( self::$interceptors[ $concept ][ $serviceName ][ $method ] );                                                                                     </span>
+<span class="lineNum" id="container405"><a name="405"></a><a href="#405" id="line405">     405</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container406"><a name="406"></a><a href="#406" id="line406">     406</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container407"><a name="407"></a><a href="#407" id="line407">     407</a> </span>                :     public static function interceptorCommit( $eventType, $commitList, $isService = false )                                                                       
+<span class="lineNum" id="container408"><a name="408"></a><a href="#408" id="line408">     408</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container409"><a name="409"></a><a href="#409" id="line409">     409</a> </span><span class="lineCov">             12 :         $result = array( $eventType =&gt; array() );                                                                                                                 </span>
+<span class="lineNum" id="container410"><a name="410"></a><a href="#410" id="line410">     410</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container411"><a name="411"></a><a href="#411" id="line411">     411</a> </span><span class="lineCov">             12 :         if( is_array( $commitList ) )                                                                                                                             </span>
+<span class="lineNum" id="container412"><a name="412"></a><a href="#412" id="line412">     412</a> </span><span class="lineCov">             12 :             foreach( $commitList as $i =&gt; $tx )                                                                                                                   </span>
+<span class="lineNum" id="container413"><a name="413"></a><a href="#413" id="line413">     413</a> </span>                :             {                                                                                                                                                     
+<span class="lineNum" id="container414"><a name="414"></a><a href="#414" id="line414">     414</a> </span><span class="lineCov">             12 :             $interceptors = self::interceptor( 'commit', $tx['concept'], $tx['service'], $isService );                                                            </span>
+<span class="lineNum" id="container415"><a name="415"></a><a href="#415" id="line415">     415</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container416"><a name="416"></a><a href="#416" id="line416">     416</a> </span><span class="lineCov">             12 :             $result[$eventType] = array_merge( $result[$eventType], $interceptors[$eventType] );                                                                  </span>
+<span class="lineNum" id="container417"><a name="417"></a><a href="#417" id="line417">     417</a> </span><span class="lineCov">             12 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container418"><a name="418"></a><a href="#418" id="line418">     418</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container419"><a name="419"></a><a href="#419" id="line419">     419</a> </span><span class="lineCov">             12 :         return( $result );                                                                                                                                        </span>
+<span class="lineNum" id="container420"><a name="420"></a><a href="#420" id="line420">     420</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container421"><a name="421"></a><a href="#421" id="line421">     421</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container422"><a name="422"></a><a href="#422" id="line422">     422</a> </span>                :     public static function fire( $eventType, $method, &amp;$params, $original, $isService = false )                                                                   
+<span class="lineNum" id="container423"><a name="423"></a><a href="#423" id="line423">     423</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container424"><a name="424"></a><a href="#424" id="line424">     424</a> </span><span class="lineCov">             12 :         if( $method === 'commit' )                                                                                                                                </span>
+<span class="lineNum" id="container425"><a name="425"></a><a href="#425" id="line425">     425</a> </span><span class="lineCov">             12 :         $interceptors = self::interceptorCommit( $eventType, $params['criteria'], $isService );                                                                   </span>
+<span class="lineNum" id="container426"><a name="426"></a><a href="#426" id="line426">     426</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container427"><a name="427"></a><a href="#427" id="line427">     427</a> </span>                :         else                                                                                                                                                      
+<span class="lineNum" id="container428"><a name="428"></a><a href="#428" id="line428">     428</a> </span><span class="lineCov">             12 :         $interceptors = self::interceptor( $method,                                                                                                               </span>
+<span class="lineNum" id="container429"><a name="429"></a><a href="#429" id="line429">     429</a> </span><span class="lineCov">             12 :                            isset($original['URI']['concept']) ? $original['URI']['concept'] : false,                                                              </span>
+<span class="lineNum" id="container430"><a name="430"></a><a href="#430" id="line430">     430</a> </span><span class="lineCov">             12 :                            isset($params['URI']['service']) ? $params['URI']['service'] : false, $isService );                                                    </span>
+<span class="lineNum" id="container431"><a name="431"></a><a href="#431" id="line431">     431</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container432"><a name="432"></a><a href="#432" id="line432">     432</a> </span><span class="lineCov">             12 :         if( $interceptors &amp;&amp; isset($interceptors[ $eventType ]) )                                                                                                 </span>
+<span class="lineNum" id="container433"><a name="433"></a><a href="#433" id="line433">     433</a> </span><span class="lineCov">             12 :         foreach( $interceptors[ $eventType ] as $intercept =&gt; $interceptor )                                                                                      </span>
+<span class="lineNum" id="container434"><a name="434"></a><a href="#434" id="line434">     434</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container435"><a name="435"></a><a href="#435" id="line435">     435</a> </span><span class="lineCov">              2 :             $return = $interceptor-&gt;$intercept( $params['URI'], $params['properties'], $params['criteria'], $original /*, $params['service'] */);                 </span>
+<span class="lineNum" id="container436"><a name="436"></a><a href="#436" id="line436">     436</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container437"><a name="437"></a><a href="#437" id="line437">     437</a> </span><span class="lineCov">              2 :             if( $return === false )                                                                                                                               </span>
+<span class="lineNum" id="container438"><a name="438"></a><a href="#438" id="line438">     438</a> </span><span class="lineCov">              2 :         return( false );                                                                                                                                          </span>
+<span class="lineNum" id="container439"><a name="439"></a><a href="#439" id="line439">     439</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container440"><a name="440"></a><a href="#440" id="line440">     440</a> </span><span class="lineCov">              2 :             if( isset($return) )                                                                                                                                  </span>
+<span class="lineNum" id="container441"><a name="441"></a><a href="#441" id="line441">     441</a> </span><span class="lineCov">              2 :             $params['properties'] = $return;                                                                                                                      </span>
+<span class="lineNum" id="container442"><a name="442"></a><a href="#442" id="line442">     442</a> </span><span class="lineCov">             12 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container443"><a name="443"></a><a href="#443" id="line443">     443</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container444"><a name="444"></a><a href="#444" id="line444">     444</a> </span><span class="lineCov">             12 :           return( $params );                                                                                                                                      </span>
+<span class="lineNum" id="container445"><a name="445"></a><a href="#445" id="line445">     445</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container446"><a name="446"></a><a href="#446" id="line446">     446</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container447"><a name="447"></a><a href="#447" id="line447">     447</a> </span>                :     /*                                                                                                                                                            
+<span class="lineNum" id="container448"><a name="448"></a><a href="#448" id="line448">     448</a> </span>                :       * ex: array                                                                                                                                                 
+<span class="lineNum" id="container449"><a name="449"></a><a href="#449" id="line449">     449</a> </span>                :       *        (                                                                                                                                                  
+<span class="lineNum" id="container450"><a name="450"></a><a href="#450" id="line450">     450</a> </span>                :       *            [0] array( 'OR', array( array( '=', 'campo', 'valor' ),                                                                                        
+<span class="lineNum" id="container451"><a name="451"></a><a href="#451" id="line451">     451</a> </span>                :                               array( 'OR', array( array( '=', 'campo', 'valor' ) ) ) )                                                                            
+<span class="lineNum" id="container452"><a name="452"></a><a href="#452" id="line452">     452</a> </span>                :       *            [1] array( '=', 'campo' , 'valor' )                                                                                                            
+<span class="lineNum" id="container453"><a name="453"></a><a href="#453" id="line453">     453</a> </span>                :       *            [2] array( 'OR' , array( array( '=' , campo', 'valor' ) ) )                                                                                    
+<span class="lineNum" id="container454"><a name="454"></a><a href="#454" id="line454">     454</a> </span>                :       *            [3] array( 'IN', 'campo', array( '1' , '2' , '3' ) )                                                                                           
+<span class="lineNum" id="container455"><a name="455"></a><a href="#455" id="line455">     455</a> </span>                :       *        )                                                                                                                                                  
+<span class="lineNum" id="container456"><a name="456"></a><a href="#456" id="line456">     456</a> </span>                :       * OR                                                                                                                                                        
+<span class="lineNum" id="container457"><a name="457"></a><a href="#457" id="line457">     457</a> </span>                :       *        array( '=' , 'campo' , 'valor' )                                                                                                                   
+<span class="lineNum" id="container458"><a name="458"></a><a href="#458" id="line458">     458</a> </span>                :     */                                                                                                                                                            
+<span class="lineNum" id="container459"><a name="459"></a><a href="#459" id="line459">     459</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container460"><a name="460"></a><a href="#460" id="line460">     460</a> </span>                :     //TODO: Compatibilizar as configs relativas aos modulos, adicionando os mesmo nos parametros passados                                                         
+<span class="lineNum" id="container461"><a name="461"></a><a href="#461" id="line461">     461</a> </span>                :     public static function serviceName( $URI, $original = false )                                                                                                 
+<span class="lineNum" id="container462"><a name="462"></a><a href="#462" id="line462">     462</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container463"><a name="463"></a><a href="#463" id="line463">     463</a> </span><span class="lineCov">             12 :          $concept = &quot;&quot;;                                                                                                                                           </span>
+<span class="lineNum" id="container464"><a name="464"></a><a href="#464" id="line464">     464</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container465"><a name="465"></a><a href="#465" id="line465">     465</a> </span><span class="lineCov">             12 :         if( $original &amp;&amp; isset($original['concept']) &amp;&amp; $original['concept'] )                                                                                    </span>
+<span class="lineNum" id="container466"><a name="466"></a><a href="#466" id="line466">     466</a> </span><span class="lineCov">             12 :         $concept = $original['concept'];                                                                                                                          </span>
+<span class="lineNum" id="container467"><a name="467"></a><a href="#467" id="line467">     467</a> </span><span class="lineNoCov">              0 :         elseif( isset($URI['concept']) &amp;&amp; $URI['concept'] )                                                                                                       </span>
+<span class="lineNum" id="container468"><a name="468"></a><a href="#468" id="line468">     468</a> </span><span class="lineNoCov">              0 :         $concept = $URI['concept'];                                                                                                                               </span>
+<span class="lineNum" id="container469"><a name="469"></a><a href="#469" id="line469">     469</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container470"><a name="470"></a><a href="#470" id="line470">     470</a> </span><span class="lineCov">             12 :         if( ( !isset($URI['service']) || !$URI['service'] ) &amp;&amp; $concept )                                                                                         </span>
+<span class="lineNum" id="container471"><a name="471"></a><a href="#471" id="line471">     471</a> </span><span class="lineCov">             12 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container472"><a name="472"></a><a href="#472" id="line472">     472</a> </span><span class="lineCov">             12 :         if( !isset(self::$config[ $concept ]) )                                                                                                                   </span>
+<span class="lineNum" id="container473"><a name="473"></a><a href="#473" id="line473">     473</a> </span><span class="lineCov">             12 :             self::$config[ $concept ] = self::loadConfig( $concept );                                                                                             </span>
+<span class="lineNum" id="container474"><a name="474"></a><a href="#474" id="line474">     474</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container475"><a name="475"></a><a href="#475" id="line475">     475</a> </span><span class="lineCov">             12 :         $URI['service'] = self::$config[ $concept ][ 'service' ];                                                                                                 </span>
+<span class="lineNum" id="container476"><a name="476"></a><a href="#476" id="line476">     476</a> </span><span class="lineCov">             12 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container477"><a name="477"></a><a href="#477" id="line477">     477</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container478"><a name="478"></a><a href="#478" id="line478">     478</a> </span><span class="lineCov">             12 :         if( !isset($URI['service']) )                                                                                                                             </span>
+<span class="lineNum" id="container479"><a name="479"></a><a href="#479" id="line479">     479</a> </span><span class="lineCov">             12 :         throw new Exception( &quot;CONFIGURATION ERROR: service name from concept '$concept' not found&quot; );                                                             </span>
+<span class="lineNum" id="container480"><a name="480"></a><a href="#480" id="line480">     480</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container481"><a name="481"></a><a href="#481" id="line481">     481</a> </span><span class="lineCov">             12 :         return( $URI );                                                                                                                                           </span>
+<span class="lineNum" id="container482"><a name="482"></a><a href="#482" id="line482">     482</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container483"><a name="483"></a><a href="#483" id="line483">     483</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container484"><a name="484"></a><a href="#484" id="line484">     484</a> </span>                :     //TODO: Compatibilizar as configs relativas aos modulos, adicionando os mesmos nas options passadas                                                           
+<span class="lineNum" id="container485"><a name="485"></a><a href="#485" id="line485">     485</a> </span>                :     public static function call( $method, $URI, $properties = false, $options = false, $service = false )                                                         
+<span class="lineNum" id="container486"><a name="486"></a><a href="#486" id="line486">     486</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container487"><a name="487"></a><a href="#487" id="line487">     487</a> </span>                :         try                                                                                                                                                       
+<span class="lineNum" id="container488"><a name="488"></a><a href="#488" id="line488">     488</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container489"><a name="489"></a><a href="#489" id="line489">     489</a> </span><span class="lineCov">             12 :         if( !isset($URI['concept']) ) $URI['concept'] = false;                                                                                                    </span>
+<span class="lineNum" id="container490"><a name="490"></a><a href="#490" id="line490">     490</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container491"><a name="491"></a><a href="#491" id="line491">     491</a> </span><span class="lineCov">             12 :         $original = $params = array( 'properties' =&gt; $properties,                                                                                                 </span>
+<span class="lineNum" id="container492"><a name="492"></a><a href="#492" id="line492">     492</a> </span><span class="lineCov">             12 :                              'criteria' =&gt; $options,                                                                                                              </span>
+<span class="lineNum" id="container493"><a name="493"></a><a href="#493" id="line493">     493</a> </span><span class="lineCov">             12 :                          'URI' =&gt; $URI,                                                                                                                           </span>
+<span class="lineNum" id="container494"><a name="494"></a><a href="#494" id="line494">     494</a> </span><span class="lineCov">             12 :                          'service' =&gt; $service );                                                                                                                 </span>
+<span class="lineNum" id="container495"><a name="495"></a><a href="#495" id="line495">     495</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container496"><a name="496"></a><a href="#496" id="line496">     496</a> </span><span class="lineCov">             12 :         if( isset($params['URI']['concept'])  &amp;&amp; !self::fire( 'before', $method, $params, $original ) )                                                           </span>
+<span class="lineNum" id="container497"><a name="497"></a><a href="#497" id="line497">     497</a> </span><span class="lineCov">             12 :             return( empty($params['properties']) ? false : $params['properties'] );                                                                               </span>
+<span class="lineNum" id="container498"><a name="498"></a><a href="#498" id="line498">     498</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container499"><a name="499"></a><a href="#499" id="line499">     499</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container500"><a name="500"></a><a href="#500" id="line500">     500</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container501"><a name="501"></a><a href="#501" id="line501">     501</a> </span><span class="lineCov">             12 :         if( $params &amp;&amp; !$params['service'] )                                                                                                                      </span>
+<span class="lineNum" id="container502"><a name="502"></a><a href="#502" id="line502">     502</a> </span><span class="lineCov">             12 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container503"><a name="503"></a><a href="#503" id="line503">     503</a> </span><span class="lineCov">             12 :             $params['URI'] = self::serviceName( $params['URI'], $original['URI'] );                                                                               </span>
+<span class="lineNum" id="container504"><a name="504"></a><a href="#504" id="line504">     504</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container505"><a name="505"></a><a href="#505" id="line505">     505</a> </span><span class="lineCov">             12 :             $params['service'] = self::service( $params['URI']['service'], $params['URI']['concept'] );                                                           </span>
+<span class="lineNum" id="container506"><a name="506"></a><a href="#506" id="line506">     506</a> </span><span class="lineCov">             12 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container507"><a name="507"></a><a href="#507" id="line507">     507</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container508"><a name="508"></a><a href="#508" id="line508">     508</a> </span><span class="lineCov">             12 :         if( isset($params['URI']['service']) )                                                                                                                    </span>
+<span class="lineNum" id="container509"><a name="509"></a><a href="#509" id="line509">     509</a> </span><span class="lineCov">             12 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container510"><a name="510"></a><a href="#510" id="line510">     510</a> </span><span class="lineCov">             12 :             if( $method === 'create' || $method === 'update' || $method === 'delete' )                                                                            </span>
+<span class="lineNum" id="container511"><a name="511"></a><a href="#511" id="line511">     511</a> </span><span class="lineCov">             12 :             {                                                                                                                                                     </span>
+<span class="lineNum" id="container512"><a name="512"></a><a href="#512" id="line512">     512</a> </span><span class="lineCov">             12 :             if( $commit = !isset(self::$tx[ $params['URI']['service'] ])  )                                                                                       </span>
+<span class="lineNum" id="container513"><a name="513"></a><a href="#513" id="line513">     513</a> </span><span class="lineCov">             12 :             {                                                                                                                                                     </span>
+<span class="lineNum" id="container514"><a name="514"></a><a href="#514" id="line514">     514</a> </span><span class="lineCov">             12 :                 self::call( 'begin', $params['URI'] );                                                                                                            </span>
+<span class="lineNum" id="container515"><a name="515"></a><a href="#515" id="line515">     515</a> </span><span class="lineCov">             12 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container516"><a name="516"></a><a href="#516" id="line516">     516</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container517"><a name="517"></a><a href="#517" id="line517">     517</a> </span><span class="lineCov">             12 :             $TX = array();                                                                                                                                        </span>
+<span class="lineNum" id="container518"><a name="518"></a><a href="#518" id="line518">     518</a> </span><span class="lineCov">             12 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container519"><a name="519"></a><a href="#519" id="line519">     519</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container520"><a name="520"></a><a href="#520" id="line520">     520</a> </span><span class="lineCov">             12 :             if( !self::fire( 'before', $method, $params, $original, true ) )                                                                                      </span>
+<span class="lineNum" id="container521"><a name="521"></a><a href="#521" id="line521">     521</a> </span><span class="lineCov">             12 :             return( empty($params['properties']) ? false : $params['properties'] );                                                                               </span>
+<span class="lineNum" id="container522"><a name="522"></a><a href="#522" id="line522">     522</a> </span><span class="lineCov">             12 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container523"><a name="523"></a><a href="#523" id="line523">     523</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container524"><a name="524"></a><a href="#524" id="line524">     524</a> </span><span class="lineCov">             12 :         if( $params['service'] )                                                                                                                                  </span>
+<span class="lineNum" id="container525"><a name="525"></a><a href="#525" id="line525">     525</a> </span><span class="lineCov">             12 :             switch( $method )                                                                                                                                     </span>
+<span class="lineNum" id="container526"><a name="526"></a><a href="#526" id="line526">     526</a> </span>                :             {                                                                                                                                                     
+<span class="lineNum" id="container527"><a name="527"></a><a href="#527" id="line527">     527</a> </span><span class="lineCov">             12 :             case 'find': $return = $params['service']-&gt;find( $params['URI'], $params['properties'], $params['criteria'] ); break;                                 </span>
+<span class="lineNum" id="container528"><a name="528"></a><a href="#528" id="line528">     528</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container529"><a name="529"></a><a href="#529" id="line529">     529</a> </span><span class="lineCov">             12 :             case 'read': $return = $params['service']-&gt;read( $params['URI'], $params['properties'] , $params['criteria'] ); break;                                </span>
+<span class="lineNum" id="container530"><a name="530"></a><a href="#530" id="line530">     530</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container531"><a name="531"></a><a href="#531" id="line531">     531</a> </span><span class="lineCov">             12 :             case 'create': $return = $params['service']-&gt;create( $params['URI'], $params['properties']/*, $criteria*/ ); break;                                   </span>
+<span class="lineNum" id="container532"><a name="532"></a><a href="#532" id="line532">     532</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container533"><a name="533"></a><a href="#533" id="line533">     533</a> </span><span class="lineCov">             12 :             case 'delete': $return = $params['service']-&gt;delete( $params['URI'], $params['properties']/*, $criteria*/ ); break;                                   </span>
+<span class="lineNum" id="container534"><a name="534"></a><a href="#534" id="line534">     534</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container535"><a name="535"></a><a href="#535" id="line535">     535</a> </span><span class="lineCov">             12 :             case 'deleteAll': $return = $params['service']-&gt;deleteAll( $params['URI'], $params['properties'], $params['criteria'] ); break;                       </span>
+<span class="lineNum" id="container536"><a name="536"></a><a href="#536" id="line536">     536</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container537"><a name="537"></a><a href="#537" id="line537">     537</a> </span><span class="lineCov">             12 :             case 'update': $return = $params['service']-&gt;update( $params['URI'], $params['properties']/*, $criteria*/ ); break;                                   </span>
+<span class="lineNum" id="container538"><a name="538"></a><a href="#538" id="line538">     538</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container539"><a name="539"></a><a href="#539" id="line539">     539</a> </span><span class="lineCov">             12 :             case 'replace': $return = $params['service']-&gt;replace( $params['URI'], $params['properties'], $params['criteria'] ); break;                           </span>
+<span class="lineNum" id="container540"><a name="540"></a><a href="#540" id="line540">     540</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container541"><a name="541"></a><a href="#541" id="line541">     541</a> </span><span class="lineCov">             12 :             case 'begin': $return = $params['service']-&gt;begin( $params['URI'] ); break;                                                                           </span>
+<span class="lineNum" id="container542"><a name="542"></a><a href="#542" id="line542">     542</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container543"><a name="543"></a><a href="#543" id="line543">     543</a> </span><span class="lineCov">             12 :             case 'commit': $return = $params['service']-&gt;commit( $params['URI'], $params['criteria'] ); break;                                                    </span>
+<span class="lineNum" id="container544"><a name="544"></a><a href="#544" id="line544">     544</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container545"><a name="545"></a><a href="#545" id="line545">     545</a> </span><span class="lineNoCov">              0 :             case 'rollback': $return = $params['service']-&gt;rollback( $params['URI'], $params['criteria'] ); break;                                                </span>
+<span class="lineNum" id="container546"><a name="546"></a><a href="#546" id="line546">     546</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container547"><a name="547"></a><a href="#547" id="line547">     547</a> </span><span class="lineNoCov">              0 :             case 'parse': $return = $params['service']-&gt;parse( $params['properties'], $params['criteria'] ); break;                                               </span>
+<span class="lineNum" id="container548"><a name="548"></a><a href="#548" id="line548">     548</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container549"><a name="549"></a><a href="#549" id="line549">     549</a> </span><span class="lineNoCov">              0 :             case 'analize': $return = $params['service']-&gt;analize( $params['properties'], $params['criteria'] ); break;                                           </span>
+<span class="lineNum" id="container550"><a name="550"></a><a href="#550" id="line550">     550</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container551"><a name="551"></a><a href="#551" id="line551">     551</a> </span><span class="lineNoCov">              0 :             case 'format': $return = $params['service']-&gt;format( $params['properties'], $params['criteria'] ); break;                                             </span>
+<span class="lineNum" id="container552"><a name="552"></a><a href="#552" id="line552">     552</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container553"><a name="553"></a><a href="#553" id="line553">     553</a> </span><span class="lineNoCov">              0 :             default : $return = $params['service']-&gt;$method( $params['properties'], $params['criteria'] );                                                        </span>
+<span class="lineNum" id="container554"><a name="554"></a><a href="#554" id="line554">     554</a> </span><span class="lineCov">             12 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container555"><a name="555"></a><a href="#555" id="line555">     555</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container556"><a name="556"></a><a href="#556" id="line556">     556</a> </span><span class="lineCov">             12 :         if( isset($return) &amp;&amp; $return !== false )                                                                                                                 </span>
+<span class="lineNum" id="container557"><a name="557"></a><a href="#557" id="line557">     557</a> </span><span class="lineCov">             12 :             $params['properties'] = $return;                                                                                                                      </span>
+<span class="lineNum" id="container558"><a name="558"></a><a href="#558" id="line558">     558</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container559"><a name="559"></a><a href="#559" id="line559">     559</a> </span><span class="lineCov">             12 :         if( isset($params['URI']['service']) )                                                                                                                    </span>
+<span class="lineNum" id="container560"><a name="560"></a><a href="#560" id="line560">     560</a> </span><span class="lineCov">             12 :             if( !self::fire( 'after', $method, $params, $original, true ) )                                                                                       </span>
+<span class="lineNum" id="container561"><a name="561"></a><a href="#561" id="line561">     561</a> </span><span class="lineCov">             12 :             return( empty($params['properties']) ? false : $params['properties'] );                                                                               </span>
+<span class="lineNum" id="container562"><a name="562"></a><a href="#562" id="line562">     562</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container563"><a name="563"></a><a href="#563" id="line563">     563</a> </span><span class="lineCov">             12 :         if( isset($URI['concept']) )                                                                                                                              </span>
+<span class="lineNum" id="container564"><a name="564"></a><a href="#564" id="line564">     564</a> </span><span class="lineCov">             12 :             self::fire( 'after', $method, $params, $original );                                                                                                   </span>
+<span class="lineNum" id="container565"><a name="565"></a><a href="#565" id="line565">     565</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container566"><a name="566"></a><a href="#566" id="line566">     566</a> </span><span class="lineCov">             12 :         if( empty($params['properties']) )                                                                                                                        </span>
+<span class="lineNum" id="container567"><a name="567"></a><a href="#567" id="line567">     567</a> </span><span class="lineCov">             12 :             $params['properties'] = false;                                                                                                                        </span>
+<span class="lineNum" id="container568"><a name="568"></a><a href="#568" id="line568">     568</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container569"><a name="569"></a><a href="#569" id="line569">     569</a> </span><span class="lineCov">             12 :         if( isset( $TX ) )                                                                                                                                        </span>
+<span class="lineNum" id="container570"><a name="570"></a><a href="#570" id="line570">     570</a> </span><span class="lineCov">             12 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container571"><a name="571"></a><a href="#571" id="line571">     571</a> </span><span class="lineCov">             12 :             $TX['rollback'] = !!!$params['properties'];                                                                                                           </span>
+<span class="lineNum" id="container572"><a name="572"></a><a href="#572" id="line572">     572</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container573"><a name="573"></a><a href="#573" id="line573">     573</a> </span><span class="lineCov">             12 :             if( $params['properties'] &amp;&amp; is_array($params['properties']) &amp;&amp; isset($params['properties']['id']) )                                                  </span>
+<span class="lineNum" id="container574"><a name="574"></a><a href="#574" id="line574">     574</a> </span><span class="lineCov">             12 :             $TX['id'] = $params['properties']['id'];                                                                                                              </span>
+<span class="lineNum" id="container575"><a name="575"></a><a href="#575" id="line575">     575</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container576"><a name="576"></a><a href="#576" id="line576">     576</a> </span><span class="lineCov">             12 :             self::$tx[ $params['URI']['service'] ][] = array_merge( $TX, $original['URI'], array( 'service' =&gt; $params['URI']['service'], 'method' =&gt; $method ) );</span>
+<span class="lineNum" id="container577"><a name="577"></a><a href="#577" id="line577">     577</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container578"><a name="578"></a><a href="#578" id="line578">     578</a> </span><span class="lineCov">             12 :             if( isset($commit) &amp;&amp; $commit )                                                                                                                       </span>
+<span class="lineNum" id="container579"><a name="579"></a><a href="#579" id="line579">     579</a> </span><span class="lineCov">             12 :             {                                                                                                                                                     </span>
+<span class="lineNum" id="container580"><a name="580"></a><a href="#580" id="line580">     580</a> </span><span class="lineCov">             12 :             if( !self::call( 'commit', $params['URI'], false, self::$tx[ $params['URI']['service'] ] ) )                                                          </span>
+<span class="lineNum" id="container581"><a name="581"></a><a href="#581" id="line581">     581</a> </span><span class="lineCov">             12 :                 self::call( 'rollback', $params['URI'] , false, self::$tx[ $params['URI']['service'] ] );                                                         </span>
+<span class="lineNum" id="container582"><a name="582"></a><a href="#582" id="line582">     582</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container583"><a name="583"></a><a href="#583" id="line583">     583</a> </span><span class="lineCov">             12 :             unset( self::$tx[ $params['URI']['service'] ] );                                                                                                      </span>
+<span class="lineNum" id="container584"><a name="584"></a><a href="#584" id="line584">     584</a> </span><span class="lineCov">             12 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container585"><a name="585"></a><a href="#585" id="line585">     585</a> </span><span class="lineCov">             12 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container586"><a name="586"></a><a href="#586" id="line586">     586</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container587"><a name="587"></a><a href="#587" id="line587">     587</a> </span><span class="lineCov">             12 :         catch( Exception $e )                                                                                                                                     </span>
+<span class="lineNum" id="container588"><a name="588"></a><a href="#588" id="line588">     588</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container589"><a name="589"></a><a href="#589" id="line589">     589</a> </span><span class="lineNoCov">              0 :         if( !self::fallback( $e ) )                                                                                                                               </span>
+<span class="lineNum" id="container590"><a name="590"></a><a href="#590" id="line590">     590</a> </span><span class="lineNoCov">              0 :             self::closeAll();                                                                                                                                     </span>
+<span class="lineNum" id="container591"><a name="591"></a><a href="#591" id="line591">     591</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container592"><a name="592"></a><a href="#592" id="line592">     592</a> </span><span class="lineNoCov">              0 :         return( false );                                                                                                                                          </span>
+<span class="lineNum" id="container593"><a name="593"></a><a href="#593" id="line593">     593</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container594"><a name="594"></a><a href="#594" id="line594">     594</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container595"><a name="595"></a><a href="#595" id="line595">     595</a> </span><span class="lineCov">             12 :         return( $params['properties'] );                                                                                                                          </span>
+<span class="lineNum" id="container596"><a name="596"></a><a href="#596" id="line596">     596</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container597"><a name="597"></a><a href="#597" id="line597">     597</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container598"><a name="598"></a><a href="#598" id="line598">     598</a> </span>                :     public static function fallback( $exception )                                                                                                                 
+<span class="lineNum" id="container599"><a name="599"></a><a href="#599" id="line599">     599</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container600"><a name="600"></a><a href="#600" id="line600">     600</a> </span><span class="lineNoCov">              0 :         error_log( $exception-&gt;getMessage() );                                                                                                                    </span>
+<span class="lineNum" id="container601"><a name="601"></a><a href="#601" id="line601">     601</a> </span><span class="lineNoCov">              0 :         return( true );                                                                                                                                           </span>
+<span class="lineNum" id="container602"><a name="602"></a><a href="#602" id="line602">     602</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container603"><a name="603"></a><a href="#603" id="line603">     603</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container604"><a name="604"></a><a href="#604" id="line604">     604</a> </span>                :     public static function put( $URI, $data, $txIds = false )                                                                                                     
+<span class="lineNum" id="container605"><a name="605"></a><a href="#605" id="line605">     605</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container606"><a name="606"></a><a href="#606" id="line606">     606</a> </span>                :         try                                                                                                                                                       
+<span class="lineNum" id="container607"><a name="607"></a><a href="#607" id="line607">     607</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container608"><a name="608"></a><a href="#608" id="line608">     608</a> </span><span class="lineNoCov">              0 :         $URI = self::serviceName( $URI );                                                                                                                         </span>
+<span class="lineNum" id="container609"><a name="609"></a><a href="#609" id="line609">     609</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container610"><a name="610"></a><a href="#610" id="line610">     610</a> </span><span class="lineNoCov">              0 :         if( $commit = !$txIds )                                                                                                                                   </span>
+<span class="lineNum" id="container611"><a name="611"></a><a href="#611" id="line611">     611</a> </span><span class="lineNoCov">              0 :             $txIds = array();                                                                                                                                     </span>
+<span class="lineNum" id="container612"><a name="612"></a><a href="#612" id="line612">     612</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container613"><a name="613"></a><a href="#613" id="line613">     613</a> </span><span class="lineNoCov">              0 :         if( !isset( self::$tx[ $URI['service'] ] ) )                                                                                                              </span>
+<span class="lineNum" id="container614"><a name="614"></a><a href="#614" id="line614">     614</a> </span><span class="lineNoCov">              0 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container615"><a name="615"></a><a href="#615" id="line615">     615</a> </span><span class="lineNoCov">              0 :             self::call( 'begin', $URI );                                                                                                                          </span>
+<span class="lineNum" id="container616"><a name="616"></a><a href="#616" id="line616">     616</a> </span><span class="lineNoCov">              0 :             self::$tx[ $txIds[] = $URI['service'] ] = array();                                                                                                    </span>
+<span class="lineNum" id="container617"><a name="617"></a><a href="#617" id="line617">     617</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container618"><a name="618"></a><a href="#618" id="line618">     618</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container619"><a name="619"></a><a href="#619" id="line619">     619</a> </span><span class="lineNoCov">              0 :         $method = $data ? isset( $data['id'] ) ?                                                                                                                  </span>
+<span class="lineNum" id="container620"><a name="620"></a><a href="#620" id="line620">     620</a> </span><span class="lineNoCov">              0 :               'update' : 'create' : 'delete';                                                                                                                     </span>
+<span class="lineNum" id="container621"><a name="621"></a><a href="#621" id="line621">     621</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container622"><a name="622"></a><a href="#622" id="line622">     622</a> </span><span class="lineNoCov">              0 :         $links = self::links( $URI['concept'] );                                                                                                                  </span>
+<span class="lineNum" id="container623"><a name="623"></a><a href="#623" id="line623">     623</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container624"><a name="624"></a><a href="#624" id="line624">     624</a> </span><span class="lineNoCov">              0 :         $order = self::$txID++;                                                                                                                                   </span>
+<span class="lineNum" id="container625"><a name="625"></a><a href="#625" id="line625">     625</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container626"><a name="626"></a><a href="#626" id="line626">     626</a> </span><span class="lineNoCov">              0 :         $postpone = array();                                                                                                                                      </span>
+<span class="lineNum" id="container627"><a name="627"></a><a href="#627" id="line627">     627</a> </span><span class="lineNoCov">              0 :         $linkNames = array();                                                                                                                                     </span>
+<span class="lineNum" id="container628"><a name="628"></a><a href="#628" id="line628">     628</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container629"><a name="629"></a><a href="#629" id="line629">     629</a> </span>                :         if( $data )                                                                                                                                               
+<span class="lineNum" id="container630"><a name="630"></a><a href="#630" id="line630">     630</a> </span><span class="lineNoCov">              0 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container631"><a name="631"></a><a href="#631" id="line631">     631</a> </span><span class="lineNoCov">              0 :             $URI['id'] = isset( $data['id'] ) ? $data['id'] : false;                                                                                              </span>
+<span class="lineNum" id="container632"><a name="632"></a><a href="#632" id="line632">     632</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container633"><a name="633"></a><a href="#633" id="line633">     633</a> </span><span class="lineNoCov">              0 :             foreach( $links as $linkName =&gt; $linkTarget )                                                                                                         </span>
+<span class="lineNum" id="container634"><a name="634"></a><a href="#634" id="line634">     634</a> </span>                :             {                                                                                                                                                     
+<span class="lineNum" id="container635"><a name="635"></a><a href="#635" id="line635">     635</a> </span><span class="lineNoCov">              0 :             if( isset( $data[$linkName] ) &amp;&amp; is_array( $data[$linkName] ) )                                                                                       </span>
+<span class="lineNum" id="container636"><a name="636"></a><a href="#636" id="line636">     636</a> </span><span class="lineNoCov">              0 :             {                                                                                                                                                     </span>
+<span class="lineNum" id="container637"><a name="637"></a><a href="#637" id="line637">     637</a> </span><span class="lineNoCov">              0 :                 if( self::isConcept( $URI['concept'], $linkName ) )                                                                                               </span>
+<span class="lineNum" id="container638"><a name="638"></a><a href="#638" id="line638">     638</a> </span><span class="lineNoCov">              0 :                     $data[$linkName] = self::put( array( 'concept' =&gt; $linkTarget ), $data[$linkName], &amp;$txIds );                                                 </span>
+<span class="lineNum" id="container639"><a name="639"></a><a href="#639" id="line639">     639</a> </span>                :                 else                                                                                                                                              
+<span class="lineNum" id="container640"><a name="640"></a><a href="#640" id="line640">     640</a> </span>                :                 {                                                                                                                                                 
+<span class="lineNum" id="container641"><a name="641"></a><a href="#641" id="line641">     641</a> </span><span class="lineNoCov">              0 :                     $postpone[ $linkTarget ] =  $data[$linkName];                                                                                                 </span>
+<span class="lineNum" id="container642"><a name="642"></a><a href="#642" id="line642">     642</a> </span><span class="lineNoCov">              0 :                     $linkNames[ $linkTarget ] = $linkName;                                                                                                        </span>
+<span class="lineNum" id="container643"><a name="643"></a><a href="#643" id="line643">     643</a> </span>                :                 }                                                                                                                                                 
+<span class="lineNum" id="container644"><a name="644"></a><a href="#644" id="line644">     644</a> </span><span class="lineNoCov">              0 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container645"><a name="645"></a><a href="#645" id="line645">     645</a> </span><span class="lineNoCov">              0 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container646"><a name="646"></a><a href="#646" id="line646">     646</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container647"><a name="647"></a><a href="#647" id="line647">     647</a> </span>                :         else                                                                                                                                                      
+<span class="lineNum" id="container648"><a name="648"></a><a href="#648" id="line648">     648</a> </span><span class="lineNoCov">              0 :           $URI['id'] = isset( $data['id'] ) ? $data['id'] : $URI['id'];                                                                                           </span>
+<span class="lineNum" id="container649"><a name="649"></a><a href="#649" id="line649">     649</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container650"><a name="650"></a><a href="#650" id="line650">     650</a> </span><span class="lineNoCov">              0 :         $result = Controller::call( $method, $URI, $data, false, false, true );                                                                                   </span>
+<span class="lineNum" id="container651"><a name="651"></a><a href="#651" id="line651">     651</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container652"><a name="652"></a><a href="#652" id="line652">     652</a> </span><span class="lineNoCov">              0 :         if( is_array( $result ) &amp;&amp; isset( $result['id'] ) )                                                                                                       </span>
+<span class="lineNum" id="container653"><a name="653"></a><a href="#653" id="line653">     653</a> </span><span class="lineNoCov">              0 :               $URI['id'] = $result['id'];                                                                                                                         </span>
+<span class="lineNum" id="container654"><a name="654"></a><a href="#654" id="line654">     654</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container655"><a name="655"></a><a href="#655" id="line655">     655</a> </span><span class="lineNoCov">              0 :         self::$tx[ $URI['service'] ][ count(self::$tx[ $URI['service'] ]) - 1 ]['order'] = $order;                                                                </span>
+<span class="lineNum" id="container656"><a name="656"></a><a href="#656" id="line656">     656</a> </span><span class="lineNoCov">              0 :         self::$tx[ $URI['service'] ][ count(self::$tx[ $URI['service'] ]) - 1 ]['id'] = $URI['id'];                                                               </span>
+<span class="lineNum" id="container657"><a name="657"></a><a href="#657" id="line657">     657</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container658"><a name="658"></a><a href="#658" id="line658">     658</a> </span><span class="lineNoCov">              0 :         foreach( $postpone as $linkTarget =&gt; $dt )                                                                                                                </span>
+<span class="lineNum" id="container659"><a name="659"></a><a href="#659" id="line659">     659</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container660"><a name="660"></a><a href="#660" id="line660">     660</a> </span><span class="lineNoCov">              0 :               if( Controller::hasOne( $URI['concept'], $linkNames[ $linkTarget ] ) )                                                                              </span>
+<span class="lineNum" id="container661"><a name="661"></a><a href="#661" id="line661">     661</a> </span><span class="lineNoCov">              0 :               $dt = array( $dt );                                                                                                                                 </span>
+<span class="lineNum" id="container662"><a name="662"></a><a href="#662" id="line662">     662</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container663"><a name="663"></a><a href="#663" id="line663">     663</a> </span><span class="lineNoCov">              0 :               foreach( $dt as $ii =&gt; $value )                                                                                                                     </span>
+<span class="lineNum" id="container664"><a name="664"></a><a href="#664" id="line664">     664</a> </span>                :               {                                                                                                                                                   
+<span class="lineNum" id="container665"><a name="665"></a><a href="#665" id="line665">     665</a> </span><span class="lineNoCov">              0 :               if( !is_array( $value ) )                                                                                                                           </span>
+<span class="lineNum" id="container666"><a name="666"></a><a href="#666" id="line666">     666</a> </span><span class="lineNoCov">              0 :                 $value = array( 'id' =&gt; $value );                                                                                                                 </span>
+<span class="lineNum" id="container667"><a name="667"></a><a href="#667" id="line667">     667</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container668"><a name="668"></a><a href="#668" id="line668">     668</a> </span><span class="lineNoCov">              0 :               $value[ self::links( $URI['concept'], $linkNames[ $linkTarget ] ) ] = $URI['id'];                                                                   </span>
+<span class="lineNum" id="container669"><a name="669"></a><a href="#669" id="line669">     669</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container670"><a name="670"></a><a href="#670" id="line670">     670</a> </span><span class="lineNoCov">              0 :               self::put( array( 'concept' =&gt; $linkTarget ), $value, &amp;$txIds );                                                                                    </span>
+<span class="lineNum" id="container671"><a name="671"></a><a href="#671" id="line671">     671</a> </span><span class="lineNoCov">              0 :               }                                                                                                                                                   </span>
+<span class="lineNum" id="container672"><a name="672"></a><a href="#672" id="line672">     672</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container673"><a name="673"></a><a href="#673" id="line673">     673</a> </span>                :         if( $commit )                                                                                                                                             
+<span class="lineNum" id="container674"><a name="674"></a><a href="#674" id="line674">     674</a> </span><span class="lineNoCov">              0 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container675"><a name="675"></a><a href="#675" id="line675">     675</a> </span><span class="lineNoCov">              0 :               $result = array();                                                                                                                                  </span>
+<span class="lineNum" id="container676"><a name="676"></a><a href="#676" id="line676">     676</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container677"><a name="677"></a><a href="#677" id="line677">     677</a> </span><span class="lineNoCov">              0 :               for( $i = count( $txIds ) - 1; $i &gt;= 0; $i-- )                                                                                                      </span>
+<span class="lineNum" id="container678"><a name="678"></a><a href="#678" id="line678">     678</a> </span>                :               {                                                                                                                                                   
+<span class="lineNum" id="container679"><a name="679"></a><a href="#679" id="line679">     679</a> </span><span class="lineNoCov">              0 :                   $currentTx = self::$tx[ $txIds[$i] ];                                                                                                           </span>
+<span class="lineNum" id="container680"><a name="680"></a><a href="#680" id="line680">     680</a> </span><span class="lineNoCov">              0 :                   unset( self::$tx[ $txIds[$i] ] );                                                                                                               </span>
+<span class="lineNum" id="container681"><a name="681"></a><a href="#681" id="line681">     681</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container682"><a name="682"></a><a href="#682" id="line682">     682</a> </span><span class="lineNoCov">              0 :                   if( !self::commit( array( 'service' =&gt; $txIds[$i] ), $currentTx ) )                                                                             </span>
+<span class="lineNum" id="container683"><a name="683"></a><a href="#683" id="line683">     683</a> </span><span class="lineNoCov">              0 :                   {                                                                                                                                               </span>
+<span class="lineNum" id="container684"><a name="684"></a><a href="#684" id="line684">     684</a> </span><span class="lineNoCov">              0 :                   self::rollback( array( 'service' =&gt; $txIds[$i] ), $currentTx );                                                                                 </span>
+<span class="lineNum" id="container685"><a name="685"></a><a href="#685" id="line685">     685</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container686"><a name="686"></a><a href="#686" id="line686">     686</a> </span><span class="lineNoCov">              0 :                   foreach( $currentTx as $i =&gt; $st )                                                                                                              </span>
+<span class="lineNum" id="container687"><a name="687"></a><a href="#687" id="line687">     687</a> </span><span class="lineNoCov">              0 :                       $currentTx[$i][ 'rollback' ] = true;                                                                                                        </span>
+<span class="lineNum" id="container688"><a name="688"></a><a href="#688" id="line688">     688</a> </span><span class="lineNoCov">              0 :                   }                                                                                                                                               </span>
+<span class="lineNum" id="container689"><a name="689"></a><a href="#689" id="line689">     689</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container690"><a name="690"></a><a href="#690" id="line690">     690</a> </span><span class="lineNoCov">              0 :                   $result = array_merge( $result, $currentTx );                                                                                                   </span>
+<span class="lineNum" id="container691"><a name="691"></a><a href="#691" id="line691">     691</a> </span><span class="lineNoCov">              0 :               }                                                                                                                                                   </span>
+<span class="lineNum" id="container692"><a name="692"></a><a href="#692" id="line692">     692</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container693"><a name="693"></a><a href="#693" id="line693">     693</a> </span><span class="lineNoCov">              0 :               self::$txID = 0;                                                                                                                                    </span>
+<span class="lineNum" id="container694"><a name="694"></a><a href="#694" id="line694">     694</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container695"><a name="695"></a><a href="#695" id="line695">     695</a> </span><span class="lineNoCov">              0 :               return( $result );                                                                                                                                  </span>
+<span class="lineNum" id="container696"><a name="696"></a><a href="#696" id="line696">     696</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container697"><a name="697"></a><a href="#697" id="line697">     697</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container698"><a name="698"></a><a href="#698" id="line698">     698</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container699"><a name="699"></a><a href="#699" id="line699">     699</a> </span><span class="lineNoCov">              0 :         catch( Exception $e )                                                                                                                                     </span>
+<span class="lineNum" id="container700"><a name="700"></a><a href="#700" id="line700">     700</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container701"><a name="701"></a><a href="#701" id="line701">     701</a> </span><span class="lineNoCov">              0 :         if( !self::fallback( $e ) )                                                                                                                               </span>
+<span class="lineNum" id="container702"><a name="702"></a><a href="#702" id="line702">     702</a> </span><span class="lineNoCov">              0 :             self::closeAll();                                                                                                                                     </span>
+<span class="lineNum" id="container703"><a name="703"></a><a href="#703" id="line703">     703</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container704"><a name="704"></a><a href="#704" id="line704">     704</a> </span><span class="lineNoCov">              0 :         return( false );                                                                                                                                          </span>
+<span class="lineNum" id="container705"><a name="705"></a><a href="#705" id="line705">     705</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container706"><a name="706"></a><a href="#706" id="line706">     706</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container707"><a name="707"></a><a href="#707" id="line707">     707</a> </span><span class="lineNoCov">              0 :         return( $URI['id'] );                                                                                                                                     </span>
+<span class="lineNum" id="container708"><a name="708"></a><a href="#708" id="line708">     708</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container709"><a name="709"></a><a href="#709" id="line709">     709</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container710"><a name="710"></a><a href="#710" id="line710">     710</a> </span>                :     public static function get()                                                                                                                                  
+<span class="lineNum" id="container711"><a name="711"></a><a href="#711" id="line711">     711</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container712"><a name="712"></a><a href="#712" id="line712">     712</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container713"><a name="713"></a><a href="#713" id="line713">     713</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                             </span>
+<span class="lineNum" id="container714"><a name="714"></a><a href="#714" id="line714">     714</a> </span>                : }                                                                                                                                                                 
+<span class="lineNum" id="container715"><a name="715"></a><a href="#715" id="line715">     715</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container716"><a name="716"></a><a href="#716" id="line716">     716</a> </span>                : Controller::$cache = Controller::loadCache();                                                                                                                     
+<span class="lineNum" id="container717"><a name="717"></a><a href="#717" id="line717">     717</a> </span>                : // ?&gt;                                                                                                                                                             
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel71": {
+          "header": "10 tests cover line 71",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel72": {
+          "header": "10 tests cover line 72",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel74": {
+          "header": "10 tests cover line 74",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel87": {
+          "header": "12 tests cover line 87",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel88": {
+          "header": "12 tests cover line 88",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel90": {
+          "header": "12 tests cover line 90",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel95": {
+          "header": "12 tests cover line 95",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel96": {
+          "header": "12 tests cover line 96",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel119": {
+          "header": "12 tests cover line 119",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel236": {
+          "header": "2 tests cover line 236",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel238": {
+          "header": "2 tests cover line 238",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel240": {
+          "header": "2 tests cover line 240",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel241": {
+          "header": "2 tests cover line 241",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel242": {
+          "header": "2 tests cover line 242",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel244": {
+          "header": "2 tests cover line 244",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel245": {
+          "header": "2 tests cover line 245",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel247": {
+          "header": "2 tests cover line 247",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel252": {
+          "header": "1 test covers line 252",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel253": {
+          "header": "1 test covers line 253",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel254": {
+          "header": "1 test covers line 254",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel255": {
+          "header": "1 test covers line 255",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel256": {
+          "header": "1 test covers line 256",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel258": {
+          "header": "1 test covers line 258",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel263": {
+          "header": "1 test covers line 263",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel264": {
+          "header": "1 test covers line 264",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel266": {
+          "header": "1 test covers line 266",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel267": {
+          "header": "1 test covers line 267",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel268": {
+          "header": "1 test covers line 268",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel269": {
+          "header": "1 test covers line 269",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel271": {
+          "header": "1 test covers line 271",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel273": {
+          "header": "1 test covers line 273",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel274": {
+          "header": "1 test covers line 274",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel275": {
+          "header": "1 test covers line 275",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel276": {
+          "header": "1 test covers line 276",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel277": {
+          "header": "1 test covers line 277",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel279": {
+          "header": "1 test covers line 279",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel281": {
+          "header": "1 test covers line 281",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel286": {
+          "header": "1 test covers line 286",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel287": {
+          "header": "1 test covers line 287",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel289": {
+          "header": "1 test covers line 289",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel291": {
+          "header": "1 test covers line 291",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel292": {
+          "header": "1 test covers line 292",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel294": {
+          "header": "1 test covers line 294",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel296": {
+          "header": "1 test covers line 296",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel301": {
+          "header": "1 test covers line 301",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel303": {
+          "header": "1 test covers line 303",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel304": {
+          "header": "1 test covers line 304",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel306": {
+          "header": "1 test covers line 306",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel311": {
+          "header": "1 test covers line 311",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel312": {
+          "header": "1 test covers line 312",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel314": {
+          "header": "1 test covers line 314",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel333": {
+          "header": "12 tests cover line 333",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel334": {
+          "header": "12 tests cover line 334",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel336": {
+          "header": "1 test covers line 336",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel337": {
+          "header": "1 test covers line 337",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel339": {
+          "header": "1 test covers line 339",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel340": {
+          "header": "1 test covers line 340",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel342": {
+          "header": "1 test covers line 342",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel343": {
+          "header": "1 test covers line 343",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel345": {
+          "header": "1 test covers line 345",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel347": {
+          "header": "1 test covers line 347",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel348": {
+          "header": "1 test covers line 348",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel350": {
+          "header": "1 test covers line 350",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel352": {
+          "header": "1 test covers line 352",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel353": {
+          "header": "1 test covers line 353",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel354": {
+          "header": "1 test covers line 354",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel355": {
+          "header": "1 test covers line 355",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel356": {
+          "header": "1 test covers line 356",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel357": {
+          "header": "1 test covers line 357",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel359": {
+          "header": "1 test covers line 359",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel360": {
+          "header": "1 test covers line 360",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel362": {
+          "header": "1 test covers line 362",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel363": {
+          "header": "1 test covers line 363",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel365": {
+          "header": "1 test covers line 365",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel371": {
+          "header": "12 tests cover line 371",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel372": {
+          "header": "12 tests cover line 372",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel374": {
+          "header": "12 tests cover line 374",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel375": {
+          "header": "12 tests cover line 375",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel377": {
+          "header": "12 tests cover line 377",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel378": {
+          "header": "12 tests cover line 378",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel380": {
+          "header": "12 tests cover line 380",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel381": {
+          "header": "12 tests cover line 381",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel383": {
+          "header": "12 tests cover line 383",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel384": {
+          "header": "12 tests cover line 384",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel385": {
+          "header": "4 tests cover line 385",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li></ul>",
+          "footer": ""
+        },
+        "panel386": {
+          "header": "4 tests cover line 386",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li></ul>",
+          "footer": ""
+        },
+        "panel388": {
+          "header": "4 tests cover line 388",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li></ul>",
+          "footer": ""
+        },
+        "panel390": {
+          "header": "4 tests cover line 390",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li></ul>",
+          "footer": ""
+        },
+        "panel392": {
+          "header": "4 tests cover line 392",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li></ul>",
+          "footer": ""
+        },
+        "panel394": {
+          "header": "4 tests cover line 394",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li></ul>",
+          "footer": ""
+        },
+        "panel395": {
+          "header": "4 tests cover line 395",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li></ul>",
+          "footer": ""
+        },
+        "panel397": {
+          "header": "1 test covers line 397",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel398": {
+          "header": "1 test covers line 398",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel399": {
+          "header": "4 tests cover line 399",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li></ul>",
+          "footer": ""
+        },
+        "panel401": {
+          "header": "4 tests cover line 401",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li></ul>",
+          "footer": ""
+        },
+        "panel402": {
+          "header": "4 tests cover line 402",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li></ul>",
+          "footer": ""
+        },
+        "panel404": {
+          "header": "12 tests cover line 404",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel409": {
+          "header": "12 tests cover line 409",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel411": {
+          "header": "12 tests cover line 411",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel412": {
+          "header": "12 tests cover line 412",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel414": {
+          "header": "12 tests cover line 414",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel416": {
+          "header": "12 tests cover line 416",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel417": {
+          "header": "12 tests cover line 417",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel419": {
+          "header": "12 tests cover line 419",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel424": {
+          "header": "12 tests cover line 424",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel425": {
+          "header": "12 tests cover line 425",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel428": {
+          "header": "12 tests cover line 428",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel429": {
+          "header": "12 tests cover line 429",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel430": {
+          "header": "12 tests cover line 430",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel432": {
+          "header": "12 tests cover line 432",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel433": {
+          "header": "12 tests cover line 433",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel435": {
+          "header": "2 tests cover line 435",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel437": {
+          "header": "2 tests cover line 437",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel438": {
+          "header": "2 tests cover line 438",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel440": {
+          "header": "2 tests cover line 440",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel441": {
+          "header": "2 tests cover line 441",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel442": {
+          "header": "12 tests cover line 442",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel444": {
+          "header": "12 tests cover line 444",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel463": {
+          "header": "12 tests cover line 463",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel465": {
+          "header": "12 tests cover line 465",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel466": {
+          "header": "12 tests cover line 466",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel470": {
+          "header": "12 tests cover line 470",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel471": {
+          "header": "12 tests cover line 471",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel472": {
+          "header": "12 tests cover line 472",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel473": {
+          "header": "12 tests cover line 473",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel475": {
+          "header": "12 tests cover line 475",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel476": {
+          "header": "12 tests cover line 476",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel478": {
+          "header": "12 tests cover line 478",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel479": {
+          "header": "12 tests cover line 479",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel481": {
+          "header": "12 tests cover line 481",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel489": {
+          "header": "12 tests cover line 489",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel491": {
+          "header": "12 tests cover line 491",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel492": {
+          "header": "12 tests cover line 492",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel493": {
+          "header": "12 tests cover line 493",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel494": {
+          "header": "12 tests cover line 494",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel496": {
+          "header": "12 tests cover line 496",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel497": {
+          "header": "12 tests cover line 497",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel501": {
+          "header": "12 tests cover line 501",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel502": {
+          "header": "12 tests cover line 502",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel503": {
+          "header": "12 tests cover line 503",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel505": {
+          "header": "12 tests cover line 505",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel506": {
+          "header": "12 tests cover line 506",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel508": {
+          "header": "12 tests cover line 508",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel509": {
+          "header": "12 tests cover line 509",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel510": {
+          "header": "12 tests cover line 510",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel511": {
+          "header": "12 tests cover line 511",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel512": {
+          "header": "12 tests cover line 512",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel513": {
+          "header": "12 tests cover line 513",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel514": {
+          "header": "12 tests cover line 514",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel515": {
+          "header": "12 tests cover line 515",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel517": {
+          "header": "12 tests cover line 517",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel518": {
+          "header": "12 tests cover line 518",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel520": {
+          "header": "12 tests cover line 520",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel521": {
+          "header": "12 tests cover line 521",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel522": {
+          "header": "12 tests cover line 522",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel524": {
+          "header": "12 tests cover line 524",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel525": {
+          "header": "12 tests cover line 525",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel527": {
+          "header": "12 tests cover line 527",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel529": {
+          "header": "12 tests cover line 529",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel531": {
+          "header": "12 tests cover line 531",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel533": {
+          "header": "12 tests cover line 533",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel535": {
+          "header": "12 tests cover line 535",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel537": {
+          "header": "12 tests cover line 537",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel539": {
+          "header": "12 tests cover line 539",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel541": {
+          "header": "12 tests cover line 541",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel543": {
+          "header": "12 tests cover line 543",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel554": {
+          "header": "12 tests cover line 554",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel556": {
+          "header": "12 tests cover line 556",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel557": {
+          "header": "12 tests cover line 557",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel559": {
+          "header": "12 tests cover line 559",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel560": {
+          "header": "12 tests cover line 560",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel561": {
+          "header": "12 tests cover line 561",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel563": {
+          "header": "12 tests cover line 563",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel564": {
+          "header": "12 tests cover line 564",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel566": {
+          "header": "12 tests cover line 566",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel567": {
+          "header": "12 tests cover line 567",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel569": {
+          "header": "12 tests cover line 569",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel570": {
+          "header": "12 tests cover line 570",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel571": {
+          "header": "12 tests cover line 571",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel573": {
+          "header": "12 tests cover line 573",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel574": {
+          "header": "12 tests cover line 574",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel576": {
+          "header": "12 tests cover line 576",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel578": {
+          "header": "12 tests cover line 578",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel579": {
+          "header": "12 tests cover line 579",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel580": {
+          "header": "12 tests cover line 580",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel581": {
+          "header": "12 tests cover line 581",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel583": {
+          "header": "12 tests cover line 583",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel584": {
+          "header": "12 tests cover line 584",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel585": {
+          "header": "12 tests cover line 585",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel587": {
+          "header": "12 tests cover line 587",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel595": {
+          "header": "12 tests cover line 595",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar_interceptors.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar_interceptors.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar_interceptors.html	(revision 5888)
@@ -0,0 +1,146 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>interceptors</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">interceptors</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="modules.html">modules</a>/<a href="modules_calendar.html">calendar</a>/<a href="modules_calendar_interceptors.html">interceptors</a> (<a href="modules_calendar_interceptors.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="12.50%">
+              <div class="size scarlet_red"  style="width:12.5%" title="12.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">12.50%</td>
+          <td class="coverNumLo">7 / 56</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="modules_calendar_interceptors_Helpers.php.html">Helpers.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 24</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="modules_calendar_interceptors_LDAPMapping.php.html">LDAPMapping.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="21.88%">
+              <div class="size scarlet_red"  style="width:21.875%" title="21.88%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">21.88%</td>
+          <td class="coverNumLo">7 / 32</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest.dashboard.html	(revision 5888)
@@ -0,0 +1,115 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>rest</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [0,0,0,0,0,0,0,0,0,0,0,1]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[100,19,"<a href=\"rest_oauth_OAuth2StorageUserCredential.php.html#11\">OAuth2StorageUserCredential<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">rest</td></tr>
+      <tr><td><div align="center"><p><a href="rest.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest_oauth.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest_oauth.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest_oauth.dashboard.html	(revision 5888)
@@ -0,0 +1,115 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>oauth</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [0,0,0,0,0,0,0,0,0,0,0,1]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[100,19,"<a href=\"rest_oauth_OAuth2StorageUserCredential.php.html#11\">OAuth2StorageUserCredential<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">oauth</td></tr>
+      <tr><td><div align="center"><p><a href="rest_oauth.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/library.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>library</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">library</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a> (<a href="library.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 296</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="library_oauth2.html">oauth2</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 296</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar_interceptors_LDAPMapping.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar_interceptors_LDAPMapping.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules_calendar_interceptors_LDAPMapping.php.html	(revision 5888)
@@ -0,0 +1,270 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>LDAPMapping.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">LDAPMapping.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="modules.html">modules</a>/<a href="modules_calendar.html">calendar</a>/<a href="modules_calendar_interceptors.html">interceptors</a>/<a href="modules_calendar_interceptors_LDAPMapping.php.html">LDAPMapping.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="21.88%">
+                <div class="size scarlet_red"  style="width:21.875%" title="21.88%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">21.88%</td>
+          <td class="coverNumLo">7 / 32</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">LDAPMapping</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12.39</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="19.35%">
+                <div class="size scarlet_red"  style="width:19.354838709677%" title="19.35%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">19.35%</td>
+          <td class="coverNumLo">6 / 31</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#7">encodeFindUser( &amp;$uri , &amp;$params , &amp;$criteria , $original )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12.39</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="19.35%">
+                  <div class="size scarlet_red"  style="width:19.354838709677%" title="19.35%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">19.35%</td>
+          <td class="coverNumLo">6 / 31</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                            
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                                  
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span><span class="lineCov">              1 : require_once ROOTPATH.'/modules/calendar/interceptors/Helpers.php';                                                              </span>
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                :                                                                                                                                  
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                : class LDAPMapping extends Helpers {                                                                                              
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :                                                                                                                                  
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :    public function encodeFindUser( &amp;$uri , &amp;$params , &amp;$criteria , $original ){                                                  
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span><span class="lineCov">              2 :             if(isset($criteria['filter']))                                                                                       </span>
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span><span class="lineCov">              2 :             {                                                                                                                    </span>
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span><span class="lineCov">              2 :                 if($criteria['filter'][0] === '*' &amp;&amp; $criteria['filter'][1] === 'name') //Busca pelo nome usar DFD00032          </span>
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span><span class="lineCov">              2 :                     $criteria['filter'] = array('AND',                                                                           </span>
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span><span class="lineNoCov">              0 :                                                 array('AND' ,                                                                    </span>
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span><span class="lineNoCov">              0 :                                                             array('=' , 'objectClass' , 'phpgwAccount'),                         </span>
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span><span class="lineNoCov">              0 :                                                             array('OR' ,                                                         </span>
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span><span class="lineNoCov">              0 :                                                                         array('=' , 'phpgwAccountType' , 'i'),                   </span>
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span><span class="lineNoCov">              0 :                                                                         array('=' , 'phpgwAccountType' , 'u'),                   </span>
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span><span class="lineNoCov">              0 :                                                                         array('=' , 'phpgwAccountType' , 's')                    </span>
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span><span class="lineNoCov">              0 :                                                                  )                                                               </span>
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span><span class="lineNoCov">              0 :                                                     ),                                                                           </span>
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span><span class="lineNoCov">              0 :                                                  array('AND' ,                                                                   </span>
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span><span class="lineNoCov">              0 :                                                                 array('!','phpgwAccountVisible','-1'),                           </span>
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span><span class="lineNoCov">              0 :                                                                 array('OR',                                                      </span>
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span><span class="lineNoCov">              0 :                                                                         array('=','phpgwAccountStatus','A'),                     </span>
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span><span class="lineNoCov">              0 :                                                                         array('=','accountStatus','active'),                     </span>
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span><span class="lineNoCov">              0 :                                                                         array('=','objectClass','posixGroup')                    </span>
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span><span class="lineNoCov">              0 :                                                                     ),                                                           </span>
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span><span class="lineNoCov">              0 :                                                                 array('OR',                                                      </span>
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span><span class="lineNoCov">              0 :                                                                         array('*','name',$criteria['filter'][2]),                </span>
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span><span class="lineNoCov">              0 :                                                                         array('*','givenName',$criteria['filter'][2]),           </span>
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span><span class="lineNoCov">              0 :                                                                         array('*','uid',$criteria['filter'][2]),                 </span>
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span><span class="lineNoCov">              0 :                                                                         array('*','sn',$criteria['filter'][2]),                  </span>
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span><span class="lineNoCov">              0 :                                                                         array('*','displayName',$criteria['filter'][2]),         </span>
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span><span class="lineNoCov">              0 :                                                                         array('*','mail',$criteria['filter'][2]),                </span>
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span><span class="lineNoCov">              0 :                                                                         array('*','mailAlternateAddress',$criteria['filter'][2]),</span>
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :                                                                     )                                                            
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span><span class="lineNoCov">              0 :                                                           )                                                                      </span>
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span><span class="lineNoCov">              0 :                                                 );                                                                               </span>
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineCov">              2 :             }                                                                                                                    </span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :                                                                                                                                  
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span><span class="lineCov">              2 :     }                                                                                                                            </span>
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :                                                                                                                                  
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                : }                                                                                                                                
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :                                                                                                                                  
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                : ?&gt;                                                                                                                               
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel3": {
+          "header": "1 test covers line 3",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel8": {
+          "header": "2 tests cover line 8",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel9": {
+          "header": "2 tests cover line 9",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel10": {
+          "header": "2 tests cover line 10",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel11": {
+          "header": "2 tests cover line 11",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel38": {
+          "header": "2 tests cover line 38",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel40": {
+          "header": "2 tests cover line 40",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest_oauth_OAuth2StorageUserCredential.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest_oauth_OAuth2StorageUserCredential.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/rest_oauth_OAuth2StorageUserCredential.php.html	(revision 5888)
@@ -0,0 +1,945 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>OAuth2StorageUserCredential.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">OAuth2StorageUserCredential.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="rest.html">rest</a>/<a href="rest_oauth.html">oauth</a>/<a href="rest_oauth_OAuth2StorageUserCredential.php.html">OAuth2StorageUserCredential.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">11 / 11</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">57 / 57</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">OAuth2StorageUserCredential</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">11 / 11</td>
+          <td class="crap">19</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">57 / 57</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#13">checkUserCredentials($client_id, $username, $password)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">5 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#42">checkClientCredentials($client_id, $client_secret = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">6 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#72">getClientDetails($client_id)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">4 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#99">getAccessToken($oauth_token)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#125">setRefreshToken($refresh_token, $client_id, $user_id, $expires, $scope = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">8 / 8</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#155">setAccessToken($oauth_token, $client_id, $user_id, $expires, $scope = NULL, $refresh_token)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">9 / 9</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#187">checkRestrictedGrantType($client_id, $grant_type)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#217">getRefreshToken($refresh_token)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#237">unsetRefreshToken($refresh_token)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">6 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#244">unsetAccessToken($refresh_token)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">6 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#258">getToken($token, $isRefresh = true)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">10 / 10</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                                                                                                                              
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : require ROOTPATH . '/library/oauth2/lib/OAuth2.php';                                                                                                                                                                                               
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : require ROOTPATH . '/library/oauth2/lib/IOAuth2Storage.php';                                                                                                                                                                                       
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                : require ROOTPATH . '/library/oauth2/lib/IOAuth2GrantCode.php';                                                                                                                                                                                     
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                : require ROOTPATH . '/library/oauth2/lib/IOAuth2RefreshTokens.php';                                                                                                                                                                                 
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                : require ROOTPATH . '/library/oauth2/lib/IOAuth2GrantUser.php';                                                                                                                                                                                     
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                : class OAuth2StorageUserCredential implements IOAuth2GrantUser, IOAuth2RefreshTokens {                                                                                                                                                              
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :     public function checkUserCredentials($client_id, $username, $password) {                                                                                                                                                                       
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :         //Authentica no LDAP                                                                                                                                                                                                                       
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span><span class="lineCov">              2 :         $usuario =  Controller::find(array('concept'=&gt;'user' , 'service' =&gt; 'OpenLDAP'), false , array('filter' =&gt; array('AND', array('=' , 'uid' , $username ), array('=' , 'password', '{md5}' . base64_encode(pack(&quot;H*&quot;,md5($password))))  ) ));</span>
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span><span class="lineCov">              2 :         if(isset($usuario[0]['id']))                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span><span class="lineCov">              2 :         {                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span><span class="lineCov">              1 :             return array('scope' =&gt; 'all' , 'user_id' =&gt; $usuario[0]['id']);                                                                                                                                                                       </span>
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span><span class="lineCov">              1 :         return false;                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :      * Make sure that the client credentials is valid.                                                                                                                                                                                             
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :      * @param $client_id                                                                                                                                                                                                                           
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :      * Client identifier to be check with.                                                                                                                                                                                                         
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :      * @param $client_secret                                                                                                                                                                                                                       
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :      * (optional) If a secret is required, check that they've given the right one.                                                                                                                                                                 
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :      * @return                                                                                                                                                                                                                                     
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :      * TRUE if the client credentials are valid, and MUST return FALSE if it isn't.                                                                                                                                                                
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :      * @endcode                                                                                                                                                                                                                                    
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-3.1                                                                                                                                                                          
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                :      * @ingroup oauth2_section_3                                                                                                                                                                                                                   
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :     public function checkClientCredentials($client_id, $client_secret = NULL) {                                                                                                                                                                    
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span><span class="lineCov">              3 :         if($client_secret == NULL) {                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span><span class="lineCov">              1 :             return false;                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span><span class="lineCov">              2 :         $res =  Controller::find(array('concept' =&gt; 'oauthCliente'), array('client_secret') , array('filter' =&gt; array('=' , 'client_id' , $client_id)) );                                                                                          </span>
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span><span class="lineCov">              2 :         if(isset($res[0]['client_secret']) &amp;&amp; $res[0]['client_secret'] == $client_secret) {                                                                                                                                                        </span>
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span><span class="lineCov">              1 :             return true;                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :         else {                                                                                                                                                                                                                                     
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span><span class="lineCov">              1 :             return false;                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                :      * Get client details corresponding client_id.                                                                                                                                                                                                 
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :      * OAuth says we should store request URIs for each registered client.                                                                                                                                                                         
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :      * Implement this function to grab the stored URI for a given client id.                                                                                                                                                                       
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :      * @param $client_id                                                                                                                                                                                                                           
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :      * Client identifier to be check with.                                                                                                                                                                                                         
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :      * @return array                                                                                                                                                                                                                               
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :      * Client details. Only mandatory item is the &quot;registered redirect URI&quot;, and MUST                                                                                                                                                              
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :      * return FALSE if the given client does not exist or is invalid.                                                                                                                                                                              
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                   
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span>                :     public function getClientDetails($client_id) {                                                                                                                                                                                                 
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span><span class="lineCov">              2 :         $res =  Controller::find(array('concept' =&gt; 'oauthCliente'), array('redirect_uri') , array('filter' =&gt; array('=' , 'client_id' , $client_id)));                                                                                            </span>
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span><span class="lineCov">              2 :         if(isset($res[0]['redirect_uri'])) {                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span><span class="lineCov">              1 :             return $res[0]['redirect_uri'];                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :         else {                                                                                                                                                                                                                                     
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span><span class="lineCov">              1 :             return false;                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                :      * Look up the supplied oauth_token from storage.                                                                                                                                                                                              
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                :      * We need to retrieve access token data as we create and verify tokens.                                                                                                                                                                       
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span>                :      * @param $oauth_token                                                                                                                                                                                                                         
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span>                :      * oauth_token to be check with.                                                                                                                                                                                                               
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                :      * @return                                                                                                                                                                                                                                     
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                :      * An associative array as below, and return NULL if the supplied oauth_token                                                                                                                                                                  
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :      * is invalid:                                                                                                                                                                                                                                 
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span>                :      * - client_id: Stored client identifier.                                                                                                                                                                                                      
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span>                :      * - expires: Stored expiration in unix timestamp.                                                                                                                                                                                             
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                :      * - scope: (optional) Stored scope values in space-separated string.                                                                                                                                                                          
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :      * @ingroup oauth2_section_7                                                                                                                                                                                                                   
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :     public function getAccessToken($oauth_token) {                                                                                                                                                                                                 
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span><span class="lineCov">              2 :         return $this-&gt;getToken($oauth_token, false);                                                                                                                                                                                               </span>
+<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span>                :      * Take the provided refresh token values and store them somewhere.                                                                                                                                                                            
+<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span>                :      * This function should be the storage counterpart to getRefreshToken().                                                                                                                                                                       
+<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span>                :      * If storage fails for some reason, we're not currently checking for                                                                                                                                                                          
+<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span>                :      * any sort of success/failure, so you should bail out of the script                                                                                                                                                                           
+<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span>                :      * and provide a descriptive fail message.                                                                                                                                                                                                     
+<span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111">     111</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112">     112</a> </span>                :      * Required for OAuth2::GRANT_TYPE_REFRESH_TOKEN.                                                                                                                                                                                              
+<span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113">     113</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114">     114</a> </span>                :      * @param $refresh_token                                                                                                                                                                                                                       
+<span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115">     115</a> </span>                :      * Refresh token to be stored.                                                                                                                                                                                                                 
+<span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116">     116</a> </span>                :      * @param $client_id                                                                                                                                                                                                                           
+<span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117">     117</a> </span>                :      * Client identifier to be stored.                                                                                                                                                                                                             
+<span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118">     118</a> </span>                :      * @param $expires                                                                                                                                                                                                                             
+<span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119">     119</a> </span>                :      * expires to be stored.                                                                                                                                                                                                                       
+<span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120">     120</a> </span>                :      * @param $scope                                                                                                                                                                                                                               
+<span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121">     121</a> </span>                :      * (optional) Scopes to be stored in space-separated string.                                                                                                                                                                                   
+<span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122">     122</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123">     123</a> </span>                :      * @ingroup oauth2_section_6                                                                                                                                                                                                                   
+<span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124">     124</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125">     125</a> </span>                :     public function setRefreshToken($refresh_token, $client_id, $user_id, $expires, $scope = NULL) {                                                                                                                                               
+<span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126">     126</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127">     127</a> </span><span class="lineCov">             12 :         $data = array();                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128">     128</a> </span><span class="lineCov">             12 :         $data['refresh_token']  = $refresh_token;                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129">     129</a> </span><span class="lineCov">             12 :         $data['client_id'] = $client_id;                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130">     130</a> </span><span class="lineCov">             12 :         $data['user_id'] = $user_id;                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131">     131</a> </span><span class="lineCov">             12 :         $data['expires'] = $expires;                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132">     132</a> </span><span class="lineCov">             12 :         $data['scope'] = $scope;                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133">     133</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134">     134</a> </span><span class="lineCov">             12 :             Controller::create(array('concept' =&gt; 'oauthRefreshToken'), $data);                                                                                                                                                                    </span>
+<span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135">     135</a> </span><span class="lineCov">             12 :     }                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136">     136</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container137"><a name="137"></a><a href="#137" id="line137">     137</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138">     138</a> </span>                :      * Store the supplied access token values to storage.                                                                                                                                                                                          
+<span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139">     139</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140">     140</a> </span>                :      * We need to store access token data as we create and verify tokens.                                                                                                                                                                          
+<span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141">     141</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142">     142</a> </span>                :      * @param $oauth_token                                                                                                                                                                                                                         
+<span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143">     143</a> </span>                :      * oauth_token to be stored.                                                                                                                                                                                                                   
+<span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144">     144</a> </span>                :      * @param $client_id                                                                                                                                                                                                                           
+<span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145">     145</a> </span>                :      * Client identifier to be stored.                                                                                                                                                                                                             
+<span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146">     146</a> </span>                :      * @param $user_id                                                                                                                                                                                                                             
+<span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147">     147</a> </span>                :      * User identifier to be stored.                                                                                                                                                                                                               
+<span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148">     148</a> </span>                :      * @param $expires                                                                                                                                                                                                                             
+<span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149">     149</a> </span>                :      * Expiration to be stored.                                                                                                                                                                                                                    
+<span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150">     150</a> </span>                :      * @param $scope                                                                                                                                                                                                                               
+<span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151">     151</a> </span>                :      * (optional) Scopes to be stored in space-separated string.                                                                                                                                                                                   
+<span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152">     152</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153">     153</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                   
+<span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154">     154</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155">     155</a> </span>                :     public function setAccessToken($oauth_token, $client_id, $user_id, $expires, $scope = NULL, $refresh_token) {                                                                                                                                  
+<span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156">     156</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157">     157</a> </span><span class="lineCov">             12 :         $data = array();                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158">     158</a> </span><span class="lineCov">             12 :         $data['oauth_token']  = $oauth_token;                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159">     159</a> </span><span class="lineCov">             12 :         $data['client_id'] = $client_id;                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160">     160</a> </span><span class="lineCov">             12 :         $data['user_id'] = $user_id;                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161">     161</a> </span><span class="lineCov">             12 :         $data['expires'] = $expires;                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162">     162</a> </span><span class="lineCov">             12 :         $data['scope'] = $scope;                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163">     163</a> </span><span class="lineCov">             12 :         $data['refresh_token'] = $refresh_token;                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164">     164</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165">     165</a> </span><span class="lineCov">             12 :         Controller::create(array('concept' =&gt; 'oauthToken'), $data);                                                                                                                                                                               </span>
+<span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166">     166</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167">     167</a> </span><span class="lineCov">             12 :     }                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168">     168</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169">     169</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170">     170</a> </span>                :      * Check restricted grant types of corresponding client identifier.                                                                                                                                                                            
+<span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171">     171</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172">     172</a> </span>                :      * If you want to restrict clients to certain grant types, override this                                                                                                                                                                       
+<span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173">     173</a> </span>                :      * function.                                                                                                                                                                                                                                   
+<span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174">     174</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175">     175</a> </span>                :      * @param $client_id                                                                                                                                                                                                                           
+<span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176">     176</a> </span>                :      * Client identifier to be check with.                                                                                                                                                                                                         
+<span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177">     177</a> </span>                :      * @param $grant_type                                                                                                                                                                                                                          
+<span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178">     178</a> </span>                :      * Grant type to be check with, would be one of the values contained in                                                                                                                                                                        
+<span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179">     179</a> </span>                :      * OAuth2::GRANT_TYPE_REGEXP.                                                                                                                                                                                                                  
+<span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180">     180</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181">     181</a> </span>                :      * @return                                                                                                                                                                                                                                     
+<span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182">     182</a> </span>                :      * TRUE if the grant type is supported by this client identifier, and                                                                                                                                                                          
+<span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183">     183</a> </span>                :      * FALSE if it isn't.                                                                                                                                                                                                                          
+<span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184">     184</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185">     185</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                   
+<span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186">     186</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187">     187</a> </span>                :     public function checkRestrictedGrantType($client_id, $grant_type) {                                                                                                                                                                            
+<span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188">     188</a> </span>                :         /*TODO: essa funÃ§Ã£o deve verificar se o cliente tem permissao para realizar o login via 'password'                                                                                                                                       
+<span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189">     189</a> </span>                :          * deixe para implementar no prox. sprint, quando trataremos de seguranca. Deve-se criar um campo extra no banco para guardar quais tipos                                                                                                  
+<span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190">     190</a> </span>                :          * de grant_type o cliente esta autorizado a fazer                                                                                                                                                                                         
+<span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191">     191</a> </span>                :         */                                                                                                                                                                                                                                         
+<span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192">     192</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193">     193</a> </span><span class="lineCov">              1 :         return true;                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194">     194</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195">     195</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196">     196</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197">     197</a> </span>                :      * Grant refresh access tokens.                                                                                                                                                                                                                
+<span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198">     198</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199">     199</a> </span>                :      * Retrieve the stored data for the given refresh token.                                                                                                                                                                                       
+<span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200">     200</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201">     201</a> </span>                :      * Required for OAuth2::GRANT_TYPE_REFRESH_TOKEN.                                                                                                                                                                                              
+<span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202">     202</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203">     203</a> </span>                :      * @param $refresh_token                                                                                                                                                                                                                       
+<span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204">     204</a> </span>                :      * Refresh token to be check with.                                                                                                                                                                                                             
+<span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205">     205</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container206"><a name="206"></a><a href="#206" id="line206">     206</a> </span>                :      * @return                                                                                                                                                                                                                                     
+<span class="lineNum" id="container207"><a name="207"></a><a href="#207" id="line207">     207</a> </span>                :      * An associative array as below, and NULL if the refresh_token is                                                                                                                                                                             
+<span class="lineNum" id="container208"><a name="208"></a><a href="#208" id="line208">     208</a> </span>                :      * invalid:                                                                                                                                                                                                                                    
+<span class="lineNum" id="container209"><a name="209"></a><a href="#209" id="line209">     209</a> </span>                :      * - client_id: Stored client identifier.                                                                                                                                                                                                      
+<span class="lineNum" id="container210"><a name="210"></a><a href="#210" id="line210">     210</a> </span>                :      * - expires: Stored expiration unix timestamp.                                                                                                                                                                                                
+<span class="lineNum" id="container211"><a name="211"></a><a href="#211" id="line211">     211</a> </span>                :      * - scope: (optional) Stored scope values in space-separated string.                                                                                                                                                                          
+<span class="lineNum" id="container212"><a name="212"></a><a href="#212" id="line212">     212</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container213"><a name="213"></a><a href="#213" id="line213">     213</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-6                                                                                                                                                                            
+<span class="lineNum" id="container214"><a name="214"></a><a href="#214" id="line214">     214</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container215"><a name="215"></a><a href="#215" id="line215">     215</a> </span>                :      * @ingroup oauth2_section_6                                                                                                                                                                                                                   
+<span class="lineNum" id="container216"><a name="216"></a><a href="#216" id="line216">     216</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container217"><a name="217"></a><a href="#217" id="line217">     217</a> </span>                :     public function getRefreshToken($refresh_token) {                                                                                                                                                                                              
+<span class="lineNum" id="container218"><a name="218"></a><a href="#218" id="line218">     218</a> </span><span class="lineCov">              2 :         return $this-&gt;getToken($refresh_token, true);                                                                                                                                                                                              </span>
+<span class="lineNum" id="container219"><a name="219"></a><a href="#219" id="line219">     219</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container220"><a name="220"></a><a href="#220" id="line220">     220</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container221"><a name="221"></a><a href="#221" id="line221">     221</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container222"><a name="222"></a><a href="#222" id="line222">     222</a> </span>                :      * Expire a used refresh token.                                                                                                                                                                                                                
+<span class="lineNum" id="container223"><a name="223"></a><a href="#223" id="line223">     223</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container224"><a name="224"></a><a href="#224" id="line224">     224</a> </span>                :      * This is not explicitly required in the spec, but is almost implied.                                                                                                                                                                         
+<span class="lineNum" id="container225"><a name="225"></a><a href="#225" id="line225">     225</a> </span>                :      * After granting a new refresh token, the old one is no longer useful and                                                                                                                                                                     
+<span class="lineNum" id="container226"><a name="226"></a><a href="#226" id="line226">     226</a> </span>                :      * so should be forcibly expired in the data store so it can't be used again.                                                                                                                                                                  
+<span class="lineNum" id="container227"><a name="227"></a><a href="#227" id="line227">     227</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container228"><a name="228"></a><a href="#228" id="line228">     228</a> </span>                :      * If storage fails for some reason, we're not currently checking for                                                                                                                                                                          
+<span class="lineNum" id="container229"><a name="229"></a><a href="#229" id="line229">     229</a> </span>                :      * any sort of success/failure, so you should bail out of the script                                                                                                                                                                           
+<span class="lineNum" id="container230"><a name="230"></a><a href="#230" id="line230">     230</a> </span>                :      * and provide a descriptive fail message.                                                                                                                                                                                                     
+<span class="lineNum" id="container231"><a name="231"></a><a href="#231" id="line231">     231</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container232"><a name="232"></a><a href="#232" id="line232">     232</a> </span>                :      * @param $refresh_token                                                                                                                                                                                                                       
+<span class="lineNum" id="container233"><a name="233"></a><a href="#233" id="line233">     233</a> </span>                :      * Refresh token to be expirse.                                                                                                                                                                                                                
+<span class="lineNum" id="container234"><a name="234"></a><a href="#234" id="line234">     234</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container235"><a name="235"></a><a href="#235" id="line235">     235</a> </span>                :      * @ingroup oauth2_section_6                                                                                                                                                                                                                   
+<span class="lineNum" id="container236"><a name="236"></a><a href="#236" id="line236">     236</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container237"><a name="237"></a><a href="#237" id="line237">     237</a> </span>                :     public function unsetRefreshToken($refresh_token) {                                                                                                                                                                                            
+<span class="lineNum" id="container238"><a name="238"></a><a href="#238" id="line238">     238</a> </span><span class="lineCov">             12 :         Controller::delete(                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container239"><a name="239"></a><a href="#239" id="line239">     239</a> </span><span class="lineCov">             12 :             array('concept' =&gt; 'oauthRefreshToken'),                                                                                                                                                                                               </span>
+<span class="lineNum" id="container240"><a name="240"></a><a href="#240" id="line240">     240</a> </span><span class="lineCov">             12 :             false,                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container241"><a name="241"></a><a href="#241" id="line241">     241</a> </span><span class="lineCov">             12 :             array('filter' =&gt; array('=', 'refresh_token', $refresh_token ))                                                                                                                                                                        </span>
+<span class="lineNum" id="container242"><a name="242"></a><a href="#242" id="line242">     242</a> </span><span class="lineCov">             12 :         );                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container243"><a name="243"></a><a href="#243" id="line243">     243</a> </span><span class="lineCov">             12 :     }                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container244"><a name="244"></a><a href="#244" id="line244">     244</a> </span>                :     public function unsetAccessToken($refresh_token) {                                                                                                                                                                                             
+<span class="lineNum" id="container245"><a name="245"></a><a href="#245" id="line245">     245</a> </span><span class="lineCov">             12 :         Controller::delete(                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container246"><a name="246"></a><a href="#246" id="line246">     246</a> </span><span class="lineCov">             12 :             array('concept' =&gt; 'oauthToken'),                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container247"><a name="247"></a><a href="#247" id="line247">     247</a> </span><span class="lineCov">             12 :             false,                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container248"><a name="248"></a><a href="#248" id="line248">     248</a> </span><span class="lineCov">             12 :             array('filter' =&gt; array('=', 'oauth_token', $refresh_token ))                                                                                                                                                                          </span>
+<span class="lineNum" id="container249"><a name="249"></a><a href="#249" id="line249">     249</a> </span><span class="lineCov">             12 :         );                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container250"><a name="250"></a><a href="#250" id="line250">     250</a> </span><span class="lineCov">             12 :     }                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container251"><a name="251"></a><a href="#251" id="line251">     251</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container252"><a name="252"></a><a href="#252" id="line252">     252</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container253"><a name="253"></a><a href="#253" id="line253">     253</a> </span>                :      * Retrieves an access or refresh token.                                                                                                                                                                                                       
+<span class="lineNum" id="container254"><a name="254"></a><a href="#254" id="line254">     254</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container255"><a name="255"></a><a href="#255" id="line255">     255</a> </span>                :      * @param string $token                                                                                                                                                                                                                        
+<span class="lineNum" id="container256"><a name="256"></a><a href="#256" id="line256">     256</a> </span>                :      * @param bool $refresh                                                                                                                                                                                                                        
+<span class="lineNum" id="container257"><a name="257"></a><a href="#257" id="line257">     257</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container258"><a name="258"></a><a href="#258" id="line258">     258</a> </span>                :     protected function getToken($token, $isRefresh = true) {                                                                                                                                                                                       
+<span class="lineNum" id="container259"><a name="259"></a><a href="#259" id="line259">     259</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container260"><a name="260"></a><a href="#260" id="line260">     260</a> </span><span class="lineCov">              4 :         $tokenConcept = $isRefresh ? 'oauthRefreshToken' : 'oauthToken';                                                                                                                                                                           </span>
+<span class="lineNum" id="container261"><a name="261"></a><a href="#261" id="line261">     261</a> </span><span class="lineCov">              4 :         $filter =  $isRefresh ? 'refresh_token' : 'oauth_token';                                                                                                                                                                                   </span>
+<span class="lineNum" id="container262"><a name="262"></a><a href="#262" id="line262">     262</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container263"><a name="263"></a><a href="#263" id="line263">     263</a> </span><span class="lineCov">              4 :         $res = Controller::find(                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container264"><a name="264"></a><a href="#264" id="line264">     264</a> </span><span class="lineCov">              4 :             array('concept' =&gt; $tokenConcept),                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container265"><a name="265"></a><a href="#265" id="line265">     265</a> </span><span class="lineCov">              4 :             false,                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container266"><a name="266"></a><a href="#266" id="line266">     266</a> </span><span class="lineCov">              4 :             array('filter' =&gt; array('=' , $filter , $token))                                                                                                                                                                                       </span>
+<span class="lineNum" id="container267"><a name="267"></a><a href="#267" id="line267">     267</a> </span><span class="lineCov">              4 :         );                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container268"><a name="268"></a><a href="#268" id="line268">     268</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container269"><a name="269"></a><a href="#269" id="line269">     269</a> </span>                :         /*return (!empty($res[0]))? $res[0] : false;*/                                                                                                                                                                                             
+<span class="lineNum" id="container270"><a name="270"></a><a href="#270" id="line270">     270</a> </span><span class="lineCov">              4 :         if(!empty($res[0])) {                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container271"><a name="271"></a><a href="#271" id="line271">     271</a> </span><span class="lineCov">              2 :             return $res[0];                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container272"><a name="272"></a><a href="#272" id="line272">     272</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container273"><a name="273"></a><a href="#273" id="line273">     273</a> </span>                :         else {                                                                                                                                                                                                                                     
+<span class="lineNum" id="container274"><a name="274"></a><a href="#274" id="line274">     274</a> </span><span class="lineCov">              2 :             return false;                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container275"><a name="275"></a><a href="#275" id="line275">     275</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container276"><a name="276"></a><a href="#276" id="line276">     276</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container277"><a name="277"></a><a href="#277" id="line277">     277</a> </span>                : }                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container278"><a name="278"></a><a href="#278" id="line278">     278</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container279"><a name="279"></a><a href="#279" id="line279">     279</a> </span>                :                                                                                                                                                                                                                                                    
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel16": {
+          "header": "2 tests cover line 16",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel18": {
+          "header": "2 tests cover line 18",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel19": {
+          "header": "2 tests cover line 19",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel20": {
+          "header": "1 test covers line 20",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel23": {
+          "header": "1 test covers line 23",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel43": {
+          "header": "3 tests cover line 43",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li></ul>",
+          "footer": ""
+        },
+        "panel44": {
+          "header": "1 test covers line 44",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li></ul>",
+          "footer": ""
+        },
+        "panel47": {
+          "header": "2 tests cover line 47",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel49": {
+          "header": "2 tests cover line 49",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel50": {
+          "header": "1 test covers line 50",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li></ul>",
+          "footer": ""
+        },
+        "panel53": {
+          "header": "1 test covers line 53",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel73": {
+          "header": "2 tests cover line 73",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel74": {
+          "header": "2 tests cover line 74",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel75": {
+          "header": "1 test covers line 75",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li></ul>",
+          "footer": ""
+        },
+        "panel78": {
+          "header": "1 test covers line 78",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li></ul>",
+          "footer": ""
+        },
+        "panel100": {
+          "header": "2 tests cover line 100",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel127": {
+          "header": "12 tests cover line 127",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel128": {
+          "header": "12 tests cover line 128",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel129": {
+          "header": "12 tests cover line 129",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel130": {
+          "header": "12 tests cover line 130",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel131": {
+          "header": "12 tests cover line 131",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel132": {
+          "header": "12 tests cover line 132",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel134": {
+          "header": "12 tests cover line 134",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel135": {
+          "header": "12 tests cover line 135",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel157": {
+          "header": "12 tests cover line 157",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel158": {
+          "header": "12 tests cover line 158",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel159": {
+          "header": "12 tests cover line 159",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel160": {
+          "header": "12 tests cover line 160",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel161": {
+          "header": "12 tests cover line 161",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel162": {
+          "header": "12 tests cover line 162",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel163": {
+          "header": "12 tests cover line 163",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel165": {
+          "header": "12 tests cover line 165",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel167": {
+          "header": "12 tests cover line 167",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel193": {
+          "header": "1 test covers line 193",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel218": {
+          "header": "2 tests cover line 218",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel238": {
+          "header": "12 tests cover line 238",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel239": {
+          "header": "12 tests cover line 239",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel240": {
+          "header": "12 tests cover line 240",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel241": {
+          "header": "12 tests cover line 241",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel242": {
+          "header": "12 tests cover line 242",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel243": {
+          "header": "12 tests cover line 243",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel245": {
+          "header": "12 tests cover line 245",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel246": {
+          "header": "12 tests cover line 246",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel247": {
+          "header": "12 tests cover line 247",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel248": {
+          "header": "12 tests cover line 248",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel249": {
+          "header": "12 tests cover line 249",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel250": {
+          "header": "12 tests cover line 250",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckUserCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentials</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testCheckClientCredentialsWithoutClientSecret</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetails</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetClientDetailsFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testcheckRestrictedGrantType</li></ul>",
+          "footer": ""
+        },
+        "panel260": {
+          "header": "4 tests cover line 260",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel261": {
+          "header": "4 tests cover line 261",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel263": {
+          "header": "4 tests cover line 263",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel264": {
+          "header": "4 tests cover line 264",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel265": {
+          "header": "4 tests cover line 265",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel266": {
+          "header": "4 tests cover line 266",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel267": {
+          "header": "4 tests cover line 267",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel270": {
+          "header": "4 tests cover line 270",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+        "panel271": {
+          "header": "2 tests cover line 271",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessToken</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshToken</li></ul>",
+          "footer": ""
+        },
+        "panel274": {
+          "header": "2 tests cover line 274",
+          "body": "<ul><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetAccessTokenFalse</li><li class=\"testPassed\">OAuth2StorageUserCredentialTest::testGetRefreshTokenFalse</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/container.css
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/container.css	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/container.css	(revision 5888)
@@ -0,0 +1,324 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+.yui-overlay,
+.yui-panel-container {
+    visibility:hidden;
+    position:absolute;
+    z-index: 2;
+}
+
+.yui-tt {
+    visibility:hidden;
+    position:absolute;
+    color:#333;
+    background-color:#FDFFB4;
+    font-family:arial,helvetica,verdana,sans-serif;
+    padding:2px;
+    border:1px solid #FCC90D;
+    font:100% sans-serif;
+    width:auto;
+}
+
+/*
+    PLEASE NOTE: The <DIV> element used for a Tooltip's shadow is appended
+    to its root element via JavaScript once it has been rendered.  The
+    code that creates the shadow lives in the Tooltip's public "onRender"
+    event handler that is a prototype method of YAHOO.widget.Tooltip.
+    Implementers wishing to remove a Tooltip's shadow or add any other markup
+    required for a given skin for Tooltip should override the "onRender" method.
+*/
+
+.yui-tt-shadow {
+    display: none;
+}
+
+* html body.masked select {
+    visibility:hidden;
+}
+
+* html div.yui-panel-container select {
+    visibility:inherit;
+}
+
+* html div.drag select {
+    visibility:hidden;
+}
+
+* html div.hide-select select {
+    visibility:hidden;
+}
+
+.mask {
+    z-index: 1;
+    display:none;
+    position:absolute;
+    top:0;
+    left:0;
+    -moz-opacity: 0.5;
+    opacity:.50;
+    filter: alpha(opacity=50);
+    background-color:#CCC;
+}
+
+/*
+
+There are two known issues with YAHOO.widget.Overlay (and its subclasses) that
+manifest in Gecko-based browsers on Mac OS X:
+
+    1) Elements with scrollbars will poke through Overlay instances floating
+       above them.
+
+    2) An Overlay's scrollbars and the scrollbars of its child nodes remain
+       visible when the Overlay is hidden.
+
+To fix these bugs:
+
+    1) The "overflow" property of an Overlay instance's root element and child
+       nodes is toggled between "hidden" and "auto" (through the application
+       and removal of the "hide-scrollbars" and "show-scrollbars" CSS classes)
+       as its "visibility" configuration property is toggled between
+       "false" and "true."
+
+    2) The "display" property of <SELECT> elements that are child nodes of the
+       Overlay instance's root element is set to "none" when it is hidden.
+
+PLEASE NOTE:
+
+    1) The "hide-scrollbars" and "show-scrollbars" CSS classes classes are
+       applied only for Gecko on Mac OS X and are added/removed to/from the
+       Overlay's root HTML element (DIV) via the "hideMacGeckoScrollbars" and
+       "showMacGeckoScrollbars" methods of YAHOO.widget.Overlay.
+
+    2) There may be instances where the CSS for a web page or application
+       contains style rules whose specificity override the rules implemented by
+       the Container CSS files to fix this bug.  In such cases, is necessary to
+       leverage the provided "hide-scrollbars" and "show-scrollbars" classes to
+       write custom style rules to guard against this bug.
+
+** For more information on this issue, see:
+   + https://bugzilla.mozilla.org/show_bug.cgi?id=187435
+   + YUILibrary bug #1723530
+
+*/
+
+.hide-scrollbars,
+.hide-scrollbars * {
+
+    overflow: hidden;
+
+}
+
+.hide-scrollbars select {
+
+    display: none;
+
+}
+
+.show-scrollbars {
+
+    overflow: auto;
+
+}
+
+.yui-panel-container.show-scrollbars {
+
+    overflow: visible;
+
+}
+
+.yui-panel-container.show-scrollbars .underlay {
+
+    overflow: auto;
+
+}
+
+.yui-panel-container.focused {
+
+}
+
+
+/* Panel underlay styles */
+
+.yui-panel-container .underlay {
+
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+
+}
+
+.yui-panel-container.matte {
+
+    padding: 3px;
+    background-color: #fff;
+
+}
+
+.yui-panel-container.shadow .underlay {
+
+    top: 3px;
+    bottom: -3px;
+    right: -3px;
+    left: 3px;
+    background-color: #000;
+    opacity: .12;
+    filter: alpha(opacity=12);  /* For IE */
+
+}
+
+/*
+   Workaround for Safari 2.x - the yui-force-redraw class is applied, and then removed when
+   the Panel's content changes, to force Safari 2.x to redraw the underlay.
+   We attempt to choose a CSS property which has no visual impact when added,
+   removed, but still causes Safari to redraw
+*/
+.yui-panel-container.shadow .underlay.yui-force-redraw {
+    padding-bottom: 1px;
+}
+
+.yui-effect-fade .underlay {
+    display:none;
+}
+
+.yui-panel {
+    visibility:hidden;
+    border-collapse:separate;
+    position:relative;
+    left:0;
+    top:0;
+    font:1em Arial;
+    background-color:#FFF;
+    border:1px solid #000;
+    z-index:1;
+    overflow:hidden;
+}
+
+.yui-panel .hd {
+    background-color:#3d77cb;
+    color:#FFF;
+    font-size:100%;
+    line-height:100%;
+    border:1px solid #FFF;
+    border-bottom:1px solid #000;
+    font-weight:bold;
+    padding:4px;
+    white-space:nowrap;
+}
+
+.yui-panel .bd {
+    overflow:hidden;
+    padding:4px;
+}
+
+.yui-panel .bd p {
+    margin:0 0 1em;
+}
+
+.yui-panel .container-close {
+    position:absolute;
+    top:5px;
+    right:4px;
+    z-index:6;
+    height:12px;
+    width:12px;
+    margin:0px;
+    padding:0px;
+    background:url(close12_1.gif) no-repeat;
+    cursor:pointer;
+    visibility:inherit;
+    text-indent:-10000em;
+    overflow:hidden;
+    text-decoration:none;
+}
+
+.yui-panel .ft {
+    padding:4px;
+    overflow:hidden;
+}
+
+.yui-simple-dialog .bd .yui-icon {
+    background-repeat:no-repeat;
+    width:16px;
+    height:16px;
+    margin-right:10px;
+    float:left;
+}
+
+.yui-simple-dialog .bd span.blckicon {
+    background: url("blck16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.alrticon {
+    background: url("alrt16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.hlpicon {
+    background: url("hlp16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.infoicon {
+    background: url("info16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.warnicon {
+    background: url("warn16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.tipicon {
+    background: url("tip16_1.gif") no-repeat;
+}
+
+.yui-dialog .ft,
+.yui-simple-dialog .ft {
+    padding-bottom:5px;
+    padding-right:5px;
+    text-align:right;
+}
+
+.yui-dialog form,
+.yui-simple-dialog form {
+    margin:0;
+}
+
+.button-group button {
+    font:100 76% verdana;
+    text-decoration:none;
+    background-color: #E4E4E4;
+    color: #333;
+    cursor: hand;
+    vertical-align: middle;
+    border: 2px solid #797979;
+    border-top-color:#FFF;
+    border-left-color:#FFF;
+    margin:2px;
+    padding:2px;
+}
+
+.button-group button.default {
+    font-weight:bold;
+}
+
+.button-group button:hover,
+.button-group button.hover {
+    border:2px solid #90A029;
+    background-color:#EBF09E;
+    border-top-color:#FFF;
+    border-left-color:#FFF;
+}
+
+.button-group button:active {
+    border:2px solid #E4E4E4;
+    background-color:#BBB;
+    border-top-color:#333;
+    border-left-color:#333;
+}
+
+.yui-override-padding {
+    padding:0 !important;
+}
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/index.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/index.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/index.html	(revision 5888)
@@ -0,0 +1,221 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title></title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title"></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a> (<a href="index.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="42.95%">
+              <div class="size butter"  style="width:42.954324586978%" title="42.95%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">42.95%</td>
+          <td class="coverNumMed">442 / 1029</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="29.29%">
+                <div class="size scarlet_red"  style="width:29.285714285714%" title="29.29%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">29.29%</td>
+          <td class="coverNumLo">41 / 140</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="8.33%">
+                 <div class="size scarlet_red"  style="width:8.3333333333333%" title="8.33%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">8.33%</td>
+          <td class="coverNumLo">1 / 12</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="api.html">api</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="55.56%">
+              <div class="size butter"  style="width:55.555555555556%" title="55.56%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">55.56%</td>
+          <td class="coverNumMed">205 / 369</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="30.77%">
+                <div class="size scarlet_red"  style="width:30.769230769231%" title="30.77%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">30.77%</td>
+          <td class="coverNumLo">16 / 52</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="library.html">library</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 296</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="modules.html">modules</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="12.50%">
+              <div class="size scarlet_red"  style="width:12.5%" title="12.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">12.50%</td>
+          <td class="coverNumLo">7 / 56</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="rest.html">rest</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+              <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">57 / 57</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">11 / 11</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                 <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="services.html">services</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="68.92%">
+              <div class="size butter"  style="width:68.924302788845%" title="68.92%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">68.92%</td>
+          <td class="coverNumMed">173 / 251</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="32.56%">
+                <div class="size scarlet_red"  style="width:32.558139534884%" title="32.56%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">32.56%</td>
+          <td class="coverNumLo">14 / 43</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/modules.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>modules</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">modules</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="modules.html">modules</a> (<a href="modules.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="12.50%">
+              <div class="size scarlet_red"  style="width:12.5%" title="12.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">12.50%</td>
+          <td class="coverNumLo">7 / 56</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="modules_calendar.html">calendar</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="12.50%">
+              <div class="size scarlet_red"  style="width:12.5%" title="12.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">12.50%</td>
+          <td class="coverNumLo">7 / 56</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/code-coverage/api.html	(revision 5888)
@@ -0,0 +1,196 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>api</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">api</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="api.html">api</a> (<a href="api.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="55.56%">
+              <div class="size butter"  style="width:55.555555555556%" title="55.56%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">55.56%</td>
+          <td class="coverNumMed">205 / 369</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="30.77%">
+                <div class="size scarlet_red"  style="width:30.769230769231%" title="30.77%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">30.77%</td>
+          <td class="coverNumLo">16 / 52</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="api_cache.html">cache</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.00%">
+              <div class="size butter"  style="width:50%" title="50.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.00%</td>
+          <td class="coverNumMed">3 / 6</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="40.00%">
+                <div class="size butter"  style="width:40%" title="40.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">40.00%</td>
+          <td class="coverNumMed">2 / 5</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="api_config.php.html">config.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="40.00%">
+              <div class="size butter"  style="width:40%" title="40.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">40.00%</td>
+          <td class="coverNumMed">10 / 25</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="14.29%">
+                <div class="size scarlet_red"  style="width:14.285714285714%" title="14.29%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">14.29%</td>
+          <td class="coverNumLo">1 / 7</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="api_controller.php.html">controller.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="56.68%">
+              <div class="size butter"  style="width:56.676557863501%" title="56.68%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">56.68%</td>
+          <td class="coverNumMed">191 / 337</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="32.50%">
+                <div class="size scarlet_red"  style="width:32.5%" title="32.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">32.50%</td>
+          <td class="coverNumLo">13 / 40</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="api_service.php.html">service.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+              <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size snow"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerNone">100.00%</td>
+          <td class="coverNumNone">&nbsp;</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                 <div class="size snow"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerNone">100.00%</td>
+          <td class="coverNumNone">&nbsp;</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 11:41:57 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/oauth/OAuth2StorageUserCredentialTest.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/oauth/OAuth2StorageUserCredentialTest.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/oauth/OAuth2StorageUserCredentialTest.php	(revision 5888)
@@ -0,0 +1,148 @@
+<?php
+define('CONFIG_REFRESH_LIFETIME', '30');
+define('ROOTPATH', __DIR__ . '/../../../');
+
+#require_once(__DIR__ . '/../../../library/oauth2/lib/OAuth2.php');
+#require_once(__DIR__ . '/../../../library/oauth2/lib/IOAuth2Storage.php');
+#require_once(__DIR__ . '/../../../library/oauth2/lib/IOAuth2RefreshTokens.php');
+require_once(__DIR__ . '/../../../api/controller.php');
+
+require_once(__DIR__ . '/../../../rest/oauth/OAuth2StorageUserCredential.php');
+
+/*Classe de teste para autenticaÃ§Ã£o do tipo password(Resource Owner User Credentials)*/
+class OAuth2StorageUserCredentialTest extends PHPUnit_Framework_TestCase {
+
+	private $class = null;
+	private $client_id = 666;
+	private $user_id = 666;
+	private $client_secret = 'secret123';
+	private $username = 'user2';
+	private $password = 'prognus';
+	private $accessToken = 'aaaaaa259f553ac148f01b6bbcbb101';
+	private $refreshToken = 'rrrrrr03fff3b8cdc51206244529abd';
+	private $grant_type = 'password';
+
+	private $test_token = 'ac148a8526008422f01ac148a8526008422f01';
+
+	//configura classe para testes
+	public function setUp() {
+		$this->class = new OAuth2StorageUserCredential();
+
+		//insere access token
+		$this->class->setAccessToken($this->accessToken, $this->client_id, $this->user_id, time(), 'all', $this->refreshToken);
+
+		//insere refresh token
+		$this->class->setRefreshToken($this->refreshToken, $this->client_id, $this->user_id, time(), 'all');
+		
+	}
+	//finaliza classe
+	public function tearDown() {
+		$this->class->unsetRefreshToken($this->refreshToken);
+		$this->class->unsetAccessToken($this->accessToken);
+	}
+
+
+	/*
+	 * verifica credenciais do usuario
+	 * credenciais devem estar no LDAP
+	 */
+	//(login correto)
+	public function testCheckUserCredentials() {
+		$res = $this->class->checkUserCredentials(1, $this->username, $this->password);
+		$check = (!empty($res))? true : false; 
+		$this->assertTrue($check);
+	}
+	//login errado
+	public function testCheckUserCredentialsFalse() {
+		$this->assertFalse($this->class->checkUserCredentials(1, 'blablabla', 'nonono'));
+	}
+
+
+	/*
+	 * Verifica se as credencias do client sÃ£o vÃ¡lidas
+	 * as credencias devem estar no banco de dados para o funcionamento do test
+	 */
+	//login correto
+	public function testCheckClientCredentials() {
+		$this->assertTrue($this->class->checkClientCredentials($this->client_id, $this->client_secret));
+	}
+	//login errado
+	public function testCheckClientCredentialsFalse() {
+		$this->assertFalse($this->class->checkClientCredentials(1, '1'));
+	}
+	//caso nÃ£o passe o client_secret
+	public function testCheckClientCredentialsWithoutClientSecret() {
+		$this->assertFalse($this->class->checkClientCredentials(1, null));
+	}
+
+
+	/*busca detalhes do cliente
+	 * de acordo com a rfc apenas retona a uri de retorno cadastrada (registed redirect uri)
+	 */
+	//sucesso (o retorno sera uma string)
+	public function testGetClientDetails() {
+		$res = $this->class->getClientDetails($this->client_id);
+		$this->assertTrue(is_string($res));
+	}
+	//falha (o retorno eh falso)
+	public function testGetClientDetailsFalse() {
+		$res = $this->class->getClientDetails(-1);
+		$this->assertFalse($res);
+	}
+
+	/*
+	 * Busca as informaÃ§Ãµes de um token de acesso (AccessToken)
+	 *
+	 */
+	//sucesso retorna um array com as chaves 'token', 'client', 'user', 'expires', 'scope'
+	public function testGetAccessToken() {
+		$res = $this->class->getAccessToken($this->accessToken);
+		
+		if ( isset($res['refresh_token']) && $res['client_id'] && $res['user_id'] && $res['expires'] && $res['scope']) {
+			$res = true;
+		}
+		else {
+			$res = false;
+		}
+		$this->assertTrue($res);
+	}
+	//falha token nÃ£o existe
+	public function testGetAccessTokenFalse() {
+		$this->assertFalse($this->class->getAccessToken(-1));
+	}
+
+	/*
+	 * Busca as informaÃ§Ãµes de um token de refresh (RefreshToken)
+	 *
+	 */
+	//sucesso retorna um array com as chaves 'token', 'client', 'user', 'expires', 'scope'
+	public function testGetRefreshToken() {
+		$res = $this->class->getRefreshToken($this->refreshToken);
+		
+		if ( isset($res['refresh_token']) && $res['client_id'] && $res['user_id'] && $res['expires'] && $res['scope']) {
+			$res = true;
+		}
+		else {
+			$res = false;
+		}
+		$this->assertTrue($res);
+	}
+	//falha token nÃ£o existe
+	public function testGetRefreshTokenFalse() {
+		$this->assertFalse($this->class->getRefreshToken(-1));
+	}
+
+	/*
+	 * Verifica se client pode autenticar via password
+	 */
+	//deve retornar true
+	public function testcheckRestrictedGrantType() {
+		$this->assertTrue($this->class->checkRestrictedGrantType($this->client_id, $this->grant_type));
+	}
+
+
+
+}
+
+
+?>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/MailLastResourceTest.php.bkp
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/MailLastResourceTest.php.bkp	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/MailLastResourceTest.php.bkp	(revision 5888)
@@ -0,0 +1,118 @@
+<?php
+require_once(__DIR__ . '/../../../api/controller.php');
+require_once(__DIR__ . '/../../../library/tonic/lib/tonic.php');
+require_once(__DIR__ . '/../../../rest/mail/MailLastResource.php');
+require_once(__DIR__ . '/../../../rest/oauth/OAuth2StorageUserCredential.php');
+
+class MailLastResourceTest extends PHPUnit_Framework_TestCase {
+
+	private $class = null;
+	private $user = 'user2';
+	private $pass = 'prognus';
+	private $mbox = null;
+	private $cyrusConf = null;
+	private $cyrusOPTS = null;
+	private $accessToken = 'aaaaaa259f553ac148f01b6bbcbb101';
+	private $refreshToken = 'rrrrrr03fff3b8cdc51206244529abd';
+	
+	
+	private $client_id = 666;
+	private $user_id = 666;
+	
+	//configura classe para testes
+	public function setUp() 
+	{
+	    
+	    $request = new Request();
+	    $this->class = new MailLastResource($request);
+	    $this->classOAuth = new OAuth2StorageUserCredential();
+	    
+	    $_SESSION['wallet']['user']['uid']	=   $this->user;
+	    $_SESSION['wallet']['user']['password'] =	$this->pass;
+	    
+	    $this->cyrusConf = Config::service('Cyrus', 'config');
+	    $this->cyrusOPTS = ($this->cyrusConf['tlsEncryption']) ? '/tls/novalidate-cert' : '/notls/novalidate-cert'; 
+	    $this->mbox = imap_open( '{'.$this->cyrusConf['host'].":".$this->cyrusConf['port'].$this->cyrusOPTS.'}INBOX' , Config::me('uid') , Config::me('password') ); 
+	
+	    $messages = imap_sort( $this->mbox , SORTDATE , 1 , null , "UNSEEN" , 'UTF-8');
+	    if (is_array($messages))
+		    foreach ($messages as $msg_number)
+			    imap_delete($this->mbox, $msg_number);
+		    
+	     imap_expunge (  $this->mbox );
+	     
+	    //insere access token
+	    $this->classOAuth->setAccessToken($this->accessToken, $this->client_id, $this->user_id, (time() + 3600), 'all', $this->refreshToken);
+
+	    //insere refresh token
+	    $this->classOAuth->setRefreshToken($this->refreshToken, $this->client_id, $this->user_id, (time() + 3600), 'all');
+
+	    
+	}
+	//finaliza classe
+	public function tearDown() 
+	{
+	    $messages = imap_sort( $this->mbox , SORTDATE , 1 , null , "UNSEEN" , 'UTF-8');
+	    if (is_array($messages))
+		    foreach ($messages as $msg_number)
+			    imap_delete($this->mbox, $msg_number);
+
+	    imap_expunge (  $this->mbox );
+	    
+	    $this->classOAuth->unsetRefreshToken($this->refreshToken);
+	    $this->classOAuth->unsetAccessToken($this->accessToken);
+	}
+
+	/*
+	 * 
+	 * 
+	 */
+	//(sem mensagens novas)
+	public function testGet_emptyFolder() 
+	{
+	    
+	   $request = new Request();
+	   $get =  $this->class->get($request);
+	   $body = json_decode($get->body);
+	   $this->assertCount(0, $body);
+	}
+	
+	/*
+	 * 
+	 * 
+	 */
+	//(uma mensagem nova)
+	public function testGet() 
+	{
+	    $msg = (" MIME-Version: 1.0\r\n"
+		    . "Content-Type: text/plain; charset=ISO-8859-1\r\n"
+		    . "Content-Transfer-Encoding: quoted-printable\r\n"
+		    . "Subject: This is the subject\r\n"
+		    . "From: =?ISO-8859-1?Q?jo=E3o_Silva?= <teste@teste.com.br>\r\n"
+		    . "To: teste@test\r\n"
+		    . "Cc:\r\n"
+		    . "Bcc:\r\n"
+		    . "\r\n\r\n"
+		    . "Corpo\r\n\r\n"); 
+	    
+		    imap_append($this->mbox,'{'.$this->cyrusConf['host'].":".$this->cyrusConf['port'].$this->cyrusOPTS.'}INBOX',$msg); 	
+		
+           $request = new Request();
+	   $get =  $this->class->get($request);
+	   $body = json_decode($get->body,true);
+	   $this->assertCount(1, $body);
+	   
+	   $body = $body[0];
+	   
+	   
+	   $this->assertEquals($body['subject'], 'This is the subject'); 
+	   $this->assertEquals($body['from']['mail'], 'teste@teste.com.br'); 
+	   $this->assertEquals($body['from']['name'], 'joÃ£o Silva'); 
+	   $this->assertInternalType('int', $body['date']);
+	   
+	}
+
+}
+
+
+?>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic_lib.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic_lib.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic_lib.dashboard.html	(revision 5888)
@@ -0,0 +1,128 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>lib</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [3,0,0,1,0,0,0,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[28.444444444444,101,"<a href=\"library_tonic_lib_tonic.php.html#21\">Request<\/a>"],[0,14,"<a href=\"library_tonic_lib_tonic.php.html#599\">Resource<\/a>"],[0,16,"<a href=\"library_tonic_lib_tonic.php.html#698\">Response<\/a>"],[0,1,"<a href=\"library_tonic_lib_tonic.php.html#841\">ResponseException<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">lib</td></tr>
+      <tr><td><div align="center"><p><a href="library_tonic_lib.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="library_tonic_lib_tonic.php.html#21">Request</a> (3838)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#698">Response</a> (272)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#599">Resource</a> (210)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="library_tonic_lib_tonic.php.html#783">Response::addHeader</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#752">Response::__construct</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#644">Resource::exec</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#791">Response::addCacheHeader</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#803">Response::addEtag</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#848">ResponseException::response</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#807">Response::addVary</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#624">Resource::secured</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#607">Resource::__construct</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#379">Request::getResourceClassDetails</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:14 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_cache.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_cache.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_cache.dashboard.html	(revision 5888)
@@ -0,0 +1,118 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>cache</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [0,0,0,0,0,0,1,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[50,5,"<a href=\"api_cache_MemoryCache.php.html#30\">MemoryCache<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">cache</td></tr>
+      <tr><td><div align="center"><p><a href="api_cache.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="api_cache_MemoryCache.php.html#105">MemoryCache::clearAll</a> (0%)</li>
+              <li><a href="api_cache_MemoryCache.php.html#97">MemoryCache::clear</a> (0%)</li>
+              <li><a href="api_cache_MemoryCache.php.html#43">MemoryCache::__construct</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/services.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/services.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/services.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>services</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">services</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="services.html">services</a> (<a href="services.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="52.90%">
+              <div class="size butter"  style="width:52.903225806452%" title="52.90%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">52.90%</td>
+          <td class="coverNumMed">82 / 155</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="25.00%">
+                <div class="size scarlet_red"  style="width:25%" title="25.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">25.00%</td>
+          <td class="coverNumLo">6 / 24</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="services_PostgreSQL.php.html">PostgreSQL.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="52.90%">
+              <div class="size butter"  style="width:52.903225806452%" title="52.90%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">52.90%</td>
+          <td class="coverNumMed">82 / 155</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="25.00%">
+                <div class="size scarlet_red"  style="width:25%" title="25.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">25.00%</td>
+          <td class="coverNumLo">6 / 24</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/yahoo-dom-event.js
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/yahoo-dom-event.js	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/yahoo-dom-event.js	(revision 5888)
@@ -0,0 +1,14 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
+}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
+if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
+if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
+if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
+/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
+if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
+}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/style.css
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/style.css	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/style.css	(revision 5888)
@@ -0,0 +1,500 @@
+/* All views: initial background and text color */
+body
+{
+  background-color: #fff;
+  color: #2e3436;
+  font-family: arial, helvetica, sans-serif;
+  font-size: 12px;
+  margin: 0 auto;
+  width: 100%;
+}
+
+/* All views: standard link format*/
+a:link
+{
+  color: #2e3436;
+  text-decoration: underline;
+}
+
+/* All views: standard link - visited format */
+a:visited
+{
+  color: #2e3436;
+  text-decoration: underline;
+}
+
+/* All views: standard link - activated format */
+a:active
+{
+  color: #2e3436;
+  text-decoration: underline;
+}
+
+/* All views: main title format */
+td.title
+{
+  text-align: center;
+  padding: 10px;
+  font-family: sans-serif;
+  font-style: italic;
+  font-weight: bold;
+  font-size: 1.6em;
+}
+
+/* All views: header item format */
+td.headerItem
+{
+  text-align: right;
+  padding-right: 6px;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* All views: header item value format */
+td.headerValue
+{
+  text-align: left;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* All views: header legend item format */
+td.legendItem
+{
+  text-align: right;
+  padding-right: 6px;
+  padding-top: 10px;
+  padding-bottom: 2px;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* All views: header legend item value format */
+td.legendValue
+{
+  text-align: left;
+  padding-top: 10px;
+  padding-bottom: 2px;
+  color:  #2e3436;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* All views: color of horizontal ruler */
+td.ruler
+{
+  background-color: #d3d7cf;
+}
+
+/* All views: version string format */
+td.versionInfo
+{
+  text-align: center;
+  padding-top: 2px;
+  font-family: sans-serif;
+  font-style: italic;
+}
+
+/* Directory view/File view (all)/Test case descriptions:
+table headline format */
+td.tableHead
+{
+  text-align: center;
+  color: #ffffff;
+  background-color: #555753;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* Directory view/File view (all): filename entry format */
+td.coverItem, td.coverDirectory, td.coverFile
+{
+  text-align: left;
+  padding-left: 10px;
+  padding-right: 20px;
+  background-color: #d3d7cf;
+  font-family: monospace;
+}
+
+td.coverDirectory
+{
+  font-weight: bold;
+}
+
+/* Directory view/File view (all): bar-graph entry format*/
+td.coverBar
+{
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #d3d7cf;
+  text-align:center;
+  width: 100px;
+}
+
+/* Directory view/File view (all): bar-graph outline color */
+div.coverBarOutline
+{
+  background-color: #fff;
+  border: 1px solid #2e3436;
+  height: 10px;
+  overflow:hidden;
+  width: 100px;
+}
+
+/* Directory view/File view (all): common style for bar-graph  */
+div.coverBarOutline div.size
+{
+    height: 10px; float:left;
+}
+
+/* Directory view/File view (all): bar-graph color no coverage rate */
+div.coverBarOutline div.snow
+{
+    background-color:#fff;
+}
+
+/* Directory view/File view (all): bar-graph color for low coverage rate */
+div.coverBarOutline div.scarlet_red
+{
+    background-color:#ef2929;
+}
+
+/* Directory view/File view (all): bar-graph color for middle coverage rate */
+div.coverBarOutline div.butter
+{
+    background-color:#fce94f;
+}
+
+/* Directory view/File view (all):  bar-graph color for high coverage rate */
+div.coverBarOutline div.chameleon
+{
+    background-color:#8ae234;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+no coverage rate */
+td.coverPerNone
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #d3d7cf;
+  font-weight: bold;
+}
+
+/* Directory view/File view (all): line count entry for files with
+no coverage rate */
+td.coverNumNone
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #d3d7cf;
+  white-space: nowrap;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+high coverage rate */
+td.coverPerHi
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #8ae234;
+  font-weight: bold;
+}
+
+/* Directory view/File view (all): line count entry for files with
+high coverage rate */
+td.coverNumHi
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #8ae234;
+  white-space: nowrap;
+}
+
+/* Directory view/File view (all): legend entry for high coverage
+rate */
+span.coverLegendHi
+{
+  text-align: center;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #8ae234;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+medium coverage rate */
+td.coverPerMed
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #fce94f;
+  font-weight: bold;
+}
+
+/* Directory view/File view (all): line count entry for files with
+medium coverage rate */
+td.coverNumMed
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #fce94f;
+  white-space: nowrap;
+}
+
+/* Directory view/File view (all): legend entry for medium coverage
+rate */
+span.coverLegendMed
+{
+  text-align: center;
+  padding-left: 10px;
+  padding-right: 10px;
+  margin-top: 5px;
+  margin-bottom: 5px;
+  margin-right: 2px;
+  background-color: #fce94f;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+low coverage rate */
+td.coverPerLo
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #f57900;
+  font-weight: bold;
+}
+
+/* Directory view/File view (all): line count entry for files with
+low coverage rate */
+td.coverNumLo
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #f57900;
+  white-space: nowrap;
+}
+
+/* Directory view/File view (all): legend entry for low coverage
+rate */
+span.coverLegendLo
+{
+  text-align: center;
+  padding-left: 10px;
+  padding-right: 10px;
+  margin-right: 2px;
+  background-color: #f57900;
+}
+
+/* File view (all): "show/hide details" link format */
+a.detail:link
+{
+  color: #ffffff;
+}
+
+/* File view (all): "show/hide details" link - visited format */
+a.detail:visited
+{
+  color: #ffffff;
+}
+
+/* File view (all): "show/hide details" link - activated format */
+a.detail:active
+{
+  color: #ffffff;
+}
+
+/* File view (detail): test name table headline format */
+td.testNameHead
+{
+  text-align: left;
+  padding-left: 10px;
+  background-color: #729fcf;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* File view (detail): test lines table headline format */
+td.testLinesHead
+{
+  text-align: center;
+  background-color: #729fcf;
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* File view (detail): test name entry */
+td.testName
+{
+  text-align: left;
+  padding-left: 10px;
+  background-color: #729fcf;
+}
+
+/* File view (detail): test percentage entry */
+td.testPer
+{
+  text-align: right;
+  vertical-align: top;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #729fcf;
+}
+
+/* File view (detail): test lines count entry */
+td.testNum
+{
+  text-align: right;
+  vertical-align: top;
+  padding-left: 10px;
+  padding-right: 10px;
+  background-color: #729fcf;
+  white-space: nowrap;
+}
+
+/* Test case descriptions: test name format*/
+dt
+{
+  font-family: sans-serif;
+  font-weight: bold;
+}
+
+/* Test case descriptions: description table body */
+td.testDescription
+{
+  padding-top: 10px;
+  padding-left: 30px;
+  padding-bottom: 10px;
+  padding-right: 30px;
+  background-color: #729fcf;
+}
+
+/* Source code view: source code format */
+pre.source
+{
+  font-family: monospace;
+  white-space: pre;
+}
+
+/* Source code view: line number format */
+span.lineNum
+{
+  background-color: #d3d7cf;
+}
+
+span.lineNum a {
+  text-decoration: none;
+}
+
+/* Source code view: format for lines which were executed */
+span.lineCov
+{
+  background-color: #8ae234;
+}
+
+/* Source code view: format for Cov legend */
+span.LegendCov
+{
+  text-align: center;
+  padding-left: 10px;
+  padding-right: 10px;
+  margin-right: 2px;
+  background-color: #8ae234;
+}
+
+/* Source code view: format for lines which were not executed */
+span.lineNoCov
+{
+  background-color: #f57900;
+}
+
+/* Source code view: format for NoCov legend */
+span.LegendNoCov
+{
+  text-align: center;
+  padding-left: 10px;
+  padding-right: 10px;
+  margin-right: 2px;
+  background-color: #f57900;
+}
+
+/* Source code view: format for lines which are dead code */
+span.lineDeadCode
+{
+  background-color: #d3d7cf;
+}
+
+/* Source code view: format for NoCov legend */
+span.LegendDeadCode
+{
+  text-align: center;
+  padding-left: 10px;
+  padding-right: 10px;
+  margin-right: 2px;
+  background-color: #d3d7cf;
+}
+
+/* Test view: format for tests which have passed */
+li.testPassed
+{
+}
+
+/* Test view: format for tests which failed */
+li.testFailure
+{
+  background-color: #f57900;
+}
+
+/* Test view: format for tests which failed with an error */
+li.testError
+{
+  background-color: #f57900;
+}
+
+/* Test view: format for incomplete and skipped tests */
+li.testIncomplete
+{
+  background-color: #fcaf3e;
+}
+
+/* CRAP */
+td.crap
+{
+  text-align: right;
+  padding-left: 10px;
+  padding-right: 20px;
+  background-color: #d3d7cf;
+}
+
+pre span.comment {
+  color: #888a85;
+}
+
+pre span.default {
+  color: #2e3436;
+}
+
+pre span.html {
+  color: #888a85;
+}
+
+pre span.keyword {
+  color: #2e3436;
+  font-weight: bold;
+}
+
+pre span.string {
+  color: #2e3436;
+}
+
+#classCoverageDistribution, #classComplexity {
+	height: 200px;
+	width: 475px;
+}
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>oauth2</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">oauth2</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_oauth2.html">oauth2</a> (<a href="library_oauth2.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 296</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="library_oauth2_lib.html">lib</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 296</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib_OAuth2ServerException.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib_OAuth2ServerException.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib_OAuth2ServerException.php.html	(revision 5888)
@@ -0,0 +1,367 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>OAuth2ServerException.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">OAuth2ServerException.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_oauth2.html">oauth2</a>/<a href="library_oauth2_lib.html">lib</a>/<a href="library_oauth2_lib_OAuth2ServerException.php.html">OAuth2ServerException.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 17</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">OAuth2ServerException</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+          <td class="crap">72</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 17</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#23">__construct($http_status_code, $error, $error_description = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 7</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#37">getDescription()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#44">getHttpCode()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#56">sendHttpResponse()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#71">sendHeaders()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#79">__toString()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                      
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                            
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : /**                                                                                                        
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                :  * OAuth2 errors that require termination of OAuth2 due to                                                 
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :  * an error.                                                                                               
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :  *                                                                                                         
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :  */                                                                                                        
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                : class OAuth2ServerException extends Exception {                                                            
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :                                                                                                            
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :     protected $httpCode;                                                                                   
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                :     protected $errorData = array();                                                                        
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :                                                                                                            
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :     /**                                                                                                    
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :      * @param $http_status_code                                                                            
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :      * HTTP status code message as predefined.                                                             
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :      * @param $error                                                                                       
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :      * A single error code.                                                                                
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :      * @param $error_description                                                                           
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :      * (optional) A human-readable text providing additional information,                                  
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :      * used to assist in the understanding and resolution of the error                                     
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :      * occurred.                                                                                           
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :      */                                                                                                    
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :     public function __construct($http_status_code, $error, $error_description = NULL) {                    
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span><span class="lineNoCov">              0 :         parent::__construct($error);                                                                       </span>
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :                                                                                                            
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span><span class="lineNoCov">              0 :         $this-&gt;httpCode = $http_status_code;                                                               </span>
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :                                                                                                            
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span><span class="lineNoCov">              0 :         $this-&gt;errorData['error'] = $error;                                                                </span>
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span><span class="lineNoCov">              0 :         if ($error_description) {                                                                          </span>
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span><span class="lineNoCov">              0 :             $this-&gt;errorData['error_description'] = $error_description;                                    </span>
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span><span class="lineNoCov">              0 :         }                                                                                                  </span>
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span><span class="lineNoCov">              0 :     }                                                                                                      </span>
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :                                                                                                            
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :     /**                                                                                                    
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :      * @return string                                                                                      
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :      */                                                                                                    
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :     public function getDescription() {                                                                     
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineNoCov">              0 :         return isset($this-&gt;errorData['error_description']) ? $this-&gt;errorData['error_description'] : null;</span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :     }                                                                                                      
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                :                                                                                                            
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :     /**                                                                                                    
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :      * @return string                                                                                      
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :      */                                                                                                    
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :     public function getHttpCode() {                                                                        
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span><span class="lineNoCov">              0 :         return $this-&gt;httpCode;                                                                            </span>
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :     }                                                                                                      
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :                                                                                                            
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :     /**                                                                                                    
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :      * Send out error message in JSON.                                                                     
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :      *                                                                                                     
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.1                                  
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                  
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :      *                                                                                                     
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :      * @ingroup oauth2_error                                                                               
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :      */                                                                                                    
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span>                :     public function sendHttpResponse() {                                                                   
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span><span class="lineNoCov">              0 :         header(&quot;HTTP/1.1 &quot; . $this-&gt;httpCode);                                                             </span>
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span><span class="lineNoCov">              0 :         $this-&gt;sendHeaders();                                                                              </span>
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span><span class="lineNoCov">              0 :         echo (string) $this;                                                                               </span>
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span><span class="lineNoCov">              0 :         exit();                                                                                            </span>
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :     }                                                                                                      
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :                                                                                                            
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :     /**                                                                                                    
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :      * Send out HTTP headers for JSON.                                                                     
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :      *                                                                                                     
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.1                                  
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                  
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :      *                                                                                                     
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :      * @ingroup oauth2_section_5                                                                           
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                :      */                                                                                                    
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                :     protected function sendHeaders() {                                                                     
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span><span class="lineNoCov">              0 :         header(&quot;Content-Type: application/json&quot;);                                                          </span>
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span><span class="lineNoCov">              0 :         header(&quot;Cache-Control: no-store&quot;);                                                                 </span>
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span><span class="lineNoCov">              0 :     }                                                                                                      </span>
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :                                                                                                            
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :     /**                                                                                                    
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :      * @see Exception::__toString()                                                                        
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                :      */                                                                                                    
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :     public function __toString() {                                                                         
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span><span class="lineNoCov">              0 :         return json_encode($this-&gt;errorData);                                                              </span>
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                :     }                                                                                                      
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library.dashboard.html	(revision 5888)
@@ -0,0 +1,129 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>library</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [4,0,0,0,0,0,0,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[0,130,"<a href=\"library_oauth2_lib_OAuth2.php.html#44\">OAuth2<\/a>"],[0,4,"<a href=\"library_oauth2_lib_OAuth2AuthenticateException.php.html#11\">OAuth2AuthenticateException<\/a>"],[0,14,"<a href=\"library_oauth2_lib_OAuth2RedirectException.php.html#10\">OAuth2RedirectException<\/a>"],[0,8,"<a href=\"library_oauth2_lib_OAuth2ServerException.php.html#8\">OAuth2ServerException<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">library</td></tr>
+      <tr><td><div align="center"><p><a href="library.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#44">OAuth2</a> (17030)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#10">OAuth2RedirectException</a> (210)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#8">OAuth2ServerException</a> (72)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#11">OAuth2AuthenticateException</a> (20)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#52">OAuth2AuthenticateException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#32">OAuth2RedirectException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#30">OAuth2AuthenticateException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1357">OAuth2::validateRedirectUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1328">OAuth2::getAuthorizationHeader</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1343">OAuth2::sendJsonHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#47">OAuth2RedirectException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#66">OAuth2RedirectException::buildUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#71">OAuth2ServerException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#79">OAuth2ServerException::__toString</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/services_PostgreSQL.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/services_PostgreSQL.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/services_PostgreSQL.php.html	(revision 5888)
@@ -0,0 +1,1357 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>PostgreSQL.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">PostgreSQL.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="services.html">services</a>/<a href="services_PostgreSQL.php.html">PostgreSQL.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="25.00%">
+                <div class="size scarlet_red"  style="width:25%" title="25.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">25.00%</td>
+          <td class="coverNumLo">6 / 24</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="52.90%">
+                <div class="size butter"  style="width:52.903225806452%" title="52.90%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">52.90%</td>
+          <td class="coverNumMed">82 / 155</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">PostgreSQL</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="25.00%">
+                <div class="size scarlet_red"  style="width:25%" title="25.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">25.00%</td>
+          <td class="coverNumLo">6 / 24</td>
+          <td class="crap">877.70</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="52.90%">
+                <div class="size butter"  style="width:52.903225806452%" title="52.90%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">52.90%</td>
+          <td class="coverNumMed">82 / 155</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#9">find ( $uri, $justthese = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#20">read ( $uri, $justthese = false , $criteria = false)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#29">deleteAll ( $uri,   $justthese = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">3 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#35">delete ( $uri, $justthese = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#39">replace ( $uri,  $data, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#44">update ( $uri,  $data )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#49">create ( $uri,  $data )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#53">execSql( $sql )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">3.33</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="66.67%">
+                  <div class="size butter"  style="width:66.666666666667%" title="66.67%"></div>
+              </div>
+          </td>
+          <td class="coverPerMed">66.67%</td>
+          <td class="coverNumMed">4 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#66">execResultSql( $sql, $unique = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">3.14</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="75.00%">
+                  <div class="size chameleon"  style="width:75%" title="75.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">75.00%</td>
+          <td class="coverNumHi">3 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#75">begin( $uri )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">5 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#84">commit($uri )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2.31</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="57.14%">
+                  <div class="size butter"  style="width:57.142857142857%" title="57.14%"></div>
+              </div>
+          </td>
+          <td class="coverPerMed">57.14%</td>
+          <td class="coverNumMed">4 / 7</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#99">rollback( $uri )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#104">open  ( $config )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">11</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">8 / 8</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#119">close()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#127">setup()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#129">teardown()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#131">parseInsertData( $data , $concept)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">9 / 9</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#148">parseUpdateData( $data , &amp;$map)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#161">parseSelectResult( $result , $unique = false)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">5.07</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="85.71%">
+                  <div class="size chameleon"  style="width:85.714285714286%" title="85.71%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">85.71%</td>
+          <td class="coverNumHi">6 / 7</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#176">parseCriteria( $criteria  , &amp;$map , $query = '' )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">20.16</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="57.69%">
+                  <div class="size butter"  style="width:57.692307692308%" title="57.69%"></div>
+              </div>
+          </td>
+          <td class="coverPerMed">57.69%</td>
+          <td class="coverNumMed">15 / 26</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#223">parseFilter( $filter ,&amp;$map)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">19.39</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="54.55%">
+                  <div class="size butter"  style="width:54.545454545455%" title="54.55%"></div>
+              </div>
+          </td>
+          <td class="coverPerMed">54.55%</td>
+          <td class="coverNumMed">12 / 22</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#261">parseOperator( $op )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">10</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">12 / 12</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#278">parseJustthese($justthese , &amp;$map)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 11</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#300">parseOrder($order , &amp;$map)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 8</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                                                                    
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : class PostgreSQL implements Service                                                                                                                                                      
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : {                                                                                                                                                                                        
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :     private $con; //Conexão com o banco de dados                                                                                                                                         
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :     private $config; //Configuração                                                                                                                                                      
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :     public  $error = false; //Armazena um erro caso ocorra                                                                                                                               
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :     public function find ( $uri, $justthese = false, $criteria = false ){                                                                                                                
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span><span class="lineNoCov">              0 :         $map =  Config::get($uri['concept'], 'PostgreSQL.mapping');                                                                                                                      </span>
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span><span class="lineNoCov">              0 :     $criteria = ($criteria !== false) ? $this-&gt;parseCriteria ( $criteria , $map) : '';                                                                                                   </span>
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span><span class="lineNoCov">              0 :     $justthese = self::parseJustthese($justthese, $map);                                                                                                                                 </span>
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span><span class="lineNoCov">              0 :     return $this-&gt;execResultSql( 'SELECT '.$justthese['select'].' FROM '. (Config::get($uri['concept'],'PostgreSQL.concept')) .' '.$criteria );                                          </span>
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :    public function read ( $uri, $justthese = false , $criteria = false){                                                                                                                 
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span><span class="lineNoCov">              0 :       $map =  Config::get($uri['concept'], 'PostgreSQL.mapping');                                                                                                                        </span>
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span><span class="lineNoCov">              0 :       $justthese = self::parseJustthese($justthese, $map);                                                                                                                               </span>
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span><span class="lineNoCov">              0 :       $criteria = ($criteria !== false) ? $this-&gt;parseCriteria ( $criteria , $map , ' WHERE id = \''.addslashes( $uri['id'] ).'\'') : ' WHERE id = \''.addslashes( $uri['id'] ).'\'';    </span>
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span><span class="lineNoCov">              0 :       return $this-&gt;execResultSql( 'SELECT '.$justthese['select'].' FROM '. (Config::get($uri['concept'],'PostgreSQL.concept')) .$criteria , true );                                     </span>
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :     public function deleteAll ( $uri,   $justthese = false, $criteria = false ){                                                                                                         
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span><span class="lineCov">              2 :             $map = Config::get($uri['concept'], 'PostgreSQL.mapping');                                                                                                                   </span>
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span><span class="lineCov">              2 :         if(!self::parseCriteria ( $criteria , $map)) return false; //Validador para não apagar tabela inteira                                                                            </span>
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span><span class="lineCov">              2 :         return $this-&gt;execSql( 'DELETE FROM '.(Config::get($uri['concept'],'PostgreSQL.concept')).' '.self::parseCriteria ( $criteria ,$map) );                                          </span>
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :     public function delete ( $uri, $justthese = false ){                                                                                                                                 
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span><span class="lineNoCov">              0 :         return $this-&gt;execSql('DELETE FROM '.(Config::get($uri['concept'],'PostgreSQL.concept')).' WHERE id = '.addslashes($uri['id']));                                                 </span>
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :     public function replace ( $uri,  $data, $criteria = false ){                                                                                                                         
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span><span class="lineNoCov">              0 :             $map = Config::get($uri['concept'], 'PostgreSQL.mapping');                                                                                                                   </span>
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span><span class="lineNoCov">              0 :         return $this-&gt;execSql('UPDATE '.(Config::get($uri['concept'],'PostgreSQL.concept')).' '. self::parseUpdateData( $data ,$map).' '.self::parseCriteria($criteria , $map));         </span>
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :     public function update ( $uri,  $data ){                                                                                                                                             
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span><span class="lineNoCov">              0 :             $map = Config::get($uri['concept'], 'PostgreSQL.mapping');                                                                                                                   </span>
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span><span class="lineNoCov">              0 :         return $this-&gt;execSql('UPDATE '.(Config::get($uri['concept'],'PostgreSQL.concept')).' '. self::parseUpdateData( $data ,$map).' WHERE id = \''. addslashes( $uri['id']) .'\'');   </span>
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :     public function create ( $uri,  $data ){                                                                                                                                             
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span><span class="lineCov">              2 :         return $this-&gt;execResultSql( 'INSERT INTO '.(Config::get($uri['concept'],'PostgreSQL.concept')).' '.self::parseInsertData( $data , $uri['concept'] ), true );                    </span>
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :     private function execSql( $sql ){                                                                                                                                                    
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span><span class="lineCov">              2 :         if(!$this-&gt;con)    $this-&gt;open( $this-&gt;config );                                                                                                                                 </span>
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span><span class="lineCov">              2 :         $rs = pg_query( $this-&gt;con, $sql );                                                                                                                                              </span>
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span><span class="lineCov">              2 :         if ( !$rs ){                                                                                                                                                                     </span>
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span><span class="lineNoCov">              0 :             $this-&gt;error = pg_last_error ( $this-&gt;con );                                                                                                                                 </span>
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span><span class="lineNoCov">              0 :             return false;                                                                                                                                                                </span>
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :         }                                                                                                                                                                                
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span><span class="lineCov">              2 :         return $rs;                                                                                                                                                                      </span>
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :     public function execResultSql( $sql, $unique = false ){                                                                                                                              
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span><span class="lineCov">              2 :         $rs = $this-&gt;execSql( $sql );                                                                                                                                                    </span>
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span><span class="lineCov">              2 :         if( $rs &amp;&amp; $rs &gt; 0 )                                                                                                                                                             </span>
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span><span class="lineCov">              2 :         return self::parseSelectResult( $rs , $unique );                                                                                                                                 </span>
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span><span class="lineNoCov">              0 :         return $rs;                                                                                                                                                                      </span>
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :     public function begin( $uri ) {                                                                                                                                                      
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span><span class="lineCov">              2 :     if(!$this-&gt;con)                                                                                                                                                                      </span>
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span><span class="lineCov">              2 :         $this-&gt;open( $this-&gt;config );                                                                                                                                                    </span>
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span><span class="lineCov">              2 :         $this-&gt;error = false;                                                                                                                                                            </span>
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span><span class="lineCov">              2 :     pg_query($this-&gt;con, &quot;BEGIN WORK&quot;);                                                                                                                                                  </span>
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span><span class="lineCov">              2 :     }                                                                                                                                                                                    </span>
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                :     public function commit($uri ) {                                                                                                                                                      
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span><span class="lineCov">              2 :     if( $this-&gt;error !== false )                                                                                                                                                         </span>
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span><span class="lineCov">              2 :     {                                                                                                                                                                                    </span>
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span><span class="lineNoCov">              0 :         $error = $this-&gt;error;                                                                                                                                                           </span>
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span><span class="lineNoCov">              0 :         $this-&gt;error = false;                                                                                                                                                            </span>
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span><span class="lineNoCov">              0 :         throw new Exception( $error );                                                                                                                                                   </span>
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span><span class="lineCov">              2 :     pg_query($this-&gt;con, &quot;COMMIT&quot;);                                                                                                                                                      </span>
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span><span class="lineCov">              2 :     return( true );                                                                                                                                                                      </span>
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :     public function rollback( $uri ){                                                                                                                                                    
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span><span class="lineNoCov">              0 :     pg_query($this-&gt;con, &quot;ROLLBACK&quot;);                                                                                                                                                    </span>
+<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                    </span>
+<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span>                :     public function open  ( $config ){                                                                                                                                                   
+<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span><span class="lineCov">              1 :         $this-&gt;config = $config;                                                                                                                                                         </span>
+<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span><span class="lineCov">              1 :         $rs = '';                                                                                                                                                                        </span>
+<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span><span class="lineCov">              1 :         $rs .= ( isset($this-&gt;config['host']) &amp;&amp; $this-&gt;config['host'] )  ? ' host='.$this-&gt;config['host'] : '' ;                                                                        </span>
+<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span><span class="lineCov">              1 :         $rs .= ( isset($this-&gt;config['user']) &amp;&amp; $this-&gt;config['user'] )  ? ' user='.$this-&gt;config['user'] : '' ;                                                                        </span>
+<span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111">     111</a> </span><span class="lineCov">              1 :         $rs .= ( isset($this-&gt;config['password']) &amp;&amp; $this-&gt;config['password'] )  ? ' password='.$this-&gt;config['password'] : '' ;                                                        </span>
+<span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112">     112</a> </span><span class="lineCov">              1 :         $rs .= ( isset($this-&gt;config['dbname']) &amp;&amp; $this-&gt;config['dbname'] )  ? ' dbname='.$this-&gt;config['dbname'] : '' ;                                                                </span>
+<span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113">     113</a> </span><span class="lineCov">              1 :         $rs .= ( isset($this-&gt;config['port']) &amp;&amp; $this-&gt;config['port'] )  ? ' port='.$this-&gt;config['port'] : '' ;                                                                        </span>
+<span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114">     114</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115">     115</a> </span><span class="lineCov">              1 :         return( $this-&gt;con = pg_connect( $rs ) );                                                                                                                                        </span>
+<span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116">     116</a> </span>                :         //$this-&gt;con = pg_connect('host='.$config['host'].' user='.$config['user'].' password='.$config['password'].' dbname='.$config['dbname'].'  options=\'--client_encoding=UTF8\'');
+<span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117">     117</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118">     118</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119">     119</a> </span>                :     public function close(){                                                                                                                                                             
+<span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120">     120</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121">     121</a> </span><span class="lineNoCov">              0 :         pg_close($this-&gt;con);                                                                                                                                                            </span>
+<span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122">     122</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123">     123</a> </span><span class="lineNoCov">              0 :             $this-&gt;con = false;                                                                                                                                                          </span>
+<span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124">     124</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125">     125</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                    </span>
+<span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126">     126</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127">     127</a> </span><span class="lineNoCov">              0 :     public function setup(){}                                                                                                                                                            </span>
+<span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128">     128</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129">     129</a> </span><span class="lineNoCov">              0 :     public function teardown(){}                                                                                                                                                         </span>
+<span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130">     130</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131">     131</a> </span>                :     private static function parseInsertData( $data , $concept){                                                                                                                          
+<span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132">     132</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133">     133</a> </span><span class="lineCov">              2 :             $map = Config::get($concept, 'PostgreSQL.mapping');                                                                                                                          </span>
+<span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134">     134</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135">     135</a> </span><span class="lineCov">              2 :         $ind = array();                                                                                                                                                                  </span>
+<span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136">     136</a> </span><span class="lineCov">              2 :         $val = array();                                                                                                                                                                  </span>
+<span class="lineNum" id="container137"><a name="137"></a><a href="#137" id="line137">     137</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138">     138</a> </span><span class="lineCov">              2 :         foreach ($data as $i =&gt; $v){                                                                                                                                                     </span>
+<span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139">     139</a> </span><span class="lineCov">              2 :                     if(!isset($map[$i])) continue;                                                                                                                                       </span>
+<span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140">     140</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141">     141</a> </span><span class="lineCov">              2 :             $ind[] = $map[$i];                                                                                                                                                           </span>
+<span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142">     142</a> </span><span class="lineCov">              2 :             $val[] = '\''.addslashes($v).'\'';                                                                                                                                           </span>
+<span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143">     143</a> </span><span class="lineCov">              2 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144">     144</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145">     145</a> </span><span class="lineCov">              2 :         return '('.implode(',', $ind).') VALUES ('.implode(',', $val).') RETURNING id';                                                                                                  </span>
+<span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146">     146</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147">     147</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148">     148</a> </span>                :     private static function parseUpdateData( $data , &amp;$map){                                                                                                                             
+<span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149">     149</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150">     150</a> </span><span class="lineNoCov">              0 :         $d = array();                                                                                                                                                                    </span>
+<span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151">     151</a> </span><span class="lineNoCov">              0 :         foreach ($data as $i =&gt; $v)                                                                                                                                                      </span>
+<span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152">     152</a> </span>                :             {                                                                                                                                                                            
+<span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153">     153</a> </span><span class="lineNoCov">              0 :                 if(!isset($map[$i])) continue;                                                                                                                                           </span>
+<span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154">     154</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155">     155</a> </span><span class="lineNoCov">              0 :                 $d[] = $map[$i].' = \''.addslashes ($v).'\'';                                                                                                                            </span>
+<span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156">     156</a> </span><span class="lineNoCov">              0 :             }                                                                                                                                                                            </span>
+<span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157">     157</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158">     158</a> </span><span class="lineNoCov">              0 :         return 'SET '.implode(',', $d);                                                                                                                                                  </span>
+<span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159">     159</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160">     160</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161">     161</a> </span>                :     private static function parseSelectResult( $result , $unique = false){                                                                                                               
+<span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162">     162</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163">     163</a> </span><span class="lineCov">              2 :         $return = array();                                                                                                                                                               </span>
+<span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164">     164</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165">     165</a> </span><span class="lineCov">              2 :         if  (!$result) return false;                                                                                                                                                     </span>
+<span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166">     166</a> </span><span class="lineCov">              2 :         if (pg_num_rows($result) === 0) return $return;                                                                                                                                  </span>
+<span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167">     167</a> </span>                :         else                                                                                                                                                                             
+<span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168">     168</a> </span><span class="lineCov">              2 :           while( $row = pg_fetch_assoc( $result ))                                                                                                                                       </span>
+<span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169">     169</a> </span><span class="lineCov">              2 :               $return[] = $row;                                                                                                                                                          </span>
+<span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170">     170</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171">     171</a> </span><span class="lineCov">              2 :         if($unique === true) return $return[0];                                                                                                                                          </span>
+<span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172">     172</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173">     173</a> </span><span class="lineNoCov">              0 :         return $return;                                                                                                                                                                  </span>
+<span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174">     174</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175">     175</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176">     176</a> </span>                :     private static function parseCriteria( $criteria  , &amp;$map , $query = '' ){                                                                                                           
+<span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177">     177</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178">     178</a> </span><span class="lineCov">              2 :         if( isset($criteria[&quot;filter&quot;]) &amp;&amp; $criteria[&quot;filter&quot;] !== NULL )                                                                                                                 </span>
+<span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179">     179</a> </span><span class="lineCov">              2 :         {                                                                                                                                                                                </span>
+<span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180">     180</a> </span>                :             /*                                                                                                                                                                           
+<span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181">     181</a> </span>                :           * ex: array   (                                                                                                                                                                
+<span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182">     182</a> </span>                :           *          [0] 'OR',                                                                                                                                                           
+<span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183">     183</a> </span>                :           *          [1] array( 'OR', array( array( '=', 'campo', 'valor' ) ),                                                                                                           
+<span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184">     184</a> </span>                :           *          [2] array( '=', 'campo' , 'valor' ),                                                                                                                                
+<span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185">     185</a> </span>                :           *          [3] array( 'IN', 'campo', array( '1' , '2' , '3' ) )                                                                                                                
+<span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186">     186</a> </span>                :           *        )                                                                                                                                                                     
+<span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187">     187</a> </span>                :           * OR                                                                                                                                                                           
+<span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188">     188</a> </span>                :           *        array( '=' , 'campo' , 'valor' )                                                                                                                                      
+<span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189">     189</a> </span>                :         */                                                                                                                                                                               
+<span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190">     190</a> </span><span class="lineCov">              2 :                 $query .= ($query === '') ?  'WHERE ('.self::parseFilter( $criteria['filter'] , $map).')' : ' AND ('.self::parseFilter( $criteria['filter'] , $map).')';                 </span>
+<span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191">     191</a> </span><span class="lineCov">              2 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192">     192</a> </span>                :         /*                                                                                                                                                                               
+<span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193">     193</a> </span>                :           * ex: array( 'table1' =&gt; 'table2' ,  'table1' =&gt; 'table2')                                                                                                                     
+<span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194">     194</a> </span>                :           *                                                                                                                                                                              
+<span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195">     195</a> </span>                :           */                                                                                                                                                                             
+<span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196">     196</a> </span><span class="lineCov">              2 :         if( isset($criteria[&quot;join&quot;]) )                                                                                                                                                   </span>
+<span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197">     197</a> </span><span class="lineCov">              2 :         {                                                                                                                                                                                </span>
+<span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198">     198</a> </span><span class="lineNoCov">              0 :         foreach ($criteria[&quot;join&quot;] as $i =&gt; $v)                                                                                                                                          </span>
+<span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199">     199</a> </span><span class="lineNoCov">              0 :             $query .= ' AND '.$i.' = '.$v.' ';                                                                                                                                           </span>
+<span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200">     200</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201">     201</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202">     202</a> </span><span class="lineCov">              2 :         if( isset($criteria[&quot;group&quot;]) )                                                                                                                                                  </span>
+<span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203">     203</a> </span><span class="lineCov">              2 :         {                                                                                                                                                                                </span>
+<span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204">     204</a> </span><span class="lineNoCov">              0 :             $query .= ' GROUP BY '.( is_array($criteria[&quot;group&quot;]) ? implode(', ', $criteria[&quot;group&quot;]) : $criteria[&quot;group&quot;] ).' ';                                                        </span>
+<span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205">     205</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container206"><a name="206"></a><a href="#206" id="line206">     206</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container207"><a name="207"></a><a href="#207" id="line207">     207</a> </span><span class="lineCov">              2 :         if( isset($criteria[&quot;order&quot;]) )                                                                                                                                                  </span>
+<span class="lineNum" id="container208"><a name="208"></a><a href="#208" id="line208">     208</a> </span><span class="lineCov">              2 :         {                                                                                                                                                                                </span>
+<span class="lineNum" id="container209"><a name="209"></a><a href="#209" id="line209">     209</a> </span><span class="lineNoCov">              0 :             $query .= ' ORDER BY '.self::parseOrder( $criteria[&quot;order&quot;], $map ).' ';                                                                                                     </span>
+<span class="lineNum" id="container210"><a name="210"></a><a href="#210" id="line210">     210</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container211"><a name="211"></a><a href="#211" id="line211">     211</a> </span><span class="lineCov">              2 :         if( isset($criteria[&quot;limit&quot;]) )                                                                                                                                                  </span>
+<span class="lineNum" id="container212"><a name="212"></a><a href="#212" id="line212">     212</a> </span><span class="lineCov">              2 :         {                                                                                                                                                                                </span>
+<span class="lineNum" id="container213"><a name="213"></a><a href="#213" id="line213">     213</a> </span><span class="lineNoCov">              0 :             $query .= ' LIMIT '. $criteria[&quot;limit&quot;] .' ';                                                                                                                                </span>
+<span class="lineNum" id="container214"><a name="214"></a><a href="#214" id="line214">     214</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container215"><a name="215"></a><a href="#215" id="line215">     215</a> </span><span class="lineCov">              2 :         if( isset($criteria[&quot;offset&quot;]) )                                                                                                                                                 </span>
+<span class="lineNum" id="container216"><a name="216"></a><a href="#216" id="line216">     216</a> </span><span class="lineCov">              2 :         {                                                                                                                                                                                </span>
+<span class="lineNum" id="container217"><a name="217"></a><a href="#217" id="line217">     217</a> </span><span class="lineNoCov">              0 :             $query .= ' OFFSET '. $criteria[&quot;offset&quot;] .' ';                                                                                                                              </span>
+<span class="lineNum" id="container218"><a name="218"></a><a href="#218" id="line218">     218</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container219"><a name="219"></a><a href="#219" id="line219">     219</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container220"><a name="220"></a><a href="#220" id="line220">     220</a> </span><span class="lineCov">              2 :         return $query;                                                                                                                                                                   </span>
+<span class="lineNum" id="container221"><a name="221"></a><a href="#221" id="line221">     221</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container222"><a name="222"></a><a href="#222" id="line222">     222</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container223"><a name="223"></a><a href="#223" id="line223">     223</a> </span>                :     private static function parseFilter( $filter ,&amp;$map){                                                                                                                                
+<span class="lineNum" id="container224"><a name="224"></a><a href="#224" id="line224">     224</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container225"><a name="225"></a><a href="#225" id="line225">     225</a> </span><span class="lineCov">              2 :     if( !is_array( $filter ) || count($filter) &lt;= 0) return null;                                                                                                                        </span>
+<span class="lineNum" id="container226"><a name="226"></a><a href="#226" id="line226">     226</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container227"><a name="227"></a><a href="#227" id="line227">     227</a> </span><span class="lineCov">              2 :     $op = self::parseOperator( array_shift( $filter ) );                                                                                                                                 </span>
+<span class="lineNum" id="container228"><a name="228"></a><a href="#228" id="line228">     228</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container229"><a name="229"></a><a href="#229" id="line229">     229</a> </span><span class="lineCov">              2 :     if( is_array($filter[0]) )                                                                                                                                                           </span>
+<span class="lineNum" id="container230"><a name="230"></a><a href="#230" id="line230">     230</a> </span><span class="lineCov">              2 :     {                                                                                                                                                                                    </span>
+<span class="lineNum" id="container231"><a name="231"></a><a href="#231" id="line231">     231</a> </span><span class="lineNoCov">              0 :         $nested = array();                                                                                                                                                               </span>
+<span class="lineNum" id="container232"><a name="232"></a><a href="#232" id="line232">     232</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container233"><a name="233"></a><a href="#233" id="line233">     233</a> </span><span class="lineNoCov">              0 :         foreach( $filter as $i =&gt; $f )                                                                                                                                                   </span>
+<span class="lineNum" id="container234"><a name="234"></a><a href="#234" id="line234">     234</a> </span><span class="lineNoCov">              0 :                 if( $n = self::parseFilter( $f , $map))                                                                                                                                  </span>
+<span class="lineNum" id="container235"><a name="235"></a><a href="#235" id="line235">     235</a> </span><span class="lineNoCov">              0 :                     $nested[] = $n;                                                                                                                                                      </span>
+<span class="lineNum" id="container236"><a name="236"></a><a href="#236" id="line236">     236</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container237"><a name="237"></a><a href="#237" id="line237">     237</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container238"><a name="238"></a><a href="#238" id="line238">     238</a> </span><span class="lineNoCov">              0 :         return (count($nested) &gt; 0 ) ? '('.implode( ' '.$op.' ', $nested ).')' : '';                                                                                                     </span>
+<span class="lineNum" id="container239"><a name="239"></a><a href="#239" id="line239">     239</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container240"><a name="240"></a><a href="#240" id="line240">     240</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container241"><a name="241"></a><a href="#241" id="line241">     241</a> </span><span class="lineCov">              2 :         if(!isset($map[$filter[0]])) return '';                                                                                                                                          </span>
+<span class="lineNum" id="container242"><a name="242"></a><a href="#242" id="line242">     242</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container243"><a name="243"></a><a href="#243" id="line243">     243</a> </span><span class="lineCov">              2 :         $filter[0] = $map[$filter[0]];                                                                                                                                                   </span>
+<span class="lineNum" id="container244"><a name="244"></a><a href="#244" id="line244">     244</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container245"><a name="245"></a><a href="#245" id="line245">     245</a> </span><span class="lineCov">              2 :     $igSuffix = $igPrefix = '';                                                                                                                                                          </span>
+<span class="lineNum" id="container246"><a name="246"></a><a href="#246" id="line246">     246</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container247"><a name="247"></a><a href="#247" id="line247">     247</a> </span><span class="lineCov">              2 :     if( strpos( $op[0], 'i' ) === 0 )                                                                                                                                                    </span>
+<span class="lineNum" id="container248"><a name="248"></a><a href="#248" id="line248">     248</a> </span><span class="lineCov">              2 :     {                                                                                                                                                                                    </span>
+<span class="lineNum" id="container249"><a name="249"></a><a href="#249" id="line249">     249</a> </span><span class="lineNoCov">              0 :         $op[0] = substr( $op[0], 1 );                                                                                                                                                    </span>
+<span class="lineNum" id="container250"><a name="250"></a><a href="#250" id="line250">     250</a> </span><span class="lineNoCov">              0 :         $filter[0] = 'upper(&quot;'.$filter[0].'&quot;)';                                                                                                                                          </span>
+<span class="lineNum" id="container251"><a name="251"></a><a href="#251" id="line251">     251</a> </span><span class="lineNoCov">              0 :         $igPrefix = 'upper(';                                                                                                                                                            </span>
+<span class="lineNum" id="container252"><a name="252"></a><a href="#252" id="line252">     252</a> </span><span class="lineNoCov">              0 :         $igSuffix = ')';                                                                                                                                                                 </span>
+<span class="lineNum" id="container253"><a name="253"></a><a href="#253" id="line253">     253</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                    </span>
+<span class="lineNum" id="container254"><a name="254"></a><a href="#254" id="line254">     254</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container255"><a name="255"></a><a href="#255" id="line255">     255</a> </span><span class="lineCov">              2 :     if( is_array($filter[1]) )                                                                                                                                                           </span>
+<span class="lineNum" id="container256"><a name="256"></a><a href="#256" id="line256">     256</a> </span><span class="lineCov">              2 :         return( $filter[0].' '.$op[0].&quot; ($igPrefix'&quot;.implode( &quot;'$igSuffix,$igPrefix'&quot;, array_map(&quot;addslashes&quot; , $filter[1]) ).&quot;'$igSuffix)&quot; );                                           </span>
+<span class="lineNum" id="container257"><a name="257"></a><a href="#257" id="line257">     257</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container258"><a name="258"></a><a href="#258" id="line258">     258</a> </span><span class="lineCov">              2 :     return( $filter[0].' '.$op[0].&quot; $igPrefix'&quot;.$op[1].addslashes( $filter[1] ).$op[2].&quot;'$igSuffix&quot; );                                                                                   </span>
+<span class="lineNum" id="container259"><a name="259"></a><a href="#259" id="line259">     259</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container260"><a name="260"></a><a href="#260" id="line260">     260</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container261"><a name="261"></a><a href="#261" id="line261">     261</a> </span>                :     private static function parseOperator( $op ){                                                                                                                                        
+<span class="lineNum" id="container262"><a name="262"></a><a href="#262" id="line262">     262</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container263"><a name="263"></a><a href="#263" id="line263">     263</a> </span><span class="lineCov">              2 :     switch(strtolower($op))                                                                                                                                                              </span>
+<span class="lineNum" id="container264"><a name="264"></a><a href="#264" id="line264">     264</a> </span>                :     {                                                                                                                                                                                    
+<span class="lineNum" id="container265"><a name="265"></a><a href="#265" id="line265">     265</a> </span><span class="lineCov">              2 :         case 'and':                                                                                                                                                                      </span>
+<span class="lineNum" id="container266"><a name="266"></a><a href="#266" id="line266">     266</a> </span><span class="lineCov">              2 :         case 'or': return( $op );                                                                                                                                                        </span>
+<span class="lineNum" id="container267"><a name="267"></a><a href="#267" id="line267">     267</a> </span><span class="lineCov">              2 :         case 'in': return array( $op );                                                                                                                                                  </span>
+<span class="lineNum" id="container268"><a name="268"></a><a href="#268" id="line268">     268</a> </span><span class="lineCov">              2 :         case '^': return array( 'like', '%',  '' );                                                                                                                                      </span>
+<span class="lineNum" id="container269"><a name="269"></a><a href="#269" id="line269">     269</a> </span><span class="lineCov">              2 :         case '$': return array( 'like',  '', '%' );                                                                                                                                      </span>
+<span class="lineNum" id="container270"><a name="270"></a><a href="#270" id="line270">     270</a> </span><span class="lineCov">              2 :         case '*': return array( 'like', '%', '%' );                                                                                                                                      </span>
+<span class="lineNum" id="container271"><a name="271"></a><a href="#271" id="line271">     271</a> </span><span class="lineCov">              2 :         case 'i^': return array( 'ilike', '%',  '' );                                                                                                                                    </span>
+<span class="lineNum" id="container272"><a name="272"></a><a href="#272" id="line272">     272</a> </span><span class="lineCov">              2 :         case 'i$': return array( 'ilike',  '', '%' );                                                                                                                                    </span>
+<span class="lineNum" id="container273"><a name="273"></a><a href="#273" id="line273">     273</a> </span><span class="lineCov">              2 :         case 'i*': return array( 'ilike', '%', '%' );                                                                                                                                    </span>
+<span class="lineNum" id="container274"><a name="274"></a><a href="#274" id="line274">     274</a> </span><span class="lineCov">              2 :         default : return array( $op,  '',  '' );                                                                                                                                         </span>
+<span class="lineNum" id="container275"><a name="275"></a><a href="#275" id="line275">     275</a> </span><span class="lineCov">              2 :     }                                                                                                                                                                                    </span>
+<span class="lineNum" id="container276"><a name="276"></a><a href="#276" id="line276">     276</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container277"><a name="277"></a><a href="#277" id="line277">     277</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container278"><a name="278"></a><a href="#278" id="line278">     278</a> </span>                :     private static function parseJustthese($justthese , &amp;$map)                                                                                                                           
+<span class="lineNum" id="container279"><a name="279"></a><a href="#279" id="line279">     279</a> </span>                :     {                                                                                                                                                                                    
+<span class="lineNum" id="container280"><a name="280"></a><a href="#280" id="line280">     280</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container281"><a name="281"></a><a href="#281" id="line281">     281</a> </span><span class="lineNoCov">              0 :         if(!is_array($justthese)) //Caso seja um full select pegar todas as keys                                                                                                         </span>
+<span class="lineNum" id="container282"><a name="282"></a><a href="#282" id="line282">     282</a> </span><span class="lineNoCov">              0 :             $justthese = array_keys($map);                                                                                                                                               </span>
+<span class="lineNum" id="container283"><a name="283"></a><a href="#283" id="line283">     283</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container284"><a name="284"></a><a href="#284" id="line284">     284</a> </span><span class="lineNoCov">              0 :         $return = array();                                                                                                                                                               </span>
+<span class="lineNum" id="container285"><a name="285"></a><a href="#285" id="line285">     285</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container286"><a name="286"></a><a href="#286" id="line286">     286</a> </span><span class="lineNoCov">              0 :         foreach ($justthese as &amp;$value)                                                                                                                                                  </span>
+<span class="lineNum" id="container287"><a name="287"></a><a href="#287" id="line287">     287</a> </span>                :         {                                                                                                                                                                                
+<span class="lineNum" id="container288"><a name="288"></a><a href="#288" id="line288">     288</a> </span><span class="lineNoCov">              0 :             if(!isset($map[$value])) continue; //Escapa itens não existentes no mapa                                                                                                     </span>
+<span class="lineNum" id="container289"><a name="289"></a><a href="#289" id="line289">     289</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container290"><a name="290"></a><a href="#290" id="line290">     290</a> </span><span class="lineNoCov">              0 :             if(is_array($map[$value]))                                                                                                                                                   </span>
+<span class="lineNum" id="container291"><a name="291"></a><a href="#291" id="line291">     291</a> </span><span class="lineNoCov">              0 :                 $return['deepness'][$value] = $map[$value];                                                                                                                              </span>
+<span class="lineNum" id="container292"><a name="292"></a><a href="#292" id="line292">     292</a> </span>                :             else                                                                                                                                                                         
+<span class="lineNum" id="container293"><a name="293"></a><a href="#293" id="line293">     293</a> </span><span class="lineNoCov">              0 :                 $return['select'][] = $map[$value] .' as &quot;'. $value. '&quot;';                                                                                                                </span>
+<span class="lineNum" id="container294"><a name="294"></a><a href="#294" id="line294">     294</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container295"><a name="295"></a><a href="#295" id="line295">     295</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container296"><a name="296"></a><a href="#296" id="line296">     296</a> </span><span class="lineNoCov">              0 :         $return['select'] = implode(', ', $return['select']);                                                                                                                            </span>
+<span class="lineNum" id="container297"><a name="297"></a><a href="#297" id="line297">     297</a> </span><span class="lineNoCov">              0 :         return $return;                                                                                                                                                                  </span>
+<span class="lineNum" id="container298"><a name="298"></a><a href="#298" id="line298">     298</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container299"><a name="299"></a><a href="#299" id="line299">     299</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container300"><a name="300"></a><a href="#300" id="line300">     300</a> </span>                :    private static function parseOrder($order , &amp;$map)                                                                                                                                    
+<span class="lineNum" id="container301"><a name="301"></a><a href="#301" id="line301">     301</a> </span>                :     {                                                                                                                                                                                    
+<span class="lineNum" id="container302"><a name="302"></a><a href="#302" id="line302">     302</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container303"><a name="303"></a><a href="#303" id="line303">     303</a> </span><span class="lineNoCov">              0 :         if($notArray = !is_array($order)) //Caso seja um full select pegar todas as keys                                                                                                 </span>
+<span class="lineNum" id="container304"><a name="304"></a><a href="#304" id="line304">     304</a> </span><span class="lineNoCov">              0 :             $order = array( $order );                                                                                                                                                    </span>
+<span class="lineNum" id="container305"><a name="305"></a><a href="#305" id="line305">     305</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container306"><a name="306"></a><a href="#306" id="line306">     306</a> </span><span class="lineNoCov">              0 :         $return = array();                                                                                                                                                               </span>
+<span class="lineNum" id="container307"><a name="307"></a><a href="#307" id="line307">     307</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container308"><a name="308"></a><a href="#308" id="line308">     308</a> </span><span class="lineNoCov">              0 :         foreach ($order as &amp;$value)                                                                                                                                                      </span>
+<span class="lineNum" id="container309"><a name="309"></a><a href="#309" id="line309">     309</a> </span>                :         {                                                                                                                                                                                
+<span class="lineNum" id="container310"><a name="310"></a><a href="#310" id="line310">     310</a> </span><span class="lineNoCov">              0 :             if(!isset($map[$value])) continue; //Escapa itens não existentes no mapa                                                                                                     </span>
+<span class="lineNum" id="container311"><a name="311"></a><a href="#311" id="line311">     311</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container312"><a name="312"></a><a href="#312" id="line312">     312</a> </span><span class="lineNoCov">              0 :             $value = $map[$value];                                                                                                                                                       </span>
+<span class="lineNum" id="container313"><a name="313"></a><a href="#313" id="line313">     313</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                </span>
+<span class="lineNum" id="container314"><a name="314"></a><a href="#314" id="line314">     314</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container315"><a name="315"></a><a href="#315" id="line315">     315</a> </span><span class="lineNoCov">              0 :         return ( $notArray ?  $order[0] : implode(', ', $order) );                                                                                                                       </span>
+<span class="lineNum" id="container316"><a name="316"></a><a href="#316" id="line316">     316</a> </span>                :     }                                                                                                                                                                                    
+<span class="lineNum" id="container317"><a name="317"></a><a href="#317" id="line317">     317</a> </span>                : }                                                                                                                                                                                        
+<span class="lineNum" id="container318"><a name="318"></a><a href="#318" id="line318">     318</a> </span>                :                                                                                                                                                                                          
+<span class="lineNum" id="container319"><a name="319"></a><a href="#319" id="line319">     319</a> </span>                : ?&gt;                                                                                                                                                                                       
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel30": {
+          "header": "2 tests cover line 30",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel31": {
+          "header": "2 tests cover line 31",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel32": {
+          "header": "2 tests cover line 32",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel50": {
+          "header": "2 tests cover line 50",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel54": {
+          "header": "2 tests cover line 54",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel56": {
+          "header": "2 tests cover line 56",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel58": {
+          "header": "2 tests cover line 58",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel63": {
+          "header": "2 tests cover line 63",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel67": {
+          "header": "2 tests cover line 67",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel69": {
+          "header": "2 tests cover line 69",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel70": {
+          "header": "2 tests cover line 70",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel77": {
+          "header": "2 tests cover line 77",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel78": {
+          "header": "2 tests cover line 78",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel80": {
+          "header": "2 tests cover line 80",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel81": {
+          "header": "2 tests cover line 81",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel82": {
+          "header": "2 tests cover line 82",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel86": {
+          "header": "2 tests cover line 86",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel87": {
+          "header": "2 tests cover line 87",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel94": {
+          "header": "2 tests cover line 94",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel96": {
+          "header": "2 tests cover line 96",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel106": {
+          "header": "1 test covers line 106",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel108": {
+          "header": "1 test covers line 108",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel109": {
+          "header": "1 test covers line 109",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel110": {
+          "header": "1 test covers line 110",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel111": {
+          "header": "1 test covers line 111",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel112": {
+          "header": "1 test covers line 112",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel113": {
+          "header": "1 test covers line 113",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel115": {
+          "header": "1 test covers line 115",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel133": {
+          "header": "2 tests cover line 133",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel135": {
+          "header": "2 tests cover line 135",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel136": {
+          "header": "2 tests cover line 136",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel138": {
+          "header": "2 tests cover line 138",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel139": {
+          "header": "2 tests cover line 139",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel141": {
+          "header": "2 tests cover line 141",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel142": {
+          "header": "2 tests cover line 142",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel143": {
+          "header": "2 tests cover line 143",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel145": {
+          "header": "2 tests cover line 145",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel163": {
+          "header": "2 tests cover line 163",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel165": {
+          "header": "2 tests cover line 165",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel166": {
+          "header": "2 tests cover line 166",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel168": {
+          "header": "2 tests cover line 168",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel169": {
+          "header": "2 tests cover line 169",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel171": {
+          "header": "2 tests cover line 171",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel178": {
+          "header": "2 tests cover line 178",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel179": {
+          "header": "2 tests cover line 179",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel190": {
+          "header": "2 tests cover line 190",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel191": {
+          "header": "2 tests cover line 191",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel196": {
+          "header": "2 tests cover line 196",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel197": {
+          "header": "2 tests cover line 197",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel202": {
+          "header": "2 tests cover line 202",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel203": {
+          "header": "2 tests cover line 203",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel207": {
+          "header": "2 tests cover line 207",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel208": {
+          "header": "2 tests cover line 208",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel211": {
+          "header": "2 tests cover line 211",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel212": {
+          "header": "2 tests cover line 212",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel215": {
+          "header": "2 tests cover line 215",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel216": {
+          "header": "2 tests cover line 216",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel220": {
+          "header": "2 tests cover line 220",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel225": {
+          "header": "2 tests cover line 225",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel227": {
+          "header": "2 tests cover line 227",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel229": {
+          "header": "2 tests cover line 229",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel230": {
+          "header": "2 tests cover line 230",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel241": {
+          "header": "2 tests cover line 241",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel243": {
+          "header": "2 tests cover line 243",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel245": {
+          "header": "2 tests cover line 245",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel247": {
+          "header": "2 tests cover line 247",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel248": {
+          "header": "2 tests cover line 248",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel255": {
+          "header": "2 tests cover line 255",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel256": {
+          "header": "2 tests cover line 256",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel258": {
+          "header": "2 tests cover line 258",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel263": {
+          "header": "2 tests cover line 263",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel265": {
+          "header": "2 tests cover line 265",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel266": {
+          "header": "2 tests cover line 266",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel267": {
+          "header": "2 tests cover line 267",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel268": {
+          "header": "2 tests cover line 268",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel269": {
+          "header": "2 tests cover line 269",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel270": {
+          "header": "2 tests cover line 270",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel271": {
+          "header": "2 tests cover line 271",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel272": {
+          "header": "2 tests cover line 272",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel273": {
+          "header": "2 tests cover line 273",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel274": {
+          "header": "2 tests cover line 274",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel275": {
+          "header": "2 tests cover line 275",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/index.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/index.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/index.dashboard.html	(revision 5888)
@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title></title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [4,0,0,0,0,0,5,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[50,5,"<a href=\"api_cache_MemoryCache.php.html#30\">MemoryCache<\/a>"],[56,21,"<a href=\"api_config.php.html#3\">Config<\/a>"],[52.818991097923,191,"<a href=\"api_controller.php.html#20\">Controller<\/a>"],[0,130,"<a href=\"library_oauth2_lib_OAuth2.php.html#44\">OAuth2<\/a>"],[0,4,"<a href=\"library_oauth2_lib_OAuth2AuthenticateException.php.html#11\">OAuth2AuthenticateException<\/a>"],[0,14,"<a href=\"library_oauth2_lib_OAuth2RedirectException.php.html#10\">OAuth2RedirectException<\/a>"],[0,8,"<a href=\"library_oauth2_lib_OAuth2ServerException.php.html#8\">OAuth2ServerException<\/a>"],[50.877192982456,19,"<a href=\"rest_oauth_OAuth2StorageUserCredential.php.html#11\">OAuth2StorageUserCredential<\/a>"],[52.903225806452,87,"<a href=\"services_PostgreSQL.php.html#3\">PostgreSQL<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title"></td></tr>
+      <tr><td><div align="center"><p><a href="index.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#44">OAuth2</a> (17030)</li>
+              <li><a href="api_controller.php.html#20">Controller</a> (4022)</li>
+              <li><a href="services_PostgreSQL.php.html#3">PostgreSQL</a> (877)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#10">OAuth2RedirectException</a> (210)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#8">OAuth2ServerException</a> (72)</li>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#11">OAuth2StorageUserCredential</a> (61)</li>
+              <li><a href="api_config.php.html#3">Config</a> (58)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#11">OAuth2AuthenticateException</a> (20)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#32">OAuth2RedirectException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#52">OAuth2AuthenticateException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#30">OAuth2AuthenticateException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1357">OAuth2::validateRedirectUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#47">OAuth2RedirectException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#66">OAuth2RedirectException::buildUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#44">OAuth2ServerException::getHttpCode</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#37">OAuth2ServerException::getDescription</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#23">OAuth2ServerException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1343">OAuth2::sendJsonHeaders</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api.dashboard.html	(revision 5888)
@@ -0,0 +1,127 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>api</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [0,0,0,0,0,0,3,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[50,5,"<a href=\"api_cache_MemoryCache.php.html#30\">MemoryCache<\/a>"],[56,21,"<a href=\"api_config.php.html#3\">Config<\/a>"],[52.818991097923,191,"<a href=\"api_controller.php.html#20\">Controller<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">api</td></tr>
+      <tr><td><div align="center"><p><a href="api.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="api_controller.php.html#20">Controller</a> (4022)</li>
+              <li><a href="api_config.php.html#3">Config</a> (58)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="api_controller.php.html#142">Controller::parse</a> (0%)</li>
+              <li><a href="api_controller.php.html#147">Controller::URI</a> (0%)</li>
+              <li><a href="api_controller.php.html#155">Controller::links</a> (0%)</li>
+              <li><a href="api_controller.php.html#137">Controller::format</a> (0%)</li>
+              <li><a href="api_controller.php.html#132">Controller::rollback</a> (0%)</li>
+              <li><a href="api_cache_MemoryCache.php.html#43">MemoryCache::__construct</a> (0%)</li>
+              <li><a href="api_controller.php.html#127">Controller::commit</a> (0%)</li>
+              <li><a href="api_controller.php.html#203">Controller::isConcept</a> (0%)</li>
+              <li><a href="api_controller.php.html#211">Controller::hasOne</a> (0%)</li>
+              <li><a href="api_controller.php.html#604">Controller::put</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>tonic</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">tonic</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_tonic.html">tonic</a> (<a href="library_tonic.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="22.38%">
+              <div class="size scarlet_red"  style="width:22.377622377622%" title="22.38%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">22.38%</td>
+          <td class="coverNumLo">64 / 286</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 16</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="library_tonic_lib.html">lib</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="22.38%">
+              <div class="size scarlet_red"  style="width:22.377622377622%" title="22.38%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">22.38%</td>
+          <td class="coverNumLo">64 / 286</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 16</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:14 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib_OAuth2AuthenticateException.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib_OAuth2AuthenticateException.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib_OAuth2AuthenticateException.php.html	(revision 5888)
@@ -0,0 +1,264 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>OAuth2AuthenticateException.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">OAuth2AuthenticateException.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_oauth2.html">oauth2</a>/<a href="library_oauth2_lib.html">lib</a>/<a href="library_oauth2_lib_OAuth2AuthenticateException.php.html">OAuth2AuthenticateException.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 11</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">OAuth2AuthenticateException</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+          <td class="crap">20</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 11</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#30">__construct($httpCode, $tokenType, $realm, $error, $error_description = NULL, $scope = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 9</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#52">sendHeaders()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                             
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                   
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : /**                                                                                                               
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                :  * Send an error header with the given realm and an error, if provided.                                           
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :  * Suitable for the bearer token type.                                                                            
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :  *                                                                                                                
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :  * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-04#section-2.4                                      
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :  *                                                                                                                
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :  * @ingroup oauth2_error                                                                                          
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :  */                                                                                                               
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                : class OAuth2AuthenticateException extends OAuth2ServerException {                                                 
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :                                                                                                                   
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :     protected $header;                                                                                            
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :                                                                                                                   
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :     /**                                                                                                           
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :      *                                                                                                            
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :      * @param $http_status_code                                                                                   
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :      * HTTP status code message as predefined.                                                                    
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :      * @param $error                                                                                              
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :      * The &quot;error&quot; attribute is used to provide the client with the reason                                        
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :      * why the access request was declined.                                                                       
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :      * @param $error_description                                                                                  
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :      * (optional) The &quot;error_description&quot; attribute provides a human-readable text                                
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :      * containing additional information, used to assist in the understanding                                     
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :      * and resolution of the error occurred.                                                                      
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :      * @param $scope                                                                                              
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :      * A space-delimited list of scope values indicating the required scope                                       
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :      * of the access token for accessing the requested resource.                                                  
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :      */                                                                                                           
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :     public function __construct($httpCode, $tokenType, $realm, $error, $error_description = NULL, $scope = NULL) {
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span><span class="lineNoCov">              0 :         parent::__construct($httpCode, $error, $error_description);                                               </span>
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :                                                                                                                   
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span><span class="lineNoCov">              0 :         if ($scope) {                                                                                             </span>
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span><span class="lineNoCov">              0 :             $this-&gt;errorData['scope'] = $scope;                                                                   </span>
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span><span class="lineNoCov">              0 :         }                                                                                                         </span>
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :                                                                                                                   
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :         // Build header                                                                                           
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineNoCov">              0 :         $this-&gt;header = sprintf('WWW-Authenticate: %s realm=&quot;%s&quot;', ucwords($tokenType), $realm);                  </span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span><span class="lineNoCov">              0 :         foreach ( $this-&gt;errorData as $key =&gt; $value ) {                                                          </span>
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span><span class="lineNoCov">              0 :             $this-&gt;header .= &quot;, $key=\&quot;$value\&quot;&quot;;                                                                 </span>
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span><span class="lineNoCov">              0 :         }                                                                                                         </span>
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span><span class="lineNoCov">              0 :     }                                                                                                             </span>
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :                                                                                                                   
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :     /**                                                                                                           
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :      * Send out HTTP headers for JSON.                                                                            
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :      *                                                                                                            
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.1                                         
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                         
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :      *                                                                                                            
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :      * @ingroup oauth2_section_5                                                                                  
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :      */                                                                                                           
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :     protected function sendHeaders() {                                                                            
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span><span class="lineNoCov">              0 :         header($this-&gt;header);                                                                                    </span>
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span><span class="lineNoCov">              0 :     }                                                                                                             </span>
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_mail_MailLastResource.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_mail_MailLastResource.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_mail_MailLastResource.php.html	(revision 5888)
@@ -0,0 +1,344 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>MailLastResource.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">MailLastResource.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="rest.html">rest</a>/<a href="rest_mail.html">mail</a>/<a href="rest_mail_MailLastResource.php.html">MailLastResource.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 27</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">MailLastResource</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+          <td class="crap">272</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 27</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#15">get($request)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">42</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 19</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#58">decodeMimeStringCallback( $mathes )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#74">decodeMimeString( $string )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#90">formatMailObject( $obj )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">42</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                                                                   
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : class MailLastResource extends Resource {                                                                                                                                               
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :     /**                                                                                                                                                                                 
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :     * Busca as Ãºltimas 20 menssagens nÃ£o lidas do usuÃ¡rio                                                                                                                            
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :     *                                                                                                                                                                                   
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :     * @license    http://www.gnu.org/copyleft/gpl.html GPL                                                                                                                              
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :     * @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)                                                                  
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :     * @sponsor    Caixa EconÃŽmica Federal                                                                                                                                              
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                :     * @author     Cristiano CorrÃªa Schmidt                                                                                                                                             
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :     * @return     Lista das ultimas 10 menssagens do usuÃ¡rio nÃ£o lidas                                                                                                                
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :     * @access     public                                                                                                                                                                
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :     **/                                                                                                                                                                                 
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :     function get($request)                                                                                                                                                              
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :     {                                                                                                                                                                                   
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span><span class="lineNoCov">              0 :     $this-&gt;secured();                                                                                                                                                                   </span>
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span><span class="lineNoCov">              0 :         $response = new Response($request);                                                                                                                                             </span>
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span><span class="lineNoCov">              0 :         $response-&gt;code = Response::OK;                                                                                                                                                 </span>
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span><span class="lineNoCov">              0 :         $response-&gt;addHeader('Content-type', 'aplication/json');                                                                                                                        </span>
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span><span class="lineNoCov">              0 :     $cyrus = Config::service('Cyrus', 'config');                                                                                                                                        </span>
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span><span class="lineNoCov">              0 :     $options = ($cyrus['tlsEncryption']) ? '/tls/novalidate-cert' : '/notls/novalidate-cert';                                                                                           </span>
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span><span class="lineNoCov">              0 :     $mbox = imap_open( '{'.$cyrus['host'].&quot;:&quot;.$cyrus['port'].$options.'}INBOX' , Config::me('uid') , Config::me('password') );                                                          </span>
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span><span class="lineNoCov">              0 :     $msgIds = imap_sort( $mbox , SORTDATE , 1 , null , &quot;UNSEEN&quot; , 'UTF-8');                                                                                                             </span>
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span><span class="lineNoCov">              0 :     $msgIds = array_splice($msgIds , 0 , 20);                                                                                                                                           </span>
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span><span class="lineNoCov">              0 :     $return = array();                                                                                                                                                                  </span>
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span><span class="lineNoCov">              0 :     foreach ($msgIds as $key =&gt; &amp;$value)                                                                                                                                                </span>
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :     {                                                                                                                                                                                   
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span><span class="lineNoCov">              0 :           $header = imap_headerinfo( $mbox, $value );                                                                                                                                   </span>
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span><span class="lineNoCov">              0 :           $return[$key]['subject'] = ( isset($header-&gt;subject) &amp;&amp; trim($header-&gt;subject) !== '' ) ?  self::decodeMimeString($header-&gt;subject) : 'No Subject';                           </span>
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span><span class="lineNoCov">              0 :           $return[$key]['date'] =  $header-&gt;udate;                                                                                                                                      </span>
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span><span class="lineNoCov">              0 :           $return[$key]['from'] =  (isset( $header-&gt;from[0] )) ? self::formatMailObject( $header-&gt;from[0] ) : array( 'name' =&gt; '' , 'mail' =&gt; '');                                      </span>
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                   </span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span><span class="lineNoCov">              0 :     $response-&gt;body = json_encode($return);                                                                                                                                             </span>
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span><span class="lineNoCov">              0 :     imap_close($mbox);                                                                                                                                                                  </span>
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span><span class="lineNoCov">              0 :     return $response;                                                                                                                                                                   </span>
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :     }                                                                                                                                                                                   
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :     /**                                                                                                                                                                                 
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :     *  Decodifica os tokens encontrados na funÃ§Ã£o decodeMimeString                                                                                                                    
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :     *                                                                                                                                                                                   
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :     * @license    http://www.gnu.org/copyleft/gpl.html GPL                                                                                                                              
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :     * @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)                                                                  
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :     * @sponsor    Caixa EconÃ³mica Federal                                                                                                                                              
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :     * @author     Cristiano CorrÃªa Schmidt                                                                                                                                             
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :     * @return     bool                                                                                                                                                                  
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span>                :     * @access     public                                                                                                                                                                
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :     */                                                                                                                                                                                  
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                :     static private function decodeMimeStringCallback( $mathes )                                                                                                                         
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :     {                                                                                                                                                                                   
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span><span class="lineNoCov">              0 :        $str = (strtolower($mathes[2]) == 'q') ?  quoted_printable_decode(str_replace('_','=20',$mathes[3])) : base64_decode( $mathes[3]) ;                                              </span>
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span><span class="lineNoCov">              0 :        return ( strtoupper($mathes[1]) == 'ISO-8859-1' ) ? mb_convert_encoding(  $str , 'UTF-8' , 'ISO-8859-1') : $str;                                                                 </span>
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :     }                                                                                                                                                                                   
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :     /**                                                                                                                                                                                 
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :     *  Decodifica uma string no formato mime RFC2047                                                                                                                                    
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :     *                                                                                                                                                                                   
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :     * @license    http://www.gnu.org/copyleft/gpl.html GPL                                                                                                                              
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :     * @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)                                                                  
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :     * @sponsor    Caixa EconÃ³mica Federal                                                                                                                                              
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                :     * @author     Cristiano CorrÃªa Schmidt                                                                                                                                             
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                :     * @return     bool                                                                                                                                                                  
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span>                :     * @access     public                                                                                                                                                                
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                :     */                                                                                                                                                                                  
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span>                :     static private function decodeMimeString( $string )                                                                                                                                 
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :     {                                                                                                                                                                                   
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span><span class="lineNoCov">              0 :       $string =  preg_replace('/\?\=(\s)*\=\?/', '?==?', $string);                                                                                                                      </span>
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span><span class="lineNoCov">              0 :       return preg_replace_callback( '/\=\?([^\?]*)\?([qb])\?([^\?]*)\?=/i' ,array( 'self' , 'decodeMimeStringCallback'), $string);                                                      </span>
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                :     }                                                                                                                                                                                   
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :                                                                                                                                                                                         
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span>                :      /**                                                                                                                                                                                
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                :     *  Formata um mailObject para um array com name e email                                                                                                                             
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span>                :     *                                                                                                                                                                                   
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                :     * @license    http://www.gnu.org/copyleft/gpl.html GPL                                                                                                                              
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                :     * @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)                                                                  
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                :     * @sponsor    Caixa EconÃ³mica Federal                                                                                                                                              
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span>                :     * @author     Cristiano CorrÃªa Schmidt                                                                                                                                             
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span>                :     * @return     bool                                                                                                                                                                  
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span>                :     * @access     public                                                                                                                                                                
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                :     */                                                                                                                                                                                  
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                :     static private function formatMailObject( $obj )                                                                                                                                    
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                :     {                                                                                                                                                                                   
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span><span class="lineNoCov">              0 :     $return = array();                                                                                                                                                                  </span>
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span><span class="lineNoCov">              0 :     $return['mail'] = self::decodeMimeString($obj-&gt;mailbox) . (( isset( $obj-&gt;host) &amp;&amp; $obj-&gt;host != ('unspecified-domain') &amp;&amp;  $obj-&gt;host !=  '.SYNTAX-ERROR.')? '@'. $obj-&gt;host : '');</span>
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span><span class="lineNoCov">              0 :     $return['name'] = ( isset( $obj-&gt;personal ) &amp;&amp; trim($obj-&gt;personal) !== '' ) ? self::decodeMimeString($obj-&gt;personal) :  $return['mail'];                                           </span>
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span><span class="lineNoCov">              0 :     return $return;                                                                                                                                                                     </span>
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                :     }                                                                                                                                                                                   
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 14:52:11 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/services.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/services.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/services.dashboard.html	(revision 5888)
@@ -0,0 +1,126 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>services</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [0,0,0,0,0,0,1,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[52.903225806452,87,"<a href=\"services_PostgreSQL.php.html#3\">PostgreSQL<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">services</td></tr>
+      <tr><td><div align="center"><p><a href="services.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="services_PostgreSQL.php.html#3">PostgreSQL</a> (877)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="services_PostgreSQL.php.html#127">PostgreSQL::setup</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#119">PostgreSQL::close</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#129">PostgreSQL::teardown</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#148">PostgreSQL::parseUpdateData</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#300">PostgreSQL::parseOrder</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#278">PostgreSQL::parseJustthese</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#9">PostgreSQL::find</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#99">PostgreSQL::rollback</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#35">PostgreSQL::delete</a> (0%)</li>
+              <li><a href="services_PostgreSQL.php.html#20">PostgreSQL::read</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/jquery.min.js
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/jquery.min.js	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/jquery.min.js	(revision 5888)
@@ -0,0 +1,4 @@
+/*! jQuery v1.6.3 http://jquery.com/ | http://jquery.org/license */
+(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bA.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bP,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(Q.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(w,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.3",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g+"With"](this===b?d:this,[h])}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML="   <link><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type=checkbox>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u,v;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null
+,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,M(a.origType,a.selector),f.extend({},a,{handler:L,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,M(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?D:C):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=D;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=D;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=D,this.stopPropagation()},isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C};var E=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},F=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?F:E,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?F:E)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="submit"||c==="image")&&f(b).closest("form").length&&J("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&J("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var G,H=function(a){var b=f.nodeName(a,"input")?a.type:"",c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var K={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||C,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=w.exec(h),k="",j&&(k=j[0],h=h.replace(w,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,K[h]?(a.push(K[h]+k),h=h+k):h=(K[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+M(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+M(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var N=/Until$/,O=/^(?:parents|prevUntil|prevAll)/,P=/,/,Q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,S=f.expr.match.POS,T={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(V(this,a,!1),"not",a)},filter:function(a){return this.pushStack(V(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=S.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|object|embed|option|style)/i,bb=/checked\s*(?:[^=]|=\s*.checked.)/i,bc=/\/(java|ecma)script/i,bd=/^\s*<!(?:\[CDATA\[|\-\-)/,be={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bb.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!ba.test(a[0])&&(f.support.checkClone||!bb.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);
+return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bk(k[i]);else bk(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bc.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/([A-Z]|^ms)/g,bp=/^-?\d+(?:px)?$/i,bq=/^-?\d/,br=/^([\-+])=([\-+.\de]+)/,bs={position:"absolute",visibility:"hidden",display:"block"},bt=["Left","Right"],bu=["Top","Bottom"],bv,bw,bx;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bv(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=br.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bv)return bv(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return by(a,b,d);f.swap(a,bs,function(){e=by(a,b,d)});return e}},set:function(a,b){if(!bp.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cr(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cq("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cq("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cr(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cq("show",1),slideUp:cq("hide",1),slideToggle:cq("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return d.step(a)}var d=this,e=f.fx;this.startTime=cn||co(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&f.timers.push(g)&&!cl&&(cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||co(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cs=/^t(?:able|d|h)$/i,ct=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cu(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cs.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/container-min.js
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/container-min.js	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/container-min.js	(revision 5888)
@@ -0,0 +1,19 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+(function(){YAHOO.util.Config=function(d){if(d){this.init(d);}};var b=YAHOO.lang,c=YAHOO.util.CustomEvent,a=YAHOO.util.Config;a.CONFIG_CHANGED_EVENT="configChanged";a.BOOLEAN_TYPE="boolean";a.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(d){this.owner=d;this.configChangedEvent=this.createEvent(a.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=c.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(d){return(typeof d==a.BOOLEAN_TYPE);},checkNumber:function(d){return(!isNaN(d));},fireEvent:function(d,f){var e=this.config[d];if(e&&e.event){e.event.fire(f);}},addProperty:function(e,d){e=e.toLowerCase();this.config[e]=d;d.event=this.createEvent(e,{scope:this.owner});d.event.signature=c.LIST;d.key=e;if(d.handler){d.event.subscribe(d.handler,this.owner);}this.setProperty(e,d.value,true);if(!d.suppressEvent){this.queueProperty(e,d.value);}},getConfig:function(){var d={},f=this.config,g,e;for(g in f){if(b.hasOwnProperty(f,g)){e=f[g];if(e&&e.event){d[g]=e.value;}}}return d;},getProperty:function(d){var e=this.config[d.toLowerCase()];if(e&&e.event){return e.value;}else{return undefined;}},resetProperty:function(d){d=d.toLowerCase();var e=this.config[d];if(e&&e.event){if(d in this.initialConfig){this.setProperty(d,this.initialConfig[d]);return true;}}else{return false;}},setProperty:function(e,g,d){var f;e=e.toLowerCase();if(this.queueInProgress&&!d){this.queueProperty(e,g);return true;}else{f=this.config[e];if(f&&f.event){if(f.validator&&!f.validator(g)){return false;}else{f.value=g;if(!d){this.fireEvent(e,g);this.configChangedEvent.fire([e,g]);}return true;}}else{return false;}}},queueProperty:function(v,r){v=v.toLowerCase();var u=this.config[v],l=false,k,g,h,j,p,t,f,n,o,d,m,w,e;if(u&&u.event){if(!b.isUndefined(r)&&u.validator&&!u.validator(r)){return false;}else{if(!b.isUndefined(r)){u.value=r;}else{r=u.value;}l=false;k=this.eventQueue.length;for(m=0;m<k;m++){g=this.eventQueue[m];if(g){h=g[0];j=g[1];if(h==v){this.eventQueue[m]=null;this.eventQueue.push([v,(!b.isUndefined(r)?r:j)]);l=true;break;}}}if(!l&&!b.isUndefined(r)){this.eventQueue.push([v,r]);}}if(u.supercedes){p=u.supercedes.length;for(w=0;w<p;w++){t=u.supercedes[w];f=this.eventQueue.length;for(e=0;e<f;e++){n=this.eventQueue[e];if(n){o=n[0];d=n[1];if(o==t.toLowerCase()){this.eventQueue.push([o,d]);this.eventQueue[e]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(d){d=d.toLowerCase();var e=this.config[d];if(e&&e.event&&!b.isUndefined(e.value)){if(this.queueInProgress){this.queueProperty(d);}else{this.fireEvent(d,e.value);}}},applyConfig:function(d,g){var f,e;if(g){e={};for(f in d){if(b.hasOwnProperty(d,f)){e[f.toLowerCase()]=d[f];}}this.initialConfig=e;}for(f in d){if(b.hasOwnProperty(d,f)){this.queueProperty(f,d[f]);}}},refresh:function(){var d;for(d in this.config){if(b.hasOwnProperty(this.config,d)){this.refireEvent(d);}}},fireQueue:function(){var e,h,d,g,f;this.queueInProgress=true;for(e=0;e<this.eventQueue.length;e++){h=this.eventQueue[e];if(h){d=h[0];g=h[1];f=this.config[d];f.value=g;this.eventQueue[e]=null;this.fireEvent(d,g);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(d,e,g,h){var f=this.config[d.toLowerCase()];if(f&&f.event){if(!a.alreadySubscribed(f.event,e,g)){f.event.subscribe(e,g,h);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(d,e,g){var f=this.config[d.toLowerCase()];if(f&&f.event){return f.event.unsubscribe(e,g);}else{return false;}},toString:function(){var d="Config";if(this.owner){d+=" ["+this.owner.toString()+"]";}return d;},outputEventQueue:function(){var d="",g,e,f=this.eventQueue.length;for(e=0;e<f;e++){g=this.eventQueue[e];if(g){d+=g[0]+"="+g[1]+", ";}}return d;},destroy:function(){var e=this.config,d,f;for(d in e){if(b.hasOwnProperty(e,d)){f=e[d];f.event.unsubscribeAll();f.event=null;}}this.configChangedEvent.unsubscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};a.alreadySubscribed=function(e,h,j){var f=e.subscribers.length,d,g;if(f>0){g=f-1;do{d=e.subscribers[g];if(d&&d.obj==j&&d.fn==h){return true;}}while(g--);}return false;};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Module=function(r,q){if(r){this.init(r,q);}else{}};var f=YAHOO.util.Dom,d=YAHOO.util.Config,n=YAHOO.util.Event,m=YAHOO.util.CustomEvent,g=YAHOO.widget.Module,i=YAHOO.env.ua,h,p,o,e,a={"BEFORE_INIT":"beforeInit","INIT":"init","APPEND":"append","BEFORE_RENDER":"beforeRender","RENDER":"render","CHANGE_HEADER":"changeHeader","CHANGE_BODY":"changeBody","CHANGE_FOOTER":"changeFooter","CHANGE_CONTENT":"changeContent","DESTROY":"destroy","BEFORE_SHOW":"beforeShow","SHOW":"show","BEFORE_HIDE":"beforeHide","HIDE":"hide"},j={"VISIBLE":{key:"visible",value:true,validator:YAHOO.lang.isBoolean},"EFFECT":{key:"effect",suppressEvent:true,supercedes:["visible"]},"MONITOR_RESIZE":{key:"monitorresize",value:true},"APPEND_TO_DOCUMENT_BODY":{key:"appendtodocumentbody",value:false}};g.IMG_ROOT=null;g.IMG_ROOT_SSL=null;g.CSS_MODULE="yui-module";g.CSS_HEADER="hd";g.CSS_BODY="bd";g.CSS_FOOTER="ft";g.RESIZE_MONITOR_SECURE_URL="javascript:false;";g.RESIZE_MONITOR_BUFFER=1;g.textResizeEvent=new m("textResize");g.forceDocumentRedraw=function(){var q=document.documentElement;if(q){q.className+=" ";q.className=YAHOO.lang.trim(q.className);}};function l(){if(!h){h=document.createElement("div");h.innerHTML=('<div class="'+g.CSS_HEADER+'"></div>'+'<div class="'+g.CSS_BODY+'"></div><div class="'+g.CSS_FOOTER+'"></div>');p=h.firstChild;o=p.nextSibling;e=o.nextSibling;}return h;}function k(){if(!p){l();}return(p.cloneNode(false));}function b(){if(!o){l();}return(o.cloneNode(false));}function c(){if(!e){l();}return(e.cloneNode(false));}g.prototype={constructor:g,element:null,header:null,body:null,footer:null,id:null,imageRoot:g.IMG_ROOT,initEvents:function(){var q=m.LIST;
+this.beforeInitEvent=this.createEvent(a.BEFORE_INIT);this.beforeInitEvent.signature=q;this.initEvent=this.createEvent(a.INIT);this.initEvent.signature=q;this.appendEvent=this.createEvent(a.APPEND);this.appendEvent.signature=q;this.beforeRenderEvent=this.createEvent(a.BEFORE_RENDER);this.beforeRenderEvent.signature=q;this.renderEvent=this.createEvent(a.RENDER);this.renderEvent.signature=q;this.changeHeaderEvent=this.createEvent(a.CHANGE_HEADER);this.changeHeaderEvent.signature=q;this.changeBodyEvent=this.createEvent(a.CHANGE_BODY);this.changeBodyEvent.signature=q;this.changeFooterEvent=this.createEvent(a.CHANGE_FOOTER);this.changeFooterEvent.signature=q;this.changeContentEvent=this.createEvent(a.CHANGE_CONTENT);this.changeContentEvent.signature=q;this.destroyEvent=this.createEvent(a.DESTROY);this.destroyEvent.signature=q;this.beforeShowEvent=this.createEvent(a.BEFORE_SHOW);this.beforeShowEvent.signature=q;this.showEvent=this.createEvent(a.SHOW);this.showEvent.signature=q;this.beforeHideEvent=this.createEvent(a.BEFORE_HIDE);this.beforeHideEvent.signature=q;this.hideEvent=this.createEvent(a.HIDE);this.hideEvent.signature=q;},platform:function(){var q=navigator.userAgent.toLowerCase();if(q.indexOf("windows")!=-1||q.indexOf("win32")!=-1){return"windows";}else{if(q.indexOf("macintosh")!=-1){return"mac";}else{return false;}}}(),browser:function(){var q=navigator.userAgent.toLowerCase();if(q.indexOf("opera")!=-1){return"opera";}else{if(q.indexOf("msie 7")!=-1){return"ie7";}else{if(q.indexOf("msie")!=-1){return"ie";}else{if(q.indexOf("safari")!=-1){return"safari";}else{if(q.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}}(),isSecure:function(){if(window.location.href.toLowerCase().indexOf("https")===0){return true;}else{return false;}}(),initDefaultConfig:function(){this.cfg.addProperty(j.VISIBLE.key,{handler:this.configVisible,value:j.VISIBLE.value,validator:j.VISIBLE.validator});this.cfg.addProperty(j.EFFECT.key,{handler:this.configEffect,suppressEvent:j.EFFECT.suppressEvent,supercedes:j.EFFECT.supercedes});this.cfg.addProperty(j.MONITOR_RESIZE.key,{handler:this.configMonitorResize,value:j.MONITOR_RESIZE.value});this.cfg.addProperty(j.APPEND_TO_DOCUMENT_BODY.key,{value:j.APPEND_TO_DOCUMENT_BODY.value});},init:function(v,u){var s,w;this.initEvents();this.beforeInitEvent.fire(g);this.cfg=new d(this);if(this.isSecure){this.imageRoot=g.IMG_ROOT_SSL;}if(typeof v=="string"){s=v;v=document.getElementById(v);if(!v){v=(l()).cloneNode(false);v.id=s;}}this.id=f.generateId(v);this.element=v;w=this.element.firstChild;if(w){var r=false,q=false,t=false;do{if(1==w.nodeType){if(!r&&f.hasClass(w,g.CSS_HEADER)){this.header=w;r=true;}else{if(!q&&f.hasClass(w,g.CSS_BODY)){this.body=w;q=true;}else{if(!t&&f.hasClass(w,g.CSS_FOOTER)){this.footer=w;t=true;}}}}}while((w=w.nextSibling));}this.initDefaultConfig();f.addClass(this.element,g.CSS_MODULE);if(u){this.cfg.applyConfig(u,true);}if(!d.alreadySubscribed(this.renderEvent,this.cfg.fireQueue,this.cfg)){this.renderEvent.subscribe(this.cfg.fireQueue,this.cfg,true);}this.initEvent.fire(g);},initResizeMonitor:function(){var r=(i.gecko&&this.platform=="windows");if(r){var q=this;setTimeout(function(){q._initResizeMonitor();},0);}else{this._initResizeMonitor();}},_initResizeMonitor:function(){var q,s,u;function w(){g.textResizeEvent.fire();}if(!i.opera){s=f.get("_yuiResizeMonitor");var v=this._supportsCWResize();if(!s){s=document.createElement("iframe");if(this.isSecure&&g.RESIZE_MONITOR_SECURE_URL&&i.ie){s.src=g.RESIZE_MONITOR_SECURE_URL;}if(!v){u=["<html><head><script ",'type="text/javascript">',"window.onresize=function(){window.parent.","YAHOO.widget.Module.textResizeEvent.","fire();};<","/script></head>","<body></body></html>"].join("");s.src="data:text/html;charset=utf-8,"+encodeURIComponent(u);}s.id="_yuiResizeMonitor";s.title="Text Resize Monitor";s.tabIndex=-1;s.setAttribute("role","presentation");s.style.position="absolute";s.style.visibility="hidden";var r=document.body,t=r.firstChild;if(t){r.insertBefore(s,t);}else{r.appendChild(s);}s.style.backgroundColor="transparent";s.style.borderWidth="0";s.style.width="2em";s.style.height="2em";s.style.left="0";s.style.top=(-1*(s.offsetHeight+g.RESIZE_MONITOR_BUFFER))+"px";s.style.visibility="visible";if(i.webkit){q=s.contentWindow.document;q.open();q.close();}}if(s&&s.contentWindow){g.textResizeEvent.subscribe(this.onDomResize,this,true);if(!g.textResizeInitialized){if(v){if(!n.on(s.contentWindow,"resize",w)){n.on(s,"resize",w);}}g.textResizeInitialized=true;}this.resizeMonitor=s;}}},_supportsCWResize:function(){var q=true;if(i.gecko&&i.gecko<=1.8){q=false;}return q;},onDomResize:function(s,r){var q=-1*(this.resizeMonitor.offsetHeight+g.RESIZE_MONITOR_BUFFER);this.resizeMonitor.style.top=q+"px";this.resizeMonitor.style.left="0";},setHeader:function(r){var q=this.header||(this.header=k());if(r.nodeName){q.innerHTML="";q.appendChild(r);}else{q.innerHTML=r;}if(this._rendered){this._renderHeader();}this.changeHeaderEvent.fire(r);this.changeContentEvent.fire();},appendToHeader:function(r){var q=this.header||(this.header=k());q.appendChild(r);this.changeHeaderEvent.fire(r);this.changeContentEvent.fire();},setBody:function(r){var q=this.body||(this.body=b());if(r.nodeName){q.innerHTML="";q.appendChild(r);}else{q.innerHTML=r;}if(this._rendered){this._renderBody();}this.changeBodyEvent.fire(r);this.changeContentEvent.fire();},appendToBody:function(r){var q=this.body||(this.body=b());q.appendChild(r);this.changeBodyEvent.fire(r);this.changeContentEvent.fire();},setFooter:function(r){var q=this.footer||(this.footer=c());if(r.nodeName){q.innerHTML="";q.appendChild(r);}else{q.innerHTML=r;}if(this._rendered){this._renderFooter();}this.changeFooterEvent.fire(r);this.changeContentEvent.fire();},appendToFooter:function(r){var q=this.footer||(this.footer=c());q.appendChild(r);this.changeFooterEvent.fire(r);this.changeContentEvent.fire();},render:function(s,q){var t=this;function r(u){if(typeof u=="string"){u=document.getElementById(u);
+}if(u){t._addToParent(u,t.element);t.appendEvent.fire();}}this.beforeRenderEvent.fire();if(!q){q=this.element;}if(s){r(s);}else{if(!f.inDocument(this.element)){return false;}}this._renderHeader(q);this._renderBody(q);this._renderFooter(q);this._rendered=true;this.renderEvent.fire();return true;},_renderHeader:function(q){q=q||this.element;if(this.header&&!f.inDocument(this.header)){var r=q.firstChild;if(r){q.insertBefore(this.header,r);}else{q.appendChild(this.header);}}},_renderBody:function(q){q=q||this.element;if(this.body&&!f.inDocument(this.body)){if(this.footer&&f.isAncestor(q,this.footer)){q.insertBefore(this.body,this.footer);}else{q.appendChild(this.body);}}},_renderFooter:function(q){q=q||this.element;if(this.footer&&!f.inDocument(this.footer)){q.appendChild(this.footer);}},destroy:function(q){var r,s=!(q);if(this.element){n.purgeElement(this.element,s);r=this.element.parentNode;}if(r){r.removeChild(this.element);}this.element=null;this.header=null;this.body=null;this.footer=null;g.textResizeEvent.unsubscribe(this.onDomResize,this);this.cfg.destroy();this.cfg=null;this.destroyEvent.fire();},show:function(){this.cfg.setProperty("visible",true);},hide:function(){this.cfg.setProperty("visible",false);},configVisible:function(r,q,s){var t=q[0];if(t){if(this.beforeShowEvent.fire()){f.setStyle(this.element,"display","block");this.showEvent.fire();}}else{if(this.beforeHideEvent.fire()){f.setStyle(this.element,"display","none");this.hideEvent.fire();}}},configEffect:function(r,q,s){this._cachedEffects=(this.cacheEffects)?this._createEffects(q[0]):null;},cacheEffects:true,_createEffects:function(t){var q=null,u,r,s;if(t){if(t instanceof Array){q=[];u=t.length;for(r=0;r<u;r++){s=t[r];if(s.effect){q[q.length]=s.effect(this,s.duration);}}}else{if(t.effect){q=[t.effect(this,t.duration)];}}}return q;},configMonitorResize:function(s,r,t){var q=r[0];if(q){this.initResizeMonitor();}else{g.textResizeEvent.unsubscribe(this.onDomResize,this,true);this.resizeMonitor=null;}},_addToParent:function(q,r){if(!this.cfg.getProperty("appendtodocumentbody")&&q===document.body&&q.firstChild){q.insertBefore(r,q.firstChild);}else{q.appendChild(r);}},toString:function(){return"Module "+this.id;}};YAHOO.lang.augmentProto(g,YAHOO.util.EventProvider);}());(function(){YAHOO.widget.Overlay=function(p,o){YAHOO.widget.Overlay.superclass.constructor.call(this,p,o);};var i=YAHOO.lang,m=YAHOO.util.CustomEvent,g=YAHOO.widget.Module,n=YAHOO.util.Event,f=YAHOO.util.Dom,d=YAHOO.util.Config,k=YAHOO.env.ua,b=YAHOO.widget.Overlay,h="subscribe",e="unsubscribe",c="contained",j,a={"BEFORE_MOVE":"beforeMove","MOVE":"move"},l={"X":{key:"x",validator:i.isNumber,suppressEvent:true,supercedes:["iframe"]},"Y":{key:"y",validator:i.isNumber,suppressEvent:true,supercedes:["iframe"]},"XY":{key:"xy",suppressEvent:true,supercedes:["iframe"]},"CONTEXT":{key:"context",suppressEvent:true,supercedes:["iframe"]},"FIXED_CENTER":{key:"fixedcenter",value:false,supercedes:["iframe","visible"]},"WIDTH":{key:"width",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"HEIGHT":{key:"height",suppressEvent:true,supercedes:["context","fixedcenter","iframe"]},"AUTO_FILL_HEIGHT":{key:"autofillheight",supercedes:["height"],value:"body"},"ZINDEX":{key:"zindex",value:null},"CONSTRAIN_TO_VIEWPORT":{key:"constraintoviewport",value:false,validator:i.isBoolean,supercedes:["iframe","x","y","xy"]},"IFRAME":{key:"iframe",value:(k.ie==6?true:false),validator:i.isBoolean,supercedes:["zindex"]},"PREVENT_CONTEXT_OVERLAP":{key:"preventcontextoverlap",value:false,validator:i.isBoolean,supercedes:["constraintoviewport"]}};b.IFRAME_SRC="javascript:false;";b.IFRAME_OFFSET=3;b.VIEWPORT_OFFSET=10;b.TOP_LEFT="tl";b.TOP_RIGHT="tr";b.BOTTOM_LEFT="bl";b.BOTTOM_RIGHT="br";b.PREVENT_OVERLAP_X={"tltr":true,"blbr":true,"brbl":true,"trtl":true};b.PREVENT_OVERLAP_Y={"trbr":true,"tlbl":true,"bltl":true,"brtr":true};b.CSS_OVERLAY="yui-overlay";b.CSS_HIDDEN="yui-overlay-hidden";b.CSS_IFRAME="yui-overlay-iframe";b.STD_MOD_RE=/^\s*?(body|footer|header)\s*?$/i;b.windowScrollEvent=new m("windowScroll");b.windowResizeEvent=new m("windowResize");b.windowScrollHandler=function(p){var o=n.getTarget(p);if(!o||o===window||o===window.document){if(k.ie){if(!window.scrollEnd){window.scrollEnd=-1;}clearTimeout(window.scrollEnd);window.scrollEnd=setTimeout(function(){b.windowScrollEvent.fire();},1);}else{b.windowScrollEvent.fire();}}};b.windowResizeHandler=function(o){if(k.ie){if(!window.resizeEnd){window.resizeEnd=-1;}clearTimeout(window.resizeEnd);window.resizeEnd=setTimeout(function(){b.windowResizeEvent.fire();},100);}else{b.windowResizeEvent.fire();}};b._initialized=null;if(b._initialized===null){n.on(window,"scroll",b.windowScrollHandler);n.on(window,"resize",b.windowResizeHandler);b._initialized=true;}b._TRIGGER_MAP={"windowScroll":b.windowScrollEvent,"windowResize":b.windowResizeEvent,"textResize":g.textResizeEvent};YAHOO.extend(b,g,{CONTEXT_TRIGGERS:[],init:function(p,o){b.superclass.init.call(this,p);this.beforeInitEvent.fire(b);f.addClass(this.element,b.CSS_OVERLAY);if(o){this.cfg.applyConfig(o,true);}if(this.platform=="mac"&&k.gecko){if(!d.alreadySubscribed(this.showEvent,this.showMacGeckoScrollbars,this)){this.showEvent.subscribe(this.showMacGeckoScrollbars,this,true);}if(!d.alreadySubscribed(this.hideEvent,this.hideMacGeckoScrollbars,this)){this.hideEvent.subscribe(this.hideMacGeckoScrollbars,this,true);}}this.initEvent.fire(b);},initEvents:function(){b.superclass.initEvents.call(this);var o=m.LIST;this.beforeMoveEvent=this.createEvent(a.BEFORE_MOVE);this.beforeMoveEvent.signature=o;this.moveEvent=this.createEvent(a.MOVE);this.moveEvent.signature=o;},initDefaultConfig:function(){b.superclass.initDefaultConfig.call(this);var o=this.cfg;o.addProperty(l.X.key,{handler:this.configX,validator:l.X.validator,suppressEvent:l.X.suppressEvent,supercedes:l.X.supercedes});o.addProperty(l.Y.key,{handler:this.configY,validator:l.Y.validator,suppressEvent:l.Y.suppressEvent,supercedes:l.Y.supercedes});
+o.addProperty(l.XY.key,{handler:this.configXY,suppressEvent:l.XY.suppressEvent,supercedes:l.XY.supercedes});o.addProperty(l.CONTEXT.key,{handler:this.configContext,suppressEvent:l.CONTEXT.suppressEvent,supercedes:l.CONTEXT.supercedes});o.addProperty(l.FIXED_CENTER.key,{handler:this.configFixedCenter,value:l.FIXED_CENTER.value,validator:l.FIXED_CENTER.validator,supercedes:l.FIXED_CENTER.supercedes});o.addProperty(l.WIDTH.key,{handler:this.configWidth,suppressEvent:l.WIDTH.suppressEvent,supercedes:l.WIDTH.supercedes});o.addProperty(l.HEIGHT.key,{handler:this.configHeight,suppressEvent:l.HEIGHT.suppressEvent,supercedes:l.HEIGHT.supercedes});o.addProperty(l.AUTO_FILL_HEIGHT.key,{handler:this.configAutoFillHeight,value:l.AUTO_FILL_HEIGHT.value,validator:this._validateAutoFill,supercedes:l.AUTO_FILL_HEIGHT.supercedes});o.addProperty(l.ZINDEX.key,{handler:this.configzIndex,value:l.ZINDEX.value});o.addProperty(l.CONSTRAIN_TO_VIEWPORT.key,{handler:this.configConstrainToViewport,value:l.CONSTRAIN_TO_VIEWPORT.value,validator:l.CONSTRAIN_TO_VIEWPORT.validator,supercedes:l.CONSTRAIN_TO_VIEWPORT.supercedes});o.addProperty(l.IFRAME.key,{handler:this.configIframe,value:l.IFRAME.value,validator:l.IFRAME.validator,supercedes:l.IFRAME.supercedes});o.addProperty(l.PREVENT_CONTEXT_OVERLAP.key,{value:l.PREVENT_CONTEXT_OVERLAP.value,validator:l.PREVENT_CONTEXT_OVERLAP.validator,supercedes:l.PREVENT_CONTEXT_OVERLAP.supercedes});},moveTo:function(o,p){this.cfg.setProperty("xy",[o,p]);},hideMacGeckoScrollbars:function(){f.replaceClass(this.element,"show-scrollbars","hide-scrollbars");},showMacGeckoScrollbars:function(){f.replaceClass(this.element,"hide-scrollbars","show-scrollbars");},_setDomVisibility:function(o){f.setStyle(this.element,"visibility",(o)?"visible":"hidden");var p=b.CSS_HIDDEN;if(o){f.removeClass(this.element,p);}else{f.addClass(this.element,p);}},configVisible:function(x,w,t){var p=w[0],B=f.getStyle(this.element,"visibility"),o=this._cachedEffects||this._createEffects(this.cfg.getProperty("effect")),A=(this.platform=="mac"&&k.gecko),y=d.alreadySubscribed,q,v,s,r,u,z;if(B=="inherit"){v=this.element.parentNode;while(v.nodeType!=9&&v.nodeType!=11){B=f.getStyle(v,"visibility");if(B!="inherit"){break;}v=v.parentNode;}if(B=="inherit"){B="visible";}}if(p){if(A){this.showMacGeckoScrollbars();}if(o){if(p){if(B!="visible"||B===""||this._fadingOut){if(this.beforeShowEvent.fire()){z=o.length;for(s=0;s<z;s++){q=o[s];if(s===0&&!y(q.animateInCompleteEvent,this.showEvent.fire,this.showEvent)){q.animateInCompleteEvent.subscribe(this.showEvent.fire,this.showEvent,true);}q.animateIn();}}}}}else{if(B!="visible"||B===""){if(this.beforeShowEvent.fire()){this._setDomVisibility(true);this.cfg.refireEvent("iframe");this.showEvent.fire();}}else{this._setDomVisibility(true);}}}else{if(A){this.hideMacGeckoScrollbars();}if(o){if(B=="visible"||this._fadingIn){if(this.beforeHideEvent.fire()){z=o.length;for(r=0;r<z;r++){u=o[r];if(r===0&&!y(u.animateOutCompleteEvent,this.hideEvent.fire,this.hideEvent)){u.animateOutCompleteEvent.subscribe(this.hideEvent.fire,this.hideEvent,true);}u.animateOut();}}}else{if(B===""){this._setDomVisibility(false);}}}else{if(B=="visible"||B===""){if(this.beforeHideEvent.fire()){this._setDomVisibility(false);this.hideEvent.fire();}}else{this._setDomVisibility(false);}}}},doCenterOnDOMEvent:function(){var o=this.cfg,p=o.getProperty("fixedcenter");if(o.getProperty("visible")){if(p&&(p!==c||this.fitsInViewport())){this.center();}}},fitsInViewport:function(){var s=b.VIEWPORT_OFFSET,q=this.element,t=q.offsetWidth,r=q.offsetHeight,o=f.getViewportWidth(),p=f.getViewportHeight();return((t+s<o)&&(r+s<p));},configFixedCenter:function(s,q,t){var u=q[0],p=d.alreadySubscribed,r=b.windowResizeEvent,o=b.windowScrollEvent;if(u){this.center();if(!p(this.beforeShowEvent,this.center)){this.beforeShowEvent.subscribe(this.center);}if(!p(r,this.doCenterOnDOMEvent,this)){r.subscribe(this.doCenterOnDOMEvent,this,true);}if(!p(o,this.doCenterOnDOMEvent,this)){o.subscribe(this.doCenterOnDOMEvent,this,true);}}else{this.beforeShowEvent.unsubscribe(this.center);r.unsubscribe(this.doCenterOnDOMEvent,this);o.unsubscribe(this.doCenterOnDOMEvent,this);}},configHeight:function(r,p,s){var o=p[0],q=this.element;f.setStyle(q,"height",o);this.cfg.refireEvent("iframe");},configAutoFillHeight:function(t,s,p){var v=s[0],q=this.cfg,u="autofillheight",w="height",r=q.getProperty(u),o=this._autoFillOnHeightChange;q.unsubscribeFromConfigEvent(w,o);g.textResizeEvent.unsubscribe(o);this.changeContentEvent.unsubscribe(o);if(r&&v!==r&&this[r]){f.setStyle(this[r],w,"");}if(v){v=i.trim(v.toLowerCase());q.subscribeToConfigEvent(w,o,this[v],this);g.textResizeEvent.subscribe(o,this[v],this);this.changeContentEvent.subscribe(o,this[v],this);q.setProperty(u,v,true);}},configWidth:function(r,o,s){var q=o[0],p=this.element;f.setStyle(p,"width",q);this.cfg.refireEvent("iframe");},configzIndex:function(q,o,r){var s=o[0],p=this.element;if(!s){s=f.getStyle(p,"zIndex");if(!s||isNaN(s)){s=0;}}if(this.iframe||this.cfg.getProperty("iframe")===true){if(s<=0){s=1;}}f.setStyle(p,"zIndex",s);this.cfg.setProperty("zIndex",s,true);if(this.iframe){this.stackIframe();}},configXY:function(q,p,r){var t=p[0],o=t[0],s=t[1];this.cfg.setProperty("x",o);this.cfg.setProperty("y",s);this.beforeMoveEvent.fire([o,s]);o=this.cfg.getProperty("x");s=this.cfg.getProperty("y");this.cfg.refireEvent("iframe");this.moveEvent.fire([o,s]);},configX:function(q,p,r){var o=p[0],s=this.cfg.getProperty("y");this.cfg.setProperty("x",o,true);this.cfg.setProperty("y",s,true);this.beforeMoveEvent.fire([o,s]);o=this.cfg.getProperty("x");s=this.cfg.getProperty("y");f.setX(this.element,o,true);this.cfg.setProperty("xy",[o,s],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([o,s]);},configY:function(q,p,r){var o=this.cfg.getProperty("x"),s=p[0];this.cfg.setProperty("x",o,true);this.cfg.setProperty("y",s,true);this.beforeMoveEvent.fire([o,s]);o=this.cfg.getProperty("x");s=this.cfg.getProperty("y");f.setY(this.element,s,true);
+this.cfg.setProperty("xy",[o,s],true);this.cfg.refireEvent("iframe");this.moveEvent.fire([o,s]);},showIframe:function(){var p=this.iframe,o;if(p){o=this.element.parentNode;if(o!=p.parentNode){this._addToParent(o,p);}p.style.display="block";}},hideIframe:function(){if(this.iframe){this.iframe.style.display="none";}},syncIframe:function(){var o=this.iframe,q=this.element,s=b.IFRAME_OFFSET,p=(s*2),r;if(o){o.style.width=(q.offsetWidth+p+"px");o.style.height=(q.offsetHeight+p+"px");r=this.cfg.getProperty("xy");if(!i.isArray(r)||(isNaN(r[0])||isNaN(r[1]))){this.syncPosition();r=this.cfg.getProperty("xy");}f.setXY(o,[(r[0]-s),(r[1]-s)]);}},stackIframe:function(){if(this.iframe){var o=f.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(o)&&!isNaN(o)){f.setStyle(this.iframe,"zIndex",(o-1));}}},configIframe:function(r,q,s){var o=q[0];function t(){var v=this.iframe,w=this.element,x;if(!v){if(!j){j=document.createElement("iframe");if(this.isSecure){j.src=b.IFRAME_SRC;}if(k.ie){j.style.filter="alpha(opacity=0)";j.frameBorder=0;}else{j.style.opacity="0";}j.style.position="absolute";j.style.border="none";j.style.margin="0";j.style.padding="0";j.style.display="none";j.tabIndex=-1;j.className=b.CSS_IFRAME;}v=j.cloneNode(false);v.id=this.id+"_f";x=w.parentNode;var u=x||document.body;this._addToParent(u,v);this.iframe=v;}this.showIframe();this.syncIframe();this.stackIframe();if(!this._hasIframeEventListeners){this.showEvent.subscribe(this.showIframe);this.hideEvent.subscribe(this.hideIframe);this.changeContentEvent.subscribe(this.syncIframe);this._hasIframeEventListeners=true;}}function p(){t.call(this);this.beforeShowEvent.unsubscribe(p);this._iframeDeferred=false;}if(o){if(this.cfg.getProperty("visible")){t.call(this);}else{if(!this._iframeDeferred){this.beforeShowEvent.subscribe(p);this._iframeDeferred=true;}}}else{this.hideIframe();if(this._hasIframeEventListeners){this.showEvent.unsubscribe(this.showIframe);this.hideEvent.unsubscribe(this.hideIframe);this.changeContentEvent.unsubscribe(this.syncIframe);this._hasIframeEventListeners=false;}}},_primeXYFromDOM:function(){if(YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))){this.syncPosition();this.cfg.refireEvent("xy");this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);}},configConstrainToViewport:function(p,o,q){var r=o[0];if(r){if(!d.alreadySubscribed(this.beforeMoveEvent,this.enforceConstraints,this)){this.beforeMoveEvent.subscribe(this.enforceConstraints,this,true);}if(!d.alreadySubscribed(this.beforeShowEvent,this._primeXYFromDOM)){this.beforeShowEvent.subscribe(this._primeXYFromDOM);}}else{this.beforeShowEvent.unsubscribe(this._primeXYFromDOM);this.beforeMoveEvent.unsubscribe(this.enforceConstraints,this);}},configContext:function(u,t,q){var x=t[0],r,o,v,s,p,w=this.CONTEXT_TRIGGERS;if(x){r=x[0];o=x[1];v=x[2];s=x[3];p=x[4];if(w&&w.length>0){s=(s||[]).concat(w);}if(r){if(typeof r=="string"){this.cfg.setProperty("context",[document.getElementById(r),o,v,s,p],true);}if(o&&v){this.align(o,v,p);}if(this._contextTriggers){this._processTriggers(this._contextTriggers,e,this._alignOnTrigger);}if(s){this._processTriggers(s,h,this._alignOnTrigger);this._contextTriggers=s;}}}},_alignOnTrigger:function(p,o){this.align();},_findTriggerCE:function(o){var p=null;if(o instanceof m){p=o;}else{if(b._TRIGGER_MAP[o]){p=b._TRIGGER_MAP[o];}}return p;},_processTriggers:function(s,v,r){var q,u;for(var p=0,o=s.length;p<o;++p){q=s[p];u=this._findTriggerCE(q);if(u){u[v](r,this,true);}else{this[v](q,r);}}},align:function(p,w,s){var v=this.cfg.getProperty("context"),t=this,o,q,u;function r(z,A){var y=null,x=null;switch(p){case b.TOP_LEFT:y=A;x=z;break;case b.TOP_RIGHT:y=A-q.offsetWidth;x=z;break;case b.BOTTOM_LEFT:y=A;x=z-q.offsetHeight;break;case b.BOTTOM_RIGHT:y=A-q.offsetWidth;x=z-q.offsetHeight;break;}if(y!==null&&x!==null){if(s){y+=s[0];x+=s[1];}t.moveTo(y,x);}}if(v){o=v[0];q=this.element;t=this;if(!p){p=v[1];}if(!w){w=v[2];}if(!s&&v[4]){s=v[4];}if(q&&o){u=f.getRegion(o);switch(w){case b.TOP_LEFT:r(u.top,u.left);break;case b.TOP_RIGHT:r(u.top,u.right);break;case b.BOTTOM_LEFT:r(u.bottom,u.left);break;case b.BOTTOM_RIGHT:r(u.bottom,u.right);break;}}}},enforceConstraints:function(p,o,q){var s=o[0];var r=this.getConstrainedXY(s[0],s[1]);this.cfg.setProperty("x",r[0],true);this.cfg.setProperty("y",r[1],true);this.cfg.setProperty("xy",r,true);},_getConstrainedPos:function(y,p){var t=this.element,r=b.VIEWPORT_OFFSET,A=(y=="x"),z=(A)?t.offsetWidth:t.offsetHeight,s=(A)?f.getViewportWidth():f.getViewportHeight(),D=(A)?f.getDocumentScrollLeft():f.getDocumentScrollTop(),C=(A)?b.PREVENT_OVERLAP_X:b.PREVENT_OVERLAP_Y,o=this.cfg.getProperty("context"),u=(z+r<s),w=this.cfg.getProperty("preventcontextoverlap")&&o&&C[(o[1]+o[2])],v=D+r,B=D+s-z-r,q=p;if(p<v||p>B){if(w){q=this._preventOverlap(y,o[0],z,s,D);}else{if(u){if(p<v){q=v;}else{if(p>B){q=B;}}}else{q=v;}}}return q;},_preventOverlap:function(y,w,z,u,C){var A=(y=="x"),t=b.VIEWPORT_OFFSET,s=this,q=((A)?f.getX(w):f.getY(w))-C,o=(A)?w.offsetWidth:w.offsetHeight,p=q-t,r=(u-(q+o))-t,D=false,v=function(){var x;if((s.cfg.getProperty(y)-C)>q){x=(q-z);}else{x=(q+o);}s.cfg.setProperty(y,(x+C),true);return x;},B=function(){var E=((s.cfg.getProperty(y)-C)>q)?r:p,x;if(z>E){if(D){v();}else{v();D=true;x=B();}}return x;};B();return this.cfg.getProperty(y);},getConstrainedX:function(o){return this._getConstrainedPos("x",o);},getConstrainedY:function(o){return this._getConstrainedPos("y",o);},getConstrainedXY:function(o,p){return[this.getConstrainedX(o),this.getConstrainedY(p)];},center:function(){var r=b.VIEWPORT_OFFSET,s=this.element.offsetWidth,q=this.element.offsetHeight,p=f.getViewportWidth(),t=f.getViewportHeight(),o,u;if(s<p){o=(p/2)-(s/2)+f.getDocumentScrollLeft();}else{o=r+f.getDocumentScrollLeft();}if(q<t){u=(t/2)-(q/2)+f.getDocumentScrollTop();}else{u=r+f.getDocumentScrollTop();}this.cfg.setProperty("xy",[parseInt(o,10),parseInt(u,10)]);this.cfg.refireEvent("iframe");if(k.webkit){this.forceContainerRedraw();}},syncPosition:function(){var o=f.getXY(this.element);
+this.cfg.setProperty("x",o[0],true);this.cfg.setProperty("y",o[1],true);this.cfg.setProperty("xy",o,true);},onDomResize:function(q,p){var o=this;b.superclass.onDomResize.call(this,q,p);setTimeout(function(){o.syncPosition();o.cfg.refireEvent("iframe");o.cfg.refireEvent("context");},0);},_getComputedHeight:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(p){var o=null;if(p.ownerDocument&&p.ownerDocument.defaultView){var q=p.ownerDocument.defaultView.getComputedStyle(p,"");if(q){o=parseInt(q.height,10);}}return(i.isNumber(o))?o:null;};}else{return function(p){var o=null;if(p.style.pixelHeight){o=p.style.pixelHeight;}return(i.isNumber(o))?o:null;};}})(),_validateAutoFillHeight:function(o){return(!o)||(i.isString(o)&&b.STD_MOD_RE.test(o));},_autoFillOnHeightChange:function(r,p,q){var o=this.cfg.getProperty("height");if((o&&o!=="auto")||(o===0)){this.fillHeight(q);}},_getPreciseHeight:function(p){var o=p.offsetHeight;if(p.getBoundingClientRect){var q=p.getBoundingClientRect();o=q.bottom-q.top;}return o;},fillHeight:function(r){if(r){var p=this.innerElement||this.element,o=[this.header,this.body,this.footer],v,w=0,x=0,t=0,q=false;for(var u=0,s=o.length;u<s;u++){v=o[u];if(v){if(r!==v){x+=this._getPreciseHeight(v);}else{q=true;}}}if(q){if(k.ie||k.opera){f.setStyle(r,"height",0+"px");}w=this._getComputedHeight(p);if(w===null){f.addClass(p,"yui-override-padding");w=p.clientHeight;f.removeClass(p,"yui-override-padding");}t=Math.max(w-x,0);f.setStyle(r,"height",t+"px");if(r.offsetHeight!=t){t=Math.max(t-(r.offsetHeight-t),0);}f.setStyle(r,"height",t+"px");}}},bringToTop:function(){var s=[],r=this.element;function v(z,y){var B=f.getStyle(z,"zIndex"),A=f.getStyle(y,"zIndex"),x=(!B||isNaN(B))?0:parseInt(B,10),w=(!A||isNaN(A))?0:parseInt(A,10);if(x>w){return -1;}else{if(x<w){return 1;}else{return 0;}}}function q(y){var x=f.hasClass(y,b.CSS_OVERLAY),w=YAHOO.widget.Panel;if(x&&!f.isAncestor(r,y)){if(w&&f.hasClass(y,w.CSS_PANEL)){s[s.length]=y.parentNode;}else{s[s.length]=y;}}}f.getElementsBy(q,"div",document.body);s.sort(v);var o=s[0],u;if(o){u=f.getStyle(o,"zIndex");if(!isNaN(u)){var t=false;if(o!=r){t=true;}else{if(s.length>1){var p=f.getStyle(s[1],"zIndex");if(!isNaN(p)&&(u==p)){t=true;}}}if(t){this.cfg.setProperty("zindex",(parseInt(u,10)+2));}}}},destroy:function(o){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;b.windowResizeEvent.unsubscribe(this.doCenterOnDOMEvent,this);b.windowScrollEvent.unsubscribe(this.doCenterOnDOMEvent,this);g.textResizeEvent.unsubscribe(this._autoFillOnHeightChange);if(this._contextTriggers){this._processTriggers(this._contextTriggers,e,this._alignOnTrigger);}b.superclass.destroy.call(this,o);},forceContainerRedraw:function(){var o=this;f.addClass(o.element,"yui-force-redraw");setTimeout(function(){f.removeClass(o.element,"yui-force-redraw");},0);},toString:function(){return"Overlay "+this.id;}});}());(function(){YAHOO.widget.OverlayManager=function(g){this.init(g);};var d=YAHOO.widget.Overlay,c=YAHOO.util.Event,e=YAHOO.util.Dom,b=YAHOO.util.Config,f=YAHOO.util.CustomEvent,a=YAHOO.widget.OverlayManager;a.CSS_FOCUSED="focused";a.prototype={constructor:a,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},init:function(i){this.cfg=new b(this);this.initDefaultConfig();if(i){this.cfg.applyConfig(i,true);}this.cfg.fireQueue();var h=null;this.getActive=function(){return h;};this.focus=function(j){var k=this.find(j);if(k){k.focus();}};this.remove=function(k){var m=this.find(k),j;if(m){if(h==m){h=null;}var l=(m.element===null&&m.cfg===null)?true:false;if(!l){j=e.getStyle(m.element,"zIndex");m.cfg.setProperty("zIndex",-1000,true);}this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,(this.overlays.length-1));m.hideEvent.unsubscribe(m.blur);m.destroyEvent.unsubscribe(this._onOverlayDestroy,m);m.focusEvent.unsubscribe(this._onOverlayFocusHandler,m);m.blurEvent.unsubscribe(this._onOverlayBlurHandler,m);if(!l){c.removeListener(m.element,this.cfg.getProperty("focusevent"),this._onOverlayElementFocus);m.cfg.setProperty("zIndex",j,true);m.cfg.setProperty("manager",null);}if(m.focusEvent._managed){m.focusEvent=null;}if(m.blurEvent._managed){m.blurEvent=null;}if(m.focus._managed){m.focus=null;}if(m.blur._managed){m.blur=null;}}};this.blurAll=function(){var k=this.overlays.length,j;if(k>0){j=k-1;do{this.overlays[j].blur();}while(j--);}};this._manageBlur=function(j){var k=false;if(h==j){e.removeClass(h.element,a.CSS_FOCUSED);h=null;k=true;}return k;};this._manageFocus=function(j){var k=false;if(h!=j){if(h){h.blur();}h=j;this.bringToTop(h);e.addClass(h.element,a.CSS_FOCUSED);k=true;}return k;};var g=this.cfg.getProperty("overlays");if(!this.overlays){this.overlays=[];}if(g){this.register(g);this.overlays.sort(this.compareZIndexDesc);}},_onOverlayElementFocus:function(i){var g=c.getTarget(i),h=this.close;if(h&&(g==h||e.isAncestor(h,g))){this.blur();}else{this.focus();}},_onOverlayDestroy:function(h,g,i){this.remove(i);},_onOverlayFocusHandler:function(h,g,i){this._manageFocus(i);},_onOverlayBlurHandler:function(h,g,i){this._manageBlur(i);},_bindFocus:function(g){var h=this;if(!g.focusEvent){g.focusEvent=g.createEvent("focus");g.focusEvent.signature=f.LIST;g.focusEvent._managed=true;}else{g.focusEvent.subscribe(h._onOverlayFocusHandler,g,h);}if(!g.focus){c.on(g.element,h.cfg.getProperty("focusevent"),h._onOverlayElementFocus,null,g);g.focus=function(){if(h._manageFocus(this)){if(this.cfg.getProperty("visible")&&this.focusFirst){this.focusFirst();}this.focusEvent.fire();}};g.focus._managed=true;}},_bindBlur:function(g){var h=this;if(!g.blurEvent){g.blurEvent=g.createEvent("blur");g.blurEvent.signature=f.LIST;g.focusEvent._managed=true;}else{g.blurEvent.subscribe(h._onOverlayBlurHandler,g,h);}if(!g.blur){g.blur=function(){if(h._manageBlur(this)){this.blurEvent.fire();}};g.blur._managed=true;}g.hideEvent.subscribe(g.blur);
+},_bindDestroy:function(g){var h=this;g.destroyEvent.subscribe(h._onOverlayDestroy,g,h);},_syncZIndex:function(g){var h=e.getStyle(g.element,"zIndex");if(!isNaN(h)){g.cfg.setProperty("zIndex",parseInt(h,10));}else{g.cfg.setProperty("zIndex",0);}},register:function(g){var k=false,h,j;if(g instanceof d){g.cfg.addProperty("manager",{value:this});this._bindFocus(g);this._bindBlur(g);this._bindDestroy(g);this._syncZIndex(g);this.overlays.push(g);this.bringToTop(g);k=true;}else{if(g instanceof Array){for(h=0,j=g.length;h<j;h++){k=this.register(g[h])||k;}}}return k;},bringToTop:function(m){var i=this.find(m),l,g,j;if(i){j=this.overlays;j.sort(this.compareZIndexDesc);g=j[0];if(g){l=e.getStyle(g.element,"zIndex");if(!isNaN(l)){var k=false;if(g!==i){k=true;}else{if(j.length>1){var h=e.getStyle(j[1].element,"zIndex");if(!isNaN(h)&&(l==h)){k=true;}}}if(k){i.cfg.setProperty("zindex",(parseInt(l,10)+2));}}j.sort(this.compareZIndexDesc);}}},find:function(g){var l=g instanceof d,j=this.overlays,p=j.length,k=null,m,h;if(l||typeof g=="string"){for(h=p-1;h>=0;h--){m=j[h];if((l&&(m===g))||(m.id==g)){k=m;break;}}}return k;},compareZIndexDesc:function(j,i){var h=(j.cfg)?j.cfg.getProperty("zIndex"):null,g=(i.cfg)?i.cfg.getProperty("zIndex"):null;if(h===null&&g===null){return 0;}else{if(h===null){return 1;}else{if(g===null){return -1;}else{if(h>g){return -1;}else{if(h<g){return 1;}else{return 0;}}}}}},showAll:function(){var h=this.overlays,j=h.length,g;for(g=j-1;g>=0;g--){h[g].show();}},hideAll:function(){var h=this.overlays,j=h.length,g;for(g=j-1;g>=0;g--){h[g].hide();}},toString:function(){return"OverlayManager";}};}());(function(){YAHOO.widget.Tooltip=function(p,o){YAHOO.widget.Tooltip.superclass.constructor.call(this,p,o);};var e=YAHOO.lang,n=YAHOO.util.Event,m=YAHOO.util.CustomEvent,c=YAHOO.util.Dom,j=YAHOO.widget.Tooltip,h=YAHOO.env.ua,g=(h.ie&&(h.ie<=6||document.compatMode=="BackCompat")),f,i={"PREVENT_OVERLAP":{key:"preventoverlap",value:true,validator:e.isBoolean,supercedes:["x","y","xy"]},"SHOW_DELAY":{key:"showdelay",value:200,validator:e.isNumber},"AUTO_DISMISS_DELAY":{key:"autodismissdelay",value:5000,validator:e.isNumber},"HIDE_DELAY":{key:"hidedelay",value:250,validator:e.isNumber},"TEXT":{key:"text",suppressEvent:true},"CONTAINER":{key:"container"},"DISABLED":{key:"disabled",value:false,suppressEvent:true},"XY_OFFSET":{key:"xyoffset",value:[0,25],suppressEvent:true}},a={"CONTEXT_MOUSE_OVER":"contextMouseOver","CONTEXT_MOUSE_OUT":"contextMouseOut","CONTEXT_TRIGGER":"contextTrigger"};j.CSS_TOOLTIP="yui-tt";function k(q,o){var p=this.cfg,r=p.getProperty("width");if(r==o){p.setProperty("width",q);}}function d(p,o){if("_originalWidth" in this){k.call(this,this._originalWidth,this._forcedWidth);}var q=document.body,u=this.cfg,t=u.getProperty("width"),r,s;if((!t||t=="auto")&&(u.getProperty("container")!=q||u.getProperty("x")>=c.getViewportWidth()||u.getProperty("y")>=c.getViewportHeight())){s=this.element.cloneNode(true);s.style.visibility="hidden";s.style.top="0px";s.style.left="0px";q.appendChild(s);r=(s.offsetWidth+"px");q.removeChild(s);s=null;u.setProperty("width",r);u.refireEvent("xy");this._originalWidth=t||"";this._forcedWidth=r;}}function b(p,o,q){this.render(q);}function l(){n.onDOMReady(b,this.cfg.getProperty("container"),this);}YAHOO.extend(j,YAHOO.widget.Overlay,{init:function(p,o){j.superclass.init.call(this,p);this.beforeInitEvent.fire(j);c.addClass(this.element,j.CSS_TOOLTIP);if(o){this.cfg.applyConfig(o,true);}this.cfg.queueProperty("visible",false);this.cfg.queueProperty("constraintoviewport",true);this.setBody("");this.subscribe("changeContent",d);this.subscribe("init",l);this.subscribe("render",this.onRender);this.initEvent.fire(j);},initEvents:function(){j.superclass.initEvents.call(this);var o=m.LIST;this.contextMouseOverEvent=this.createEvent(a.CONTEXT_MOUSE_OVER);this.contextMouseOverEvent.signature=o;this.contextMouseOutEvent=this.createEvent(a.CONTEXT_MOUSE_OUT);this.contextMouseOutEvent.signature=o;this.contextTriggerEvent=this.createEvent(a.CONTEXT_TRIGGER);this.contextTriggerEvent.signature=o;},initDefaultConfig:function(){j.superclass.initDefaultConfig.call(this);this.cfg.addProperty(i.PREVENT_OVERLAP.key,{value:i.PREVENT_OVERLAP.value,validator:i.PREVENT_OVERLAP.validator,supercedes:i.PREVENT_OVERLAP.supercedes});this.cfg.addProperty(i.SHOW_DELAY.key,{handler:this.configShowDelay,value:200,validator:i.SHOW_DELAY.validator});this.cfg.addProperty(i.AUTO_DISMISS_DELAY.key,{handler:this.configAutoDismissDelay,value:i.AUTO_DISMISS_DELAY.value,validator:i.AUTO_DISMISS_DELAY.validator});this.cfg.addProperty(i.HIDE_DELAY.key,{handler:this.configHideDelay,value:i.HIDE_DELAY.value,validator:i.HIDE_DELAY.validator});this.cfg.addProperty(i.TEXT.key,{handler:this.configText,suppressEvent:i.TEXT.suppressEvent});this.cfg.addProperty(i.CONTAINER.key,{handler:this.configContainer,value:document.body});this.cfg.addProperty(i.DISABLED.key,{handler:this.configContainer,value:i.DISABLED.value,supressEvent:i.DISABLED.suppressEvent});this.cfg.addProperty(i.XY_OFFSET.key,{value:i.XY_OFFSET.value.concat(),supressEvent:i.XY_OFFSET.suppressEvent});},configText:function(p,o,q){var r=o[0];if(r){this.setBody(r);}},configContainer:function(q,p,r){var o=p[0];if(typeof o=="string"){this.cfg.setProperty("container",document.getElementById(o),true);}},_removeEventListeners:function(){var r=this._context,o,q,p;if(r){o=r.length;if(o>0){p=o-1;do{q=r[p];n.removeListener(q,"mouseover",this.onContextMouseOver);n.removeListener(q,"mousemove",this.onContextMouseMove);n.removeListener(q,"mouseout",this.onContextMouseOut);}while(p--);}}},configContext:function(t,p,u){var s=p[0],v,o,r,q;if(s){if(!(s instanceof Array)){if(typeof s=="string"){this.cfg.setProperty("context",[document.getElementById(s)],true);}else{this.cfg.setProperty("context",[s],true);}s=this.cfg.getProperty("context");}this._removeEventListeners();this._context=s;v=this._context;if(v){o=v.length;if(o>0){q=o-1;do{r=v[q];n.on(r,"mouseover",this.onContextMouseOver,this);
+n.on(r,"mousemove",this.onContextMouseMove,this);n.on(r,"mouseout",this.onContextMouseOut,this);}while(q--);}}}},onContextMouseMove:function(p,o){o.pageX=n.getPageX(p);o.pageY=n.getPageY(p);},onContextMouseOver:function(q,p){var o=this;if(o.title){p._tempTitle=o.title;o.title="";}if(p.fireEvent("contextMouseOver",o,q)!==false&&!p.cfg.getProperty("disabled")){if(p.hideProcId){clearTimeout(p.hideProcId);p.hideProcId=null;}n.on(o,"mousemove",p.onContextMouseMove,p);p.showProcId=p.doShow(q,o);}},onContextMouseOut:function(q,p){var o=this;if(p._tempTitle){o.title=p._tempTitle;p._tempTitle=null;}if(p.showProcId){clearTimeout(p.showProcId);p.showProcId=null;}if(p.hideProcId){clearTimeout(p.hideProcId);p.hideProcId=null;}p.fireEvent("contextMouseOut",o,q);p.hideProcId=setTimeout(function(){p.hide();},p.cfg.getProperty("hidedelay"));},doShow:function(r,o){var t=this.cfg.getProperty("xyoffset"),p=t[0],s=t[1],q=this;if(h.opera&&o.tagName&&o.tagName.toUpperCase()=="A"){s+=12;}return setTimeout(function(){var u=q.cfg.getProperty("text");if(q._tempTitle&&(u===""||YAHOO.lang.isUndefined(u)||YAHOO.lang.isNull(u))){q.setBody(q._tempTitle);}else{q.cfg.refireEvent("text");}q.moveTo(q.pageX+p,q.pageY+s);if(q.cfg.getProperty("preventoverlap")){q.preventOverlap(q.pageX,q.pageY);}n.removeListener(o,"mousemove",q.onContextMouseMove);q.contextTriggerEvent.fire(o);q.show();q.hideProcId=q.doHide();},this.cfg.getProperty("showdelay"));},doHide:function(){var o=this;return setTimeout(function(){o.hide();},this.cfg.getProperty("autodismissdelay"));},preventOverlap:function(s,r){var o=this.element.offsetHeight,q=new YAHOO.util.Point(s,r),p=c.getRegion(this.element);p.top-=5;p.left-=5;p.right+=5;p.bottom+=5;if(p.contains(q)){this.cfg.setProperty("y",(r-o-5));}},onRender:function(s,r){function t(){var w=this.element,v=this.underlay;if(v){v.style.width=(w.offsetWidth+6)+"px";v.style.height=(w.offsetHeight+1)+"px";}}function p(){c.addClass(this.underlay,"yui-tt-shadow-visible");if(h.ie){this.forceUnderlayRedraw();}}function o(){c.removeClass(this.underlay,"yui-tt-shadow-visible");}function u(){var x=this.underlay,w,v,z,y;if(!x){w=this.element;v=YAHOO.widget.Module;z=h.ie;y=this;if(!f){f=document.createElement("div");f.className="yui-tt-shadow";}x=f.cloneNode(false);w.appendChild(x);this.underlay=x;this._shadow=this.underlay;p.call(this);this.subscribe("beforeShow",p);this.subscribe("hide",o);if(g){window.setTimeout(function(){t.call(y);},0);this.cfg.subscribeToConfigEvent("width",t);this.cfg.subscribeToConfigEvent("height",t);this.subscribe("changeContent",t);v.textResizeEvent.subscribe(t,this,true);this.subscribe("destroy",function(){v.textResizeEvent.unsubscribe(t,this);});}}}function q(){u.call(this);this.unsubscribe("beforeShow",q);}if(this.cfg.getProperty("visible")){u.call(this);}else{this.subscribe("beforeShow",q);}},forceUnderlayRedraw:function(){var o=this;c.addClass(o.underlay,"yui-force-redraw");setTimeout(function(){c.removeClass(o.underlay,"yui-force-redraw");},0);},destroy:function(){this._removeEventListeners();j.superclass.destroy.call(this);},toString:function(){return"Tooltip "+this.id;}});}());(function(){YAHOO.widget.Panel=function(v,u){YAHOO.widget.Panel.superclass.constructor.call(this,v,u);};var s=null;var e=YAHOO.lang,f=YAHOO.util,a=f.Dom,t=f.Event,m=f.CustomEvent,k=YAHOO.util.KeyListener,i=f.Config,h=YAHOO.widget.Overlay,o=YAHOO.widget.Panel,l=YAHOO.env.ua,p=(l.ie&&(l.ie<=6||document.compatMode=="BackCompat")),g,q,c,d={"BEFORE_SHOW_MASK":"beforeShowMask","BEFORE_HIDE_MASK":"beforeHideMask","SHOW_MASK":"showMask","HIDE_MASK":"hideMask","DRAG":"drag"},n={"CLOSE":{key:"close",value:true,validator:e.isBoolean,supercedes:["visible"]},"DRAGGABLE":{key:"draggable",value:(f.DD?true:false),validator:e.isBoolean,supercedes:["visible"]},"DRAG_ONLY":{key:"dragonly",value:false,validator:e.isBoolean,supercedes:["draggable"]},"UNDERLAY":{key:"underlay",value:"shadow",supercedes:["visible"]},"MODAL":{key:"modal",value:false,validator:e.isBoolean,supercedes:["visible","zindex"]},"KEY_LISTENERS":{key:"keylisteners",suppressEvent:true,supercedes:["visible"]},"STRINGS":{key:"strings",supercedes:["close"],validator:e.isObject,value:{close:"Close"}}};o.CSS_PANEL="yui-panel";o.CSS_PANEL_CONTAINER="yui-panel-container";o.FOCUSABLE=["a","button","select","textarea","input","iframe"];function j(v,u){if(!this.header&&this.cfg.getProperty("draggable")){this.setHeader("&#160;");}}function r(v,u,w){var z=w[0],x=w[1],y=this.cfg,A=y.getProperty("width");if(A==x){y.setProperty("width",z);}this.unsubscribe("hide",r,w);}function b(v,u){var y,x,w;if(p){y=this.cfg;x=y.getProperty("width");if(!x||x=="auto"){w=(this.element.offsetWidth+"px");y.setProperty("width",w);this.subscribe("hide",r,[(x||""),w]);}}}YAHOO.extend(o,h,{init:function(v,u){o.superclass.init.call(this,v);this.beforeInitEvent.fire(o);a.addClass(this.element,o.CSS_PANEL);this.buildWrapper();if(u){this.cfg.applyConfig(u,true);}this.subscribe("showMask",this._addFocusHandlers);this.subscribe("hideMask",this._removeFocusHandlers);this.subscribe("beforeRender",j);this.subscribe("render",function(){this.setFirstLastFocusable();this.subscribe("changeContent",this.setFirstLastFocusable);});this.subscribe("show",this._focusOnShow);this.initEvent.fire(o);},_onElementFocus:function(z){if(s===this){var y=t.getTarget(z),x=document.documentElement,v=(y!==x&&y!==window);if(v&&y!==this.element&&y!==this.mask&&!a.isAncestor(this.element,y)){try{this._focusFirstModal();}catch(w){try{if(v&&y!==document.body){y.blur();}}catch(u){}}}}},_focusFirstModal:function(){var u=this.firstElement;if(u){u.focus();}else{if(this._modalFocus){this._modalFocus.focus();}else{this.innerElement.focus();}}},_addFocusHandlers:function(v,u){if(!this.firstElement){if(l.webkit||l.opera){if(!this._modalFocus){this._createHiddenFocusElement();}}else{this.innerElement.tabIndex=0;}}this._setTabLoop(this.firstElement,this.lastElement);t.onFocus(document.documentElement,this._onElementFocus,this,true);s=this;},_createHiddenFocusElement:function(){var u=document.createElement("button");
+u.style.height="1px";u.style.width="1px";u.style.position="absolute";u.style.left="-10000em";u.style.opacity=0;u.tabIndex=-1;this.innerElement.appendChild(u);this._modalFocus=u;},_removeFocusHandlers:function(v,u){t.removeFocusListener(document.documentElement,this._onElementFocus,this);if(s==this){s=null;}},_focusOnShow:function(v,u,w){if(u&&u[1]){t.stopEvent(u[1]);}if(!this.focusFirst(v,u,w)){if(this.cfg.getProperty("modal")){this._focusFirstModal();}}},focusFirst:function(w,u,z){var v=this.firstElement,y=false;if(u&&u[1]){t.stopEvent(u[1]);}if(v){try{v.focus();y=true;}catch(x){}}return y;},focusLast:function(w,u,z){var v=this.lastElement,y=false;if(u&&u[1]){t.stopEvent(u[1]);}if(v){try{v.focus();y=true;}catch(x){}}return y;},_setTabLoop:function(u,v){this.setTabLoop(u,v);},setTabLoop:function(x,z){var v=this.preventBackTab,w=this.preventTabOut,u=this.showEvent,y=this.hideEvent;if(v){v.disable();u.unsubscribe(v.enable,v);y.unsubscribe(v.disable,v);v=this.preventBackTab=null;}if(w){w.disable();u.unsubscribe(w.enable,w);y.unsubscribe(w.disable,w);w=this.preventTabOut=null;}if(x){this.preventBackTab=new k(x,{shift:true,keys:9},{fn:this.focusLast,scope:this,correctScope:true});v=this.preventBackTab;u.subscribe(v.enable,v,true);y.subscribe(v.disable,v,true);}if(z){this.preventTabOut=new k(z,{shift:false,keys:9},{fn:this.focusFirst,scope:this,correctScope:true});w=this.preventTabOut;u.subscribe(w.enable,w,true);y.subscribe(w.disable,w,true);}},getFocusableElements:function(v){v=v||this.innerElement;var x={},u=this;for(var w=0;w<o.FOCUSABLE.length;w++){x[o.FOCUSABLE[w]]=true;}return a.getElementsBy(function(y){return u._testIfFocusable(y,x);},null,v);},_testIfFocusable:function(u,v){if(u.focus&&u.type!=="hidden"&&!u.disabled&&v[u.tagName.toLowerCase()]){return true;}return false;},setFirstLastFocusable:function(){this.firstElement=null;this.lastElement=null;var u=this.getFocusableElements();this.focusableElements=u;if(u.length>0){this.firstElement=u[0];this.lastElement=u[u.length-1];}if(this.cfg.getProperty("modal")){this._setTabLoop(this.firstElement,this.lastElement);}},initEvents:function(){o.superclass.initEvents.call(this);var u=m.LIST;this.showMaskEvent=this.createEvent(d.SHOW_MASK);this.showMaskEvent.signature=u;this.beforeShowMaskEvent=this.createEvent(d.BEFORE_SHOW_MASK);this.beforeShowMaskEvent.signature=u;this.hideMaskEvent=this.createEvent(d.HIDE_MASK);this.hideMaskEvent.signature=u;this.beforeHideMaskEvent=this.createEvent(d.BEFORE_HIDE_MASK);this.beforeHideMaskEvent.signature=u;this.dragEvent=this.createEvent(d.DRAG);this.dragEvent.signature=u;},initDefaultConfig:function(){o.superclass.initDefaultConfig.call(this);this.cfg.addProperty(n.CLOSE.key,{handler:this.configClose,value:n.CLOSE.value,validator:n.CLOSE.validator,supercedes:n.CLOSE.supercedes});this.cfg.addProperty(n.DRAGGABLE.key,{handler:this.configDraggable,value:(f.DD)?true:false,validator:n.DRAGGABLE.validator,supercedes:n.DRAGGABLE.supercedes});this.cfg.addProperty(n.DRAG_ONLY.key,{value:n.DRAG_ONLY.value,validator:n.DRAG_ONLY.validator,supercedes:n.DRAG_ONLY.supercedes});this.cfg.addProperty(n.UNDERLAY.key,{handler:this.configUnderlay,value:n.UNDERLAY.value,supercedes:n.UNDERLAY.supercedes});this.cfg.addProperty(n.MODAL.key,{handler:this.configModal,value:n.MODAL.value,validator:n.MODAL.validator,supercedes:n.MODAL.supercedes});this.cfg.addProperty(n.KEY_LISTENERS.key,{handler:this.configKeyListeners,suppressEvent:n.KEY_LISTENERS.suppressEvent,supercedes:n.KEY_LISTENERS.supercedes});this.cfg.addProperty(n.STRINGS.key,{value:n.STRINGS.value,handler:this.configStrings,validator:n.STRINGS.validator,supercedes:n.STRINGS.supercedes});},configClose:function(y,v,z){var A=v[0],x=this.close,u=this.cfg.getProperty("strings"),w;if(A){if(!x){if(!c){c=document.createElement("a");c.className="container-close";c.href="#";}x=c.cloneNode(true);w=this.innerElement.firstChild;if(w){this.innerElement.insertBefore(x,w);}else{this.innerElement.appendChild(x);}x.innerHTML=(u&&u.close)?u.close:"&#160;";t.on(x,"click",this._doClose,this,true);this.close=x;}else{x.style.display="block";}}else{if(x){x.style.display="none";}}},_doClose:function(u){t.preventDefault(u);this.hide();},configDraggable:function(v,u,w){var x=u[0];if(x){if(!f.DD){this.cfg.setProperty("draggable",false);return;}if(this.header){a.setStyle(this.header,"cursor","move");this.registerDragDrop();}this.subscribe("beforeShow",b);}else{if(this.dd){this.dd.unreg();}if(this.header){a.setStyle(this.header,"cursor","auto");}this.unsubscribe("beforeShow",b);}},configUnderlay:function(D,C,z){var B=(this.platform=="mac"&&l.gecko),E=C[0].toLowerCase(),v=this.underlay,w=this.element;function x(){var F=false;if(!v){if(!q){q=document.createElement("div");q.className="underlay";}v=q.cloneNode(false);this.element.appendChild(v);this.underlay=v;if(p){this.sizeUnderlay();this.cfg.subscribeToConfigEvent("width",this.sizeUnderlay);this.cfg.subscribeToConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.subscribe(this.sizeUnderlay);YAHOO.widget.Module.textResizeEvent.subscribe(this.sizeUnderlay,this,true);}if(l.webkit&&l.webkit<420){this.changeContentEvent.subscribe(this.forceUnderlayRedraw);}F=true;}}function A(){var F=x.call(this);if(!F&&p){this.sizeUnderlay();}this._underlayDeferred=false;this.beforeShowEvent.unsubscribe(A);}function y(){if(this._underlayDeferred){this.beforeShowEvent.unsubscribe(A);this._underlayDeferred=false;}if(v){this.cfg.unsubscribeFromConfigEvent("width",this.sizeUnderlay);this.cfg.unsubscribeFromConfigEvent("height",this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.sizeUnderlay);this.changeContentEvent.unsubscribe(this.forceUnderlayRedraw);YAHOO.widget.Module.textResizeEvent.unsubscribe(this.sizeUnderlay,this,true);this.element.removeChild(v);this.underlay=null;}}switch(E){case"shadow":a.removeClass(w,"matte");a.addClass(w,"shadow");break;case"matte":if(!B){y.call(this);}a.removeClass(w,"shadow");a.addClass(w,"matte");break;default:if(!B){y.call(this);
+}a.removeClass(w,"shadow");a.removeClass(w,"matte");break;}if((E=="shadow")||(B&&!v)){if(this.cfg.getProperty("visible")){var u=x.call(this);if(!u&&p){this.sizeUnderlay();}}else{if(!this._underlayDeferred){this.beforeShowEvent.subscribe(A);this._underlayDeferred=true;}}}},configModal:function(v,u,x){var w=u[0];if(w){if(!this._hasModalityEventListeners){this.subscribe("beforeShow",this.buildMask);this.subscribe("beforeShow",this.bringToTop);this.subscribe("beforeShow",this.showMask);this.subscribe("hide",this.hideMask);h.windowResizeEvent.subscribe(this.sizeMask,this,true);this._hasModalityEventListeners=true;}}else{if(this._hasModalityEventListeners){if(this.cfg.getProperty("visible")){this.hideMask();this.removeMask();}this.unsubscribe("beforeShow",this.buildMask);this.unsubscribe("beforeShow",this.bringToTop);this.unsubscribe("beforeShow",this.showMask);this.unsubscribe("hide",this.hideMask);h.windowResizeEvent.unsubscribe(this.sizeMask,this);this._hasModalityEventListeners=false;}}},removeMask:function(){var v=this.mask,u;if(v){this.hideMask();u=v.parentNode;if(u){u.removeChild(v);}this.mask=null;}},configKeyListeners:function(x,u,A){var w=u[0],z,y,v;if(w){if(w instanceof Array){y=w.length;for(v=0;v<y;v++){z=w[v];if(!i.alreadySubscribed(this.showEvent,z.enable,z)){this.showEvent.subscribe(z.enable,z,true);}if(!i.alreadySubscribed(this.hideEvent,z.disable,z)){this.hideEvent.subscribe(z.disable,z,true);this.destroyEvent.subscribe(z.disable,z,true);}}}else{if(!i.alreadySubscribed(this.showEvent,w.enable,w)){this.showEvent.subscribe(w.enable,w,true);}if(!i.alreadySubscribed(this.hideEvent,w.disable,w)){this.hideEvent.subscribe(w.disable,w,true);this.destroyEvent.subscribe(w.disable,w,true);}}}},configStrings:function(v,u,w){var x=e.merge(n.STRINGS.value,u[0]);this.cfg.setProperty(n.STRINGS.key,x,true);},configHeight:function(x,v,y){var u=v[0],w=this.innerElement;a.setStyle(w,"height",u);this.cfg.refireEvent("iframe");},_autoFillOnHeightChange:function(x,v,w){o.superclass._autoFillOnHeightChange.apply(this,arguments);if(p){var u=this;setTimeout(function(){u.sizeUnderlay();},0);}},configWidth:function(x,u,y){var w=u[0],v=this.innerElement;a.setStyle(v,"width",w);this.cfg.refireEvent("iframe");},configzIndex:function(v,u,x){o.superclass.configzIndex.call(this,v,u,x);if(this.mask||this.cfg.getProperty("modal")===true){var w=a.getStyle(this.element,"zIndex");if(!w||isNaN(w)){w=0;}if(w===0){this.cfg.setProperty("zIndex",1);}else{this.stackMask();}}},buildWrapper:function(){var w=this.element.parentNode,u=this.element,v=document.createElement("div");v.className=o.CSS_PANEL_CONTAINER;v.id=u.id+"_c";if(w){w.insertBefore(v,u);}v.appendChild(u);this.element=v;this.innerElement=u;a.setStyle(this.innerElement,"visibility","inherit");},sizeUnderlay:function(){var v=this.underlay,u;if(v){u=this.element;v.style.width=u.offsetWidth+"px";v.style.height=u.offsetHeight+"px";}},registerDragDrop:function(){var v=this;if(this.header){if(!f.DD){return;}var u=(this.cfg.getProperty("dragonly")===true);this.dd=new f.DD(this.element.id,this.id,{dragOnly:u});if(!this.header.id){this.header.id=this.id+"_h";}this.dd.startDrag=function(){var x,z,w,C,B,A;if(YAHOO.env.ua.ie==6){a.addClass(v.element,"drag");}if(v.cfg.getProperty("constraintoviewport")){var y=h.VIEWPORT_OFFSET;x=v.element.offsetHeight;z=v.element.offsetWidth;w=a.getViewportWidth();C=a.getViewportHeight();B=a.getDocumentScrollLeft();A=a.getDocumentScrollTop();if(x+y<C){this.minY=A+y;this.maxY=A+C-x-y;}else{this.minY=A+y;this.maxY=A+y;}if(z+y<w){this.minX=B+y;this.maxX=B+w-z-y;}else{this.minX=B+y;this.maxX=B+y;}this.constrainX=true;this.constrainY=true;}else{this.constrainX=false;this.constrainY=false;}v.dragEvent.fire("startDrag",arguments);};this.dd.onDrag=function(){v.syncPosition();v.cfg.refireEvent("iframe");if(this.platform=="mac"&&YAHOO.env.ua.gecko){this.showMacGeckoScrollbars();}v.dragEvent.fire("onDrag",arguments);};this.dd.endDrag=function(){if(YAHOO.env.ua.ie==6){a.removeClass(v.element,"drag");}v.dragEvent.fire("endDrag",arguments);v.moveEvent.fire(v.cfg.getProperty("xy"));};this.dd.setHandleElId(this.header.id);this.dd.addInvalidHandleType("INPUT");this.dd.addInvalidHandleType("SELECT");this.dd.addInvalidHandleType("TEXTAREA");}},buildMask:function(){var u=this.mask;if(!u){if(!g){g=document.createElement("div");g.className="mask";g.innerHTML="&#160;";}u=g.cloneNode(true);u.id=this.id+"_mask";document.body.insertBefore(u,document.body.firstChild);this.mask=u;if(YAHOO.env.ua.gecko&&this.platform=="mac"){a.addClass(this.mask,"block-scrollbars");}this.stackMask();}},hideMask:function(){if(this.cfg.getProperty("modal")&&this.mask&&this.beforeHideMaskEvent.fire()){this.mask.style.display="none";a.removeClass(document.body,"masked");this.hideMaskEvent.fire();}},showMask:function(){if(this.cfg.getProperty("modal")&&this.mask&&this.beforeShowMaskEvent.fire()){a.addClass(document.body,"masked");this.sizeMask();this.mask.style.display="block";this.showMaskEvent.fire();}},sizeMask:function(){if(this.mask){var v=this.mask,w=a.getViewportWidth(),u=a.getViewportHeight();if(v.offsetHeight>u){v.style.height=u+"px";}if(v.offsetWidth>w){v.style.width=w+"px";}v.style.height=a.getDocumentHeight()+"px";v.style.width=a.getDocumentWidth()+"px";}},stackMask:function(){if(this.mask){var u=a.getStyle(this.element,"zIndex");if(!YAHOO.lang.isUndefined(u)&&!isNaN(u)){a.setStyle(this.mask,"zIndex",u-1);}}},render:function(u){return o.superclass.render.call(this,u,this.innerElement);},_renderHeader:function(u){u=u||this.innerElement;o.superclass._renderHeader.call(this,u);},_renderBody:function(u){u=u||this.innerElement;o.superclass._renderBody.call(this,u);},_renderFooter:function(u){u=u||this.innerElement;o.superclass._renderFooter.call(this,u);},destroy:function(u){h.windowResizeEvent.unsubscribe(this.sizeMask,this);this.removeMask();if(this.close){t.purgeElement(this.close);}o.superclass.destroy.call(this,u);},forceUnderlayRedraw:function(){var v=this.underlay;a.addClass(v,"yui-force-redraw");
+setTimeout(function(){a.removeClass(v,"yui-force-redraw");},0);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(j,i){YAHOO.widget.Dialog.superclass.constructor.call(this,j,i);};var b=YAHOO.util.Event,g=YAHOO.util.CustomEvent,e=YAHOO.util.Dom,a=YAHOO.widget.Dialog,f=YAHOO.lang,h={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},c={"POST_METHOD":{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTONS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};a.CSS_DIALOG="yui-dialog";function d(){var m=this._aButtons,k,l,j;if(f.isArray(m)){k=m.length;if(k>0){j=k-1;do{l=m[j];if(YAHOO.widget.Button&&l instanceof YAHOO.widget.Button){l.destroy();}else{if(l.tagName.toUpperCase()=="BUTTON"){b.purgeElement(l);b.purgeElement(l,false);}}}while(j--);}}}YAHOO.extend(a,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){a.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(c.POST_METHOD.key,{handler:this.configPostMethod,value:c.POST_METHOD.value,validator:function(i){if(i!="form"&&i!="async"&&i!="none"&&i!="manual"){return false;}else{return true;}}});this.cfg.addProperty(c.POST_DATA.key,{value:c.POST_DATA.value});this.cfg.addProperty(c.HIDEAFTERSUBMIT.key,{value:c.HIDEAFTERSUBMIT.value});this.cfg.addProperty(c.BUTTONS.key,{handler:this.configButtons,value:c.BUTTONS.value,supercedes:c.BUTTONS.supercedes});},initEvents:function(){a.superclass.initEvents.call(this);var i=g.LIST;this.beforeSubmitEvent=this.createEvent(h.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=i;this.submitEvent=this.createEvent(h.SUBMIT);this.submitEvent.signature=i;this.manualSubmitEvent=this.createEvent(h.MANUAL_SUBMIT);this.manualSubmitEvent.signature=i;this.asyncSubmitEvent=this.createEvent(h.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=i;this.formSubmitEvent=this.createEvent(h.FORM_SUBMIT);this.formSubmitEvent.signature=i;this.cancelEvent=this.createEvent(h.CANCEL);this.cancelEvent.signature=i;},init:function(j,i){a.superclass.init.call(this,j);this.beforeInitEvent.fire(a);e.addClass(this.element,a.CSS_DIALOG);this.cfg.setProperty("visible",false);if(i){this.cfg.applyConfig(i,true);}this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(a);},doSubmit:function(){var q=YAHOO.util.Connect,r=this.form,l=false,o=false,s,n,m,j;switch(this.cfg.getProperty("postmethod")){case"async":s=r.elements;n=s.length;if(n>0){m=n-1;do{if(s[m].type=="file"){l=true;break;}}while(m--);}if(l&&YAHOO.env.ua.ie&&this.isSecure){o=true;}j=this._getFormAttributes(r);q.setForm(r,l,o);var k=this.cfg.getProperty("postdata");var p=q.asyncRequest(j.method,j.action,this.callback,k);this.asyncSubmitEvent.fire(p);break;case"form":r.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},_getFormAttributes:function(k){var i={method:null,action:null};if(k){if(k.getAttributeNode){var j=k.getAttributeNode("action");var l=k.getAttributeNode("method");if(j){i.action=j.value;}if(l){i.method=l.value;}}else{i.action=k.getAttribute("action");i.method=k.getAttribute("method");}}i.method=(f.isString(i.method)?i.method:"POST").toUpperCase();i.action=f.isString(i.action)?i.action:"";return i;},registerForm:function(){var i=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==i&&e.isAncestor(this.element,this.form)){return;}else{b.purgeElement(this.form);this.form=null;}}if(!i){i=document.createElement("form");i.name="frm_"+this.id;this.body.appendChild(i);}if(i){this.form=i;b.on(i,"submit",this._submitHandler,this,true);}},_submitHandler:function(i){b.stopEvent(i);this.submit();this.form.blur();},setTabLoop:function(i,j){i=i||this.firstButton;j=j||this.lastButton;a.superclass.setTabLoop.call(this,i,j);},_setTabLoop:function(i,j){i=i||this.firstButton;j=this.lastButton||j;this.setTabLoop(i,j);},setFirstLastFocusable:function(){a.superclass.setFirstLastFocusable.call(this);var k,j,m,n=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&n&&n.length>0){j=n.length;for(k=0;k<j;++k){m=n[k];if(this.form===m.form){this.firstFormElement=m;break;}}for(k=j-1;k>=0;--k){m=n[k];if(this.form===m.form){this.lastFormElement=m;break;}}}},configClose:function(j,i,k){a.superclass.configClose.apply(this,arguments);},_doClose:function(i){b.preventDefault(i);this.cancel();},configButtons:function(t,s,n){var o=YAHOO.widget.Button,v=s[0],l=this.innerElement,u,q,k,r,p,j,m;d.call(this);this._aButtons=null;if(f.isArray(v)){p=document.createElement("span");p.className="button-group";r=v.length;this._aButtons=[];this.defaultHtmlButton=null;for(m=0;m<r;m++){u=v[m];if(o){k=new o({label:u.text,type:u.type});k.appendTo(p);q=k.get("element");if(u.isDefault){k.addClass("default");this.defaultHtmlButton=q;}if(f.isFunction(u.handler)){k.set("onclick",{fn:u.handler,obj:this,scope:this});}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){k.set("onclick",{fn:u.handler.fn,obj:((!f.isUndefined(u.handler.obj))?u.handler.obj:this),scope:(u.handler.scope||this)});}}this._aButtons[this._aButtons.length]=k;}else{q=document.createElement("button");q.setAttribute("type","button");if(u.isDefault){q.className="default";this.defaultHtmlButton=q;}q.innerHTML=u.text;if(f.isFunction(u.handler)){b.on(q,"click",u.handler,this,true);}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){b.on(q,"click",u.handler.fn,((!f.isUndefined(u.handler.obj))?u.handler.obj:this),(u.handler.scope||this));}}p.appendChild(q);this._aButtons[this._aButtons.length]=q;}u.htmlButton=q;if(m===0){this.firstButton=q;}if(m==(r-1)){this.lastButton=q;}}this.setFooter(p);j=this.footer;if(e.inDocument(this.element)&&!e.isAncestor(l,j)){l.appendChild(j);}this.buttonSpan=p;}else{p=this.buttonSpan;
+j=this.footer;if(p&&j){j.removeChild(p);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}this.changeContentEvent.fire();},getButtons:function(){return this._aButtons||null;},focusFirst:function(k,i,n){var j=this.firstFormElement,m=false;if(i&&i[1]){b.stopEvent(i[1]);if(i[0]===9&&this.firstElement){j=this.firstElement;}}if(j){try{j.focus();m=true;}catch(l){}}else{if(this.defaultHtmlButton){m=this.focusDefaultButton();}else{m=this.focusFirstButton();}}return m;},focusLast:function(k,i,n){var o=this.cfg.getProperty("buttons"),j=this.lastFormElement,m=false;if(i&&i[1]){b.stopEvent(i[1]);if(i[0]===9&&this.lastElement){j=this.lastElement;}}if(o&&f.isArray(o)){m=this.focusLastButton();}else{if(j){try{j.focus();m=true;}catch(l){}}}return m;},_getButton:function(j){var i=YAHOO.widget.Button;if(i&&j&&j.nodeName&&j.id){j=i.getButton(j.id)||j;}return j;},focusDefaultButton:function(){var i=this._getButton(this.defaultHtmlButton),k=false;if(i){try{i.focus();k=true;}catch(j){}}return k;},blurButtons:function(){var o=this.cfg.getProperty("buttons"),l,n,k,j;if(o&&f.isArray(o)){l=o.length;if(l>0){j=(l-1);do{n=o[j];if(n){k=this._getButton(n.htmlButton);if(k){try{k.blur();}catch(m){}}}}while(j--);}}},focusFirstButton:function(){var m=this.cfg.getProperty("buttons"),k,i,l=false;if(m&&f.isArray(m)){k=m[0];if(k){i=this._getButton(k.htmlButton);if(i){try{i.focus();l=true;}catch(j){}}}}return l;},focusLastButton:function(){var n=this.cfg.getProperty("buttons"),j,l,i,m=false;if(n&&f.isArray(n)){j=n.length;if(j>0){l=n[(j-1)];if(l){i=this._getButton(l.htmlButton);if(i){try{i.focus();m=true;}catch(k){}}}}}return m;},configPostMethod:function(j,i,k){this.registerForm();},validate:function(){return true;},submit:function(){if(this.validate()){if(this.beforeSubmitEvent.fire()){this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide();}return true;}else{return false;}}else{return false;}},cancel:function(){this.cancelEvent.fire();this.hide();},getData:function(){var A=this.form,k,t,w,m,u,r,q,j,x,l,y,B,p,C,o,z,v;function s(n){var i=n.tagName.toUpperCase();return((i=="INPUT"||i=="TEXTAREA"||i=="SELECT")&&n.name==m);}if(A){k=A.elements;t=k.length;w={};for(z=0;z<t;z++){m=k[z].name;u=e.getElementsBy(s,"*",A);r=u.length;if(r>0){if(r==1){u=u[0];q=u.type;j=u.tagName.toUpperCase();switch(j){case"INPUT":if(q=="checkbox"){w[m]=u.checked;}else{if(q!="radio"){w[m]=u.value;}}break;case"TEXTAREA":w[m]=u.value;break;case"SELECT":x=u.options;l=x.length;y=[];for(v=0;v<l;v++){B=x[v];if(B.selected){o=B.attributes.value;y[y.length]=(o&&o.specified)?B.value:B.text;}}w[m]=y;break;}}else{q=u[0].type;switch(q){case"radio":for(v=0;v<r;v++){p=u[v];if(p.checked){w[m]=p.value;break;}}break;case"checkbox":y=[];for(v=0;v<r;v++){C=u[v];if(C.checked){y[y.length]=C.value;}}w[m]=y;break;}}}}}return w;},destroy:function(i){d.call(this);this._aButtons=null;var j=this.element.getElementsByTagName("form"),k;if(j.length>0){k=j[0];if(k){b.purgeElement(k);if(k.parentNode){k.parentNode.removeChild(k);}this.form=null;}}a.superclass.destroy.call(this,i);},toString:function(){return"Dialog "+this.id;}});}());(function(){YAHOO.widget.SimpleDialog=function(e,d){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,e,d);};var c=YAHOO.util.Dom,b=YAHOO.widget.SimpleDialog,a={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};b.ICON_BLOCK="blckicon";b.ICON_ALARM="alrticon";b.ICON_HELP="hlpicon";b.ICON_INFO="infoicon";b.ICON_WARN="warnicon";b.ICON_TIP="tipicon";b.ICON_CSS_CLASSNAME="yui-icon";b.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(b,YAHOO.widget.Dialog,{initDefaultConfig:function(){b.superclass.initDefaultConfig.call(this);this.cfg.addProperty(a.ICON.key,{handler:this.configIcon,value:a.ICON.value,suppressEvent:a.ICON.suppressEvent});this.cfg.addProperty(a.TEXT.key,{handler:this.configText,value:a.TEXT.value,suppressEvent:a.TEXT.suppressEvent,supercedes:a.TEXT.supercedes});},init:function(e,d){b.superclass.init.call(this,e);this.beforeInitEvent.fire(b);c.addClass(this.element,b.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(d){this.cfg.applyConfig(d,true);}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(b);},registerForm:function(){b.superclass.registerForm.call(this);var e=this.form.ownerDocument,d=e.createElement("input");d.type="hidden";d.name=this.id;d.value="";this.form.appendChild(d);},configIcon:function(k,j,h){var d=j[0],e=this.body,f=b.ICON_CSS_CLASSNAME,l,i,g;if(d&&d!="none"){l=c.getElementsByClassName(f,"*",e);if(l.length===1){i=l[0];g=i.parentNode;if(g){g.removeChild(i);i=null;}}if(d.indexOf(".")==-1){i=document.createElement("span");i.className=(f+" "+d);i.innerHTML="&#160;";}else{i=document.createElement("img");i.src=(this.imageRoot+d);i.className=f;}if(i){e.insertBefore(i,e.firstChild);}}},configText:function(e,d,f){var g=d[0];if(g){this.setBody(g);this.cfg.refireEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(function(){YAHOO.widget.ContainerEffect=function(e,h,g,d,f){if(!f){f=YAHOO.util.Anim;}this.overlay=e;this.attrIn=h;this.attrOut=g;this.targetElement=d||e.element;this.animClass=f;};var b=YAHOO.util.Dom,c=YAHOO.util.CustomEvent,a=YAHOO.widget.ContainerEffect;a.FADE=function(d,f){var g=YAHOO.util.Easing,i={attributes:{opacity:{from:0,to:1}},duration:f,method:g.easeIn},e={attributes:{opacity:{to:0}},duration:f,method:g.easeOut},h=new a(d,i,e,d.element);h.handleUnderlayStart=function(){var k=this.overlay.underlay;if(k&&YAHOO.env.ua.ie){var j=(k.filters&&k.filters.length>0);if(j){b.addClass(d.element,"yui-effect-fade");}}};h.handleUnderlayComplete=function(){var j=this.overlay.underlay;if(j&&YAHOO.env.ua.ie){b.removeClass(d.element,"yui-effect-fade");}};h.handleStartAnimateIn=function(k,j,l){l.overlay._fadingIn=true;b.addClass(l.overlay.element,"hide-select");if(!l.overlay.underlay){l.overlay.cfg.refireEvent("underlay");
+}l.handleUnderlayStart();l.overlay._setDomVisibility(true);b.setStyle(l.overlay.element,"opacity",0);};h.handleCompleteAnimateIn=function(k,j,l){l.overlay._fadingIn=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateInCompleteEvent.fire();};h.handleStartAnimateOut=function(k,j,l){l.overlay._fadingOut=true;b.addClass(l.overlay.element,"hide-select");l.handleUnderlayStart();};h.handleCompleteAnimateOut=function(k,j,l){l.overlay._fadingOut=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.overlay._setDomVisibility(false);b.setStyle(l.overlay.element,"opacity",1);l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateOutCompleteEvent.fire();};h.init();return h;};a.SLIDE=function(f,d){var i=YAHOO.util.Easing,l=f.cfg.getProperty("x")||b.getX(f.element),k=f.cfg.getProperty("y")||b.getY(f.element),m=b.getClientWidth(),h=f.element.offsetWidth,j={attributes:{points:{to:[l,k]}},duration:d,method:i.easeIn},e={attributes:{points:{to:[(m+25),k]}},duration:d,method:i.easeOut},g=new a(f,j,e,f.element,YAHOO.util.Motion);g.handleStartAnimateIn=function(o,n,p){p.overlay.element.style.left=((-25)-h)+"px";p.overlay.element.style.top=k+"px";};g.handleTweenAnimateIn=function(q,p,r){var s=b.getXY(r.overlay.element),o=s[0],n=s[1];if(b.getStyle(r.overlay.element,"visibility")=="hidden"&&o<l){r.overlay._setDomVisibility(true);}r.overlay.cfg.setProperty("xy",[o,n],true);r.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateIn=function(o,n,p){p.overlay.cfg.setProperty("xy",[l,k],true);p.startX=l;p.startY=k;p.overlay.cfg.refireEvent("iframe");p.animateInCompleteEvent.fire();};g.handleStartAnimateOut=function(o,n,r){var p=b.getViewportWidth(),s=b.getXY(r.overlay.element),q=s[1];r.animOut.attributes.points.to=[(p+25),q];};g.handleTweenAnimateOut=function(p,o,q){var s=b.getXY(q.overlay.element),n=s[0],r=s[1];q.overlay.cfg.setProperty("xy",[n,r],true);q.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateOut=function(o,n,p){p.overlay._setDomVisibility(false);p.overlay.cfg.setProperty("xy",[l,k]);p.animateOutCompleteEvent.fire();};g.init();return g;};a.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=c.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=c.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=c.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=c.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateOutEvent.fire();this.animOut.animate();},lastFrameOnStop:true,_stopAnims:function(d){if(this.animOut&&this.animOut.isAnimated()){this.animOut.stop(d);}if(this.animIn&&this.animIn.isAnimated()){this.animIn.stop(d);}},handleStartAnimateIn:function(e,d,f){},handleTweenAnimateIn:function(e,d,f){},handleCompleteAnimateIn:function(e,d,f){},handleStartAnimateOut:function(e,d,f){},handleTweenAnimateOut:function(e,d,f){},handleCompleteAnimateOut:function(e,d,f){},toString:function(){var d="ContainerEffect";if(this.overlay){d+=" ["+this.overlay.toString()+"]";}return d;}};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider);})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.9.0",build:"2800"});
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2.dashboard.html	(revision 5888)
@@ -0,0 +1,129 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>oauth2</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [4,0,0,0,0,0,0,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[0,130,"<a href=\"library_oauth2_lib_OAuth2.php.html#44\">OAuth2<\/a>"],[0,4,"<a href=\"library_oauth2_lib_OAuth2AuthenticateException.php.html#11\">OAuth2AuthenticateException<\/a>"],[0,14,"<a href=\"library_oauth2_lib_OAuth2RedirectException.php.html#10\">OAuth2RedirectException<\/a>"],[0,8,"<a href=\"library_oauth2_lib_OAuth2ServerException.php.html#8\">OAuth2ServerException<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">oauth2</td></tr>
+      <tr><td><div align="center"><p><a href="library_oauth2.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#44">OAuth2</a> (17030)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#10">OAuth2RedirectException</a> (210)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#8">OAuth2ServerException</a> (72)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#11">OAuth2AuthenticateException</a> (20)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#52">OAuth2AuthenticateException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#32">OAuth2RedirectException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#30">OAuth2AuthenticateException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1357">OAuth2::validateRedirectUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1328">OAuth2::getAuthorizationHeader</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1343">OAuth2::sendJsonHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#47">OAuth2RedirectException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#66">OAuth2RedirectException::buildUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#71">OAuth2ServerException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#79">OAuth2ServerException::__toString</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib.html	(revision 5888)
@@ -0,0 +1,196 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>lib</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">lib</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_oauth2.html">oauth2</a>/<a href="library_oauth2_lib.html">lib</a> (<a href="library_oauth2_lib.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 296</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="library_oauth2_lib_OAuth2.php.html">OAuth2.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 252</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 19</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="library_oauth2_lib_OAuth2AuthenticateException.php.html">OAuth2AuthenticateException.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 11</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="library_oauth2_lib_OAuth2RedirectException.php.html">OAuth2RedirectException.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 16</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="library_oauth2_lib_OAuth2ServerException.php.html">OAuth2ServerException.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 17</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_oauth.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_oauth.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_oauth.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>oauth</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">oauth</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="rest.html">rest</a>/<a href="rest_oauth.html">oauth</a> (<a href="rest_oauth.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.88%">
+              <div class="size butter"  style="width:50.877192982456%" title="50.88%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.88%</td>
+          <td class="coverNumMed">29 / 57</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="36.36%">
+                <div class="size butter"  style="width:36.363636363636%" title="36.36%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">36.36%</td>
+          <td class="coverNumMed">4 / 11</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="rest_oauth_OAuth2StorageUserCredential.php.html">OAuth2StorageUserCredential.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.88%">
+              <div class="size butter"  style="width:50.877192982456%" title="50.88%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.88%</td>
+          <td class="coverNumMed">29 / 57</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="36.36%">
+                <div class="size butter"  style="width:36.363636363636%" title="36.36%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">36.36%</td>
+          <td class="coverNumMed">4 / 11</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>rest</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">rest</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="rest.html">rest</a> (<a href="rest.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.88%">
+              <div class="size butter"  style="width:50.877192982456%" title="50.88%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.88%</td>
+          <td class="coverNumMed">29 / 57</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="36.36%">
+                <div class="size butter"  style="width:36.363636363636%" title="36.36%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">36.36%</td>
+          <td class="coverNumMed">4 / 11</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="rest_oauth.html">oauth</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.88%">
+              <div class="size butter"  style="width:50.877192982456%" title="50.88%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.88%</td>
+          <td class="coverNumMed">29 / 57</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="36.36%">
+                <div class="size butter"  style="width:36.363636363636%" title="36.36%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">36.36%</td>
+          <td class="coverNumMed">4 / 11</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_mail.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_mail.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_mail.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>mail</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">mail</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="rest.html">rest</a>/<a href="rest_mail.html">mail</a> (<a href="rest_mail.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 27</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="rest_mail_MailLastResource.php.html">MailLastResource.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 27</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 14:52:11 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_service.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_service.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_service.php.html	(revision 5888)
@@ -0,0 +1,229 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>service.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">service.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="api.html">api</a>/<a href="api_service.php.html">service.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="100.00%">
+                <div class="size snow"  style="width:100%" title="100.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerNone">100.00%</td>
+          <td class="coverNumNone">&nbsp;</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size snow"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerNone">100.00%</td>
+          <td class="coverNumNone">&nbsp;</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                      
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                            
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                :                                                                                            
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : // interface Service                                                                       
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                : // {                                                                                       
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                : // //---------------                                                                       
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                : //                                                                                         
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                : //     public function load   ( $concept, $parents = false, $id = false );                 
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                : //                                                                                         
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                : // //---------------                                                                       
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                : //                                                                                         
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                : //     public function search ( $justthese = false, $params = false, $criteria = false );  
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                : //                                                                                         
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                : // //---------------                                                                       
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                : //                                                                                         
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                : //     public function delete ( $justthese = false, $params = false, $criteria = false );  
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                : //                                                                                         
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                : // //---------------                                                                       
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                : //                                                                                         
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                : //     public function update ( $data,              $params = false, $criteria = false );  
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                : //                                                                                         
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                : // //---------------                                                                       
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                : //                                                                                         
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                : //     public function create ( $data,              $params = false );                     
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                : //                                                                                         
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                : // //---------------                                                                       
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                : //                                                                                         
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                : //     public function connect( $config );                                                 
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                : //                                                                                         
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                : //     public function close();                                                            
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                : //                                                                                         
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                : //     public function setup();                                                            
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                : //                                                                                         
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                : //     public function teardown();                                                         
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                : // }                                                                                       
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :                                                                                            
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :                                                                                            
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineCov">              1 : interface Service                                                                          </span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                : {                                                                                          
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                : //---------------                                                                          
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :                                                                                            
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :     public function find     ( $uri, $justthese = false, $criteria = false );              
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :                                                                                            
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :     public function read     ( $uri, $justthese = false/*, $criteria = false*/ );          
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :                                                                                            
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                : //---------------                                                                          
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :                                                                                            
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :     public function deleteAll( $uri, $justthese = false, $criteria = false );              
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :                                                                                            
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :     public function delete   ( $uri, $justthese = false/*, $criteria = false*/ );// avaliar
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :                                                                                            
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                : //---------------                                                                          
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :                                                                                            
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :     public function replace  ( $uri, $data, $criteria = false );                           
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :                                                                                            
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span>                :     public function update   ( $uri, $data/*, $criteria = false*/ );                       
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :                                                                                            
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                : //---------------                                                                          
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :                                                                                            
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :     public function create   ( $uri, $data/*, $criteria = false*/ );                       
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :                                                                                            
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                : //---------------                                                                          
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :                                                                                            
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :     public function open     ( $config );                                                  
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :                                                                                            
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :     public function close    ();                                                           
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :                                                                                            
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :                                                                                            
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :     public function begin     ( $uri );                                                    
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                :                                                                                            
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                :     public function commit    ( $uri );                                                    
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span>                :                                                                                            
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                :     public function rollback  ( $uri );                                                    
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span>                :                                                                                            
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :                                                                                            
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :     public function setup     ();                                                          
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :                                                                                            
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                :     public function teardown  ();                                                          
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel38": {
+          "header": "1 test covers line 38",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_config.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_config.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_config.php.html	(revision 5888)
@@ -0,0 +1,475 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>config.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">config.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="api.html">api</a>/<a href="api_config.php.html">config.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="42.86%">
+                <div class="size butter"  style="width:42.857142857143%" title="42.86%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">42.86%</td>
+          <td class="coverNumMed">3 / 7</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="56.00%">
+                <div class="size butter"  style="width:56%" title="56.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">56.00%</td>
+          <td class="coverNumMed">14 / 25</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">Config</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="42.86%">
+                <div class="size butter"  style="width:42.857142857143%" title="42.86%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">42.86%</td>
+          <td class="coverNumMed">3 / 7</td>
+          <td class="crap">58.57</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="56.00%">
+                <div class="size butter"  style="width:56%" title="56.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">56.00%</td>
+          <td class="coverNumMed">14 / 25</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#8">module($config , $module = false)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#21">me($config)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#26">service( $service , $config )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">3 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#34">get( $concept , $config = false , $module = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">3 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#43">regSet( $name , $value)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#47">regGet ($name )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#52">init( )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">4.43</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="70.00%">
+                  <div class="size chameleon"  style="width:70%" title="70.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">70.00%</td>
+          <td class="coverNumHi">7 / 10</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                           
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : class Config                                                                                                    
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : {                                                                                                               
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :     static $register;                                                                                           
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :     static $sessionStarted;                                                                                     
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :     static function module($config , $module = false)                                                           
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :         //Todo: registrar na nova api o currentapp                                                              
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span><span class="lineNoCov">              0 :         if(!$module)                                                                                            </span>
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span><span class="lineNoCov">              0 :             $module =  $_SESSION['flags']['currentapp'];                                                        </span>
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span><span class="lineNoCov">              0 :         if( !isset( $_SESSION['config'][$module] ) || !isset( $_SESSION['config'][$module][$config] ))          </span>
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span><span class="lineNoCov">              0 :             $_SESSION['config'][$module] = parse_ini_file( ROOTPATH.&quot;/config/$module.ini&quot;, true );              </span>
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span><span class="lineNoCov">              0 :         return isset($_SESSION['config'][$module][$config]) ? $_SESSION['config'][$module][$config] : false;    </span>
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :     }                                                                                                           
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :     static function me($config)                                                                                 
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span><span class="lineCov">              2 :         return isset($_SESSION['wallet']['user'][$config]) ? $_SESSION['wallet']['user'][$config] : false;      </span>
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :     }                                                                                                           
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :     static function service( $service , $config )                                                               
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span><span class="lineCov">              2 :         if( !isset( $_SESSION['wallet'][$service] ) || !isset( $_SESSION['wallet'][$service][$config] ))        </span>
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span><span class="lineCov">              2 :             $_SESSION['wallet'][$service] = parse_ini_file( ROOTPATH.&quot;/config/$service.srv&quot;, true );            </span>
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span><span class="lineCov">              2 :         return (isset($_SESSION['wallet'][$service][$config])) ? $_SESSION['wallet'][$service][$config] : false;</span>
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :     }                                                                                                           
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :     static function get( $concept , $config = false , $module = false )                                         
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span><span class="lineCov">              2 :         $load = parse_ini_file( ROOTPATH.&quot;/config/$concept.ini&quot;, true );                                        </span>
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineCov">              2 :         if($config === false) return $load;                                                                     </span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span><span class="lineCov">              2 :         return (isset($load[$config])) ? $load[$config] : false;                                                </span>
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :     }                                                                                                           
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :     static function regSet( $name , $value)                                                                     
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span><span class="lineNoCov">              0 :         self::$register[$name] = $value;                                                                        </span>
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span><span class="lineNoCov">              0 :     }                                                                                                           </span>
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :     static function regGet ($name )                                                                             
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span><span class="lineNoCov">              0 :         return (isset(self::$register[$name]) ? self::$register[$name] : false );                               </span>
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :     }                                                                                                           
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :     static function init( )                                                                                     
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :     {                                                                                                           
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span><span class="lineCov">              1 :         if( !defined( 'ROOTPATH' ) )                                                                            </span>
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span><span class="lineCov">              1 :             define( 'ROOTPATH', dirname(__FILE__).'/..' );                                                      </span>
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span><span class="lineCov">              1 :         if ( isset( $_COOKIE[ 'sessionid' ] ) )                                                                 </span>
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span><span class="lineCov">              1 :         {                                                                                                       </span>
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span><span class="lineNoCov">              0 :             session_id( $_COOKIE[ 'sessionid' ] );                                                              </span>
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span><span class="lineNoCov">              0 :             $GLOBALS['phpgw']-&gt;session-&gt;sessionid = $_COOKIE[ 'sessionid' ];                                    </span>
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span><span class="lineNoCov">              0 :         }                                                                                                       </span>
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span><span class="lineCov">              1 :     if( !self::$sessionStarted )                                                                                </span>
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span><span class="lineCov">              1 :             self::$sessionStarted = session_start();                                                            </span>
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                : //    if( $header === true )                                                                                    
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                : //    {                                                                                                         
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                : //            require_once (dirname(__FILE__).'/../../header.inc.php');                                         
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                : //            $_SESSION['wallet']['Sieve']['user']          =  $GLOBALS['phpgw_info']['user']['account_lid'];   
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span>                : //            $_SESSION['wallet']['Sieve']['password']      =  $GLOBALS['phpgw_info']['user']['passwd'];        
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span>                : //            $_SESSION['wallet']['Cyrus']['user']          =  $GLOBALS['phpgw_info']['user']['account_lid'];   
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                : //            $_SESSION['wallet']['Cyrus']['password']      =  $GLOBALS['phpgw_info']['user']['passwd'];        
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                : //            $_SESSION['wallet']['user']['uid']                =  $GLOBALS['phpgw_info']['user']['userid'];    
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                : //            $_SESSION['wallet']['user']['uidNumber']      =  $GLOBALS['phpgw_info']['user']['account_id'];    
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                : //            $_SESSION['wallet']['user']['password']       =  $GLOBALS['phpgw_info']['user']['passwd'];        
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span>                : //            $_SESSION['wallet']['user']['cn']             =  $GLOBALS['phpgw_info']['user']['cn'];            
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                : //            $_SESSION['wallet']['user']['mail']           =  $GLOBALS['phpgw_info']['user']['email'];         
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                : //            $_SESSION['wallet']['PostgreSQL']['user']     = $GLOBALS['phpgw_info']['server']['db_user'];      
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                : //            $_SESSION['wallet']['PostgreSQL']['password'] = $GLOBALS['phpgw_info']['server']['db_pass'];      
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                : //            $_SESSION['wallet']['PostgreSQL']['dbname']   = $GLOBALS['phpgw_info']['server']['db_name'];      
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span>                : //            $_SESSION['wallet']['PostgreSQL']['host']     = $GLOBALS['phpgw_info']['server']['db_host'];      
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span>                : //            $_SESSION['wallet']['OpenLDAP']['context']   =  $GLOBALS['phpgw_info']['server']['ldap_context']; 
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                : //            $_SESSION['wallet']['OpenLDAP']['host']      =  $GLOBALS['phpgw_info']['server']['ldap_host'];    
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                : //                                                                                                              
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                : //    }                                                                                                         
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span><span class="lineCov">              1 :     }                                                                                                           </span>
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                : }                                                                                                               
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :     Config::init();                                                                                             
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :                                                                                                                 
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                : ?&gt;                                                                                                              
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel23": {
+          "header": "2 tests cover line 23",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel28": {
+          "header": "2 tests cover line 28",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel29": {
+          "header": "2 tests cover line 29",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel31": {
+          "header": "2 tests cover line 31",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel36": {
+          "header": "2 tests cover line 36",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel38": {
+          "header": "2 tests cover line 38",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel40": {
+          "header": "2 tests cover line 40",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel55": {
+          "header": "1 test covers line 55",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel56": {
+          "header": "1 test covers line 56",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel58": {
+          "header": "1 test covers line 58",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel59": {
+          "header": "1 test covers line 59",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel64": {
+          "header": "1 test covers line 64",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel65": {
+          "header": "1 test covers line 65",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel93": {
+          "header": "1 test covers line 93",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib_OAuth2.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib_OAuth2.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib_OAuth2.php.html	(revision 5888)
@@ -0,0 +1,1915 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>OAuth2.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">OAuth2.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_oauth2.html">oauth2</a>/<a href="library_oauth2_lib.html">lib</a>/<a href="library_oauth2_lib_OAuth2.php.html">OAuth2.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 19</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 252</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">OAuth2</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="5.00%">
+                <div class="size scarlet_red"  style="width:5%" title="5.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">5.00%</td>
+          <td class="coverNumLo">1 / 20</td>
+          <td class="crap">17030</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 252</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#340">__construct(IOAuth2Storage $storage, $config = array()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#353">setDefaultOptions()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 11</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#377">getVariable($name, $default = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#391">setVariable($name, $value)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#427">verifyAccessToken($token_param, $scope = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">132</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 17</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#490">getBearerToken()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">0 / 0</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#557">checkScope($required_scope, $available_scope)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 7</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#759">grantAccessToken(array $inputData = NULL, array $authHeaders = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">1980</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 100</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#970">getClientCredentials(array $inputData, array $authHeaders)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1005">getAuthorizeParams(array $inputData = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">342</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 32</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1101">finishClientAuthorization($is_authorized, $user_id = NULL, $params = array()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 15</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1143">doRedirectUriCallback($redirect_uri, $params)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1162">buildUri($uri, $params)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">132</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 16</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1227">createAccessToken($client_id, $user_id, $scope = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 14</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1269">createAuthCode($client_id, $user_id, $redirect_uri, $scope = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1287">genAccessToken()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1309">genAuthCode()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1328">getAuthorizationHeader()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1343">sendJsonHeaders()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#1357">validateRedirectUri($inputUri, $storedUri)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                : require_once ROOTPATH . '/library/oauth2/lib/OAuth2ServerException.php';                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : require_once ROOTPATH . '/library/oauth2/lib/OAuth2AuthenticateException.php';                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : require_once ROOTPATH . '/library/oauth2/lib/OAuth2RedirectException.php';                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                : /**                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :  * @mainpage                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :  * OAuth 2.0 server in PHP, originally written for                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :  * &lt;a href=&quot;http://www.opendining.net/&quot;&gt; Open Dining&lt;/a&gt;. Supports                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :  * &lt;a href=&quot;http://tools.ietf.org/html/draft-ietf-oauth-v2-20&quot;&gt;IETF draft v20&lt;/a&gt;.                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :  * Source repo has sample servers implementations for                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :  * &lt;a href=&quot;http://php.net/manual/en/book.pdo.php&quot;&gt; PHP Data Objects&lt;/a&gt; and                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :  * &lt;a href=&quot;http://www.mongodb.org/&quot;&gt;MongoDB&lt;/a&gt;. Easily adaptable to other                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :  * storage engines.                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :  * PHP Data Objects supports a variety of databases, including MySQL,                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :  * Microsoft SQL Server, SQLite, and Oracle, so you can try out the sample                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :  * to see how it all works.                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :  * We're expanding the wiki to include more helpful documentation, but for                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :  * now, your best bet is to view the oauth.php source - it has lots of                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :  * comments.                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :  * @author Tim Ridgely &lt;tim.ridgely@gmail.com&gt;                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :  * @author Aaron Parecki &lt;aaron@parecki.com&gt;                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :  * @author Edison Wong &lt;hswong3i@pantarei-design.com&gt;                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :  * @author David Rochwerger &lt;catch.dave@gmail.com&gt;                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :  * @see http://code.google.com/p/oauth2-php/                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :  * @see https://github.com/quizlet/oauth2-php                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :  */                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                : /**                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :  * OAuth2.0 draft v20 server-side implementation.                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :  * @todo Add support for Message Authentication Code (MAC) token type.                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :  * @author Originally written by Tim Ridgely &lt;tim.ridgely@gmail.com&gt;.                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                :  * @author Updated to draft v10 by Aaron Parecki &lt;aaron@parecki.com&gt;.                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :  * @author Debug, coding style clean up and documented by Edison Wong &lt;hswong3i@pantarei-design.com&gt;.                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :  * @author Refactored (including separating from raw POST/GET) and updated to draft v20 by David Rochwerger &lt;catch.dave@gmail.com&gt;.                                                                                                                                                                                                                      
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :  */                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                : class OAuth2 {                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :      * Array of persistent variables stored.                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :     protected $conf = array();                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :      * Storage engine for authentication server                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :      * @var IOAuth2Storage                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span>                :     protected $storage;                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :      * Keep track of the old refresh token. So we can unset                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :      * the old refresh tokens when a new one is issued.                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :      * @var string                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :     protected $oldRefreshToken;                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :      * Default values for configuration options.                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :      * @var int                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                :      * @see OAuth2::setDefaultOptions()                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span>                :     const DEFAULT_ACCESS_TOKEN_LIFETIME = 3600;                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                :     const DEFAULT_REFRESH_TOKEN_LIFETIME = 1209600;                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span>                :     const DEFAULT_AUTH_CODE_LIFETIME = 3600;                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :     const DEFAULT_WWW_REALM = 'Service';                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                :      * Configurable options.                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span>                :      * @var string                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span>                :     const CONFIG_ACCESS_LIFETIME = 3600; // The lifetime of access token in seconds.                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                :     const CONFIG_REFRESH_LIFETIME = 3600; // The lifetime of refresh token in seconds.                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                :     const CONFIG_AUTH_LIFETIME = 3600; // The lifetime of auth code in seconds.                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                :     const CONFIG_SUPPORTED_SCOPES = 'supported_scopes'; // Array of scopes you want to support                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span>                :     const CONFIG_TOKEN_TYPE = 'token_type'; // Token type to respond with. Currently only &quot;Bearer&quot; supported.                                                                                                                                                                                                                                            
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span>                :     const CONFIG_WWW_REALM = 'realm';                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span>                :     const CONFIG_ENFORCE_INPUT_REDIRECT = 'enforce_redirect'; // Set to true to enforce redirect_uri on input for both authorize and token steps.                                                                                                                                                                                                        
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                :     const CONFIG_ENFORCE_STATE = 'enforce_state'; // Set to true to enforce state to be passed in authorization (see http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-10.12)                                                                                                                                                                    
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span>                :      * Regex to filter out the client identifier (described in Section 2 of IETF draft).                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                :      * IETF draft does not prescribe a format for these, however I've arbitrarily                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                :      * chosen alphanumeric strings with hyphens and underscores, 3-32 characters                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :      * long.                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :      * Feel free to change.                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span>                :     const CLIENT_ID_REGEXP = '/^[a-z0-9-_]{3,32}$/i';                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span>                :      * @defgroup oauth2_section_5 Accessing a Protected Resource                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                :      * @{                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span>                :      * Clients access protected resources by presenting an access token to                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span>                :      * the resource server. Access tokens act as bearer tokens, where the                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span>                :      * token string acts as a shared symmetric secret. This requires                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span>                :      * treating the access token with the same care as other secrets (e.g.                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111">     111</a> </span>                :      * end-user passwords). Access tokens SHOULD NOT be sent in the clear                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112">     112</a> </span>                :      * over an insecure channel.                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113">     113</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114">     114</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-7                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115">     115</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116">     116</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117">     117</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118">     118</a> </span>                :      * Used to define the name of the OAuth access token parameter                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119">     119</a> </span>                :      * (POST &amp; GET). This is for the &quot;bearer&quot; token type.                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120">     120</a> </span>                :      * Other token types may use different methods and names.                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121">     121</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122">     122</a> </span>                :      * IETF Draft section 2 specifies that it should be called &quot;access_token&quot;                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123">     123</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124">     124</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-06#section-2.2                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125">     125</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-06#section-2.3                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126">     126</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127">     127</a> </span>                :     const TOKEN_PARAM_NAME = 'access_token';                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128">     128</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129">     129</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130">     130</a> </span>                :      * When using the bearer token type, there is a specifc Authorization header                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131">     131</a> </span>                :      * required: &quot;Bearer&quot;                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132">     132</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133">     133</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-04#section-2.1                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134">     134</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135">     135</a> </span>                :     const TOKEN_BEARER_HEADER_NAME = 'Bearer';                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136">     136</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container137"><a name="137"></a><a href="#137" id="line137">     137</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138">     138</a> </span>                :      * @}                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139">     139</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140">     140</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141">     141</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142">     142</a> </span>                :      * @defgroup oauth2_section_4 Obtaining Authorization                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143">     143</a> </span>                :      * @{                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144">     144</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145">     145</a> </span>                :      * When the client interacts with an end-user, the end-user MUST first                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146">     146</a> </span>                :      * grant the client authorization to access its protected resources.                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147">     147</a> </span>                :      * Once obtained, the end-user authorization grant is expressed as an                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148">     148</a> </span>                :      * authorization code which the client uses to obtain an access token.                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149">     149</a> </span>                :      * To obtain an end-user authorization, the client sends the end-user to                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150">     150</a> </span>                :      * the end-user authorization endpoint.                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151">     151</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152">     152</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153">     153</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154">     154</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155">     155</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156">     156</a> </span>                :      * List of possible authentication response types.                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157">     157</a> </span>                :      * The &quot;authorization_code&quot; mechanism exclusively supports 'code'                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158">     158</a> </span>                :      * and the &quot;implicit&quot; mechanism exclusively supports 'token'.                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159">     159</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160">     160</a> </span>                :      * @var string                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161">     161</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.1                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162">     162</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.1                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163">     163</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164">     164</a> </span>                :     const RESPONSE_TYPE_AUTH_CODE = 'code';                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165">     165</a> </span>                :     const RESPONSE_TYPE_ACCESS_TOKEN = 'token';                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166">     166</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167">     167</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168">     168</a> </span>                :      * @}                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169">     169</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170">     170</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171">     171</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172">     172</a> </span>                :      * @defgroup oauth2_section_5 Obtaining an Access Token                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173">     173</a> </span>                :      * @{                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174">     174</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175">     175</a> </span>                :      * The client obtains an access token by authenticating with the                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176">     176</a> </span>                :      * authorization server and presenting its authorization grant (in the form of                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177">     177</a> </span>                :      * an authorization code, resource owner credentials, an assertion, or a                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178">     178</a> </span>                :      * refresh token).                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179">     179</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180">     180</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181">     181</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182">     182</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183">     183</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184">     184</a> </span>                :      * Grant types support by draft 20                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185">     185</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186">     186</a> </span>                :     const GRANT_TYPE_AUTH_CODE = 'authorization_code';                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187">     187</a> </span>                :     const GRANT_TYPE_IMPLICIT = 'token';                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188">     188</a> </span>                :     const GRANT_TYPE_USER_CREDENTIALS = 'password';                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189">     189</a> </span>                :     const GRANT_TYPE_CLIENT_CREDENTIALS = 'client_credentials';                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190">     190</a> </span>                :     const GRANT_TYPE_REFRESH_TOKEN = 'refresh_token';                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191">     191</a> </span>                :     const GRANT_TYPE_EXTENSIONS = 'extensions';                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192">     192</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193">     193</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194">     194</a> </span>                :      * Regex to filter out the grant type.                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195">     195</a> </span>                :      * NB: For extensibility, the grant type can be a URI                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196">     196</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.5                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197">     197</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198">     198</a> </span>                :     const GRANT_TYPE_REGEXP = '#^(authorization_code|token|password|client_credentials|refresh_token|http://.*)$#';                                                                                                                                                                                                                                      
+<span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199">     199</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200">     200</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201">     201</a> </span>                :      * @}                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202">     202</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203">     203</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204">     204</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205">     205</a> </span>                :      * Possible token types as defined by draft 20.                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container206"><a name="206"></a><a href="#206" id="line206">     206</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container207"><a name="207"></a><a href="#207" id="line207">     207</a> </span>                :      * TODO: Add support for mac (and maybe other types?)                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container208"><a name="208"></a><a href="#208" id="line208">     208</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container209"><a name="209"></a><a href="#209" id="line209">     209</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-7.1                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container210"><a name="210"></a><a href="#210" id="line210">     210</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container211"><a name="211"></a><a href="#211" id="line211">     211</a> </span>                :     const TOKEN_TYPE_BEARER = 'bearer';                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container212"><a name="212"></a><a href="#212" id="line212">     212</a> </span>                :     const TOKEN_TYPE_MAC = 'mac'; // Currently unsupported                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container213"><a name="213"></a><a href="#213" id="line213">     213</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container214"><a name="214"></a><a href="#214" id="line214">     214</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container215"><a name="215"></a><a href="#215" id="line215">     215</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container216"><a name="216"></a><a href="#216" id="line216">     216</a> </span>                :      * @defgroup self::HTTP_status HTTP status code                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container217"><a name="217"></a><a href="#217" id="line217">     217</a> </span>                :      * @{                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container218"><a name="218"></a><a href="#218" id="line218">     218</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container219"><a name="219"></a><a href="#219" id="line219">     219</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container220"><a name="220"></a><a href="#220" id="line220">     220</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container221"><a name="221"></a><a href="#221" id="line221">     221</a> </span>                :      * HTTP status codes for successful and error states as specified by draft 20.                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container222"><a name="222"></a><a href="#222" id="line222">     222</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container223"><a name="223"></a><a href="#223" id="line223">     223</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container224"><a name="224"></a><a href="#224" id="line224">     224</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container225"><a name="225"></a><a href="#225" id="line225">     225</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container226"><a name="226"></a><a href="#226" id="line226">     226</a> </span>                :     const HTTP_FOUND = '302 Found';                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container227"><a name="227"></a><a href="#227" id="line227">     227</a> </span>                :     const HTTP_BAD_REQUEST = '400 Bad Request';                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container228"><a name="228"></a><a href="#228" id="line228">     228</a> </span>                :     const HTTP_UNAUTHORIZED = '401 Unauthorized';                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container229"><a name="229"></a><a href="#229" id="line229">     229</a> </span>                :     const HTTP_FORBIDDEN = '403 Forbidden';                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container230"><a name="230"></a><a href="#230" id="line230">     230</a> </span>                :     const HTTP_UNAVAILABLE = '503 Service Unavailable';                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container231"><a name="231"></a><a href="#231" id="line231">     231</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container232"><a name="232"></a><a href="#232" id="line232">     232</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container233"><a name="233"></a><a href="#233" id="line233">     233</a> </span>                :      * @}                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container234"><a name="234"></a><a href="#234" id="line234">     234</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container235"><a name="235"></a><a href="#235" id="line235">     235</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container236"><a name="236"></a><a href="#236" id="line236">     236</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container237"><a name="237"></a><a href="#237" id="line237">     237</a> </span>                :      * @defgroup oauth2_error Error handling                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container238"><a name="238"></a><a href="#238" id="line238">     238</a> </span>                :      * @{                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container239"><a name="239"></a><a href="#239" id="line239">     239</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container240"><a name="240"></a><a href="#240" id="line240">     240</a> </span>                :      * @todo Extend for i18n.                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container241"><a name="241"></a><a href="#241" id="line241">     241</a> </span>                :      * @todo Consider moving all error related functionality into a separate class.                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container242"><a name="242"></a><a href="#242" id="line242">     242</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container243"><a name="243"></a><a href="#243" id="line243">     243</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container244"><a name="244"></a><a href="#244" id="line244">     244</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container245"><a name="245"></a><a href="#245" id="line245">     245</a> </span>                :      * The request is missing a required parameter, includes an unsupported                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container246"><a name="246"></a><a href="#246" id="line246">     246</a> </span>                :      * parameter or parameter value, or is otherwise malformed.                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container247"><a name="247"></a><a href="#247" id="line247">     247</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container248"><a name="248"></a><a href="#248" id="line248">     248</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container249"><a name="249"></a><a href="#249" id="line249">     249</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container250"><a name="250"></a><a href="#250" id="line250">     250</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container251"><a name="251"></a><a href="#251" id="line251">     251</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container252"><a name="252"></a><a href="#252" id="line252">     252</a> </span>                :     const ERROR_INVALID_REQUEST = 'invalid_request';                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container253"><a name="253"></a><a href="#253" id="line253">     253</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container254"><a name="254"></a><a href="#254" id="line254">     254</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container255"><a name="255"></a><a href="#255" id="line255">     255</a> </span>                :      * The client identifier provided is invalid.                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container256"><a name="256"></a><a href="#256" id="line256">     256</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container257"><a name="257"></a><a href="#257" id="line257">     257</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container258"><a name="258"></a><a href="#258" id="line258">     258</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container259"><a name="259"></a><a href="#259" id="line259">     259</a> </span>                :     const ERROR_INVALID_CLIENT = 'invalid_client';                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container260"><a name="260"></a><a href="#260" id="line260">     260</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container261"><a name="261"></a><a href="#261" id="line261">     261</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container262"><a name="262"></a><a href="#262" id="line262">     262</a> </span>                :      * The client is not authorized to use the requested response type.                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container263"><a name="263"></a><a href="#263" id="line263">     263</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container264"><a name="264"></a><a href="#264" id="line264">     264</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container265"><a name="265"></a><a href="#265" id="line265">     265</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container266"><a name="266"></a><a href="#266" id="line266">     266</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container267"><a name="267"></a><a href="#267" id="line267">     267</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container268"><a name="268"></a><a href="#268" id="line268">     268</a> </span>                :     const ERROR_UNAUTHORIZED_CLIENT = 'unauthorized_client';                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container269"><a name="269"></a><a href="#269" id="line269">     269</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container270"><a name="270"></a><a href="#270" id="line270">     270</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container271"><a name="271"></a><a href="#271" id="line271">     271</a> </span>                :      * The redirection URI provided does not match a pre-registered value.                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container272"><a name="272"></a><a href="#272" id="line272">     272</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container273"><a name="273"></a><a href="#273" id="line273">     273</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-3.1.2.4                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container274"><a name="274"></a><a href="#274" id="line274">     274</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container275"><a name="275"></a><a href="#275" id="line275">     275</a> </span>                :     const ERROR_REDIRECT_URI_MISMATCH = 'redirect_uri_mismatch';                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container276"><a name="276"></a><a href="#276" id="line276">     276</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container277"><a name="277"></a><a href="#277" id="line277">     277</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container278"><a name="278"></a><a href="#278" id="line278">     278</a> </span>                :      * The end-user or authorization server denied the request.                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container279"><a name="279"></a><a href="#279" id="line279">     279</a> </span>                :      * This could be returned, for example, if the resource owner decides to reject                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container280"><a name="280"></a><a href="#280" id="line280">     280</a> </span>                :      * access to the client at a later point.                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container281"><a name="281"></a><a href="#281" id="line281">     281</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container282"><a name="282"></a><a href="#282" id="line282">     282</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container283"><a name="283"></a><a href="#283" id="line283">     283</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container284"><a name="284"></a><a href="#284" id="line284">     284</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container285"><a name="285"></a><a href="#285" id="line285">     285</a> </span>                :     const ERROR_USER_DENIED = 'access_denied';                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container286"><a name="286"></a><a href="#286" id="line286">     286</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container287"><a name="287"></a><a href="#287" id="line287">     287</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container288"><a name="288"></a><a href="#288" id="line288">     288</a> </span>                :      * The requested response type is not supported by the authorization server.                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container289"><a name="289"></a><a href="#289" id="line289">     289</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container290"><a name="290"></a><a href="#290" id="line290">     290</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container291"><a name="291"></a><a href="#291" id="line291">     291</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container292"><a name="292"></a><a href="#292" id="line292">     292</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container293"><a name="293"></a><a href="#293" id="line293">     293</a> </span>                :     const ERROR_UNSUPPORTED_RESPONSE_TYPE = 'unsupported_response_type';                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container294"><a name="294"></a><a href="#294" id="line294">     294</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container295"><a name="295"></a><a href="#295" id="line295">     295</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container296"><a name="296"></a><a href="#296" id="line296">     296</a> </span>                :      * The requested scope is invalid, unknown, or malformed.                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container297"><a name="297"></a><a href="#297" id="line297">     297</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container298"><a name="298"></a><a href="#298" id="line298">     298</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container299"><a name="299"></a><a href="#299" id="line299">     299</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container300"><a name="300"></a><a href="#300" id="line300">     300</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container301"><a name="301"></a><a href="#301" id="line301">     301</a> </span>                :     const ERROR_INVALID_SCOPE = 'invalid_scope';                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container302"><a name="302"></a><a href="#302" id="line302">     302</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container303"><a name="303"></a><a href="#303" id="line303">     303</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container304"><a name="304"></a><a href="#304" id="line304">     304</a> </span>                :      * The provided authorization grant is invalid, expired,                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container305"><a name="305"></a><a href="#305" id="line305">     305</a> </span>                :      * revoked, does not match the redirection URI used in the                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container306"><a name="306"></a><a href="#306" id="line306">     306</a> </span>                :      * authorization request, or was issued to another client.                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container307"><a name="307"></a><a href="#307" id="line307">     307</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container308"><a name="308"></a><a href="#308" id="line308">     308</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container309"><a name="309"></a><a href="#309" id="line309">     309</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container310"><a name="310"></a><a href="#310" id="line310">     310</a> </span>                :     const ERROR_INVALID_GRANT = 'invalid_grant';                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container311"><a name="311"></a><a href="#311" id="line311">     311</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container312"><a name="312"></a><a href="#312" id="line312">     312</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container313"><a name="313"></a><a href="#313" id="line313">     313</a> </span>                :      * The authorization grant is not supported by the authorization server.                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container314"><a name="314"></a><a href="#314" id="line314">     314</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container315"><a name="315"></a><a href="#315" id="line315">     315</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container316"><a name="316"></a><a href="#316" id="line316">     316</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container317"><a name="317"></a><a href="#317" id="line317">     317</a> </span>                :     const ERROR_UNSUPPORTED_GRANT_TYPE = 'unsupported_grant_type';                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container318"><a name="318"></a><a href="#318" id="line318">     318</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container319"><a name="319"></a><a href="#319" id="line319">     319</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container320"><a name="320"></a><a href="#320" id="line320">     320</a> </span>                :      * The request requires higher privileges than provided by the access token.                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container321"><a name="321"></a><a href="#321" id="line321">     321</a> </span>                :      * The resource server SHOULD respond with the HTTP 403 (Forbidden) status                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container322"><a name="322"></a><a href="#322" id="line322">     322</a> </span>                :      * code and MAY include the &quot;scope&quot; attribute with the scope necessary to                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container323"><a name="323"></a><a href="#323" id="line323">     323</a> </span>                :      * access the protected resource.                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container324"><a name="324"></a><a href="#324" id="line324">     324</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container325"><a name="325"></a><a href="#325" id="line325">     325</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container326"><a name="326"></a><a href="#326" id="line326">     326</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container327"><a name="327"></a><a href="#327" id="line327">     327</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container328"><a name="328"></a><a href="#328" id="line328">     328</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container329"><a name="329"></a><a href="#329" id="line329">     329</a> </span>                :     const ERROR_INSUFFICIENT_SCOPE = 'invalid_scope';                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container330"><a name="330"></a><a href="#330" id="line330">     330</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container331"><a name="331"></a><a href="#331" id="line331">     331</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container332"><a name="332"></a><a href="#332" id="line332">     332</a> </span>                :      * @}                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container333"><a name="333"></a><a href="#333" id="line333">     333</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container334"><a name="334"></a><a href="#334" id="line334">     334</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container335"><a name="335"></a><a href="#335" id="line335">     335</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container336"><a name="336"></a><a href="#336" id="line336">     336</a> </span>                :      * Creates an OAuth2.0 server-side instance.                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container337"><a name="337"></a><a href="#337" id="line337">     337</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container338"><a name="338"></a><a href="#338" id="line338">     338</a> </span>                :      * @param $config - An associative array as below of config options. See CONFIG_* constants.                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container339"><a name="339"></a><a href="#339" id="line339">     339</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container340"><a name="340"></a><a href="#340" id="line340">     340</a> </span>                :     public function __construct(IOAuth2Storage $storage, $config = array()) {                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container341"><a name="341"></a><a href="#341" id="line341">     341</a> </span><span class="lineNoCov">              0 :         $this-&gt;storage = $storage;                                                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container342"><a name="342"></a><a href="#342" id="line342">     342</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container343"><a name="343"></a><a href="#343" id="line343">     343</a> </span>                :         // Configuration options                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container344"><a name="344"></a><a href="#344" id="line344">     344</a> </span><span class="lineNoCov">              0 :         $this-&gt;setDefaultOptions();                                                                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container345"><a name="345"></a><a href="#345" id="line345">     345</a> </span><span class="lineNoCov">              0 :         foreach ( $config as $name =&gt; $value ) {                                                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container346"><a name="346"></a><a href="#346" id="line346">     346</a> </span><span class="lineNoCov">              0 :             $this-&gt;setVariable($name, $value);                                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container347"><a name="347"></a><a href="#347" id="line347">     347</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container348"><a name="348"></a><a href="#348" id="line348">     348</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container349"><a name="349"></a><a href="#349" id="line349">     349</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container350"><a name="350"></a><a href="#350" id="line350">     350</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container351"><a name="351"></a><a href="#351" id="line351">     351</a> </span>                :      * Default configuration options are specified here.                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container352"><a name="352"></a><a href="#352" id="line352">     352</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container353"><a name="353"></a><a href="#353" id="line353">     353</a> </span>                :     protected function setDefaultOptions() {                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container354"><a name="354"></a><a href="#354" id="line354">     354</a> </span><span class="lineNoCov">              0 :         $this-&gt;conf = array(                                                                                                                                                                                                                                                                                                                             </span>
+<span class="lineNum" id="container355"><a name="355"></a><a href="#355" id="line355">     355</a> </span><span class="lineNoCov">              0 :             self::CONFIG_ACCESS_LIFETIME =&gt; self::DEFAULT_ACCESS_TOKEN_LIFETIME,                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container356"><a name="356"></a><a href="#356" id="line356">     356</a> </span><span class="lineNoCov">              0 :             self::CONFIG_REFRESH_LIFETIME =&gt; self::DEFAULT_REFRESH_TOKEN_LIFETIME,                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container357"><a name="357"></a><a href="#357" id="line357">     357</a> </span><span class="lineNoCov">              0 :             self::CONFIG_AUTH_LIFETIME =&gt; self::DEFAULT_AUTH_CODE_LIFETIME,                                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container358"><a name="358"></a><a href="#358" id="line358">     358</a> </span><span class="lineNoCov">              0 :             self::CONFIG_WWW_REALM =&gt; self::DEFAULT_WWW_REALM,                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container359"><a name="359"></a><a href="#359" id="line359">     359</a> </span><span class="lineNoCov">              0 :             self::CONFIG_TOKEN_TYPE =&gt; self::TOKEN_TYPE_BEARER,                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container360"><a name="360"></a><a href="#360" id="line360">     360</a> </span><span class="lineNoCov">              0 :             self::CONFIG_ENFORCE_INPUT_REDIRECT =&gt; FALSE,                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container361"><a name="361"></a><a href="#361" id="line361">     361</a> </span><span class="lineNoCov">              0 :             self::CONFIG_ENFORCE_STATE =&gt; FALSE,                                                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container362"><a name="362"></a><a href="#362" id="line362">     362</a> </span><span class="lineNoCov">              0 :             self::CONFIG_SUPPORTED_SCOPES =&gt; array() // This is expected to be passed in on construction. Scopes can be an aribitrary string.                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container363"><a name="363"></a><a href="#363" id="line363">     363</a> </span><span class="lineNoCov">              0 :         );                                                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container364"><a name="364"></a><a href="#364" id="line364">     364</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container365"><a name="365"></a><a href="#365" id="line365">     365</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container366"><a name="366"></a><a href="#366" id="line366">     366</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container367"><a name="367"></a><a href="#367" id="line367">     367</a> </span>                :      * Returns a persistent variable.                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container368"><a name="368"></a><a href="#368" id="line368">     368</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container369"><a name="369"></a><a href="#369" id="line369">     369</a> </span>                :      * @param $name                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container370"><a name="370"></a><a href="#370" id="line370">     370</a> </span>                :      * The name of the variable to return.                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container371"><a name="371"></a><a href="#371" id="line371">     371</a> </span>                :      * @param $default                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container372"><a name="372"></a><a href="#372" id="line372">     372</a> </span>                :      * The default value to use if this variable has never been set.                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container373"><a name="373"></a><a href="#373" id="line373">     373</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container374"><a name="374"></a><a href="#374" id="line374">     374</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container375"><a name="375"></a><a href="#375" id="line375">     375</a> </span>                :      * The value of the variable.                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container376"><a name="376"></a><a href="#376" id="line376">     376</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container377"><a name="377"></a><a href="#377" id="line377">     377</a> </span>                :     public function getVariable($name, $default = NULL) {                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container378"><a name="378"></a><a href="#378" id="line378">     378</a> </span><span class="lineNoCov">              0 :         $name = strtolower($name);                                                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container379"><a name="379"></a><a href="#379" id="line379">     379</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container380"><a name="380"></a><a href="#380" id="line380">     380</a> </span><span class="lineNoCov">              0 :         return isset($this-&gt;conf[$name]) ? $this-&gt;conf[$name] : $default;                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container381"><a name="381"></a><a href="#381" id="line381">     381</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container382"><a name="382"></a><a href="#382" id="line382">     382</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container383"><a name="383"></a><a href="#383" id="line383">     383</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container384"><a name="384"></a><a href="#384" id="line384">     384</a> </span>                :      * Sets a persistent variable.                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container385"><a name="385"></a><a href="#385" id="line385">     385</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container386"><a name="386"></a><a href="#386" id="line386">     386</a> </span>                :      * @param $name                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container387"><a name="387"></a><a href="#387" id="line387">     387</a> </span>                :      * The name of the variable to set.                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container388"><a name="388"></a><a href="#388" id="line388">     388</a> </span>                :      * @param $value                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container389"><a name="389"></a><a href="#389" id="line389">     389</a> </span>                :      * The value to set.                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container390"><a name="390"></a><a href="#390" id="line390">     390</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container391"><a name="391"></a><a href="#391" id="line391">     391</a> </span>                :     public function setVariable($name, $value) {                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container392"><a name="392"></a><a href="#392" id="line392">     392</a> </span><span class="lineNoCov">              0 :         $name = strtolower($name);                                                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container393"><a name="393"></a><a href="#393" id="line393">     393</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container394"><a name="394"></a><a href="#394" id="line394">     394</a> </span><span class="lineNoCov">              0 :         $this-&gt;conf[$name] = $value;                                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container395"><a name="395"></a><a href="#395" id="line395">     395</a> </span><span class="lineNoCov">              0 :         return $this;                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container396"><a name="396"></a><a href="#396" id="line396">     396</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container397"><a name="397"></a><a href="#397" id="line397">     397</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container398"><a name="398"></a><a href="#398" id="line398">     398</a> </span>                :     // Resource protecting (Section 5).                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container399"><a name="399"></a><a href="#399" id="line399">     399</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container400"><a name="400"></a><a href="#400" id="line400">     400</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container401"><a name="401"></a><a href="#401" id="line401">     401</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container402"><a name="402"></a><a href="#402" id="line402">     402</a> </span>                :      * Check that a valid access token has been provided.                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container403"><a name="403"></a><a href="#403" id="line403">     403</a> </span>                :      * The token is returned (as an associative array) if valid.                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container404"><a name="404"></a><a href="#404" id="line404">     404</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container405"><a name="405"></a><a href="#405" id="line405">     405</a> </span>                :      * The scope parameter defines any required scope that the token must have.                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container406"><a name="406"></a><a href="#406" id="line406">     406</a> </span>                :      * If a scope param is provided and the token does not have the required                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container407"><a name="407"></a><a href="#407" id="line407">     407</a> </span>                :      * scope, we bounce the request.                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container408"><a name="408"></a><a href="#408" id="line408">     408</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container409"><a name="409"></a><a href="#409" id="line409">     409</a> </span>                :      * Some implementations may choose to return a subset of the protected                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container410"><a name="410"></a><a href="#410" id="line410">     410</a> </span>                :      * resource (i.e. &quot;public&quot; data) if the user has not provided an access                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container411"><a name="411"></a><a href="#411" id="line411">     411</a> </span>                :      * token or if the access token is invalid or expired.                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container412"><a name="412"></a><a href="#412" id="line412">     412</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container413"><a name="413"></a><a href="#413" id="line413">     413</a> </span>                :      * The IETF spec says that we should send a 401 Unauthorized header and                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container414"><a name="414"></a><a href="#414" id="line414">     414</a> </span>                :      * bail immediately so that's what the defaults are set to. You can catch                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container415"><a name="415"></a><a href="#415" id="line415">     415</a> </span>                :      * the exception thrown and behave differently if you like (log errors, allow                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container416"><a name="416"></a><a href="#416" id="line416">     416</a> </span>                :      * public access for missing tokens, etc)                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container417"><a name="417"></a><a href="#417" id="line417">     417</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container418"><a name="418"></a><a href="#418" id="line418">     418</a> </span>                :      * @param $scope                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container419"><a name="419"></a><a href="#419" id="line419">     419</a> </span>                :      * A space-separated string of required scope(s), if you want to check                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container420"><a name="420"></a><a href="#420" id="line420">     420</a> </span>                :      * for scope.                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container421"><a name="421"></a><a href="#421" id="line421">     421</a> </span>                :      * @return array                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container422"><a name="422"></a><a href="#422" id="line422">     422</a> </span>                :      * Token                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container423"><a name="423"></a><a href="#423" id="line423">     423</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-7                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container424"><a name="424"></a><a href="#424" id="line424">     424</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container425"><a name="425"></a><a href="#425" id="line425">     425</a> </span>                :      * @ingroup oauth2_section_7                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container426"><a name="426"></a><a href="#426" id="line426">     426</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container427"><a name="427"></a><a href="#427" id="line427">     427</a> </span>                :     public function verifyAccessToken($token_param, $scope = NULL) {                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container428"><a name="428"></a><a href="#428" id="line428">     428</a> </span><span class="lineNoCov">              0 :         $tokenType = $this-&gt;getVariable(self::CONFIG_TOKEN_TYPE);                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container429"><a name="429"></a><a href="#429" id="line429">     429</a> </span><span class="lineNoCov">              0 :         $realm = $this-&gt;getVariable(self::CONFIG_WWW_REALM);                                                                                                                                                                                                                                                                                             </span>
+<span class="lineNum" id="container430"><a name="430"></a><a href="#430" id="line430">     430</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container431"><a name="431"></a><a href="#431" id="line431">     431</a> </span><span class="lineNoCov">              0 :         if (!$token_param) { // Access token was not provided                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container432"><a name="432"></a><a href="#432" id="line432">     432</a> </span><span class="lineNoCov">              0 :             throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'The request is missing a required parameter, includes an unsupported parameter or parameter value, repeats the same parameter, uses more than one method for including an access token, or is otherwise malformed.', $scope);</span>
+<span class="lineNum" id="container433"><a name="433"></a><a href="#433" id="line433">     433</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container434"><a name="434"></a><a href="#434" id="line434">     434</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container435"><a name="435"></a><a href="#435" id="line435">     435</a> </span>                :         // Get the stored token data (from the implementing subclass)                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container436"><a name="436"></a><a href="#436" id="line436">     436</a> </span><span class="lineNoCov">              0 :         $token = $this-&gt;storage-&gt;getAccessToken($token_param);                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container437"><a name="437"></a><a href="#437" id="line437">     437</a> </span><span class="lineNoCov">              0 :         if ($token === NULL) {                                                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container438"><a name="438"></a><a href="#438" id="line438">     438</a> </span><span class="lineNoCov">              0 :             throw new OAuth2AuthenticateException(self::HTTP_UNAUTHORIZED, $tokenType, $realm, self::ERROR_INVALID_GRANT, 'The access token provided is invalid.', $scope);                                                                                                                                                                              </span>
+<span class="lineNum" id="container439"><a name="439"></a><a href="#439" id="line439">     439</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container440"><a name="440"></a><a href="#440" id="line440">     440</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container441"><a name="441"></a><a href="#441" id="line441">     441</a> </span>                :         // Check we have a well formed token                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container442"><a name="442"></a><a href="#442" id="line442">     442</a> </span><span class="lineNoCov">              0 :         if (!isset($token[&quot;expires&quot;]) || !isset($token[&quot;client_id&quot;])) {                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container443"><a name="443"></a><a href="#443" id="line443">     443</a> </span><span class="lineNoCov">              0 :             throw new OAuth2AuthenticateException(self::HTTP_UNAUTHORIZED, $tokenType, $realm, self::ERROR_INVALID_GRANT, 'Malformed token (missing &quot;expires&quot; or &quot;client_id&quot;)', $scope);                                                                                                                                                                 </span>
+<span class="lineNum" id="container444"><a name="444"></a><a href="#444" id="line444">     444</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container445"><a name="445"></a><a href="#445" id="line445">     445</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container446"><a name="446"></a><a href="#446" id="line446">     446</a> </span>                :         // Check token expiration (expires is a mandatory paramter)                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container447"><a name="447"></a><a href="#447" id="line447">     447</a> </span><span class="lineNoCov">              0 :         if (isset($token[&quot;expires&quot;]) &amp;&amp; time() &gt; $token[&quot;expires&quot;]) {                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container448"><a name="448"></a><a href="#448" id="line448">     448</a> </span><span class="lineNoCov">              0 :             throw new OAuth2AuthenticateException(self::HTTP_UNAUTHORIZED, $tokenType, $realm, self::ERROR_INVALID_GRANT, 'The access token provided has expired.', $scope);                                                                                                                                                                             </span>
+<span class="lineNum" id="container449"><a name="449"></a><a href="#449" id="line449">     449</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container450"><a name="450"></a><a href="#450" id="line450">     450</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container451"><a name="451"></a><a href="#451" id="line451">     451</a> </span>                :         // Check scope, if provided                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container452"><a name="452"></a><a href="#452" id="line452">     452</a> </span>                :         // If token doesn't have a scope, it's NULL/empty, or it's insufficient, then throw an error                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container453"><a name="453"></a><a href="#453" id="line453">     453</a> </span><span class="lineNoCov">              0 :         if ($scope &amp;&amp; (!isset($token[&quot;scope&quot;]) || !$token[&quot;scope&quot;] || !$this-&gt;checkScope($scope, $token[&quot;scope&quot;]))) {                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container454"><a name="454"></a><a href="#454" id="line454">     454</a> </span><span class="lineNoCov">              0 :             throw new OAuth2AuthenticateException(self::HTTP_FORBIDDEN, $tokenType, $realm, self::ERROR_INSUFFICIENT_SCOPE, 'The request requires higher privileges than provided by the access token.', $scope);                                                                                                                                        </span>
+<span class="lineNum" id="container455"><a name="455"></a><a href="#455" id="line455">     455</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container456"><a name="456"></a><a href="#456" id="line456">     456</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container457"><a name="457"></a><a href="#457" id="line457">     457</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container458"><a name="458"></a><a href="#458" id="line458">     458</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container459"><a name="459"></a><a href="#459" id="line459">     459</a> </span><span class="lineNoCov">              0 :         session_write_close(); //Fecha session anterior                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container460"><a name="460"></a><a href="#460" id="line460">     460</a> </span><span class="lineNoCov">              0 :         session_id($token['refresh_token']); //Define o id da session o mesmo do resfresh token                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container461"><a name="461"></a><a href="#461" id="line461">     461</a> </span><span class="lineNoCov">              0 :         session_start();                                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container462"><a name="462"></a><a href="#462" id="line462">     462</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container463"><a name="463"></a><a href="#463" id="line463">     463</a> </span><span class="lineNoCov">              0 :         return $token;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container464"><a name="464"></a><a href="#464" id="line464">     464</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container465"><a name="465"></a><a href="#465" id="line465">     465</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container466"><a name="466"></a><a href="#466" id="line466">     466</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container467"><a name="467"></a><a href="#467" id="line467">     467</a> </span>                :      * This is a convenience function that can be used to get the token, which can then                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container468"><a name="468"></a><a href="#468" id="line468">     468</a> </span>                :      * be passed to verifyAccessToken(). The constraints specified by the draft are                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container469"><a name="469"></a><a href="#469" id="line469">     469</a> </span>                :      * attempted to be adheared to in this method.                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container470"><a name="470"></a><a href="#470" id="line470">     470</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container471"><a name="471"></a><a href="#471" id="line471">     471</a> </span>                :      * As per the Bearer spec (draft 8, section 2) - there are three ways for a client                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container472"><a name="472"></a><a href="#472" id="line472">     472</a> </span>                :      * to specify the bearer token, in order of preference: Authorization Header,                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container473"><a name="473"></a><a href="#473" id="line473">     473</a> </span>                :      * POST and GET.                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container474"><a name="474"></a><a href="#474" id="line474">     474</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container475"><a name="475"></a><a href="#475" id="line475">     475</a> </span>                :      * NB: Resource servers MUST accept tokens via the Authorization scheme                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container476"><a name="476"></a><a href="#476" id="line476">     476</a> </span>                :      * (http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2).                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container477"><a name="477"></a><a href="#477" id="line477">     477</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container478"><a name="478"></a><a href="#478" id="line478">     478</a> </span>                :      * @todo Should we enforce TLS/SSL in this function?                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container479"><a name="479"></a><a href="#479" id="line479">     479</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container480"><a name="480"></a><a href="#480" id="line480">     480</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2.1                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container481"><a name="481"></a><a href="#481" id="line481">     481</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2.2                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container482"><a name="482"></a><a href="#482" id="line482">     482</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2.3                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container483"><a name="483"></a><a href="#483" id="line483">     483</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container484"><a name="484"></a><a href="#484" id="line484">     484</a> </span>                :      * Old Android version bug (at least with version 2.2)                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container485"><a name="485"></a><a href="#485" id="line485">     485</a> </span>                :      * @see http://code.google.com/p/android/issues/detail?id=6684                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container486"><a name="486"></a><a href="#486" id="line486">     486</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container487"><a name="487"></a><a href="#487" id="line487">     487</a> </span>                :      * We don't want to test this functionality as it relies on superglobals and headers:                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container488"><a name="488"></a><a href="#488" id="line488">     488</a> </span>                :      * @codeCoverageIgnoreStart                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container489"><a name="489"></a><a href="#489" id="line489">     489</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container490"><a name="490"></a><a href="#490" id="line490">     490</a> </span>                :     public function getBearerToken() {                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container491"><a name="491"></a><a href="#491" id="line491">     491</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container492"><a name="492"></a><a href="#492" id="line492">     492</a> </span>                :         if (isset($_SERVER['HTTP_AUTHORIZATION'])) {                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container493"><a name="493"></a><a href="#493" id="line493">     493</a> </span>                :             $headers = trim($_SERVER[&quot;HTTP_AUTHORIZATION&quot;]);                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container494"><a name="494"></a><a href="#494" id="line494">     494</a> </span>                :         } elseif (function_exists('apache_request_headers')) {                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container495"><a name="495"></a><a href="#495" id="line495">     495</a> </span>                :             $requestHeaders = apache_request_headers();                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container496"><a name="496"></a><a href="#496" id="line496">     496</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container497"><a name="497"></a><a href="#497" id="line497">     497</a> </span>                :             // Server-side fix for bug in old Android versions (a nice side-effect of this fix means we don't care about capitalization for Authorization)                                                                                                                                                                                               
+<span class="lineNum" id="container498"><a name="498"></a><a href="#498" id="line498">     498</a> </span>                :             $requestHeaders = array_combine(array_map('ucwords', array_keys($requestHeaders)), array_values($requestHeaders));                                                                                                                                                                                                                           
+<span class="lineNum" id="container499"><a name="499"></a><a href="#499" id="line499">     499</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container500"><a name="500"></a><a href="#500" id="line500">     500</a> </span>                :             if (isset($requestHeaders['Authorization'])) {                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container501"><a name="501"></a><a href="#501" id="line501">     501</a> </span>                :                 $headers = trim($requestHeaders['Authorization']);                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container502"><a name="502"></a><a href="#502" id="line502">     502</a> </span>                :             }                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container503"><a name="503"></a><a href="#503" id="line503">     503</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container504"><a name="504"></a><a href="#504" id="line504">     504</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container505"><a name="505"></a><a href="#505" id="line505">     505</a> </span>                :         $tokenType = $this-&gt;getVariable(self::CONFIG_TOKEN_TYPE);                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container506"><a name="506"></a><a href="#506" id="line506">     506</a> </span>                :         $realm = $this-&gt;getVariable(self::CONFIG_WWW_REALM);                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container507"><a name="507"></a><a href="#507" id="line507">     507</a> </span>                :         // Check that exactly one method was used                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container508"><a name="508"></a><a href="#508" id="line508">     508</a> </span>                :         $methodsUsed = !empty($headers) + isset($_GET[self::TOKEN_PARAM_NAME]) + isset($_POST[self::TOKEN_PARAM_NAME]);                                                                                                                                                                                                                                  
+<span class="lineNum" id="container509"><a name="509"></a><a href="#509" id="line509">     509</a> </span>                :         if ($methodsUsed &gt; 1) {                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container510"><a name="510"></a><a href="#510" id="line510">     510</a> </span>                :             throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'Only one method may be used to authenticate at a time (Auth header, GET or POST).');                                                                                                                                         
+<span class="lineNum" id="container511"><a name="511"></a><a href="#511" id="line511">     511</a> </span>                :         } elseif ($methodsUsed == 0) {                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container512"><a name="512"></a><a href="#512" id="line512">     512</a> </span>                :             throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'The access token was not found.');                                                                                                                                                                                           
+<span class="lineNum" id="container513"><a name="513"></a><a href="#513" id="line513">     513</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container514"><a name="514"></a><a href="#514" id="line514">     514</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container515"><a name="515"></a><a href="#515" id="line515">     515</a> </span>                :         // HEADER: Get the access token from the header                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container516"><a name="516"></a><a href="#516" id="line516">     516</a> </span>                :         if (!empty($headers)) {                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container517"><a name="517"></a><a href="#517" id="line517">     517</a> </span>                :             if (!preg_match('/' . self::TOKEN_BEARER_HEADER_NAME . '\s(\S+)/', $headers, $matches)) {                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container518"><a name="518"></a><a href="#518" id="line518">     518</a> </span>                :                 throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'Malformed auth header');                                                                                                                                                                                                 
+<span class="lineNum" id="container519"><a name="519"></a><a href="#519" id="line519">     519</a> </span>                :             }                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container520"><a name="520"></a><a href="#520" id="line520">     520</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container521"><a name="521"></a><a href="#521" id="line521">     521</a> </span>                :             return $matches[1];                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container522"><a name="522"></a><a href="#522" id="line522">     522</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container523"><a name="523"></a><a href="#523" id="line523">     523</a> </span>                :         // POST: Get the token from POST data                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container524"><a name="524"></a><a href="#524" id="line524">     524</a> </span>                :         if (isset($_POST[self::TOKEN_PARAM_NAME])) {                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container525"><a name="525"></a><a href="#525" id="line525">     525</a> </span>                :             if ($_SERVER['REQUEST_METHOD'] != 'POST') {                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container526"><a name="526"></a><a href="#526" id="line526">     526</a> </span>                :                 throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'When putting the token in the body, the method must be POST.');                                                                                                                                                          
+<span class="lineNum" id="container527"><a name="527"></a><a href="#527" id="line527">     527</a> </span>                :             }                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container528"><a name="528"></a><a href="#528" id="line528">     528</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container529"><a name="529"></a><a href="#529" id="line529">     529</a> </span>                :             // IETF specifies content-type. NB: Not all webservers populate this _SERVER variable                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container530"><a name="530"></a><a href="#530" id="line530">     530</a> </span>                :             if (isset($_SERVER['CONTENT_TYPE']) &amp;&amp; $_SERVER['CONTENT_TYPE'] != 'application/x-www-form-urlencoded') {                                                                                                                                                                                                                                    
+<span class="lineNum" id="container531"><a name="531"></a><a href="#531" id="line531">     531</a> </span>                :                 throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'The content type for POST requests must be &quot;application/x-www-form-urlencoded&quot;');                                                                                                                                        
+<span class="lineNum" id="container532"><a name="532"></a><a href="#532" id="line532">     532</a> </span>                :             }                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container533"><a name="533"></a><a href="#533" id="line533">     533</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container534"><a name="534"></a><a href="#534" id="line534">     534</a> </span>                :             return $_POST[self::TOKEN_PARAM_NAME];                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container535"><a name="535"></a><a href="#535" id="line535">     535</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container536"><a name="536"></a><a href="#536" id="line536">     536</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container537"><a name="537"></a><a href="#537" id="line537">     537</a> </span>                :         // GET method                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container538"><a name="538"></a><a href="#538" id="line538">     538</a> </span>                :         return $_GET[self::TOKEN_PARAM_NAME];                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container539"><a name="539"></a><a href="#539" id="line539">     539</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container540"><a name="540"></a><a href="#540" id="line540">     540</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container541"><a name="541"></a><a href="#541" id="line541">     541</a> </span>                :     /** @codeCoverageIgnoreEnd */                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container542"><a name="542"></a><a href="#542" id="line542">     542</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container543"><a name="543"></a><a href="#543" id="line543">     543</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container544"><a name="544"></a><a href="#544" id="line544">     544</a> </span>                :      * Check if everything in required scope is contained in available scope.                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container545"><a name="545"></a><a href="#545" id="line545">     545</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container546"><a name="546"></a><a href="#546" id="line546">     546</a> </span>                :      * @param $required_scope                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container547"><a name="547"></a><a href="#547" id="line547">     547</a> </span>                :      * Required scope to be check with.                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container548"><a name="548"></a><a href="#548" id="line548">     548</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container549"><a name="549"></a><a href="#549" id="line549">     549</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container550"><a name="550"></a><a href="#550" id="line550">     550</a> </span>                :      * TRUE if everything in required scope is contained in available scope,                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container551"><a name="551"></a><a href="#551" id="line551">     551</a> </span>                :      * and False if it isn't.                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container552"><a name="552"></a><a href="#552" id="line552">     552</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container553"><a name="553"></a><a href="#553" id="line553">     553</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-7                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container554"><a name="554"></a><a href="#554" id="line554">     554</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container555"><a name="555"></a><a href="#555" id="line555">     555</a> </span>                :      * @ingroup oauth2_section_7                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container556"><a name="556"></a><a href="#556" id="line556">     556</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container557"><a name="557"></a><a href="#557" id="line557">     557</a> </span>                :     private function checkScope($required_scope, $available_scope) {                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container558"><a name="558"></a><a href="#558" id="line558">     558</a> </span>                :         // The required scope should match or be a subset of the available scope                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container559"><a name="559"></a><a href="#559" id="line559">     559</a> </span><span class="lineNoCov">              0 :         if (!is_array($required_scope)) {                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container560"><a name="560"></a><a href="#560" id="line560">     560</a> </span><span class="lineNoCov">              0 :             $required_scope = explode(' ', trim($required_scope));                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container561"><a name="561"></a><a href="#561" id="line561">     561</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container562"><a name="562"></a><a href="#562" id="line562">     562</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container563"><a name="563"></a><a href="#563" id="line563">     563</a> </span><span class="lineNoCov">              0 :         if (!is_array($available_scope)) {                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container564"><a name="564"></a><a href="#564" id="line564">     564</a> </span><span class="lineNoCov">              0 :             $available_scope = explode(' ', trim($available_scope));                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container565"><a name="565"></a><a href="#565" id="line565">     565</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container566"><a name="566"></a><a href="#566" id="line566">     566</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container567"><a name="567"></a><a href="#567" id="line567">     567</a> </span><span class="lineNoCov">              0 :         return (count(array_diff($required_scope, $available_scope)) == 0);                                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container568"><a name="568"></a><a href="#568" id="line568">     568</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container569"><a name="569"></a><a href="#569" id="line569">     569</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container570"><a name="570"></a><a href="#570" id="line570">     570</a> </span>                :     // Access token granting (Section 4).                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container571"><a name="571"></a><a href="#571" id="line571">     571</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container572"><a name="572"></a><a href="#572" id="line572">     572</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container573"><a name="573"></a><a href="#573" id="line573">     573</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container574"><a name="574"></a><a href="#574" id="line574">     574</a> </span>                :      * Grant or deny a requested access token.                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container575"><a name="575"></a><a href="#575" id="line575">     575</a> </span>                :      * This would be called from the &quot;/token&quot; endpoint as defined in the spec.                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container576"><a name="576"></a><a href="#576" id="line576">     576</a> </span>                :      * Obviously, you can call your endpoint whatever you want.                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container577"><a name="577"></a><a href="#577" id="line577">     577</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container578"><a name="578"></a><a href="#578" id="line578">     578</a> </span>                :      * @param $inputData - The draft specifies that the parameters should be                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container579"><a name="579"></a><a href="#579" id="line579">     579</a> </span>                :      * retrieved from POST, but you can override to whatever method you like.                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container580"><a name="580"></a><a href="#580" id="line580">     580</a> </span>                :      * @throws OAuth2ServerException                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container581"><a name="581"></a><a href="#581" id="line581">     581</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container582"><a name="582"></a><a href="#582" id="line582">     582</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container583"><a name="583"></a><a href="#583" id="line583">     583</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-10.6                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container584"><a name="584"></a><a href="#584" id="line584">     584</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-4.1.3                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container585"><a name="585"></a><a href="#585" id="line585">     585</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container586"><a name="586"></a><a href="#586" id="line586">     586</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container587"><a name="587"></a><a href="#587" id="line587">     587</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container588"><a name="588"></a><a href="#588" id="line588">     588</a> </span>                : //ORIGINAL URI                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container589"><a name="589"></a><a href="#589" id="line589">     589</a> </span>                : //    public function grantAccessToken(array $inputData = NULL, array $authHeaders = NULL) {                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container590"><a name="590"></a><a href="#590" id="line590">     590</a> </span>                : //        $filters = array(                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container591"><a name="591"></a><a href="#591" id="line591">     591</a> </span>                : //            &quot;grant_type&quot; =&gt; array(&quot;filter&quot; =&gt; FILTER_VALIDATE_REGEXP, &quot;options&quot; =&gt; array(&quot;regexp&quot; =&gt; self::GRANT_TYPE_REGEXP), &quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                      
+<span class="lineNum" id="container592"><a name="592"></a><a href="#592" id="line592">     592</a> </span>                : //            &quot;scope&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container593"><a name="593"></a><a href="#593" id="line593">     593</a> </span>                : //            &quot;code&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container594"><a name="594"></a><a href="#594" id="line594">     594</a> </span>                : //            &quot;redirect_uri&quot; =&gt; array(&quot;filter&quot; =&gt; FILTER_SANITIZE_URL),                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container595"><a name="595"></a><a href="#595" id="line595">     595</a> </span>                : //            &quot;username&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container596"><a name="596"></a><a href="#596" id="line596">     596</a> </span>                : //            &quot;password&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container597"><a name="597"></a><a href="#597" id="line597">     597</a> </span>                : //            &quot;refresh_token&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container598"><a name="598"></a><a href="#598" id="line598">     598</a> </span>                : //        );                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container599"><a name="599"></a><a href="#599" id="line599">     599</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container600"><a name="600"></a><a href="#600" id="line600">     600</a> </span>                : //        // Input data by default can be either POST or GET                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container601"><a name="601"></a><a href="#601" id="line601">     601</a> </span>                : //        if (!isset($inputData)) {                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container602"><a name="602"></a><a href="#602" id="line602">     602</a> </span>                : //            $inputData = ($_SERVER['REQUEST_METHOD'] == 'POST') ? $_POST : $_GET;                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container603"><a name="603"></a><a href="#603" id="line603">     603</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container604"><a name="604"></a><a href="#604" id="line604">     604</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container605"><a name="605"></a><a href="#605" id="line605">     605</a> </span>                : //        // Basic authorization header                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container606"><a name="606"></a><a href="#606" id="line606">     606</a> </span>                : //        $authHeaders = isset($authHeaders) ? $authHeaders : $this-&gt;getAuthorizationHeader();                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container607"><a name="607"></a><a href="#607" id="line607">     607</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container608"><a name="608"></a><a href="#608" id="line608">     608</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container609"><a name="609"></a><a href="#609" id="line609">     609</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container610"><a name="610"></a><a href="#610" id="line610">     610</a> </span>                : //        // Filter input data                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container611"><a name="611"></a><a href="#611" id="line611">     611</a> </span>                : //        $input = filter_var_array($inputData, $filters);                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container612"><a name="612"></a><a href="#612" id="line612">     612</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container613"><a name="613"></a><a href="#613" id="line613">     613</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container614"><a name="614"></a><a href="#614" id="line614">     614</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container615"><a name="615"></a><a href="#615" id="line615">     615</a> </span>                : //        // Grant Type must be specified.                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container616"><a name="616"></a><a href="#616" id="line616">     616</a> </span>                : //        if (!$input[&quot;grant_type&quot;]) {                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container617"><a name="617"></a><a href="#617" id="line617">     617</a> </span>                : //            throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Invalid grant_type parameter or parameter missing');                                                                                                                                                                                                 
+<span class="lineNum" id="container618"><a name="618"></a><a href="#618" id="line618">     618</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container619"><a name="619"></a><a href="#619" id="line619">     619</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container620"><a name="620"></a><a href="#620" id="line620">     620</a> </span>                : //        // Authorize the client                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container621"><a name="621"></a><a href="#621" id="line621">     621</a> </span>                : //        $client = $this-&gt;getClientCredentials($inputData, $authHeaders);                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container622"><a name="622"></a><a href="#622" id="line622">     622</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container623"><a name="623"></a><a href="#623" id="line623">     623</a> </span>                : //        if ($this-&gt;storage-&gt;checkClientCredentials($client[0], $client[1]) === FALSE) {                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container624"><a name="624"></a><a href="#624" id="line624">     624</a> </span>                : //            throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client credentials are invalid');                                                                                                                                                                                                                 
+<span class="lineNum" id="container625"><a name="625"></a><a href="#625" id="line625">     625</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container626"><a name="626"></a><a href="#626" id="line626">     626</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container627"><a name="627"></a><a href="#627" id="line627">     627</a> </span>                : //        if (!$this-&gt;storage-&gt;checkRestrictedGrantType($client[0], $input[&quot;grant_type&quot;])) {                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container628"><a name="628"></a><a href="#628" id="line628">     628</a> </span>                : //            throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNAUTHORIZED_CLIENT, 'The grant type is unauthorized for this client_id');                                                                                                                                                                                             
+<span class="lineNum" id="container629"><a name="629"></a><a href="#629" id="line629">     629</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container630"><a name="630"></a><a href="#630" id="line630">     630</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container631"><a name="631"></a><a href="#631" id="line631">     631</a> </span>                : //        // Do the granting                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container632"><a name="632"></a><a href="#632" id="line632">     632</a> </span>                : //        //                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container633"><a name="633"></a><a href="#633" id="line633">     633</a> </span>                : //        switch ($input[&quot;grant_type&quot;]) {                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container634"><a name="634"></a><a href="#634" id="line634">     634</a> </span>                : //            case self::GRANT_TYPE_AUTH_CODE:                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container635"><a name="635"></a><a href="#635" id="line635">     635</a> </span>                : //                if (!($this-&gt;storage instanceof IOAuth2GrantCode)) {                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container636"><a name="636"></a><a href="#636" id="line636">     636</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                       
+<span class="lineNum" id="container637"><a name="637"></a><a href="#637" id="line637">     637</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container638"><a name="638"></a><a href="#638" id="line638">     638</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container639"><a name="639"></a><a href="#639" id="line639">     639</a> </span>                : //                if (!$input[&quot;code&quot;]) {                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container640"><a name="640"></a><a href="#640" id="line640">     640</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Missing parameter. &quot;code&quot; is required');                                                                                                                                                                                                     
+<span class="lineNum" id="container641"><a name="641"></a><a href="#641" id="line641">     641</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container642"><a name="642"></a><a href="#642" id="line642">     642</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container643"><a name="643"></a><a href="#643" id="line643">     643</a> </span>                : //                if ($this-&gt;getVariable(self::CONFIG_ENFORCE_INPUT_REDIRECT) &amp;&amp; !$input[&quot;redirect_uri&quot;]) {                                                                                                                                                                                                                                              
+<span class="lineNum" id="container644"><a name="644"></a><a href="#644" id="line644">     644</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, &quot;The redirect URI parameter is required.&quot;);                                                                                                                                                                                                   
+<span class="lineNum" id="container645"><a name="645"></a><a href="#645" id="line645">     645</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container646"><a name="646"></a><a href="#646" id="line646">     646</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container647"><a name="647"></a><a href="#647" id="line647">     647</a> </span>                : //                $stored = $this-&gt;storage-&gt;getAuthCode($input[&quot;code&quot;]);                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container648"><a name="648"></a><a href="#648" id="line648">     648</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container649"><a name="649"></a><a href="#649" id="line649">     649</a> </span>                : //                // Check the code exists                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container650"><a name="650"></a><a href="#650" id="line650">     650</a> </span>                : //                if ($stored === NULL || $client[0] != $stored[&quot;client_id&quot;]) {                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container651"><a name="651"></a><a href="#651" id="line651">     651</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, &quot;Refresh token doesn't exist or is invalid for the client&quot;);                                                                                                                                                                                    
+<span class="lineNum" id="container652"><a name="652"></a><a href="#652" id="line652">     652</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container653"><a name="653"></a><a href="#653" id="line653">     653</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container654"><a name="654"></a><a href="#654" id="line654">     654</a> </span>                : //                // Validate the redirect URI. If a redirect URI has been provided on input, it must be validated                                                                                                                                                                                                                                       
+<span class="lineNum" id="container655"><a name="655"></a><a href="#655" id="line655">     655</a> </span>                : //                if ($input[&quot;redirect_uri&quot;] &amp;&amp; !$this-&gt;validateRedirectUri($input[&quot;redirect_uri&quot;], $stored[&quot;redirect_uri&quot;])) {                                                                                                                                                                                                                          
+<span class="lineNum" id="container656"><a name="656"></a><a href="#656" id="line656">     656</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, &quot;The redirect URI is missing or do not match&quot;);                                                                                                                                                                                         
+<span class="lineNum" id="container657"><a name="657"></a><a href="#657" id="line657">     657</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container658"><a name="658"></a><a href="#658" id="line658">     658</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container659"><a name="659"></a><a href="#659" id="line659">     659</a> </span>                : //                if ($stored[&quot;expires&quot;] &lt; time()) {                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container660"><a name="660"></a><a href="#660" id="line660">     660</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, &quot;The authorization code has expired&quot;);                                                                                                                                                                                                          
+<span class="lineNum" id="container661"><a name="661"></a><a href="#661" id="line661">     661</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container662"><a name="662"></a><a href="#662" id="line662">     662</a> </span>                : //                break;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container663"><a name="663"></a><a href="#663" id="line663">     663</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container664"><a name="664"></a><a href="#664" id="line664">     664</a> </span>                : //            case self::GRANT_TYPE_USER_CREDENTIALS:                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container665"><a name="665"></a><a href="#665" id="line665">     665</a> </span>                : //                if (!($this-&gt;storage instanceof IOAuth2GrantUser)) {                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container666"><a name="666"></a><a href="#666" id="line666">     666</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                       
+<span class="lineNum" id="container667"><a name="667"></a><a href="#667" id="line667">     667</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container668"><a name="668"></a><a href="#668" id="line668">     668</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container669"><a name="669"></a><a href="#669" id="line669">     669</a> </span>                : //                if (!$input[&quot;username&quot;] || !$input[&quot;password&quot;]) {                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container670"><a name="670"></a><a href="#670" id="line670">     670</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Missing parameters. &quot;username&quot; and &quot;password&quot; required');                                                                                                                                                                                    
+<span class="lineNum" id="container671"><a name="671"></a><a href="#671" id="line671">     671</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container672"><a name="672"></a><a href="#672" id="line672">     672</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container673"><a name="673"></a><a href="#673" id="line673">     673</a> </span>                : //                $stored = $this-&gt;storage-&gt;checkUserCredentials($client[0], $input[&quot;username&quot;], $input[&quot;password&quot;]);                                                                                                                                                                                                                                    
+<span class="lineNum" id="container674"><a name="674"></a><a href="#674" id="line674">     674</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container675"><a name="675"></a><a href="#675" id="line675">     675</a> </span>                : //                if ($stored === FALSE) {                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container676"><a name="676"></a><a href="#676" id="line676">     676</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT);                                                                                                                                                                                                                                                
+<span class="lineNum" id="container677"><a name="677"></a><a href="#677" id="line677">     677</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container678"><a name="678"></a><a href="#678" id="line678">     678</a> </span>                : //                break;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container679"><a name="679"></a><a href="#679" id="line679">     679</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container680"><a name="680"></a><a href="#680" id="line680">     680</a> </span>                : //            case self::GRANT_TYPE_CLIENT_CREDENTIALS:                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container681"><a name="681"></a><a href="#681" id="line681">     681</a> </span>                : //                if (!($this-&gt;storage instanceof IOAuth2GrantClient)) {                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container682"><a name="682"></a><a href="#682" id="line682">     682</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                       
+<span class="lineNum" id="container683"><a name="683"></a><a href="#683" id="line683">     683</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container684"><a name="684"></a><a href="#684" id="line684">     684</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container685"><a name="685"></a><a href="#685" id="line685">     685</a> </span>                : //                if (empty($client[1])) {                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container686"><a name="686"></a><a href="#686" id="line686">     686</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client_secret is mandatory for the &quot;client_credentials&quot; grant type');                                                                                                                                                                     
+<span class="lineNum" id="container687"><a name="687"></a><a href="#687" id="line687">     687</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container688"><a name="688"></a><a href="#688" id="line688">     688</a> </span>                : //                // NB: We don't need to check for $stored==false, because it was checked above already                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container689"><a name="689"></a><a href="#689" id="line689">     689</a> </span>                : //                $stored = $this-&gt;storage-&gt;checkClientCredentialsGrant($client[0], $client[1]);                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container690"><a name="690"></a><a href="#690" id="line690">     690</a> </span>                : //                break;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container691"><a name="691"></a><a href="#691" id="line691">     691</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container692"><a name="692"></a><a href="#692" id="line692">     692</a> </span>                : //            case self::GRANT_TYPE_REFRESH_TOKEN:                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container693"><a name="693"></a><a href="#693" id="line693">     693</a> </span>                : //                if (!($this-&gt;storage instanceof IOAuth2RefreshTokens)) {                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container694"><a name="694"></a><a href="#694" id="line694">     694</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                       
+<span class="lineNum" id="container695"><a name="695"></a><a href="#695" id="line695">     695</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container696"><a name="696"></a><a href="#696" id="line696">     696</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container697"><a name="697"></a><a href="#697" id="line697">     697</a> </span>                : //                if (!$input[&quot;refresh_token&quot;]) {                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container698"><a name="698"></a><a href="#698" id="line698">     698</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'No &quot;refresh_token&quot; parameter found');                                                                                                                                                                                                        
+<span class="lineNum" id="container699"><a name="699"></a><a href="#699" id="line699">     699</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container700"><a name="700"></a><a href="#700" id="line700">     700</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container701"><a name="701"></a><a href="#701" id="line701">     701</a> </span>                : //                $stored = $this-&gt;storage-&gt;getRefreshToken($input[&quot;refresh_token&quot;]);                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container702"><a name="702"></a><a href="#702" id="line702">     702</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container703"><a name="703"></a><a href="#703" id="line703">     703</a> </span>                : //                if ($stored === NULL || $client[0] != $stored[&quot;client_id&quot;]) {                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container704"><a name="704"></a><a href="#704" id="line704">     704</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, 'Invalid refresh token');                                                                                                                                                                                                                       
+<span class="lineNum" id="container705"><a name="705"></a><a href="#705" id="line705">     705</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container706"><a name="706"></a><a href="#706" id="line706">     706</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container707"><a name="707"></a><a href="#707" id="line707">     707</a> </span>                : //                if ($stored[&quot;expires&quot;] &lt; time()) {                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container708"><a name="708"></a><a href="#708" id="line708">     708</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, 'Refresh token has expired');                                                                                                                                                                                                                   
+<span class="lineNum" id="container709"><a name="709"></a><a href="#709" id="line709">     709</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container710"><a name="710"></a><a href="#710" id="line710">     710</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container711"><a name="711"></a><a href="#711" id="line711">     711</a> </span>                : //                // store the refresh token locally so we can delete it when a new refresh token is generated                                                                                                                                                                                                                                           
+<span class="lineNum" id="container712"><a name="712"></a><a href="#712" id="line712">     712</a> </span>                : //                $this-&gt;oldRefreshToken = $stored[&quot;refresh_token&quot;];                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container713"><a name="713"></a><a href="#713" id="line713">     713</a> </span>                : //                break;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container714"><a name="714"></a><a href="#714" id="line714">     714</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container715"><a name="715"></a><a href="#715" id="line715">     715</a> </span>                : //            case self::GRANT_TYPE_IMPLICIT:                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container716"><a name="716"></a><a href="#716" id="line716">     716</a> </span>                : //                /* TODO: NOT YET IMPLEMENTED */                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container717"><a name="717"></a><a href="#717" id="line717">     717</a> </span>                : //                throw new OAuth2ServerException('501 Not Implemented', 'This OAuth2 library is not yet complete. This functionality is not implemented yet.');                                                                                                                                                                                         
+<span class="lineNum" id="container718"><a name="718"></a><a href="#718" id="line718">     718</a> </span>                : //                if (!($this-&gt;storage instanceof IOAuth2GrantImplicit)) {                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container719"><a name="719"></a><a href="#719" id="line719">     719</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                       
+<span class="lineNum" id="container720"><a name="720"></a><a href="#720" id="line720">     720</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container721"><a name="721"></a><a href="#721" id="line721">     721</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container722"><a name="722"></a><a href="#722" id="line722">     722</a> </span>                : //                break;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container723"><a name="723"></a><a href="#723" id="line723">     723</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container724"><a name="724"></a><a href="#724" id="line724">     724</a> </span>                : //            // Extended grant types:                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container725"><a name="725"></a><a href="#725" id="line725">     725</a> </span>                : //            case filter_var($input[&quot;grant_type&quot;], FILTER_VALIDATE_URL):                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container726"><a name="726"></a><a href="#726" id="line726">     726</a> </span>                : //                if (!($this-&gt;storage instanceof IOAuth2GrantExtension)) {                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container727"><a name="727"></a><a href="#727" id="line727">     727</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                       
+<span class="lineNum" id="container728"><a name="728"></a><a href="#728" id="line728">     728</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container729"><a name="729"></a><a href="#729" id="line729">     729</a> </span>                : //                $uri = filter_var($input[&quot;grant_type&quot;], FILTER_VALIDATE_URL);                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container730"><a name="730"></a><a href="#730" id="line730">     730</a> </span>                : //                $stored = $this-&gt;storage-&gt;checkGrantExtension($uri, $inputData, $authHeaders);                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container731"><a name="731"></a><a href="#731" id="line731">     731</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container732"><a name="732"></a><a href="#732" id="line732">     732</a> </span>                : //                if ($stored === FALSE) {                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container733"><a name="733"></a><a href="#733" id="line733">     733</a> </span>                : //                    throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT);                                                                                                                                                                                                                                                
+<span class="lineNum" id="container734"><a name="734"></a><a href="#734" id="line734">     734</a> </span>                : //                }                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container735"><a name="735"></a><a href="#735" id="line735">     735</a> </span>                : //                break;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container736"><a name="736"></a><a href="#736" id="line736">     736</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container737"><a name="737"></a><a href="#737" id="line737">     737</a> </span>                : //            default :                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container738"><a name="738"></a><a href="#738" id="line738">     738</a> </span>                : //                throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Invalid grant_type parameter or parameter missing');                                                                                                                                                                                             
+<span class="lineNum" id="container739"><a name="739"></a><a href="#739" id="line739">     739</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container740"><a name="740"></a><a href="#740" id="line740">     740</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container741"><a name="741"></a><a href="#741" id="line741">     741</a> </span>                : //        if (!isset($stored[&quot;scope&quot;])) {                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container742"><a name="742"></a><a href="#742" id="line742">     742</a> </span>                : //            $stored[&quot;scope&quot;] = NULL;                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container743"><a name="743"></a><a href="#743" id="line743">     743</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container744"><a name="744"></a><a href="#744" id="line744">     744</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container745"><a name="745"></a><a href="#745" id="line745">     745</a> </span>                : //        // Check scope, if provided                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container746"><a name="746"></a><a href="#746" id="line746">     746</a> </span>                : //        if ($input[&quot;scope&quot;] &amp;&amp; (!is_array($stored) || !isset($stored[&quot;scope&quot;]) || !$this-&gt;checkScope($input[&quot;scope&quot;], $stored[&quot;scope&quot;]))) {                                                                                                                                                                                                            
+<span class="lineNum" id="container747"><a name="747"></a><a href="#747" id="line747">     747</a> </span>                : //            throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_SCOPE, 'An unsupported scope was requested.');                                                                                                                                                                                                                 
+<span class="lineNum" id="container748"><a name="748"></a><a href="#748" id="line748">     748</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container749"><a name="749"></a><a href="#749" id="line749">     749</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container750"><a name="750"></a><a href="#750" id="line750">     750</a> </span>                : //        $user_id = isset($stored['user_id']) ? $stored['user_id'] : null;                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container751"><a name="751"></a><a href="#751" id="line751">     751</a> </span>                : //        $token = $this-&gt;createAccessToken($client[0], $user_id, $stored['scope']);                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container752"><a name="752"></a><a href="#752" id="line752">     752</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container753"><a name="753"></a><a href="#753" id="line753">     753</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container754"><a name="754"></a><a href="#754" id="line754">     754</a> </span>                : //        // Send response                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container755"><a name="755"></a><a href="#755" id="line755">     755</a> </span>                : //        $this-&gt;sendJsonHeaders();                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container756"><a name="756"></a><a href="#756" id="line756">     756</a> </span>                : //        echo json_encode($token);                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container757"><a name="757"></a><a href="#757" id="line757">     757</a> </span>                : //    }                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container758"><a name="758"></a><a href="#758" id="line758">     758</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container759"><a name="759"></a><a href="#759" id="line759">     759</a> </span>                :     public function grantAccessToken(array $inputData = NULL, array $authHeaders = NULL) {                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container760"><a name="760"></a><a href="#760" id="line760">     760</a> </span>                :         $filters = array(                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container761"><a name="761"></a><a href="#761" id="line761">     761</a> </span><span class="lineNoCov">              0 :             &quot;grant_type&quot; =&gt; array(&quot;filter&quot; =&gt; FILTER_VALIDATE_REGEXP, &quot;options&quot; =&gt; array(&quot;regexp&quot; =&gt; self::GRANT_TYPE_REGEXP), &quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                        </span>
+<span class="lineNum" id="container762"><a name="762"></a><a href="#762" id="line762">     762</a> </span><span class="lineNoCov">              0 :             &quot;scope&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container763"><a name="763"></a><a href="#763" id="line763">     763</a> </span><span class="lineNoCov">              0 :             &quot;code&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container764"><a name="764"></a><a href="#764" id="line764">     764</a> </span><span class="lineNoCov">              0 :             &quot;redirect_uri&quot; =&gt; array(&quot;filter&quot; =&gt; FILTER_SANITIZE_URL),                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container765"><a name="765"></a><a href="#765" id="line765">     765</a> </span><span class="lineNoCov">              0 :             &quot;username&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container766"><a name="766"></a><a href="#766" id="line766">     766</a> </span><span class="lineNoCov">              0 :             &quot;password&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container767"><a name="767"></a><a href="#767" id="line767">     767</a> </span><span class="lineNoCov">              0 :             &quot;refresh_token&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container768"><a name="768"></a><a href="#768" id="line768">     768</a> </span><span class="lineNoCov">              0 :         );                                                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container769"><a name="769"></a><a href="#769" id="line769">     769</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container770"><a name="770"></a><a href="#770" id="line770">     770</a> </span>                :         // Input data by default can be either POST or GET                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container771"><a name="771"></a><a href="#771" id="line771">     771</a> </span><span class="lineNoCov">              0 :         if (!isset($inputData)) {                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container772"><a name="772"></a><a href="#772" id="line772">     772</a> </span><span class="lineNoCov">              0 :             $inputData = ($_SERVER['REQUEST_METHOD'] == 'POST') ? $_POST : $_GET;                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container773"><a name="773"></a><a href="#773" id="line773">     773</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container774"><a name="774"></a><a href="#774" id="line774">     774</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container775"><a name="775"></a><a href="#775" id="line775">     775</a> </span>                :         // Basic authorization header                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container776"><a name="776"></a><a href="#776" id="line776">     776</a> </span><span class="lineNoCov">              0 :         $authHeaders = isset($authHeaders) ? $authHeaders : $this-&gt;getAuthorizationHeader();                                                                                                                                                                                                                                                             </span>
+<span class="lineNum" id="container777"><a name="777"></a><a href="#777" id="line777">     777</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container778"><a name="778"></a><a href="#778" id="line778">     778</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container779"><a name="779"></a><a href="#779" id="line779">     779</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container780"><a name="780"></a><a href="#780" id="line780">     780</a> </span>                :         // Filter input data                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container781"><a name="781"></a><a href="#781" id="line781">     781</a> </span><span class="lineNoCov">              0 :         $input = filter_var_array($inputData, $filters);                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container782"><a name="782"></a><a href="#782" id="line782">     782</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container783"><a name="783"></a><a href="#783" id="line783">     783</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container784"><a name="784"></a><a href="#784" id="line784">     784</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container785"><a name="785"></a><a href="#785" id="line785">     785</a> </span>                :         // Grant Type must be specified.                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container786"><a name="786"></a><a href="#786" id="line786">     786</a> </span><span class="lineNoCov">              0 :         if (!$input[&quot;grant_type&quot;]) {                                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container787"><a name="787"></a><a href="#787" id="line787">     787</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Invalid grant_type parameter or parameter missing');                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container788"><a name="788"></a><a href="#788" id="line788">     788</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container789"><a name="789"></a><a href="#789" id="line789">     789</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container790"><a name="790"></a><a href="#790" id="line790">     790</a> </span>                :         // Authorize the client                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container791"><a name="791"></a><a href="#791" id="line791">     791</a> </span><span class="lineNoCov">              0 :         $client = $this-&gt;getClientCredentials($inputData, $authHeaders);                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container792"><a name="792"></a><a href="#792" id="line792">     792</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container793"><a name="793"></a><a href="#793" id="line793">     793</a> </span><span class="lineNoCov">              0 :         if ($this-&gt;storage-&gt;checkClientCredentials($client[0], $client[1]) === FALSE) {                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container794"><a name="794"></a><a href="#794" id="line794">     794</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client credentials are invalid');                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container795"><a name="795"></a><a href="#795" id="line795">     795</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container796"><a name="796"></a><a href="#796" id="line796">     796</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container797"><a name="797"></a><a href="#797" id="line797">     797</a> </span><span class="lineNoCov">              0 :         if (!$this-&gt;storage-&gt;checkRestrictedGrantType($client[0], $input[&quot;grant_type&quot;])) {                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container798"><a name="798"></a><a href="#798" id="line798">     798</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNAUTHORIZED_CLIENT, 'The grant type is unauthorized for this client_id');                                                                                                                                                                                               </span>
+<span class="lineNum" id="container799"><a name="799"></a><a href="#799" id="line799">     799</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container800"><a name="800"></a><a href="#800" id="line800">     800</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container801"><a name="801"></a><a href="#801" id="line801">     801</a> </span>                :         // Do the granting                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container802"><a name="802"></a><a href="#802" id="line802">     802</a> </span>                :         //                                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container803"><a name="803"></a><a href="#803" id="line803">     803</a> </span><span class="lineNoCov">              0 :         switch ($input[&quot;grant_type&quot;]) {                                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container804"><a name="804"></a><a href="#804" id="line804">     804</a> </span><span class="lineNoCov">              0 :             case self::GRANT_TYPE_AUTH_CODE:                                                                                                                                                                                                                                                                                                             </span>
+<span class="lineNum" id="container805"><a name="805"></a><a href="#805" id="line805">     805</a> </span><span class="lineNoCov">              0 :                 if (!($this-&gt;storage instanceof IOAuth2GrantCode)) {                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container806"><a name="806"></a><a href="#806" id="line806">     806</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container807"><a name="807"></a><a href="#807" id="line807">     807</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container808"><a name="808"></a><a href="#808" id="line808">     808</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container809"><a name="809"></a><a href="#809" id="line809">     809</a> </span><span class="lineNoCov">              0 :                 if (!$input[&quot;code&quot;]) {                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container810"><a name="810"></a><a href="#810" id="line810">     810</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Missing parameter. &quot;code&quot; is required');                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container811"><a name="811"></a><a href="#811" id="line811">     811</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container812"><a name="812"></a><a href="#812" id="line812">     812</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container813"><a name="813"></a><a href="#813" id="line813">     813</a> </span><span class="lineNoCov">              0 :                 if ($this-&gt;getVariable(self::CONFIG_ENFORCE_INPUT_REDIRECT) &amp;&amp; !$input[&quot;redirect_uri&quot;]) {                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container814"><a name="814"></a><a href="#814" id="line814">     814</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, &quot;The redirect URI parameter is required.&quot;);                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container815"><a name="815"></a><a href="#815" id="line815">     815</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container816"><a name="816"></a><a href="#816" id="line816">     816</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container817"><a name="817"></a><a href="#817" id="line817">     817</a> </span><span class="lineNoCov">              0 :                 $stored = $this-&gt;storage-&gt;getAuthCode($input[&quot;code&quot;]);                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container818"><a name="818"></a><a href="#818" id="line818">     818</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container819"><a name="819"></a><a href="#819" id="line819">     819</a> </span>                :                 // Check the code exists                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container820"><a name="820"></a><a href="#820" id="line820">     820</a> </span><span class="lineNoCov">              0 :                 if ($stored === NULL || $client[0] != $stored[&quot;client_id&quot;]) {                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container821"><a name="821"></a><a href="#821" id="line821">     821</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, &quot;Refresh token doesn't exist or is invalid for the client&quot;);                                                                                                                                                                                      </span>
+<span class="lineNum" id="container822"><a name="822"></a><a href="#822" id="line822">     822</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container823"><a name="823"></a><a href="#823" id="line823">     823</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container824"><a name="824"></a><a href="#824" id="line824">     824</a> </span>                :                 // Validate the redirect URI. If a redirect URI has been provided on input, it must be validated                                                                                                                                                                                                                                         
+<span class="lineNum" id="container825"><a name="825"></a><a href="#825" id="line825">     825</a> </span><span class="lineNoCov">              0 :                 if ($input[&quot;redirect_uri&quot;] &amp;&amp; !$this-&gt;validateRedirectUri($input[&quot;redirect_uri&quot;], $stored[&quot;redirect_uri&quot;])) {                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container826"><a name="826"></a><a href="#826" id="line826">     826</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, &quot;The redirect URI is missing or do not match&quot;);                                                                                                                                                                                           </span>
+<span class="lineNum" id="container827"><a name="827"></a><a href="#827" id="line827">     827</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container828"><a name="828"></a><a href="#828" id="line828">     828</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container829"><a name="829"></a><a href="#829" id="line829">     829</a> </span><span class="lineNoCov">              0 :                 if ($stored[&quot;expires&quot;] &lt; time()) {                                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container830"><a name="830"></a><a href="#830" id="line830">     830</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, &quot;The authorization code has expired&quot;);                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container831"><a name="831"></a><a href="#831" id="line831">     831</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container832"><a name="832"></a><a href="#832" id="line832">     832</a> </span><span class="lineNoCov">              0 :                 break;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container833"><a name="833"></a><a href="#833" id="line833">     833</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container834"><a name="834"></a><a href="#834" id="line834">     834</a> </span><span class="lineNoCov">              0 :             case self::GRANT_TYPE_USER_CREDENTIALS:                                                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container835"><a name="835"></a><a href="#835" id="line835">     835</a> </span><span class="lineNoCov">              0 :                 if (!($this-&gt;storage instanceof IOAuth2GrantUser)) {                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container836"><a name="836"></a><a href="#836" id="line836">     836</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container837"><a name="837"></a><a href="#837" id="line837">     837</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container838"><a name="838"></a><a href="#838" id="line838">     838</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container839"><a name="839"></a><a href="#839" id="line839">     839</a> </span><span class="lineNoCov">              0 :                 if (!$input[&quot;username&quot;] || !$input[&quot;password&quot;]) {                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container840"><a name="840"></a><a href="#840" id="line840">     840</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Missing parameters. &quot;username&quot; and &quot;password&quot; required');                                                                                                                                                                                      </span>
+<span class="lineNum" id="container841"><a name="841"></a><a href="#841" id="line841">     841</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container842"><a name="842"></a><a href="#842" id="line842">     842</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container843"><a name="843"></a><a href="#843" id="line843">     843</a> </span><span class="lineNoCov">              0 :                 $stored = $this-&gt;storage-&gt;checkUserCredentials($client[0], $input[&quot;username&quot;], $input[&quot;password&quot;]);                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container844"><a name="844"></a><a href="#844" id="line844">     844</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container845"><a name="845"></a><a href="#845" id="line845">     845</a> </span><span class="lineNoCov">              0 :                 if ($stored === FALSE) {                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container846"><a name="846"></a><a href="#846" id="line846">     846</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT);                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container847"><a name="847"></a><a href="#847" id="line847">     847</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container848"><a name="848"></a><a href="#848" id="line848">     848</a> </span><span class="lineNoCov">              0 :                 break;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container849"><a name="849"></a><a href="#849" id="line849">     849</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container850"><a name="850"></a><a href="#850" id="line850">     850</a> </span><span class="lineNoCov">              0 :             case self::GRANT_TYPE_CLIENT_CREDENTIALS:                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container851"><a name="851"></a><a href="#851" id="line851">     851</a> </span><span class="lineNoCov">              0 :                 if (!($this-&gt;storage instanceof IOAuth2GrantClient)) {                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container852"><a name="852"></a><a href="#852" id="line852">     852</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container853"><a name="853"></a><a href="#853" id="line853">     853</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container854"><a name="854"></a><a href="#854" id="line854">     854</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container855"><a name="855"></a><a href="#855" id="line855">     855</a> </span><span class="lineNoCov">              0 :                 if (empty($client[1])) {                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container856"><a name="856"></a><a href="#856" id="line856">     856</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client_secret is mandatory for the &quot;client_credentials&quot; grant type');                                                                                                                                                                       </span>
+<span class="lineNum" id="container857"><a name="857"></a><a href="#857" id="line857">     857</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container858"><a name="858"></a><a href="#858" id="line858">     858</a> </span>                :                 // NB: We don't need to check for $stored==false, because it was checked above already                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container859"><a name="859"></a><a href="#859" id="line859">     859</a> </span><span class="lineNoCov">              0 :                 $stored = $this-&gt;storage-&gt;checkClientCredentialsGrant($client[0], $client[1]);                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container860"><a name="860"></a><a href="#860" id="line860">     860</a> </span><span class="lineNoCov">              0 :                 break;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container861"><a name="861"></a><a href="#861" id="line861">     861</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container862"><a name="862"></a><a href="#862" id="line862">     862</a> </span><span class="lineNoCov">              0 :             case self::GRANT_TYPE_REFRESH_TOKEN:                                                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container863"><a name="863"></a><a href="#863" id="line863">     863</a> </span><span class="lineNoCov">              0 :                 if (!($this-&gt;storage instanceof IOAuth2RefreshTokens)) {                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container864"><a name="864"></a><a href="#864" id="line864">     864</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container865"><a name="865"></a><a href="#865" id="line865">     865</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container866"><a name="866"></a><a href="#866" id="line866">     866</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container867"><a name="867"></a><a href="#867" id="line867">     867</a> </span><span class="lineNoCov">              0 :                 if (!$input[&quot;refresh_token&quot;]) {                                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container868"><a name="868"></a><a href="#868" id="line868">     868</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'No &quot;refresh_token&quot; parameter found');                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container869"><a name="869"></a><a href="#869" id="line869">     869</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container870"><a name="870"></a><a href="#870" id="line870">     870</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container871"><a name="871"></a><a href="#871" id="line871">     871</a> </span><span class="lineNoCov">              0 :                 $stored = $this-&gt;storage-&gt;getRefreshToken($input[&quot;refresh_token&quot;]);                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container872"><a name="872"></a><a href="#872" id="line872">     872</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container873"><a name="873"></a><a href="#873" id="line873">     873</a> </span><span class="lineNoCov">              0 :                 if ($stored === NULL || $client[0] != $stored[&quot;client_id&quot;]) {                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container874"><a name="874"></a><a href="#874" id="line874">     874</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, 'Invalid refresh token');                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container875"><a name="875"></a><a href="#875" id="line875">     875</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container876"><a name="876"></a><a href="#876" id="line876">     876</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container877"><a name="877"></a><a href="#877" id="line877">     877</a> </span><span class="lineNoCov">              0 :                 if ($stored[&quot;expires&quot;] &lt; time()) {                                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container878"><a name="878"></a><a href="#878" id="line878">     878</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, 'Refresh token has expired');                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container879"><a name="879"></a><a href="#879" id="line879">     879</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container880"><a name="880"></a><a href="#880" id="line880">     880</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container881"><a name="881"></a><a href="#881" id="line881">     881</a> </span>                :                 // store the refresh token locally so we can delete it when a new refresh token is generated                                                                                                                                                                                                                                             
+<span class="lineNum" id="container882"><a name="882"></a><a href="#882" id="line882">     882</a> </span><span class="lineNoCov">              0 :                 $this-&gt;oldRefreshToken = $stored[&quot;refresh_token&quot;];                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container883"><a name="883"></a><a href="#883" id="line883">     883</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container884"><a name="884"></a><a href="#884" id="line884">     884</a> </span><span class="lineNoCov">              0 :                 session_write_close(); //Fecha session anterior                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container885"><a name="885"></a><a href="#885" id="line885">     885</a> </span><span class="lineNoCov">              0 :                 session_id($stored['refresh_token']); //Define o id da session o mesmo do resfresh token                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container886"><a name="886"></a><a href="#886" id="line886">     886</a> </span><span class="lineNoCov">              0 :                 session_start();                                                                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container887"><a name="887"></a><a href="#887" id="line887">     887</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container888"><a name="888"></a><a href="#888" id="line888">     888</a> </span><span class="lineNoCov">              0 :                 break;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container889"><a name="889"></a><a href="#889" id="line889">     889</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container890"><a name="890"></a><a href="#890" id="line890">     890</a> </span><span class="lineNoCov">              0 :             case self::GRANT_TYPE_IMPLICIT:                                                                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container891"><a name="891"></a><a href="#891" id="line891">     891</a> </span>                :                 /* TODO: NOT YET IMPLEMENTED */                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container892"><a name="892"></a><a href="#892" id="line892">     892</a> </span><span class="lineNoCov">              0 :                 throw new OAuth2ServerException('501 Not Implemented', 'This OAuth2 library is not yet complete. This functionality is not implemented yet.');                                                                                                                                                                                           </span>
+<span class="lineNum" id="container893"><a name="893"></a><a href="#893" id="line893">     893</a> </span>                :                 if (!($this-&gt;storage instanceof IOAuth2GrantImplicit)) {                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container894"><a name="894"></a><a href="#894" id="line894">     894</a> </span>                :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                         
+<span class="lineNum" id="container895"><a name="895"></a><a href="#895" id="line895">     895</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container896"><a name="896"></a><a href="#896" id="line896">     896</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container897"><a name="897"></a><a href="#897" id="line897">     897</a> </span>                :                 break;                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container898"><a name="898"></a><a href="#898" id="line898">     898</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container899"><a name="899"></a><a href="#899" id="line899">     899</a> </span>                :             // Extended grant types:                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container900"><a name="900"></a><a href="#900" id="line900">     900</a> </span><span class="lineNoCov">              0 :             case filter_var($input[&quot;grant_type&quot;], FILTER_VALIDATE_URL):                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container901"><a name="901"></a><a href="#901" id="line901">     901</a> </span><span class="lineNoCov">              0 :                 if (!($this-&gt;storage instanceof IOAuth2GrantExtension)) {                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container902"><a name="902"></a><a href="#902" id="line902">     902</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container903"><a name="903"></a><a href="#903" id="line903">     903</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container904"><a name="904"></a><a href="#904" id="line904">     904</a> </span><span class="lineNoCov">              0 :                 $uri = filter_var($input[&quot;grant_type&quot;], FILTER_VALIDATE_URL);                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container905"><a name="905"></a><a href="#905" id="line905">     905</a> </span><span class="lineNoCov">              0 :                 $stored = $this-&gt;storage-&gt;checkGrantExtension($uri, $inputData, $authHeaders);                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container906"><a name="906"></a><a href="#906" id="line906">     906</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container907"><a name="907"></a><a href="#907" id="line907">     907</a> </span><span class="lineNoCov">              0 :                 if ($stored === FALSE) {                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container908"><a name="908"></a><a href="#908" id="line908">     908</a> </span><span class="lineNoCov">              0 :                     throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT);                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container909"><a name="909"></a><a href="#909" id="line909">     909</a> </span>                :                 }                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container910"><a name="910"></a><a href="#910" id="line910">     910</a> </span><span class="lineNoCov">              0 :                 break;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container911"><a name="911"></a><a href="#911" id="line911">     911</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container912"><a name="912"></a><a href="#912" id="line912">     912</a> </span><span class="lineNoCov">              0 :             default :                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container913"><a name="913"></a><a href="#913" id="line913">     913</a> </span><span class="lineNoCov">              0 :                 throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Invalid grant_type parameter or parameter missing');                                                                                                                                                                                               </span>
+<span class="lineNum" id="container914"><a name="914"></a><a href="#914" id="line914">     914</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container915"><a name="915"></a><a href="#915" id="line915">     915</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container916"><a name="916"></a><a href="#916" id="line916">     916</a> </span><span class="lineNoCov">              0 :         if (!isset($stored[&quot;scope&quot;])) {                                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container917"><a name="917"></a><a href="#917" id="line917">     917</a> </span><span class="lineNoCov">              0 :             $stored[&quot;scope&quot;] = NULL;                                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container918"><a name="918"></a><a href="#918" id="line918">     918</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container919"><a name="919"></a><a href="#919" id="line919">     919</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container920"><a name="920"></a><a href="#920" id="line920">     920</a> </span>                :         // Check scope, if provided                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container921"><a name="921"></a><a href="#921" id="line921">     921</a> </span><span class="lineNoCov">              0 :         if ($input[&quot;scope&quot;] &amp;&amp; (!is_array($stored) || !isset($stored[&quot;scope&quot;]) || !$this-&gt;checkScope($input[&quot;scope&quot;], $stored[&quot;scope&quot;]))) {                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container922"><a name="922"></a><a href="#922" id="line922">     922</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_SCOPE, 'An unsupported scope was requested.');                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container923"><a name="923"></a><a href="#923" id="line923">     923</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container924"><a name="924"></a><a href="#924" id="line924">     924</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container925"><a name="925"></a><a href="#925" id="line925">     925</a> </span><span class="lineNoCov">              0 :         $user_id = isset($stored['user_id']) ? $stored['user_id'] : null;                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container926"><a name="926"></a><a href="#926" id="line926">     926</a> </span><span class="lineNoCov">              0 :         $token = $this-&gt;createAccessToken($client[0], $user_id, $stored['scope']);                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container927"><a name="927"></a><a href="#927" id="line927">     927</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container928"><a name="928"></a><a href="#928" id="line928">     928</a> </span>                :         //Gerando Session Para o refresh_token                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container929"><a name="929"></a><a href="#929" id="line929">     929</a> </span><span class="lineNoCov">              0 :         session_write_close(); //Fecha session anterior                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container930"><a name="930"></a><a href="#930" id="line930">     930</a> </span><span class="lineNoCov">              0 :         session_start();                                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container931"><a name="931"></a><a href="#931" id="line931">     931</a> </span><span class="lineNoCov">              0 :         session_id($token['refresh_token']); //Define o id da session o mesmo do resfresh token                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container932"><a name="932"></a><a href="#932" id="line932">     932</a> </span><span class="lineNoCov">              0 :         session_cache_expire(self::CONFIG_REFRESH_LIFETIME); //Define o tempo da session o mesmo do Refresh token                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container933"><a name="933"></a><a href="#933" id="line933">     933</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container934"><a name="934"></a><a href="#934" id="line934">     934</a> </span><span class="lineNoCov">              0 :         if(isset($input[&quot;username&quot;]) &amp;&amp; isset($input[&quot;password&quot;]))                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container935"><a name="935"></a><a href="#935" id="line935">     935</a> </span><span class="lineNoCov">              0 :         {                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container936"><a name="936"></a><a href="#936" id="line936">     936</a> </span><span class="lineNoCov">              0 :             $_SESSION['wallet']['user']['uid'] =     $input[&quot;username&quot;];                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container937"><a name="937"></a><a href="#937" id="line937">     937</a> </span><span class="lineNoCov">              0 :             $_SESSION['wallet']['user']['password']       =  $input[&quot;password&quot;];                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container938"><a name="938"></a><a href="#938" id="line938">     938</a> </span><span class="lineNoCov">              0 :             $_SESSION['wallet']['user']['uidNumber']       =  $user_id;                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container939"><a name="939"></a><a href="#939" id="line939">     939</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container940"><a name="940"></a><a href="#940" id="line940">     940</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container941"><a name="941"></a><a href="#941" id="line941">     941</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container942"><a name="942"></a><a href="#942" id="line942">     942</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container943"><a name="943"></a><a href="#943" id="line943">     943</a> </span>                :         //session_write_close(); //Fecha nova session                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container944"><a name="944"></a><a href="#944" id="line944">     944</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container945"><a name="945"></a><a href="#945" id="line945">     945</a> </span>                :         // Send response                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container946"><a name="946"></a><a href="#946" id="line946">     946</a> </span><span class="lineNoCov">              0 :         $this-&gt;sendJsonHeaders();                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container947"><a name="947"></a><a href="#947" id="line947">     947</a> </span><span class="lineNoCov">              0 :         echo json_encode($token);                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container948"><a name="948"></a><a href="#948" id="line948">     948</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container949"><a name="949"></a><a href="#949" id="line949">     949</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container950"><a name="950"></a><a href="#950" id="line950">     950</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container951"><a name="951"></a><a href="#951" id="line951">     951</a> </span>                :      * Internal function used to get the client credentials from HTTP basic                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container952"><a name="952"></a><a href="#952" id="line952">     952</a> </span>                :      * auth or POST data.                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container953"><a name="953"></a><a href="#953" id="line953">     953</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container954"><a name="954"></a><a href="#954" id="line954">     954</a> </span>                :      * According to the spec (draft 20), the client_id can be provided in                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container955"><a name="955"></a><a href="#955" id="line955">     955</a> </span>                :      * the Basic Authorization header (recommended) or via GET/POST.                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container956"><a name="956"></a><a href="#956" id="line956">     956</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container957"><a name="957"></a><a href="#957" id="line957">     957</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container958"><a name="958"></a><a href="#958" id="line958">     958</a> </span>                :      * A list containing the client identifier and password, for example                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container959"><a name="959"></a><a href="#959" id="line959">     959</a> </span>                :      * @code                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container960"><a name="960"></a><a href="#960" id="line960">     960</a> </span>                :      * return array(                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container961"><a name="961"></a><a href="#961" id="line961">     961</a> </span>                :      * CLIENT_ID,                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container962"><a name="962"></a><a href="#962" id="line962">     962</a> </span>                :      * CLIENT_SECRET                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container963"><a name="963"></a><a href="#963" id="line963">     963</a> </span>                :      * );                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container964"><a name="964"></a><a href="#964" id="line964">     964</a> </span>                :      * @endcode                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container965"><a name="965"></a><a href="#965" id="line965">     965</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container966"><a name="966"></a><a href="#966" id="line966">     966</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-2.4.1                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container967"><a name="967"></a><a href="#967" id="line967">     967</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container968"><a name="968"></a><a href="#968" id="line968">     968</a> </span>                :      * @ingroup oauth2_section_2                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container969"><a name="969"></a><a href="#969" id="line969">     969</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container970"><a name="970"></a><a href="#970" id="line970">     970</a> </span>                :     protected function getClientCredentials(array $inputData, array $authHeaders) {                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container971"><a name="971"></a><a href="#971" id="line971">     971</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container972"><a name="972"></a><a href="#972" id="line972">     972</a> </span>                :         // Basic Authentication is used                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container973"><a name="973"></a><a href="#973" id="line973">     973</a> </span><span class="lineNoCov">              0 :         if (!empty($authHeaders['PHP_AUTH_USER'])) {                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container974"><a name="974"></a><a href="#974" id="line974">     974</a> </span><span class="lineNoCov">              0 :             return array($authHeaders['PHP_AUTH_USER'], $authHeaders['PHP_AUTH_PW']);                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container975"><a name="975"></a><a href="#975" id="line975">     975</a> </span><span class="lineNoCov">              0 :         } elseif (empty($inputData['client_id'])) { // No credentials were specified                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container976"><a name="976"></a><a href="#976" id="line976">     976</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'Client id was not found in the headers or body');                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container977"><a name="977"></a><a href="#977" id="line977">     977</a> </span>                :         } else {                                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container978"><a name="978"></a><a href="#978" id="line978">     978</a> </span>                :             // This method is not recommended, but is supported by specification                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container979"><a name="979"></a><a href="#979" id="line979">     979</a> </span><span class="lineNoCov">              0 :             return array($inputData['client_id'], $inputData['client_secret']);                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container980"><a name="980"></a><a href="#980" id="line980">     980</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container981"><a name="981"></a><a href="#981" id="line981">     981</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container982"><a name="982"></a><a href="#982" id="line982">     982</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container983"><a name="983"></a><a href="#983" id="line983">     983</a> </span>                :     // End-user/client Authorization (Section 2 of IETF Draft).                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container984"><a name="984"></a><a href="#984" id="line984">     984</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container985"><a name="985"></a><a href="#985" id="line985">     985</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container986"><a name="986"></a><a href="#986" id="line986">     986</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container987"><a name="987"></a><a href="#987" id="line987">     987</a> </span>                :      * Pull the authorization request data out of the HTTP request.                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container988"><a name="988"></a><a href="#988" id="line988">     988</a> </span>                :      * - The redirect_uri is OPTIONAL as per draft 20. But your implementation can enforce it                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container989"><a name="989"></a><a href="#989" id="line989">     989</a> </span>                :      * by setting CONFIG_ENFORCE_INPUT_REDIRECT to true.                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container990"><a name="990"></a><a href="#990" id="line990">     990</a> </span>                :      * - The state is OPTIONAL but recommended to enforce CSRF. Draft 21 states, however, that                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container991"><a name="991"></a><a href="#991" id="line991">     991</a> </span>                :      * CSRF protection is MANDATORY. You can enforce this by setting the CONFIG_ENFORCE_STATE to true.                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container992"><a name="992"></a><a href="#992" id="line992">     992</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container993"><a name="993"></a><a href="#993" id="line993">     993</a> </span>                :      * @param $inputData - The draft specifies that the parameters should be                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container994"><a name="994"></a><a href="#994" id="line994">     994</a> </span>                :      * retrieved from GET, but you can override to whatever method you like.                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container995"><a name="995"></a><a href="#995" id="line995">     995</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container996"><a name="996"></a><a href="#996" id="line996">     996</a> </span>                :      * The authorization parameters so the authorization server can prompt                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container997"><a name="997"></a><a href="#997" id="line997">     997</a> </span>                :      * the user for approval if valid.                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container998"><a name="998"></a><a href="#998" id="line998">     998</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container999"><a name="999"></a><a href="#999" id="line999">     999</a> </span>                :      * @throws OAuth2ServerException                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container1000"><a name="1000"></a><a href="#1000" id="line1000">    1000</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.1                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1001"><a name="1001"></a><a href="#1001" id="line1001">    1001</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-10.12                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1002"><a name="1002"></a><a href="#1002" id="line1002">    1002</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1003"><a name="1003"></a><a href="#1003" id="line1003">    1003</a> </span>                :      * @ingroup oauth2_section_3                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1004"><a name="1004"></a><a href="#1004" id="line1004">    1004</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1005"><a name="1005"></a><a href="#1005" id="line1005">    1005</a> </span>                :     public function getAuthorizeParams(array $inputData = NULL) {                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container1006"><a name="1006"></a><a href="#1006" id="line1006">    1006</a> </span>                :         $filters = array(                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1007"><a name="1007"></a><a href="#1007" id="line1007">    1007</a> </span><span class="lineNoCov">              0 :             &quot;client_id&quot; =&gt; array(&quot;filter&quot; =&gt; FILTER_VALIDATE_REGEXP, &quot;options&quot; =&gt; array(&quot;regexp&quot; =&gt; self::CLIENT_ID_REGEXP), &quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1008"><a name="1008"></a><a href="#1008" id="line1008">    1008</a> </span><span class="lineNoCov">              0 :             &quot;response_type&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1009"><a name="1009"></a><a href="#1009" id="line1009">    1009</a> </span><span class="lineNoCov">              0 :             &quot;redirect_uri&quot; =&gt; array(&quot;filter&quot; =&gt; FILTER_SANITIZE_URL),                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1010"><a name="1010"></a><a href="#1010" id="line1010">    1010</a> </span><span class="lineNoCov">              0 :             &quot;state&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR),                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1011"><a name="1011"></a><a href="#1011" id="line1011">    1011</a> </span><span class="lineNoCov">              0 :             &quot;scope&quot; =&gt; array(&quot;flags&quot; =&gt; FILTER_REQUIRE_SCALAR)                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container1012"><a name="1012"></a><a href="#1012" id="line1012">    1012</a> </span><span class="lineNoCov">              0 :         );                                                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1013"><a name="1013"></a><a href="#1013" id="line1013">    1013</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1014"><a name="1014"></a><a href="#1014" id="line1014">    1014</a> </span><span class="lineNoCov">              0 :         if (!isset($inputData)) {                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1015"><a name="1015"></a><a href="#1015" id="line1015">    1015</a> </span><span class="lineNoCov">              0 :             $inputData = $_GET;                                                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1016"><a name="1016"></a><a href="#1016" id="line1016">    1016</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1017"><a name="1017"></a><a href="#1017" id="line1017">    1017</a> </span><span class="lineNoCov">              0 :         $input = filter_var_array($inputData, $filters);                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container1018"><a name="1018"></a><a href="#1018" id="line1018">    1018</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1019"><a name="1019"></a><a href="#1019" id="line1019">    1019</a> </span>                :         // Make sure a valid client id was supplied (we can not redirect because we were unable to verify the URI)                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1020"><a name="1020"></a><a href="#1020" id="line1020">    1020</a> </span><span class="lineNoCov">              0 :         if (!$input[&quot;client_id&quot;]) {                                                                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container1021"><a name="1021"></a><a href="#1021" id="line1021">    1021</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, &quot;No client id supplied&quot;); // We don't have a good URI to use                                                                                                                                                                                             </span>
+<span class="lineNum" id="container1022"><a name="1022"></a><a href="#1022" id="line1022">    1022</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1023"><a name="1023"></a><a href="#1023" id="line1023">    1023</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1024"><a name="1024"></a><a href="#1024" id="line1024">    1024</a> </span>                :         // Get client details                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container1025"><a name="1025"></a><a href="#1025" id="line1025">    1025</a> </span><span class="lineNoCov">              0 :         $stored = $this-&gt;storage-&gt;getClientDetails($input[&quot;client_id&quot;]);                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container1026"><a name="1026"></a><a href="#1026" id="line1026">    1026</a> </span><span class="lineNoCov">              0 :         if ($stored === FALSE) {                                                                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container1027"><a name="1027"></a><a href="#1027" id="line1027">    1027</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, &quot;Client id does not exist&quot;);                                                                                                                                                                                                                             </span>
+<span class="lineNum" id="container1028"><a name="1028"></a><a href="#1028" id="line1028">    1028</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1029"><a name="1029"></a><a href="#1029" id="line1029">    1029</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1030"><a name="1030"></a><a href="#1030" id="line1030">    1030</a> </span>                :         // Make sure a valid redirect_uri was supplied. If specified, it must match the stored URI.                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1031"><a name="1031"></a><a href="#1031" id="line1031">    1031</a> </span>                :         // @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-3.1.2                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1032"><a name="1032"></a><a href="#1032" id="line1032">    1032</a> </span>                :         // @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container1033"><a name="1033"></a><a href="#1033" id="line1033">    1033</a> </span>                :         // @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container1034"><a name="1034"></a><a href="#1034" id="line1034">    1034</a> </span><span class="lineNoCov">              0 :         if (!$input[&quot;redirect_uri&quot;] &amp;&amp; !$stored[&quot;redirect_uri&quot;]) {                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container1035"><a name="1035"></a><a href="#1035" id="line1035">    1035</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, 'No redirect URL was supplied or stored.');                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container1036"><a name="1036"></a><a href="#1036" id="line1036">    1036</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1037"><a name="1037"></a><a href="#1037" id="line1037">    1037</a> </span><span class="lineNoCov">              0 :         if ($this-&gt;getVariable(self::CONFIG_ENFORCE_INPUT_REDIRECT) &amp;&amp; !$input[&quot;redirect_uri&quot;]) {                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1038"><a name="1038"></a><a href="#1038" id="line1038">    1038</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, 'The redirect URI is mandatory and was not supplied.');                                                                                                                                                                                           </span>
+<span class="lineNum" id="container1039"><a name="1039"></a><a href="#1039" id="line1039">    1039</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1040"><a name="1040"></a><a href="#1040" id="line1040">    1040</a> </span>                :         // Only need to validate if redirect_uri provided on input and stored.                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1041"><a name="1041"></a><a href="#1041" id="line1041">    1041</a> </span><span class="lineNoCov">              0 :         if ($stored[&quot;redirect_uri&quot;] &amp;&amp; $input[&quot;redirect_uri&quot;] &amp;&amp; !$this-&gt;validateRedirectUri($input[&quot;redirect_uri&quot;], $stored[&quot;redirect_uri&quot;])) {                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container1042"><a name="1042"></a><a href="#1042" id="line1042">    1042</a> </span><span class="lineNoCov">              0 :             throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, 'The redirect URI provided is missing or does not match');                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1043"><a name="1043"></a><a href="#1043" id="line1043">    1043</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1044"><a name="1044"></a><a href="#1044" id="line1044">    1044</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1045"><a name="1045"></a><a href="#1045" id="line1045">    1045</a> </span>                :         // Select the redirect URI                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1046"><a name="1046"></a><a href="#1046" id="line1046">    1046</a> </span><span class="lineNoCov">              0 :         $input[&quot;redirect_uri&quot;] = isset($input[&quot;redirect_uri&quot;]) ? $input[&quot;redirect_uri&quot;] : $stored[&quot;redirect_uri&quot;];                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container1047"><a name="1047"></a><a href="#1047" id="line1047">    1047</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1048"><a name="1048"></a><a href="#1048" id="line1048">    1048</a> </span>                :         // type and client_id are required                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1049"><a name="1049"></a><a href="#1049" id="line1049">    1049</a> </span><span class="lineNoCov">              0 :         if (!$input[&quot;response_type&quot;]) {                                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1050"><a name="1050"></a><a href="#1050" id="line1050">    1050</a> </span><span class="lineNoCov">              0 :             throw new OAuth2RedirectException($input[&quot;redirect_uri&quot;], self::ERROR_INVALID_REQUEST, 'Invalid or missing response type.', $input[&quot;state&quot;]);                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1051"><a name="1051"></a><a href="#1051" id="line1051">    1051</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1052"><a name="1052"></a><a href="#1052" id="line1052">    1052</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1053"><a name="1053"></a><a href="#1053" id="line1053">    1053</a> </span>                :         // Check requested auth response type against interfaces of storage engine                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1054"><a name="1054"></a><a href="#1054" id="line1054">    1054</a> </span><span class="lineNoCov">              0 :         $reflect = new ReflectionClass($this-&gt;storage);                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1055"><a name="1055"></a><a href="#1055" id="line1055">    1055</a> </span><span class="lineNoCov">              0 :         if (!$reflect-&gt;hasConstant('RESPONSE_TYPE_' . strtoupper($input['response_type']))) {                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1056"><a name="1056"></a><a href="#1056" id="line1056">    1056</a> </span><span class="lineNoCov">              0 :             throw new OAuth2RedirectException($input[&quot;redirect_uri&quot;], self::ERROR_UNSUPPORTED_RESPONSE_TYPE, NULL, $input[&quot;state&quot;]);                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container1057"><a name="1057"></a><a href="#1057" id="line1057">    1057</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1058"><a name="1058"></a><a href="#1058" id="line1058">    1058</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1059"><a name="1059"></a><a href="#1059" id="line1059">    1059</a> </span>                :         // Validate that the requested scope is supported                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1060"><a name="1060"></a><a href="#1060" id="line1060">    1060</a> </span><span class="lineNoCov">              0 :         if ($input[&quot;scope&quot;] &amp;&amp; !$this-&gt;checkScope($input[&quot;scope&quot;], $this-&gt;getVariable(self::CONFIG_SUPPORTED_SCOPES))) {                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container1061"><a name="1061"></a><a href="#1061" id="line1061">    1061</a> </span><span class="lineNoCov">              0 :             throw new OAuth2RedirectException($input[&quot;redirect_uri&quot;], self::ERROR_INVALID_SCOPE, 'An unsupported scope was requested.', $input[&quot;state&quot;]);                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1062"><a name="1062"></a><a href="#1062" id="line1062">    1062</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1063"><a name="1063"></a><a href="#1063" id="line1063">    1063</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1064"><a name="1064"></a><a href="#1064" id="line1064">    1064</a> </span>                :         // Validate state parameter exists (if configured to enforce this)                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1065"><a name="1065"></a><a href="#1065" id="line1065">    1065</a> </span><span class="lineNoCov">              0 :         if ($this-&gt;getVariable(self::CONFIG_ENFORCE_STATE) &amp;&amp; !$input[&quot;state&quot;]) {                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1066"><a name="1066"></a><a href="#1066" id="line1066">    1066</a> </span><span class="lineNoCov">              0 :             throw new OAuth2RedirectException($input[&quot;redirect_uri&quot;], self::ERROR_INVALID_REQUEST, &quot;The state parameter is required.&quot;);                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1067"><a name="1067"></a><a href="#1067" id="line1067">    1067</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1068"><a name="1068"></a><a href="#1068" id="line1068">    1068</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1069"><a name="1069"></a><a href="#1069" id="line1069">    1069</a> </span>                :         // Return retrieved client details together with input                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1070"><a name="1070"></a><a href="#1070" id="line1070">    1070</a> </span><span class="lineNoCov">              0 :         return ($input + $stored);                                                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container1071"><a name="1071"></a><a href="#1071" id="line1071">    1071</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1072"><a name="1072"></a><a href="#1072" id="line1072">    1072</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1073"><a name="1073"></a><a href="#1073" id="line1073">    1073</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1074"><a name="1074"></a><a href="#1074" id="line1074">    1074</a> </span>                :      * Redirect the user appropriately after approval.                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1075"><a name="1075"></a><a href="#1075" id="line1075">    1075</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1076"><a name="1076"></a><a href="#1076" id="line1076">    1076</a> </span>                :      * After the user has approved or denied the access request the                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1077"><a name="1077"></a><a href="#1077" id="line1077">    1077</a> </span>                :      * authorization server should call this function to redirect the user                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1078"><a name="1078"></a><a href="#1078" id="line1078">    1078</a> </span>                :      * appropriately.                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1079"><a name="1079"></a><a href="#1079" id="line1079">    1079</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1080"><a name="1080"></a><a href="#1080" id="line1080">    1080</a> </span>                :      * @param $is_authorized                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container1081"><a name="1081"></a><a href="#1081" id="line1081">    1081</a> </span>                :      * TRUE or FALSE depending on whether the user authorized the access.                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1082"><a name="1082"></a><a href="#1082" id="line1082">    1082</a> </span>                :      * @param $user_id                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1083"><a name="1083"></a><a href="#1083" id="line1083">    1083</a> </span>                :      * Identifier of user who authorized the client                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1084"><a name="1084"></a><a href="#1084" id="line1084">    1084</a> </span>                :      * @param $params                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1085"><a name="1085"></a><a href="#1085" id="line1085">    1085</a> </span>                :      * An associative array as below:                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1086"><a name="1086"></a><a href="#1086" id="line1086">    1086</a> </span>                :      * - response_type: The requested response: an access token, an                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1087"><a name="1087"></a><a href="#1087" id="line1087">    1087</a> </span>                :      * authorization code, or both.                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1088"><a name="1088"></a><a href="#1088" id="line1088">    1088</a> </span>                :      * - client_id: The client identifier as described in Section 2.                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container1089"><a name="1089"></a><a href="#1089" id="line1089">    1089</a> </span>                :      * - redirect_uri: An absolute URI to which the authorization server                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1090"><a name="1090"></a><a href="#1090" id="line1090">    1090</a> </span>                :      * will redirect the user-agent to when the end-user authorization                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1091"><a name="1091"></a><a href="#1091" id="line1091">    1091</a> </span>                :      * step is completed.                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1092"><a name="1092"></a><a href="#1092" id="line1092">    1092</a> </span>                :      * - scope: (optional) The scope of the access request expressed as a                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1093"><a name="1093"></a><a href="#1093" id="line1093">    1093</a> </span>                :      * list of space-delimited strings.                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1094"><a name="1094"></a><a href="#1094" id="line1094">    1094</a> </span>                :      * - state: (optional) An opaque value used by the client to maintain                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1095"><a name="1095"></a><a href="#1095" id="line1095">    1095</a> </span>                :      * state between the request and callback.                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1096"><a name="1096"></a><a href="#1096" id="line1096">    1096</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1097"><a name="1097"></a><a href="#1097" id="line1097">    1097</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1098"><a name="1098"></a><a href="#1098" id="line1098">    1098</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1099"><a name="1099"></a><a href="#1099" id="line1099">    1099</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1100"><a name="1100"></a><a href="#1100" id="line1100">    1100</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1101"><a name="1101"></a><a href="#1101" id="line1101">    1101</a> </span>                :     public function finishClientAuthorization($is_authorized, $user_id = NULL, $params = array()) {                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1102"><a name="1102"></a><a href="#1102" id="line1102">    1102</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1103"><a name="1103"></a><a href="#1103" id="line1103">    1103</a> </span>                :         // We repeat this, because we need to re-validate. In theory, this could be POSTed                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1104"><a name="1104"></a><a href="#1104" id="line1104">    1104</a> </span>                :         // by a 3rd-party (because we are not internally enforcing NONCEs, etc)                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1105"><a name="1105"></a><a href="#1105" id="line1105">    1105</a> </span><span class="lineNoCov">              0 :         $params = $this-&gt;getAuthorizeParams($params);                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1106"><a name="1106"></a><a href="#1106" id="line1106">    1106</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1107"><a name="1107"></a><a href="#1107" id="line1107">    1107</a> </span><span class="lineNoCov">              0 :         $params += array('scope' =&gt; NULL, 'state' =&gt; NULL);                                                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container1108"><a name="1108"></a><a href="#1108" id="line1108">    1108</a> </span><span class="lineNoCov">              0 :         extract($params);                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1109"><a name="1109"></a><a href="#1109" id="line1109">    1109</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1110"><a name="1110"></a><a href="#1110" id="line1110">    1110</a> </span><span class="lineNoCov">              0 :         if ($state !== NULL) {                                                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container1111"><a name="1111"></a><a href="#1111" id="line1111">    1111</a> </span><span class="lineNoCov">              0 :             $result[&quot;query&quot;][&quot;state&quot;] = $state;                                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1112"><a name="1112"></a><a href="#1112" id="line1112">    1112</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1113"><a name="1113"></a><a href="#1113" id="line1113">    1113</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1114"><a name="1114"></a><a href="#1114" id="line1114">    1114</a> </span><span class="lineNoCov">              0 :         if ($is_authorized === FALSE) {                                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1115"><a name="1115"></a><a href="#1115" id="line1115">    1115</a> </span><span class="lineNoCov">              0 :             throw new OAuth2RedirectException($redirect_uri, self::ERROR_USER_DENIED, &quot;The user denied access to your application&quot;, $state);                                                                                                                                                                                                             </span>
+<span class="lineNum" id="container1116"><a name="1116"></a><a href="#1116" id="line1116">    1116</a> </span>                :         } else {                                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1117"><a name="1117"></a><a href="#1117" id="line1117">    1117</a> </span><span class="lineNoCov">              0 :             if ($response_type == self::RESPONSE_TYPE_AUTH_CODE) {                                                                                                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container1118"><a name="1118"></a><a href="#1118" id="line1118">    1118</a> </span><span class="lineNoCov">              0 :                 $result[&quot;query&quot;][&quot;code&quot;] = $this-&gt;createAuthCode($client_id, $user_id, $redirect_uri, $scope);                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container1119"><a name="1119"></a><a href="#1119" id="line1119">    1119</a> </span><span class="lineNoCov">              0 :             } elseif ($response_type == self::RESPONSE_TYPE_ACCESS_TOKEN) {                                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container1120"><a name="1120"></a><a href="#1120" id="line1120">    1120</a> </span><span class="lineNoCov">              0 :                 $result[&quot;fragment&quot;] = $this-&gt;createAccessToken($client_id, $user_id, $scope);                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1121"><a name="1121"></a><a href="#1121" id="line1121">    1121</a> </span><span class="lineNoCov">              0 :             }                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1122"><a name="1122"></a><a href="#1122" id="line1122">    1122</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1123"><a name="1123"></a><a href="#1123" id="line1123">    1123</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1124"><a name="1124"></a><a href="#1124" id="line1124">    1124</a> </span><span class="lineNoCov">              0 :         $this-&gt;doRedirectUriCallback($redirect_uri, $result);                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1125"><a name="1125"></a><a href="#1125" id="line1125">    1125</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1126"><a name="1126"></a><a href="#1126" id="line1126">    1126</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1127"><a name="1127"></a><a href="#1127" id="line1127">    1127</a> </span>                :     // Other/utility functions.                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1128"><a name="1128"></a><a href="#1128" id="line1128">    1128</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1129"><a name="1129"></a><a href="#1129" id="line1129">    1129</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1130"><a name="1130"></a><a href="#1130" id="line1130">    1130</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1131"><a name="1131"></a><a href="#1131" id="line1131">    1131</a> </span>                :      * Redirect the user agent.                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1132"><a name="1132"></a><a href="#1132" id="line1132">    1132</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1133"><a name="1133"></a><a href="#1133" id="line1133">    1133</a> </span>                :      * Handle both redirect for success or error response.                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1134"><a name="1134"></a><a href="#1134" id="line1134">    1134</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1135"><a name="1135"></a><a href="#1135" id="line1135">    1135</a> </span>                :      * @param $redirect_uri                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1136"><a name="1136"></a><a href="#1136" id="line1136">    1136</a> </span>                :      * An absolute URI to which the authorization server will redirect                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1137"><a name="1137"></a><a href="#1137" id="line1137">    1137</a> </span>                :      * the user-agent to when the end-user authorization step is completed.                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1138"><a name="1138"></a><a href="#1138" id="line1138">    1138</a> </span>                :      * @param $params                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1139"><a name="1139"></a><a href="#1139" id="line1139">    1139</a> </span>                :      * Parameters to be pass though buildUri().                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1140"><a name="1140"></a><a href="#1140" id="line1140">    1140</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1141"><a name="1141"></a><a href="#1141" id="line1141">    1141</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1142"><a name="1142"></a><a href="#1142" id="line1142">    1142</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1143"><a name="1143"></a><a href="#1143" id="line1143">    1143</a> </span>                :     private function doRedirectUriCallback($redirect_uri, $params) {                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container1144"><a name="1144"></a><a href="#1144" id="line1144">    1144</a> </span><span class="lineNoCov">              0 :         header(&quot;HTTP/1.1 &quot; . self::HTTP_FOUND);                                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1145"><a name="1145"></a><a href="#1145" id="line1145">    1145</a> </span><span class="lineNoCov">              0 :         header(&quot;Location: &quot; . $this-&gt;buildUri($redirect_uri, $params));                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1146"><a name="1146"></a><a href="#1146" id="line1146">    1146</a> </span><span class="lineNoCov">              0 :         exit();                                                                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1147"><a name="1147"></a><a href="#1147" id="line1147">    1147</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1148"><a name="1148"></a><a href="#1148" id="line1148">    1148</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1149"><a name="1149"></a><a href="#1149" id="line1149">    1149</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1150"><a name="1150"></a><a href="#1150" id="line1150">    1150</a> </span>                :      * Build the absolute URI based on supplied URI and parameters.                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1151"><a name="1151"></a><a href="#1151" id="line1151">    1151</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1152"><a name="1152"></a><a href="#1152" id="line1152">    1152</a> </span>                :      * @param $uri                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1153"><a name="1153"></a><a href="#1153" id="line1153">    1153</a> </span>                :      * An absolute URI.                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1154"><a name="1154"></a><a href="#1154" id="line1154">    1154</a> </span>                :      * @param $params                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1155"><a name="1155"></a><a href="#1155" id="line1155">    1155</a> </span>                :      * Parameters to be append as GET.                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1156"><a name="1156"></a><a href="#1156" id="line1156">    1156</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1157"><a name="1157"></a><a href="#1157" id="line1157">    1157</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1158"><a name="1158"></a><a href="#1158" id="line1158">    1158</a> </span>                :      * An absolute URI with supplied parameters.                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1159"><a name="1159"></a><a href="#1159" id="line1159">    1159</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1160"><a name="1160"></a><a href="#1160" id="line1160">    1160</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1161"><a name="1161"></a><a href="#1161" id="line1161">    1161</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1162"><a name="1162"></a><a href="#1162" id="line1162">    1162</a> </span>                :     private function buildUri($uri, $params) {                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1163"><a name="1163"></a><a href="#1163" id="line1163">    1163</a> </span><span class="lineNoCov">              0 :         $parse_url = parse_url($uri);                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1164"><a name="1164"></a><a href="#1164" id="line1164">    1164</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1165"><a name="1165"></a><a href="#1165" id="line1165">    1165</a> </span>                :         // Add our params to the parsed uri                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1166"><a name="1166"></a><a href="#1166" id="line1166">    1166</a> </span><span class="lineNoCov">              0 :         foreach ( $params as $k =&gt; $v ) {                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1167"><a name="1167"></a><a href="#1167" id="line1167">    1167</a> </span><span class="lineNoCov">              0 :             if (isset($parse_url[$k])) {                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container1168"><a name="1168"></a><a href="#1168" id="line1168">    1168</a> </span><span class="lineNoCov">              0 :                 $parse_url[$k] .= &quot;&amp;&quot; . http_build_query($v);                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1169"><a name="1169"></a><a href="#1169" id="line1169">    1169</a> </span><span class="lineNoCov">              0 :             } else {                                                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container1170"><a name="1170"></a><a href="#1170" id="line1170">    1170</a> </span><span class="lineNoCov">              0 :                 $parse_url[$k] = http_build_query($v);                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container1171"><a name="1171"></a><a href="#1171" id="line1171">    1171</a> </span>                :             }                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container1172"><a name="1172"></a><a href="#1172" id="line1172">    1172</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1173"><a name="1173"></a><a href="#1173" id="line1173">    1173</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1174"><a name="1174"></a><a href="#1174" id="line1174">    1174</a> </span>                :         // Put humpty dumpty back together                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1175"><a name="1175"></a><a href="#1175" id="line1175">    1175</a> </span>                :         return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1176"><a name="1176"></a><a href="#1176" id="line1176">    1176</a> </span><span class="lineNoCov">              0 :             ((isset($parse_url[&quot;scheme&quot;])) ? $parse_url[&quot;scheme&quot;] . &quot;://&quot; : &quot;&quot;)                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1177"><a name="1177"></a><a href="#1177" id="line1177">    1177</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;user&quot;])) ? $parse_url[&quot;user&quot;]                                                                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1178"><a name="1178"></a><a href="#1178" id="line1178">    1178</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;pass&quot;])) ? &quot;:&quot; . $parse_url[&quot;pass&quot;] : &quot;&quot;) . &quot;@&quot; : &quot;&quot;)                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1179"><a name="1179"></a><a href="#1179" id="line1179">    1179</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;host&quot;])) ? $parse_url[&quot;host&quot;] : &quot;&quot;)                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1180"><a name="1180"></a><a href="#1180" id="line1180">    1180</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;port&quot;])) ? &quot;:&quot; . $parse_url[&quot;port&quot;] : &quot;&quot;)                                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container1181"><a name="1181"></a><a href="#1181" id="line1181">    1181</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;path&quot;])) ? $parse_url[&quot;path&quot;] : &quot;&quot;)                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1182"><a name="1182"></a><a href="#1182" id="line1182">    1182</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;query&quot;])) ? &quot;?&quot; . $parse_url[&quot;query&quot;] : &quot;&quot;)                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1183"><a name="1183"></a><a href="#1183" id="line1183">    1183</a> </span><span class="lineNoCov">              0 :             . ((isset($parse_url[&quot;fragment&quot;])) ? &quot;#&quot; . $parse_url[&quot;fragment&quot;] : &quot;&quot;)                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container1184"><a name="1184"></a><a href="#1184" id="line1184">    1184</a> </span><span class="lineNoCov">              0 :         ;                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1185"><a name="1185"></a><a href="#1185" id="line1185">    1185</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1186"><a name="1186"></a><a href="#1186" id="line1186">    1186</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1187"><a name="1187"></a><a href="#1187" id="line1187">    1187</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1188"><a name="1188"></a><a href="#1188" id="line1188">    1188</a> </span>                :      * Handle the creation of access token, also issue refresh token if support.                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1189"><a name="1189"></a><a href="#1189" id="line1189">    1189</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1190"><a name="1190"></a><a href="#1190" id="line1190">    1190</a> </span>                :      * This belongs in a separate factory, but to keep it simple, I'm just                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1191"><a name="1191"></a><a href="#1191" id="line1191">    1191</a> </span>                :      * keeping it here.                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1192"><a name="1192"></a><a href="#1192" id="line1192">    1192</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1193"><a name="1193"></a><a href="#1193" id="line1193">    1193</a> </span>                :      * @param $client_id                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1194"><a name="1194"></a><a href="#1194" id="line1194">    1194</a> </span>                :      * Client identifier related to the access token.                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1195"><a name="1195"></a><a href="#1195" id="line1195">    1195</a> </span>                :      * @param $scope                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container1196"><a name="1196"></a><a href="#1196" id="line1196">    1196</a> </span>                :      * (optional) Scopes to be stored in space-separated string.                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1197"><a name="1197"></a><a href="#1197" id="line1197">    1197</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1198"><a name="1198"></a><a href="#1198" id="line1198">    1198</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1199"><a name="1199"></a><a href="#1199" id="line1199">    1199</a> </span>                :      * @ingroup oauth2_section_5                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1200"><a name="1200"></a><a href="#1200" id="line1200">    1200</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1201"><a name="1201"></a><a href="#1201" id="line1201">    1201</a> </span>                : // FunÃ§Ã£o ORIGINAL;                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1202"><a name="1202"></a><a href="#1202" id="line1202">    1202</a> </span>                : //    protected function createAccessToken($client_id, $user_id, $scope = NULL) {                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container1203"><a name="1203"></a><a href="#1203" id="line1203">    1203</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1204"><a name="1204"></a><a href="#1204" id="line1204">    1204</a> </span>                : //        $token = array(                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1205"><a name="1205"></a><a href="#1205" id="line1205">    1205</a> </span>                : //            &quot;access_token&quot; =&gt; $this-&gt;genAccessToken(),                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1206"><a name="1206"></a><a href="#1206" id="line1206">    1206</a> </span>                : //            &quot;expires_in&quot; =&gt; $this-&gt;getVariable(self::CONFIG_ACCESS_LIFETIME),                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1207"><a name="1207"></a><a href="#1207" id="line1207">    1207</a> </span>                : //            &quot;token_type&quot; =&gt; $this-&gt;getVariable(self::CONFIG_TOKEN_TYPE),                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1208"><a name="1208"></a><a href="#1208" id="line1208">    1208</a> </span>                : //            &quot;scope&quot; =&gt; $scope                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1209"><a name="1209"></a><a href="#1209" id="line1209">    1209</a> </span>                : //        );                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container1210"><a name="1210"></a><a href="#1210" id="line1210">    1210</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1211"><a name="1211"></a><a href="#1211" id="line1211">    1211</a> </span>                : //        $this-&gt;storage-&gt;setAccessToken($token[&quot;access_token&quot;], $client_id, $user_id, time() + $this-&gt;getVariable(self::CONFIG_ACCESS_LIFETIME), $scope);                                                                                                                                                                                               
+<span class="lineNum" id="container1212"><a name="1212"></a><a href="#1212" id="line1212">    1212</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1213"><a name="1213"></a><a href="#1213" id="line1213">    1213</a> </span>                : //        // Issue a refresh token also, if we support them                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1214"><a name="1214"></a><a href="#1214" id="line1214">    1214</a> </span>                : //        if ($this-&gt;storage instanceof IOAuth2RefreshTokens) {                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1215"><a name="1215"></a><a href="#1215" id="line1215">    1215</a> </span>                : //            $token[&quot;refresh_token&quot;] = $this-&gt;genAccessToken();                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1216"><a name="1216"></a><a href="#1216" id="line1216">    1216</a> </span>                : //            $this-&gt;storage-&gt;setRefreshToken($token[&quot;refresh_token&quot;], $client_id, $user_id, time() + $this-&gt;getVariable(self::CONFIG_REFRESH_LIFETIME), $scope);                                                                                                                                                                                        
+<span class="lineNum" id="container1217"><a name="1217"></a><a href="#1217" id="line1217">    1217</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1218"><a name="1218"></a><a href="#1218" id="line1218">    1218</a> </span>                : //            // If we've granted a new refresh token, expire the old one                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1219"><a name="1219"></a><a href="#1219" id="line1219">    1219</a> </span>                : //            if ($this-&gt;oldRefreshToken) {                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1220"><a name="1220"></a><a href="#1220" id="line1220">    1220</a> </span>                : //                $this-&gt;storage-&gt;unsetRefreshToken($this-&gt;oldRefreshToken);                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container1221"><a name="1221"></a><a href="#1221" id="line1221">    1221</a> </span>                : //                unset($this-&gt;oldRefreshToken);                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1222"><a name="1222"></a><a href="#1222" id="line1222">    1222</a> </span>                : //            }                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1223"><a name="1223"></a><a href="#1223" id="line1223">    1223</a> </span>                : //        }                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1224"><a name="1224"></a><a href="#1224" id="line1224">    1224</a> </span>                : //                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container1225"><a name="1225"></a><a href="#1225" id="line1225">    1225</a> </span>                : //        return $token;                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1226"><a name="1226"></a><a href="#1226" id="line1226">    1226</a> </span>                : //    }                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1227"><a name="1227"></a><a href="#1227" id="line1227">    1227</a> </span>                :     protected function createAccessToken($client_id, $user_id, $scope = NULL) {                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1228"><a name="1228"></a><a href="#1228" id="line1228">    1228</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1229"><a name="1229"></a><a href="#1229" id="line1229">    1229</a> </span>                :         $token = array(                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1230"><a name="1230"></a><a href="#1230" id="line1230">    1230</a> </span><span class="lineNoCov">              0 :             &quot;access_token&quot; =&gt; $this-&gt;genAccessToken(),                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container1231"><a name="1231"></a><a href="#1231" id="line1231">    1231</a> </span><span class="lineNoCov">              0 :             &quot;expires_in&quot; =&gt; $this-&gt;getVariable(self::CONFIG_ACCESS_LIFETIME),                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1232"><a name="1232"></a><a href="#1232" id="line1232">    1232</a> </span><span class="lineNoCov">              0 :             &quot;token_type&quot; =&gt; $this-&gt;getVariable(self::CONFIG_TOKEN_TYPE),                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container1233"><a name="1233"></a><a href="#1233" id="line1233">    1233</a> </span>                :             &quot;scope&quot; =&gt; $scope                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container1234"><a name="1234"></a><a href="#1234" id="line1234">    1234</a> </span><span class="lineNoCov">              0 :         );                                                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1235"><a name="1235"></a><a href="#1235" id="line1235">    1235</a> </span><span class="lineNoCov">              0 :         $token[&quot;refresh_token&quot;] = $this-&gt;genAccessToken();                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1236"><a name="1236"></a><a href="#1236" id="line1236">    1236</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1237"><a name="1237"></a><a href="#1237" id="line1237">    1237</a> </span><span class="lineNoCov">              0 :         $this-&gt;storage-&gt;setAccessToken($token[&quot;access_token&quot;], $client_id, $user_id, time() + $this-&gt;getVariable(self::CONFIG_ACCESS_LIFETIME), $scope , $token['refresh_token']);                                                                                                                                                                       </span>
+<span class="lineNum" id="container1238"><a name="1238"></a><a href="#1238" id="line1238">    1238</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1239"><a name="1239"></a><a href="#1239" id="line1239">    1239</a> </span>                :         // Issue a refresh token also, if we support them                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1240"><a name="1240"></a><a href="#1240" id="line1240">    1240</a> </span><span class="lineNoCov">              0 :         if ($this-&gt;storage instanceof IOAuth2RefreshTokens) {                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1241"><a name="1241"></a><a href="#1241" id="line1241">    1241</a> </span><span class="lineNoCov">              0 :             $this-&gt;storage-&gt;setRefreshToken($token[&quot;refresh_token&quot;], $client_id, $user_id, time() + $this-&gt;getVariable(self::CONFIG_REFRESH_LIFETIME), $scope);                                                                                                                                                                                          </span>
+<span class="lineNum" id="container1242"><a name="1242"></a><a href="#1242" id="line1242">    1242</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1243"><a name="1243"></a><a href="#1243" id="line1243">    1243</a> </span>                :             // If we've granted a new refresh token, expire the old one                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1244"><a name="1244"></a><a href="#1244" id="line1244">    1244</a> </span><span class="lineNoCov">              0 :             if ($this-&gt;oldRefreshToken) {                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1245"><a name="1245"></a><a href="#1245" id="line1245">    1245</a> </span><span class="lineNoCov">              0 :                 $this-&gt;storage-&gt;unsetRefreshToken($this-&gt;oldRefreshToken);                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1246"><a name="1246"></a><a href="#1246" id="line1246">    1246</a> </span><span class="lineNoCov">              0 :                 unset($this-&gt;oldRefreshToken);                                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container1247"><a name="1247"></a><a href="#1247" id="line1247">    1247</a> </span><span class="lineNoCov">              0 :             }                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container1248"><a name="1248"></a><a href="#1248" id="line1248">    1248</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                </span>
+<span class="lineNum" id="container1249"><a name="1249"></a><a href="#1249" id="line1249">    1249</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1250"><a name="1250"></a><a href="#1250" id="line1250">    1250</a> </span><span class="lineNoCov">              0 :         return $token;                                                                                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container1251"><a name="1251"></a><a href="#1251" id="line1251">    1251</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1252"><a name="1252"></a><a href="#1252" id="line1252">    1252</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1253"><a name="1253"></a><a href="#1253" id="line1253">    1253</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1254"><a name="1254"></a><a href="#1254" id="line1254">    1254</a> </span>                :      * Handle the creation of auth code.                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1255"><a name="1255"></a><a href="#1255" id="line1255">    1255</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1256"><a name="1256"></a><a href="#1256" id="line1256">    1256</a> </span>                :      * This belongs in a separate factory, but to keep it simple, I'm just                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1257"><a name="1257"></a><a href="#1257" id="line1257">    1257</a> </span>                :      * keeping it here.                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1258"><a name="1258"></a><a href="#1258" id="line1258">    1258</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1259"><a name="1259"></a><a href="#1259" id="line1259">    1259</a> </span>                :      * @param $client_id                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1260"><a name="1260"></a><a href="#1260" id="line1260">    1260</a> </span>                :      * Client identifier related to the access token.                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1261"><a name="1261"></a><a href="#1261" id="line1261">    1261</a> </span>                :      * @param $redirect_uri                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1262"><a name="1262"></a><a href="#1262" id="line1262">    1262</a> </span>                :      * An absolute URI to which the authorization server will redirect the                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1263"><a name="1263"></a><a href="#1263" id="line1263">    1263</a> </span>                :      * user-agent to when the end-user authorization step is completed.                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1264"><a name="1264"></a><a href="#1264" id="line1264">    1264</a> </span>                :      * @param $scope                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container1265"><a name="1265"></a><a href="#1265" id="line1265">    1265</a> </span>                :      * (optional) Scopes to be stored in space-separated string.                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1266"><a name="1266"></a><a href="#1266" id="line1266">    1266</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1267"><a name="1267"></a><a href="#1267" id="line1267">    1267</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1268"><a name="1268"></a><a href="#1268" id="line1268">    1268</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1269"><a name="1269"></a><a href="#1269" id="line1269">    1269</a> </span>                :     private function createAuthCode($client_id, $user_id, $redirect_uri, $scope = NULL) {                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1270"><a name="1270"></a><a href="#1270" id="line1270">    1270</a> </span><span class="lineNoCov">              0 :         $code = $this-&gt;genAuthCode();                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1271"><a name="1271"></a><a href="#1271" id="line1271">    1271</a> </span><span class="lineNoCov">              0 :         $this-&gt;storage-&gt;setAuthCode($code, $client_id, $user_id, $redirect_uri, time() + $this-&gt;getVariable(self::CONFIG_AUTH_LIFETIME), $scope);                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1272"><a name="1272"></a><a href="#1272" id="line1272">    1272</a> </span><span class="lineNoCov">              0 :         return $code;                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1273"><a name="1273"></a><a href="#1273" id="line1273">    1273</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1274"><a name="1274"></a><a href="#1274" id="line1274">    1274</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1275"><a name="1275"></a><a href="#1275" id="line1275">    1275</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1276"><a name="1276"></a><a href="#1276" id="line1276">    1276</a> </span>                :      * Generates an unique access token.                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1277"><a name="1277"></a><a href="#1277" id="line1277">    1277</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1278"><a name="1278"></a><a href="#1278" id="line1278">    1278</a> </span>                :      * Implementing classes may want to override this function to implement                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1279"><a name="1279"></a><a href="#1279" id="line1279">    1279</a> </span>                :      * other access token generation schemes.                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container1280"><a name="1280"></a><a href="#1280" id="line1280">    1280</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1281"><a name="1281"></a><a href="#1281" id="line1281">    1281</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1282"><a name="1282"></a><a href="#1282" id="line1282">    1282</a> </span>                :      * An unique access token.                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1283"><a name="1283"></a><a href="#1283" id="line1283">    1283</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1284"><a name="1284"></a><a href="#1284" id="line1284">    1284</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1285"><a name="1285"></a><a href="#1285" id="line1285">    1285</a> </span>                :      * @see OAuth2::genAuthCode()                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container1286"><a name="1286"></a><a href="#1286" id="line1286">    1286</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1287"><a name="1287"></a><a href="#1287" id="line1287">    1287</a> </span>                :     protected function genAccessToken() {                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1288"><a name="1288"></a><a href="#1288" id="line1288">    1288</a> </span><span class="lineNoCov">              0 :         $tokenLen = 40;                                                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container1289"><a name="1289"></a><a href="#1289" id="line1289">    1289</a> </span><span class="lineNoCov">              0 :         if (file_exists('/dev/urandom')) { // Get 100 bytes of random data                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1290"><a name="1290"></a><a href="#1290" id="line1290">    1290</a> </span><span class="lineNoCov">              0 :             $randomData = file_get_contents('/dev/urandom', false, null, 0, 100) . uniqid(mt_rand(), true);                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container1291"><a name="1291"></a><a href="#1291" id="line1291">    1291</a> </span><span class="lineNoCov">              0 :         } else {                                                                                                                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container1292"><a name="1292"></a><a href="#1292" id="line1292">    1292</a> </span><span class="lineNoCov">              0 :             $randomData = mt_rand() . mt_rand() . mt_rand() . mt_rand() . microtime(true) . uniqid(mt_rand(), true);                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container1293"><a name="1293"></a><a href="#1293" id="line1293">    1293</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1294"><a name="1294"></a><a href="#1294" id="line1294">    1294</a> </span><span class="lineNoCov">              0 :         return substr(hash('sha512', $randomData), 0, $tokenLen);                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1295"><a name="1295"></a><a href="#1295" id="line1295">    1295</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1296"><a name="1296"></a><a href="#1296" id="line1296">    1296</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1297"><a name="1297"></a><a href="#1297" id="line1297">    1297</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1298"><a name="1298"></a><a href="#1298" id="line1298">    1298</a> </span>                :      * Generates an unique auth code.                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1299"><a name="1299"></a><a href="#1299" id="line1299">    1299</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1300"><a name="1300"></a><a href="#1300" id="line1300">    1300</a> </span>                :      * Implementing classes may want to override this function to implement                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1301"><a name="1301"></a><a href="#1301" id="line1301">    1301</a> </span>                :      * other auth code generation schemes.                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1302"><a name="1302"></a><a href="#1302" id="line1302">    1302</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1303"><a name="1303"></a><a href="#1303" id="line1303">    1303</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1304"><a name="1304"></a><a href="#1304" id="line1304">    1304</a> </span>                :      * An unique auth code.                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1305"><a name="1305"></a><a href="#1305" id="line1305">    1305</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1306"><a name="1306"></a><a href="#1306" id="line1306">    1306</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1307"><a name="1307"></a><a href="#1307" id="line1307">    1307</a> </span>                :      * @see OAuth2::genAccessToken()                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container1308"><a name="1308"></a><a href="#1308" id="line1308">    1308</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1309"><a name="1309"></a><a href="#1309" id="line1309">    1309</a> </span>                :     protected function genAuthCode() {                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1310"><a name="1310"></a><a href="#1310" id="line1310">    1310</a> </span><span class="lineNoCov">              0 :         return $this-&gt;genAccessToken(); // let's reuse the same scheme for token generation                                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container1311"><a name="1311"></a><a href="#1311" id="line1311">    1311</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1312"><a name="1312"></a><a href="#1312" id="line1312">    1312</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1313"><a name="1313"></a><a href="#1313" id="line1313">    1313</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1314"><a name="1314"></a><a href="#1314" id="line1314">    1314</a> </span>                :      * Pull out the Authorization HTTP header and return it.                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container1315"><a name="1315"></a><a href="#1315" id="line1315">    1315</a> </span>                :      * According to draft 20, standard basic authorization is the only                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1316"><a name="1316"></a><a href="#1316" id="line1316">    1316</a> </span>                :      * header variable required (this does not apply to extended grant types).                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1317"><a name="1317"></a><a href="#1317" id="line1317">    1317</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1318"><a name="1318"></a><a href="#1318" id="line1318">    1318</a> </span>                :      * Implementing classes may need to override this function if need be.                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container1319"><a name="1319"></a><a href="#1319" id="line1319">    1319</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1320"><a name="1320"></a><a href="#1320" id="line1320">    1320</a> </span>                :      * @todo We may need to re-implement pulling out apache headers to support extended grant types                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1321"><a name="1321"></a><a href="#1321" id="line1321">    1321</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1322"><a name="1322"></a><a href="#1322" id="line1322">    1322</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1323"><a name="1323"></a><a href="#1323" id="line1323">    1323</a> </span>                :      * An array of the basic username and password provided.                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container1324"><a name="1324"></a><a href="#1324" id="line1324">    1324</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1325"><a name="1325"></a><a href="#1325" id="line1325">    1325</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-2.4.1                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1326"><a name="1326"></a><a href="#1326" id="line1326">    1326</a> </span>                :      * @ingroup oauth2_section_2                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1327"><a name="1327"></a><a href="#1327" id="line1327">    1327</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1328"><a name="1328"></a><a href="#1328" id="line1328">    1328</a> </span>                :     protected function getAuthorizationHeader() {                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container1329"><a name="1329"></a><a href="#1329" id="line1329">    1329</a> </span>                :         return array(                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1330"><a name="1330"></a><a href="#1330" id="line1330">    1330</a> </span><span class="lineNoCov">              0 :             'PHP_AUTH_USER' =&gt; isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : '',                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1331"><a name="1331"></a><a href="#1331" id="line1331">    1331</a> </span><span class="lineNoCov">              0 :             'PHP_AUTH_PW' =&gt; isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1332"><a name="1332"></a><a href="#1332" id="line1332">    1332</a> </span><span class="lineNoCov">              0 :         );                                                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1333"><a name="1333"></a><a href="#1333" id="line1333">    1333</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1334"><a name="1334"></a><a href="#1334" id="line1334">    1334</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1335"><a name="1335"></a><a href="#1335" id="line1335">    1335</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1336"><a name="1336"></a><a href="#1336" id="line1336">    1336</a> </span>                :      * Send out HTTP headers for JSON.                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1337"><a name="1337"></a><a href="#1337" id="line1337">    1337</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1338"><a name="1338"></a><a href="#1338" id="line1338">    1338</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.1                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1339"><a name="1339"></a><a href="#1339" id="line1339">    1339</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1340"><a name="1340"></a><a href="#1340" id="line1340">    1340</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container1341"><a name="1341"></a><a href="#1341" id="line1341">    1341</a> </span>                :      * @ingroup oauth2_section_5                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container1342"><a name="1342"></a><a href="#1342" id="line1342">    1342</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1343"><a name="1343"></a><a href="#1343" id="line1343">    1343</a> </span>                :     private function sendJsonHeaders() {                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container1344"><a name="1344"></a><a href="#1344" id="line1344">    1344</a> </span><span class="lineNoCov">              0 :         if (php_sapi_name() === 'cli' || headers_sent()) {                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1345"><a name="1345"></a><a href="#1345" id="line1345">    1345</a> </span><span class="lineNoCov">              0 :             return;                                                                                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container1346"><a name="1346"></a><a href="#1346" id="line1346">    1346</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1347"><a name="1347"></a><a href="#1347" id="line1347">    1347</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1348"><a name="1348"></a><a href="#1348" id="line1348">    1348</a> </span><span class="lineNoCov">              0 :         header(&quot;Content-Type: application/json&quot;);                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container1349"><a name="1349"></a><a href="#1349" id="line1349">    1349</a> </span><span class="lineNoCov">              0 :         header(&quot;Cache-Control: no-store&quot;);                                                                                                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container1350"><a name="1350"></a><a href="#1350" id="line1350">    1350</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1351"><a name="1351"></a><a href="#1351" id="line1351">    1351</a> </span>                :                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1352"><a name="1352"></a><a href="#1352" id="line1352">    1352</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1353"><a name="1353"></a><a href="#1353" id="line1353">    1353</a> </span>                :      * Internal method for validating redirect URI supplied                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container1354"><a name="1354"></a><a href="#1354" id="line1354">    1354</a> </span>                :      * @param string $inputUri                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container1355"><a name="1355"></a><a href="#1355" id="line1355">    1355</a> </span>                :      * @param string $storedUri                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container1356"><a name="1356"></a><a href="#1356" id="line1356">    1356</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container1357"><a name="1357"></a><a href="#1357" id="line1357">    1357</a> </span>                :     protected function validateRedirectUri($inputUri, $storedUri) {                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container1358"><a name="1358"></a><a href="#1358" id="line1358">    1358</a> </span><span class="lineNoCov">              0 :         if (!$inputUri || !$storedUri) {                                                                                                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container1359"><a name="1359"></a><a href="#1359" id="line1359">    1359</a> </span><span class="lineNoCov">              0 :             return false; // if either one is missing, assume INVALID                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container1360"><a name="1360"></a><a href="#1360" id="line1360">    1360</a> </span>                :         }                                                                                                                                                                                                                                                                                                                                                
+<span class="lineNum" id="container1361"><a name="1361"></a><a href="#1361" id="line1361">    1361</a> </span><span class="lineNoCov">              0 :         return strcasecmp(substr($inputUri, 0, strlen($storedUri)), $storedUri) === 0;                                                                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container1362"><a name="1362"></a><a href="#1362" id="line1362">    1362</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container1363"><a name="1363"></a><a href="#1363" id="line1363">    1363</a> </span>                : }                                                                                                                                                                                                                                                                                                                                                        
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib_OAuth2RedirectException.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib_OAuth2RedirectException.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib_OAuth2RedirectException.php.html	(revision 5888)
@@ -0,0 +1,308 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>OAuth2RedirectException.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">OAuth2RedirectException.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_oauth2.html">oauth2</a>/<a href="library_oauth2_lib.html">lib</a>/<a href="library_oauth2_lib_OAuth2RedirectException.php.html">OAuth2RedirectException.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 16</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">OAuth2RedirectException</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+          <td class="crap">210</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 16</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#32">__construct($redirect_uri, $error, $error_description = NULL, $state = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#47">sendHeaders()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#66">buildUri($uri, $params)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">132</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 7</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : /**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                :  * Redirect the end-user's user agent with error message.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :  * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :  *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :  * @ingroup oauth2_error                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :  */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                : class OAuth2RedirectException extends OAuth2ServerException {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :     protected $redirectUri;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :      * @param $redirect_uri                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :      * An absolute URI to which the authorization server will redirect the                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :      * user-agent to when the end-user authorization step is completed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :      * @param $error                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :      * A single error code as described in Section 4.1.2.1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :      * @param $error_description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :      * (optional) A human-readable text providing additional information,                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :      * used to assist in the understanding and resolution of the error                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :      * occurred.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :      * @param $state                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :      * (optional) REQUIRED if the &quot;state&quot; parameter was present in the client                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :      * authorization request. Set to the exact value received from the client.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :      * @ingroup oauth2_error                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :     public function __construct($redirect_uri, $error, $error_description = NULL, $state = NULL) {                                                                                                                                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span><span class="lineNoCov">              0 :         parent::__construct(OAuth2::HTTP_FOUND, $error, $error_description);                                                                                                                                                                                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span><span class="lineNoCov">              0 :         $this-&gt;redirectUri = $redirect_uri;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span><span class="lineNoCov">              0 :         if ($state) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span><span class="lineNoCov">              0 :             $this-&gt;errorData['state'] = $state;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :      * Redirect the user agent.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :     protected function sendHeaders() {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span><span class="lineNoCov">              0 :         $params = array('query' =&gt; $this-&gt;errorData);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span><span class="lineNoCov">              0 :         header(&quot;Location: &quot; . $this-&gt;buildUri($this-&gt;redirectUri, $params));                                                                                                                                                                                                                                                                                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span><span class="lineNoCov">              0 :         exit(); // No point in printing out data if we're redirecting                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :     /**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :      * Build the absolute URI based on supplied URI and parameters.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span>                :      * @param $uri                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :      * An absolute URI.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                :      * @param $params                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :      * Parameters to be append as GET.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :      * @return                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :      * An absolute URI with supplied parameters.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :      *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :      */                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :     protected function buildUri($uri, $params) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span><span class="lineNoCov">              0 :         $parse_url = parse_url($uri);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </span>
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :         // Add our params to the parsed uri                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span><span class="lineNoCov">              0 :         foreach ( $params as $k =&gt; $v ) {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span><span class="lineNoCov">              0 :             if (isset($parse_url[$k]))                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span><span class="lineNoCov">              0 :                 $parse_url[$k] .= &quot;&amp;&quot; . http_build_query($v);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </span>
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                :             else                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span><span class="lineNoCov">              0 :                 $parse_url[$k] = http_build_query($v);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :         // Put humpty dumpty back together                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span><span class="lineNoCov">              0 :         return ((isset($parse_url[&quot;scheme&quot;])) ? $parse_url[&quot;scheme&quot;] . &quot;://&quot; : &quot;&quot;) . ((isset($parse_url[&quot;user&quot;])) ? $parse_url[&quot;user&quot;] . ((isset($parse_url[&quot;pass&quot;])) ? &quot;:&quot; . $parse_url[&quot;pass&quot;] : &quot;&quot;) . &quot;@&quot; : &quot;&quot;) . ((isset($parse_url[&quot;host&quot;])) ? $parse_url[&quot;host&quot;] : &quot;&quot;) . ((isset($parse_url[&quot;port&quot;])) ? &quot;:&quot; . $parse_url[&quot;port&quot;] : &quot;&quot;) . ((isset($parse_url[&quot;path&quot;])) ? $parse_url[&quot;path&quot;] : &quot;&quot;) . ((isset($parse_url[&quot;query&quot;])) ? &quot;?&quot; . $parse_url[&quot;query&quot;] : &quot;&quot;) . ((isset($parse_url[&quot;fragment&quot;])) ? &quot;#&quot; . $parse_url[&quot;fragment&quot;] : &quot;&quot;);</span>
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :     }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic.dashboard.html	(revision 5888)
@@ -0,0 +1,128 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>tonic</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [3,0,0,1,0,0,0,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[28.444444444444,101,"<a href=\"library_tonic_lib_tonic.php.html#21\">Request<\/a>"],[0,14,"<a href=\"library_tonic_lib_tonic.php.html#599\">Resource<\/a>"],[0,16,"<a href=\"library_tonic_lib_tonic.php.html#698\">Response<\/a>"],[0,1,"<a href=\"library_tonic_lib_tonic.php.html#841\">ResponseException<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">tonic</td></tr>
+      <tr><td><div align="center"><p><a href="library_tonic.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="library_tonic_lib_tonic.php.html#21">Request</a> (3838)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#698">Response</a> (272)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#599">Resource</a> (210)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="library_tonic_lib_tonic.php.html#783">Response::addHeader</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#752">Response::__construct</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#644">Resource::exec</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#791">Response::addCacheHeader</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#803">Response::addEtag</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#848">ResponseException::response</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#807">Response::addVary</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#624">Resource::secured</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#607">Resource::__construct</a> (0%)</li>
+              <li><a href="library_tonic_lib_tonic.php.html#379">Request::getResourceClassDetails</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:14 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic_lib.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic_lib.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic_lib.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>lib</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">lib</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_tonic.html">tonic</a>/<a href="library_tonic_lib.html">lib</a> (<a href="library_tonic_lib.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="22.38%">
+              <div class="size scarlet_red"  style="width:22.377622377622%" title="22.38%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">22.38%</td>
+          <td class="coverNumLo">64 / 286</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 16</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="library_tonic_lib_tonic.php.html">tonic.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="22.38%">
+              <div class="size scarlet_red"  style="width:22.377622377622%" title="22.38%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">22.38%</td>
+          <td class="coverNumLo">64 / 286</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 16</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:14 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_cache.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_cache.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_cache.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>cache</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">cache</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="api.html">api</a>/<a href="api_cache.html">cache</a> (<a href="api_cache.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.00%">
+              <div class="size butter"  style="width:50%" title="50.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.00%</td>
+          <td class="coverNumMed">3 / 6</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="40.00%">
+                <div class="size butter"  style="width:40%" title="40.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">40.00%</td>
+          <td class="coverNumMed">2 / 5</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="api_cache_MemoryCache.php.html">MemoryCache.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.00%">
+              <div class="size butter"  style="width:50%" title="50.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.00%</td>
+          <td class="coverNumMed">3 / 6</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="40.00%">
+                <div class="size butter"  style="width:40%" title="40.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">40.00%</td>
+          <td class="coverNumMed">2 / 5</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/highcharts.js
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/highcharts.js	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/highcharts.js	(revision 5888)
@@ -0,0 +1,170 @@
+/*
+ Highcharts JS v2.1.6 (2011-07-08)
+
+ (c) 2009-2011 Torstein H?nsi
+
+ License: www.highcharts.com/license
+*/
+(function(){function pa(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function ja(a,b){return parseInt(a,b||10)}function Pb(a){return typeof a==="string"}function Lb(a){return typeof a==="object"}function dc(a){return typeof a==="number"}function qc(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function M(a){return a!==Va&&a!==null}function Ea(a,b,c){var d,e;if(Pb(b))if(M(c))a.setAttribute(b,c);else{if(a&&a.getAttribute)e=a.getAttribute(b)}else if(M(b)&&Lb(b))for(d in b)a.setAttribute(d,
+b[d]);return e}function rc(a){if(!a||a.constructor!==Array)a=[a];return a}function C(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++){c=a[b];if(typeof c!=="undefined"&&c!==null)return c}}function Na(a,b){if(Bc)if(b&&b.opacity!==Va)b.filter="alpha(opacity="+b.opacity*100+")";pa(a.style,b)}function ib(a,b,c,d,e){a=wa.createElement(a);b&&pa(a,b);e&&Na(a,{padding:0,border:jb,margin:0});c&&Na(a,c);d&&d.appendChild(a);return a}function yb(a,b){var c=function(){};c.prototype=new a;pa(c.prototype,b);return c}
+function zd(a,b,c,d){var e=Wa.lang;a=a;var f=isNaN(b=$a(b))?2:b;b=c===undefined?e.decimalPoint:c;d=d===undefined?e.thousandsSep:d;e=a<0?"-":"";c=String(ja(a=$a(+a||0).toFixed(f)));var g=c.length>3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+$a(a-c).toFixed(f).slice(2):"")}function Ad(){this.symbol=this.color=0}function ec(a,b){Cc=C(a,b.animation)}function Bd(){var a=Wa.global.useUTC;Dc=a?Date.UTC:function(b,c,d,e,f,g){return(new Date(b,c,C(d,1),C(e,
+0),C(f,0),C(g,0))).getTime()};bd=a?"getUTCMinutes":"getMinutes";cd=a?"getUTCHours":"getHours";dd=a?"getUTCDay":"getDay";sc=a?"getUTCDate":"getDate";Ec=a?"getUTCMonth":"getMonth";Fc=a?"getUTCFullYear":"getFullYear";Cd=a?"setUTCMinutes":"setMinutes";Dd=a?"setUTCHours":"setHours";ed=a?"setUTCDate":"setDate";Ed=a?"setUTCMonth":"setMonth";Fd=a?"setUTCFullYear":"setFullYear"}function Gc(a){Hc||(Hc=ib(Qb));a&&Hc.appendChild(a);Hc.innerHTML=""}function Ic(){}function Gd(a,b){function c(m,i){function y(k,
+o){this.pos=k;this.minor=o;this.isNew=true;o||this.addLabel()}function x(k){if(k){this.options=k;this.id=k.id}return this}function Q(k,o,r){this.isNegative=o;this.options=k;this.x=r;this.alignOptions={align:k.align||(qa?o?"left":"right":"center"),verticalAlign:k.verticalAlign||(qa?"middle":o?"bottom":"top"),y:C(k.y,qa?4:o?14:-6),x:C(k.x,qa?o?-6:6:0)};this.textAlign=k.textAlign||(qa?o?"right":"left":"center")}function na(){var k=[],o=[],r;T=ra=null;Fa=[];u(Ia,function(q){r=false;u(["xAxis","yAxis"],
+function(ma){if(q.isCartesian&&(ma==="xAxis"&&Ga||ma==="yAxis"&&!Ga)&&(q.options[ma]===i.index||q.options[ma]===Va&&i.index===0)){q[ma]=v;Fa.push(q);r=true}});if(!q.visible&&w.ignoreHiddenSeries)r=false;if(r){var A,U,G,V,Ba;if(!Ga){A=q.options.stacking;Jc=A==="percent";if(A){V=q.type+C(q.options.stack,"");Ba="-"+V;q.stackKey=V;U=k[V]||[];k[V]=U;G=o[Ba]||[];o[Ba]=G}if(Jc){T=0;ra=99}}if(q.isCartesian){u(q.data,function(ma){var s=ma.x,W=ma.y,ba=W<0,ia=ba?G:U,zb=ba?Ba:V;if(T===null)T=ra=ma[$];if(Ga)if(s>
+ra)ra=s;else{if(s<T)T=s}else if(M(W)){if(A)ia[s]=M(ia[s])?ia[s]+W:W;W=ia?ia[s]:W;ma=C(ma.low,W);if(!Jc)if(W>ra)ra=W;else if(ma<T)T=ma;if(A){t[zb]||(t[zb]={});t[zb][s]||(t[zb][s]=new Q(i.stackLabels,ba,s));t[zb][s].setTotal(W)}}});if(/(area|column|bar)/.test(q.type)&&!Ga)if(T>=0){T=0;Hd=true}else if(ra<0){ra=0;Id=true}}}})}function O(k,o){var r,q;Fb=o?1:sa.pow(10,kb(sa.log(k)/sa.LN10));r=k/Fb;if(!o){o=[1,2,2.5,5,10];if(i.allowDecimals===false||H)if(Fb===1)o=[1,2,5,10];else if(Fb<=0.1)o=[1/Fb]}for(q=
+0;q<o.length;q++){k=o[q];if(r<=(o[q]+(o[q+1]||o[q]))/2)break}k*=Fb;return k}function ea(k){var o;o=k;Fb=C(Fb,sa.pow(10,kb(sa.log(Ta)/sa.LN10)));if(Fb<1){o=X(1/Fb)*10;o=X(k*o)/o}return o}function Ma(){var k,o,r,q,A=i.tickInterval,U=i.tickPixelInterval;k=i.maxZoom||(Ga&&!M(i.min)&&!M(i.max)?qb(m.smallestInterval*5,ra-T):null);oa=z?Ca:xa;if(Rb){r=m[Ga?"xAxis":"yAxis"][i.linkedTo];q=r.getExtremes();ca=C(q.min,q.dataMin);fa=C(q.max,q.dataMax)}else{ca=C(Ja,i.min,T);fa=C(Oa,i.max,ra)}if(H){ca=sa.log(ca)/
+sa.LN10;fa=sa.log(fa)/sa.LN10}if(fa-ca<k){q=(k-fa+ca)/2;ca=Ha(ca-q,C(i.min,ca-q),T);fa=qb(ca+k,C(i.max,ca+k),ra)}if(!Xa&&!Jc&&!Rb&&M(ca)&&M(fa)){k=fa-ca||1;if(!M(i.min)&&!M(Ja)&&Jd&&(T<0||!Hd))ca-=k*Jd;if(!M(i.max)&&!M(Oa)&&Kd&&(ra>0||!Id))fa+=k*Kd}Ta=ca===fa?1:Rb&&!A&&U===r.options.tickPixelInterval?r.tickInterval:C(A,Xa?1:(fa-ca)*U/oa);if(!F&&!M(i.tickInterval))Ta=O(Ta);v.tickInterval=Ta;Kc=i.minorTickInterval==="auto"&&Ta?Ta/5:i.minorTickInterval;if(F){ta=[];A=Wa.global.useUTC;var G=1E3/rb,V=6E4/
+rb,Ba=36E5/rb;U=864E5/rb;k=6048E5/rb;q=2592E6/rb;var ma=31556952E3/rb,s=[["second",G,[1,2,5,10,15,30]],["minute",V,[1,2,5,10,15,30]],["hour",Ba,[1,2,3,4,6,8,12]],["day",U,[1,2]],["week",k,[1,2]],["month",q,[1,2,3,4,6]],["year",ma,null]],W=s[6],ba=W[1],ia=W[2];for(r=0;r<s.length;r++){W=s[r];ba=W[1];ia=W[2];if(s[r+1])if(Ta<=(ba*ia[ia.length-1]+s[r+1][1])/2)break}if(ba===ma&&Ta<5*ba)ia=[1,2,5];s=O(Ta/ba,ia);ia=new Date(ca*rb);ia.setMilliseconds(0);if(ba>=G)ia.setSeconds(ba>=V?0:s*kb(ia.getSeconds()/
+s));if(ba>=V)ia[Cd](ba>=Ba?0:s*kb(ia[bd]()/s));if(ba>=Ba)ia[Dd](ba>=U?0:s*kb(ia[cd]()/s));if(ba>=U)ia[ed](ba>=q?1:s*kb(ia[sc]()/s));if(ba>=q){ia[Ed](ba>=ma?0:s*kb(ia[Ec]()/s));o=ia[Fc]()}if(ba>=ma){o-=o%s;ia[Fd](o)}ba===k&&ia[ed](ia[sc]()-ia[dd]()+i.startOfWeek);r=1;o=ia[Fc]();G=ia.getTime()/rb;V=ia[Ec]();for(Ba=ia[sc]();G<fa&&r<Ca;){ta.push(G);if(ba===ma)G=Dc(o+r*s,0)/rb;else if(ba===q)G=Dc(o,V+r*s)/rb;else if(!A&&(ba===U||ba===k))G=Dc(o,V,Ba+r*s*(ba===U?1:7));else G+=ba*s;r++}ta.push(G);Lc=i.dateTimeLabelFormats[W[0]]}else{r=
+ea(kb(ca/Ta)*Ta);o=ea(fd(fa/Ta)*Ta);ta=[];for(r=ea(r);r<=o;){ta.push(r);r=ea(r+Ta)}}if(!Rb){if(Xa||Ga&&m.hasColumn){o=(Xa?1:Ta)*0.5;if(Xa||!M(C(i.min,Ja)))ca-=o;if(Xa||!M(C(i.max,Oa)))fa+=o}o=ta[0];r=ta[ta.length-1];if(i.startOnTick)ca=o;else ca>o&&ta.shift();if(i.endOnTick)fa=r;else fa<r&&ta.pop();Mb||(Mb={x:0,y:0});if(!F&&ta.length>Mb[$])Mb[$]=ta.length}}function Aa(){var k,o;Gb=ca;Ld=fa;na();Ma();fb=ua;ua=oa/(fa-ca||1);if(!Ga)for(k in t)for(o in t[k])t[k][o].cum=t[k][o].total;if(!v.isDirty)v.isDirty=
+ca!==Gb||fa!==Ld}function Qa(k){k=(new x(k)).render();Sb.push(k);return k}function Ra(){var k=i.title,o=i.stackLabels,r=i.alternateGridColor,q=i.lineWidth,A,U,G=m.hasRendered,V=G&&M(Gb)&&!isNaN(Gb);A=Fa.length&&M(ca)&&M(fa);oa=z?Ca:xa;ua=oa/(fa-ca||1);eb=z?Y:sb;if(A||Rb){if(Kc&&!Xa)for(A=ca+(ta[0]-ca)%Kc;A<=fa;A+=Kc){Zb[A]||(Zb[A]=new y(A,true));V&&Zb[A].isNew&&Zb[A].render(null,true);Zb[A].isActive=true;Zb[A].render()}u(ta,function(s,W){if(!Rb||s>=ca&&s<=fa){V&&tb[s].isNew&&tb[s].render(W,true);
+tb[s].isActive=true;tb[s].render(W)}});r&&u(ta,function(s,W){if(W%2===0&&s<fa){fc[s]||(fc[s]=new x);fc[s].options={from:s,to:ta[W+1]!==Va?ta[W+1]:fa,color:r};fc[s].render();fc[s].isActive=true}});G||u((i.plotLines||[]).concat(i.plotBands||[]),function(s){Sb.push((new x(s)).render())})}u([tb,Zb,fc],function(s){for(var W in s)if(s[W].isActive)s[W].isActive=false;else{s[W].destroy();delete s[W]}});if(q){A=Y+(Ka?Ca:0)+P;U=Ua-sb-(Ka?xa:0)+P;A=ga.crispLine([ab,z?Y:A,z?U:ha,La,z?Ya-Hb:A,z?U:Ua-sb],q);if(ka)ka.animate({d:A});
+else ka=ga.path(A).attr({stroke:i.lineColor,"stroke-width":q,zIndex:7}).add()}if(v.axisTitle){A=z?Y:ha;q=ja(k.style.fontSize||12);A={low:A+(z?0:oa),middle:A+oa/2,high:A+(z?oa:0)}[k.align];q=(z?ha+xa:Y)+(z?1:-1)*(Ka?-1:1)*gd+(Z===2?q:0);v.axisTitle[G?"animate":"attr"]({x:z?A:q+(Ka?Ca:0)+P+(k.x||0),y:z?q-(Ka?xa:0)+P:A+(k.y||0)})}if(o&&o.enabled){var Ba,ma;o=v.stackTotalGroup;if(!o)v.stackTotalGroup=o=ga.g("stack-labels").attr({visibility:Ab,zIndex:6}).translate(Y,ha).add();for(Ba in t){k=t[Ba];for(ma in k)k[ma].render(o)}}v.isDirty=
+false}function Za(k){for(var o=Sb.length;o--;)Sb[o].id===k&&Sb[o].destroy()}var Ga=i.isX,Ka=i.opposite,z=qa?!Ga:Ga,Z=z?Ka?0:2:Ka?1:3,t={};i=va(Ga?Mc:hd,[Xd,Yd,Md,Zd][Z],i);var v=this,N=i.type,F=N==="datetime",H=N==="logarithmic",P=i.offset||0,$=Ga?"x":"y",oa,ua,fb,eb=z?Y:sb,Ib,Tb,gc,L,ka,T,ra,Fa,Ja,Oa,fa=null,ca=null,Gb,Ld,Jd=i.minPadding,Kd=i.maxPadding,Rb=M(i.linkedTo),Hd,Id,Jc;N=i.events;var id,Sb=[],Ta,Kc,Fb,ta,tb={},Zb={},fc={},hc,ic,gd,Lc,Xa=i.categories,$d=i.labels.formatter||function(){var k=
+this.value;return Lc?Nc(Lc,k):Ta%1E6===0?k/1E6+"M":Ta%1E3===0?k/1E3+"k":!Xa&&k>=1E3?zd(k,0):k},Oc=z&&i.labels.staggerLines,$b=i.reversed,ac=Xa&&i.tickmarkPlacement==="between"?0.5:0;y.prototype={addLabel:function(){var k=this.pos,o=i.labels,r=!(k===ca&&!C(i.showFirstLabel,1)||k===fa&&!C(i.showLastLabel,0)),q=Xa&&z&&Xa.length&&!o.step&&!o.staggerLines&&!o.rotation&&Ca/Xa.length||!z&&Ca/2,A=this.label;k=$d.call({isFirst:k===ta[0],isLast:k===ta[ta.length-1],dateTimeLabelFormat:Lc,value:Xa&&Xa[k]?Xa[k]:
+k});q=q&&{width:Ha(1,X(q-2*(o.padding||10)))+bb};q=pa(q,o.style);if(A===Va)this.label=M(k)&&r&&o.enabled?ga.text(k,0,0).attr({align:o.align,rotation:o.rotation}).css(q).add(gc):null;else A&&A.attr({text:k}).css(q)},getLabelSize:function(){var k=this.label;return k?(this.labelBBox=k.getBBox())[z?"height":"width"]:0},render:function(k,o){var r=!this.minor,q=this.label,A=this.pos,U=i.labels,G=this.gridLine,V=r?i.gridLineWidth:i.minorGridLineWidth,Ba=r?i.gridLineColor:i.minorGridLineColor,ma=r?i.gridLineDashStyle:
+i.minorGridLineDashStyle,s=this.mark,W=r?i.tickLength:i.minorTickLength,ba=r?i.tickWidth:i.minorTickWidth||0,ia=r?i.tickColor:i.minorTickColor,zb=r?i.tickPosition:i.minorTickPosition;r=U.step;var lb=o&&Pc||Ua,Nb;Nb=z?Ib(A+ac,null,null,o)+eb:Y+P+(Ka?(o&&jd||Ya)-Hb-Y:0);lb=z?lb-sb+P-(Ka?xa:0):lb-Ib(A+ac,null,null,o)-eb;if(V){A=Tb(A+ac,V,o);if(G===Va){G={stroke:Ba,"stroke-width":V};if(ma)G.dashstyle=ma;this.gridLine=G=V?ga.path(A).attr(G).add(L):null}G&&A&&G.animate({d:A})}if(ba){if(zb==="inside")W=
+-W;if(Ka)W=-W;V=ga.crispLine([ab,Nb,lb,La,Nb+(z?0:-W),lb+(z?W:0)],ba);if(s)s.animate({d:V});else this.mark=ga.path(V).attr({stroke:ia,"stroke-width":ba}).add(gc)}if(q&&!isNaN(Nb)){Nb=Nb+U.x-(ac&&z?ac*ua*($b?-1:1):0);lb=lb+U.y-(ac&&!z?ac*ua*($b?1:-1):0);M(U.y)||(lb+=ja(q.styles.lineHeight)*0.9-q.getBBox().height/2);if(Oc)lb+=k/(r||1)%Oc*16;if(r)q[k%r?"hide":"show"]();q[this.isNew?"attr":"animate"]({x:Nb,y:lb})}this.isNew=false},destroy:function(){for(var k in this)this[k]&&this[k].destroy&&this[k].destroy()}};
+x.prototype={render:function(){var k=this,o=k.options,r=o.label,q=k.label,A=o.width,U=o.to,G,V=o.from,Ba=o.dashStyle,ma=k.svgElem,s=[],W,ba,ia=o.color;ba=o.zIndex;var zb=o.events;if(A){s=Tb(o.value,A);o={stroke:ia,"stroke-width":A};if(Ba)o.dashstyle=Ba}else if(M(V)&&M(U)){V=Ha(V,ca);U=qb(U,fa);G=Tb(U);if((s=Tb(V))&&G)s.push(G[4],G[5],G[1],G[2]);else s=null;o={fill:ia}}else return;if(M(ba))o.zIndex=ba;if(ma)if(s)ma.animate({d:s},null,ma.onGetPath);else{ma.hide();ma.onGetPath=function(){ma.show()}}else if(s&&
+s.length){k.svgElem=ma=ga.path(s).attr(o).add();if(zb){Ba=function(lb){ma.on(lb,function(Nb){zb[lb].apply(k,[Nb])})};for(W in zb)Ba(W)}}if(r&&M(r.text)&&s&&s.length&&Ca>0&&xa>0){r=va({align:z&&G&&"center",x:z?!G&&4:10,verticalAlign:!z&&G&&"middle",y:z?G?16:10:G?6:-4,rotation:z&&!G&&90},r);if(!q)k.label=q=ga.text(r.text,0,0).attr({align:r.textAlign||r.align,rotation:r.rotation,zIndex:ba}).css(r.style).add();G=[s[1],s[4],C(s[6],s[1])];s=[s[2],s[5],C(s[7],s[2])];W=qb.apply(sa,G);ba=qb.apply(sa,s);q.align(r,
+false,{x:W,y:ba,width:Ha.apply(sa,G)-W,height:Ha.apply(sa,s)-ba});q.show()}else q&&q.hide();return k},destroy:function(){for(var k in this){this[k]&&this[k].destroy&&this[k].destroy();delete this[k]}qc(Sb,this)}};Q.prototype={setTotal:function(k){this.cum=this.total=k},render:function(k){var o=this.options.formatter.call(this);if(this.label)this.label.attr({text:o,visibility:ub});else this.label=m.renderer.text(o,0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation,
+visibility:ub}).add(k)},setOffset:function(k,o){var r=this.isNegative,q=v.translate(this.total),A=v.translate(0);A=$a(q-A);var U=m.xAxis[0].translate(this.x)+k,G=m.plotHeight;r={x:qa?r?q:q-A:U,y:qa?G-U-o:r?G-q-A:G-q,width:qa?A:o,height:qa?o:A};this.label&&this.label.align(this.alignOptions,null,r).attr({visibility:Ab})}};Ib=function(k,o,r,q,A){var U=1,G=0,V=q?fb:ua;q=q?Gb:ca;V||(V=ua);if(r){U*=-1;G=oa}if($b){U*=-1;G-=U*oa}if(o){if($b)k=oa-k;k=k/V+q;if(H&&A)k=sa.pow(10,k)}else{if(H&&A)k=sa.log(k)/
+sa.LN10;k=U*(k-q)*V+G}return k};Tb=function(k,o,r){var q,A,U;k=Ib(k,null,null,r);var G=r&&Pc||Ua,V=r&&jd||Ya,Ba;r=A=X(k+eb);q=U=X(G-k-eb);if(isNaN(k))Ba=true;else if(z){q=ha;U=G-sb;if(r<Y||r>Y+Ca)Ba=true}else{r=Y;A=V-Hb;if(q<ha||q>ha+xa)Ba=true}return Ba?null:ga.crispLine([ab,r,q,La,A,U],o||0)};if(qa&&Ga&&$b===Va)$b=true;pa(v,{addPlotBand:Qa,addPlotLine:Qa,adjustTickAmount:function(){if(Mb&&!F&&!Xa&&!Rb){var k=hc,o=ta.length;hc=Mb[$];if(o<hc){for(;ta.length<hc;)ta.push(ea(ta[ta.length-1]+Ta));ua*=
+(o-1)/(hc-1);fa=ta[ta.length-1]}if(M(k)&&hc!==k)v.isDirty=true}},categories:Xa,getExtremes:function(){return{min:ca,max:fa,dataMin:T,dataMax:ra,userMin:Ja,userMax:Oa}},getPlotLinePath:Tb,getThreshold:function(k){if(ca>k)k=ca;else if(fa<k)k=fa;return Ib(k,0,1)},isXAxis:Ga,options:i,plotLinesAndBands:Sb,getOffset:function(){var k=Fa.length&&M(ca)&&M(fa),o=0,r=0,q=i.title,A=i.labels,U=[-1,1,1,-1][Z],G;if(!gc){gc=ga.g("axis").attr({zIndex:7}).add();L=ga.g("grid").attr({zIndex:1}).add()}ic=0;if(k||Rb){u(ta,
+function(V){if(tb[V])tb[V].addLabel();else tb[V]=new y(V);if(Z===0||Z===2||{1:"left",3:"right"}[Z]===A.align)ic=Ha(tb[V].getLabelSize(),ic)});if(Oc)ic+=(Oc-1)*16}else for(G in tb){tb[G].destroy();delete tb[G]}if(q&&q.text){if(!v.axisTitle)v.axisTitle=ga.text(q.text,0,0).attr({zIndex:7,rotation:q.rotation||0,align:q.textAlign||{low:"left",middle:"center",high:"right"}[q.align]}).css(q.style).add();o=v.axisTitle.getBBox()[z?"height":"width"];r=C(q.margin,z?5:10)}P=U*(i.offset||Ub[Z]);gd=ic+(Z!==2&&
+ic&&U*i.labels[z?"y":"x"])+r;Ub[Z]=Ha(Ub[Z],gd+o+U*P)},render:Ra,setCategories:function(k,o){v.categories=Xa=k;u(Fa,function(r){r.translate();r.setTooltipPoints(true)});v.isDirty=true;C(o,true)&&m.redraw()},setExtremes:function(k,o,r,q){r=C(r,true);Pa(v,"setExtremes",{min:k,max:o},function(){Ja=k;Oa=o;r&&m.redraw(q)})},setScale:Aa,setTickPositions:Ma,translate:Ib,redraw:function(){jc.resetTracker&&jc.resetTracker();Ra();u(Sb,function(k){k.render()});u(Fa,function(k){k.isDirty=true})},removePlotBand:Za,
+removePlotLine:Za,reversed:$b,stacks:t});for(id in N)Sa(v,id,N[id]);Aa()}function d(){var m={};return{add:function(i,y,x,Q){if(!m[i]){y=ga.text(y,0,0).css(a.toolbar.itemStyle).align({align:"right",x:-Hb-20,y:ha+30}).on("click",Q).attr({align:"right",zIndex:20}).add();m[i]=y}},remove:function(i){Gc(m[i].element);m[i]=null}}}function e(m){function i(){var F=this.points||rc(this),H=F[0].series.xAxis,P=this.x;H=H&&H.options.type==="datetime";var $=Pb(P)||H,oa;oa=$?['<span style="font-size: 10px">'+(H?
+Nc("%A, %b %e, %Y",P):P)+"</span>"]:[];u(F,function(ua){oa.push(ua.point.tooltipFormatter($))});return oa.join("<br/>")}function y(F,H){z=Za?F:(2*z+F)/3;Z=Za?H:(Z+H)/2;t.translate(z,Z);kd=$a(F-z)>1||$a(H-Z)>1?function(){y(F,H)}:null}function x(){if(!Za){var F=p.hoverPoints;t.hide();u(ea,function(H){H&&H.hide()});F&&u(F,function(H){H.setState()});p.hoverPoints=null;Za=true}}var Q,na=m.borderWidth,O=m.crosshairs,ea=[],Ma=m.style,Aa=m.shared,Qa=ja(Ma.padding),Ra=na+Qa,Za=true,Ga,Ka,z=0,Z=0;Ma.padding=
+0;var t=ga.g("tooltip").attr({zIndex:8}).add(),v=ga.rect(Ra,Ra,0,0,m.borderRadius,na).attr({fill:m.backgroundColor,"stroke-width":na}).add(t).shadow(m.shadow),N=ga.text("",Qa+Ra,ja(Ma.fontSize)+Qa+Ra).attr({zIndex:1}).css(Ma).add(t);t.hide();return{shared:Aa,refresh:function(F){var H,P,$,oa=0,ua={},fb=[];$=F.tooltipPos;H=m.formatter||i;ua=p.hoverPoints;if(Aa){ua&&u(ua,function(eb){eb.setState()});p.hoverPoints=F;u(F,function(eb){eb.setState(Bb);oa+=eb.plotY;fb.push(eb.getLabelConfig())});P=F[0].plotX;
+oa=X(oa)/F.length;ua={x:F[0].category};ua.points=fb;F=F[0]}else ua=F.getLabelConfig();ua=H.call(ua);Q=F.series;P=Aa?P:F.plotX;oa=Aa?oa:F.plotY;H=X($?$[0]:qa?Ca-oa:P);P=X($?$[1]:qa?xa-P:oa);$=Aa||!F.series.isCartesian||kc(H,P);if(ua===false||!$)x();else{if(Za){t.show();Za=false}N.attr({text:ua});$=N.getBBox();Ga=$.width+2*Qa;Ka=$.height+2*Qa;v.attr({width:Ga,height:Ka,stroke:m.borderColor||F.color||Q.color||"#606060"});$=H-Ga+Y-25;P=P-Ka+ha+10;if($<7)$=Y+H+15;if(P<5)P=5;else if(P+Ka>Ua)P=Ua-Ka-5;y(X($-
+Ra),X(P-Ra))}if(O){O=rc(O);for(H=O.length;H--;){P=F.series[H?"yAxis":"xAxis"];if(O[H]&&P){P=P.getPlotLinePath(F[H?"y":"x"],1);if(ea[H])ea[H].attr({d:P,visibility:Ab});else{$={"stroke-width":O[H].width||1,stroke:O[H].color||"#C0C0C0",zIndex:2};if(O[H].dashStyle)$.dashstyle=O[H].dashStyle;ea[H]=ga.path(P).attr($).add()}}}}},hide:x}}function f(m,i){function y(z){var Z,t=Nd&&wa.width/wa.documentElement.clientWidth-1,v,N,F;z=z||cb.event;if(!z.target)z.target=z.srcElement;Z=z.touches?z.touches.item(0):
+z;if(z.type!=="mousemove"||cb.opera||t){v=ya;N={left:v.offsetLeft,top:v.offsetTop};for(v=v.offsetParent;v;){N.left+=v.offsetLeft;N.top+=v.offsetTop;if(v!==wa.body&&v!==wa.documentElement){N.left-=v.scrollLeft;N.top-=v.scrollTop}v=v.offsetParent}tc=N;v=tc.left;N=tc.top}if(Bc){F=z.x;Z=z.y}else if(Z.layerX===Va){F=Z.pageX-v;Z=Z.pageY-N}else{F=z.layerX;Z=z.layerY}if(t){F+=X((t+1)*v-v);Z+=X((t+1)*N-N)}return pa(z,{chartX:F,chartY:Z})}function x(z){var Z={xAxis:[],yAxis:[]};u(db,function(t){var v=t.translate,
+N=t.isXAxis;Z[N?"xAxis":"yAxis"].push({axis:t,value:v((qa?!N:N)?z.chartX-Y:xa-z.chartY+ha,true)})});return Z}function Q(){var z=m.hoverSeries,Z=m.hoverPoint;Z&&Z.onMouseOut();z&&z.onMouseOut();uc&&uc.hide();ld=null}function na(){if(Aa){var z={xAxis:[],yAxis:[]},Z=Aa.getBBox(),t=Z.x-Y,v=Z.y-ha;if(Ma){u(db,function(N){var F=N.translate,H=N.isXAxis,P=qa?!H:H,$=F(P?t:xa-v-Z.height,true,0,0,1);F=F(P?t+Z.width:xa-v,true,0,0,1);z[H?"xAxis":"yAxis"].push({axis:N,min:qb($,F),max:Ha($,F)})});Pa(m,"selection",
+z,md)}Aa=Aa.destroy()}m.mouseIsDown=nd=Ma=false;Cb(wa,Jb?"touchend":"mouseup",na)}var O,ea,Ma,Aa,Qa=w.zoomType,Ra=/x/.test(Qa),Za=/y/.test(Qa),Ga=Ra&&!qa||Za&&qa,Ka=Za&&!qa||Ra&&qa;Qc=function(){if(Rc){Rc.translate(Y,ha);qa&&Rc.attr({width:m.plotWidth,height:m.plotHeight}).invert()}else m.trackerGroup=Rc=ga.g("tracker").attr({zIndex:9}).add()};Qc();if(i.enabled)m.tooltip=uc=e(i);(function(){var z=true;ya.onmousedown=function(t){t=y(t);!Jb&&t.preventDefault&&t.preventDefault();m.mouseIsDown=nd=true;
+O=t.chartX;ea=t.chartY;Sa(wa,Jb?"touchend":"mouseup",na)};var Z=function(t){if(!(t&&t.touches&&t.touches.length>1)){t=y(t);if(!Jb)t.returnValue=false;var v=t.chartX,N=t.chartY,F=!kc(v-Y,N-ha);if(Jb&&t.type==="touchstart")if(Ea(t.target,"isTracker"))m.runTrackerClick||t.preventDefault();else!ae&&!F&&t.preventDefault();if(F){z||Q();if(v<Y)v=Y;else if(v>Y+Ca)v=Y+Ca;if(N<ha)N=ha;else if(N>ha+xa)N=ha+xa}if(nd&&t.type!=="touchstart"){Ma=Math.sqrt(Math.pow(O-v,2)+Math.pow(ea-N,2));if(Ma>10){if(lc&&(Ra||
+Za)&&kc(O-Y,ea-ha))Aa||(Aa=ga.rect(Y,ha,Ga?1:Ca,Ka?1:xa,0).attr({fill:"rgba(69,114,167,0.25)",zIndex:7}).add());if(Aa&&Ga){v=v-O;Aa.attr({width:$a(v),x:(v>0?0:v)+O})}if(Aa&&Ka){N=N-ea;Aa.attr({height:$a(N),y:(N>0?0:N)+ea})}}}else if(!F){var H;N=m.hoverPoint;v=m.hoverSeries;var P,$,oa=Ya,ua=qa?t.chartY:t.chartX-Y;if(uc&&i.shared){H=[];P=Ia.length;for($=0;$<P;$++)if(Ia[$].visible&&Ia[$].tooltipPoints.length){t=Ia[$].tooltipPoints[ua];t._dist=$a(ua-t.plotX);oa=qb(oa,t._dist);H.push(t)}for(P=H.length;P--;)H[P]._dist>
+oa&&H.splice(P,1);if(H.length&&H[0].plotX!==ld){uc.refresh(H);ld=H[0].plotX}}if(v&&v.tracker)(t=v.tooltipPoints[ua])&&t!==N&&t.onMouseOver()}return(z=F)||!lc}};ya.onmousemove=Z;Sa(ya,"mouseleave",Q);ya.ontouchstart=function(t){if(Ra||Za)ya.onmousedown(t);Z(t)};ya.ontouchmove=Z;ya.ontouchend=function(){Ma&&Q()};ya.onclick=function(t){var v=m.hoverPoint;t=y(t);t.cancelBubble=true;if(!Ma)if(v&&Ea(t.target,"isTracker")){var N=v.plotX,F=v.plotY;pa(v,{pageX:tc.left+Y+(qa?Ca-F:N),pageY:tc.top+ha+(qa?xa-
+N:F)});Pa(v.series,"click",pa(t,{point:v}));v.firePointEvent("click",t)}else{pa(t,x(t));kc(t.chartX-Y,t.chartY-ha)&&Pa(m,"click",t)}Ma=false}})();Od=setInterval(function(){kd&&kd()},32);pa(this,{zoomX:Ra,zoomY:Za,resetTracker:Q})}function g(m){var i=m.type||w.type||w.defaultSeriesType,y=vb[i],x=p.hasRendered;if(x)if(qa&&i==="column")y=vb.bar;else if(!qa&&i==="bar")y=vb.column;i=new y;i.init(p,m);if(!x&&i.inverted)qa=true;if(i.isCartesian)lc=i.isCartesian;Ia.push(i);return i}function h(){w.alignTicks!==
+false&&u(db,function(m){m.adjustTickAmount()});Mb=null}function j(m){var i=p.isDirtyLegend,y,x=p.isDirtyBox,Q=Ia.length,na=Q,O=p.clipRect;for(ec(m,p);na--;){m=Ia[na];if(m.isDirty&&m.options.stacking){y=true;break}}if(y)for(na=Q;na--;){m=Ia[na];if(m.options.stacking)m.isDirty=true}u(Ia,function(ea){if(ea.isDirty){ea.cleanData();ea.getSegments();if(ea.options.legendType==="point")i=true}});if(i&&od.renderLegend){od.renderLegend();p.isDirtyLegend=false}if(lc){if(!Sc){Mb=null;u(db,function(ea){ea.setScale()})}h();
+vc();u(db,function(ea){if(ea.isDirty||x){ea.redraw();x=true}})}if(x){pd();Qc();if(O){Tc(O);O.animate({width:p.plotSizeX,height:p.plotSizeY})}}u(Ia,function(ea){if(ea.isDirty&&ea.visible&&(!ea.isCartesian||ea.xAxis))ea.redraw()});jc&&jc.resetTracker&&jc.resetTracker();Pa(p,"redraw")}function l(){var m=a.xAxis||{},i=a.yAxis||{},y;m=rc(m);u(m,function(x,Q){x.index=Q;x.isX=true});i=rc(i);u(i,function(x,Q){x.index=Q});db=m.concat(i);p.xAxis=[];p.yAxis=[];db=mc(db,function(x){y=new c(p,x);p[y.isXAxis?"xAxis":
+"yAxis"].push(y);return y});h()}function n(m,i){Kb=va(a.title,m);wc=va(a.subtitle,i);u([["title",m,Kb],["subtitle",i,wc]],function(y){var x=y[0],Q=p[x],na=y[1];y=y[2];if(Q&&na){Q.destroy();Q=null}if(y&&y.text&&!Q)p[x]=ga.text(y.text,0,0).attr({align:y.align,"class":"highcharts-"+x,zIndex:1}).css(y.style).add().align(y,false,Ob)})}function J(){mb=w.renderTo;Pd=nc+qd++;if(Pb(mb))mb=wa.getElementById(mb);mb.innerHTML="";if(!mb.offsetWidth){Vb=mb.cloneNode(0);Na(Vb,{position:oc,top:"-9999px",display:""});
+wa.body.appendChild(Vb)}Uc=(Vb||mb).offsetWidth;xc=(Vb||mb).offsetHeight;p.chartWidth=Ya=w.width||Uc||600;p.chartHeight=Ua=w.height||(xc>19?xc:400);p.container=ya=ib(Qb,{className:"highcharts-container"+(w.className?" "+w.className:""),id:Pd},pa({position:Qd,overflow:ub,width:Ya+bb,height:Ua+bb,textAlign:"left"},w.style),Vb||mb);p.renderer=ga=w.forExport?new Vc(ya,Ya,Ua,true):new Wc(ya,Ya,Ua);var m,i;if(Rd&&ya.getBoundingClientRect){m=function(){Na(ya,{left:0,top:0});i=ya.getBoundingClientRect();
+Na(ya,{left:-(i.left-ja(i.left))+bb,top:-(i.top-ja(i.top))+bb})};m();Sa(cb,"resize",m);Sa(p,"destroy",function(){Cb(cb,"resize",m)})}}function D(){function m(){var y=w.width||mb.offsetWidth,x=w.height||mb.offsetHeight;if(y&&x){if(y!==Uc||x!==xc){clearTimeout(i);i=setTimeout(function(){rd(y,x,false)},100)}Uc=y;xc=x}}var i;Sa(cb,"resize",m);Sa(p,"destroy",function(){Cb(cb,"resize",m)})}function aa(){var m=a.labels,i=a.credits,y;n();od=p.legend=new be(p);vc();u(db,function(x){x.setTickPositions(true)});
+h();vc();pd();lc&&u(db,function(x){x.render()});if(!p.seriesGroup)p.seriesGroup=ga.g("series-group").attr({zIndex:3}).add();u(Ia,function(x){x.translate();x.setTooltipPoints();x.render()});m.items&&u(m.items,function(){var x=pa(m.style,this.style),Q=ja(x.left)+Y,na=ja(x.top)+ha+12;delete x.left;delete x.top;ga.text(this.html,Q,na).attr({zIndex:2}).css(x).add()});if(!p.toolbar)p.toolbar=d(p);if(i.enabled&&!p.credits){y=i.href;ga.text(i.text,0,0).on("click",function(){if(y)location.href=y}).attr({align:i.position.align,
+zIndex:8}).css(i.style).add().align(i.position)}Qc();p.hasRendered=true;if(Vb){mb.appendChild(ya);Gc(Vb)}}function E(){var m=Ia.length,i=ya&&ya.parentNode;Pa(p,"destroy");Cb(cb,"unload",E);Cb(p);for(u(db,function(y){Cb(y)});m--;)Ia[m].destroy();if(ya){ya.innerHTML="";Cb(ya);i&&i.removeChild(ya);ya=null}if(ga)ga.alignedObjects=null;clearInterval(Od);for(m in p)delete p[m]}function da(){if(!yc&&cb==cb.top&&wa.readyState!=="complete")wa.attachEvent("onreadystatechange",function(){wa.detachEvent("onreadystatechange",
+da);wa.readyState==="complete"&&da()});else{J();sd();td();u(a.series||[],function(m){g(m)});p.inverted=qa=C(qa,a.chart.inverted);l();p.render=aa;p.tracker=jc=new f(p,a.tooltip);aa();Pa(p,"load");b&&b.apply(p,[p]);u(p.callbacks,function(m){m.apply(p,[p])})}}Mc=va(Mc,Wa.xAxis);hd=va(hd,Wa.yAxis);Wa.xAxis=Wa.yAxis=null;a=va(Wa,a);var w=a.chart,R=w.margin;R=Lb(R)?R:[R,R,R,R];var B=C(w.marginTop,R[0]),K=C(w.marginRight,R[1]),S=C(w.marginBottom,R[2]),I=C(w.marginLeft,R[3]),za=w.spacingTop,Da=w.spacingRight,
+gb=w.spacingBottom,wb=w.spacingLeft,Ob,Kb,wc,ha,Hb,sb,Y,Ub,mb,Vb,ya,Pd,Uc,xc,Ya,Ua,jd,Pc,Xc,ud,vd,Yc,p=this,ae=(R=w.events)&&!!R.click,wd,kc,uc,nd,bc,Sd,xd,xa,Ca,jc,Rc,Qc,od,Wb,Xb,tc,lc=w.showAxes,Sc=0,db=[],Mb,Ia=[],qa,ga,kd,Od,ld,pd,vc,sd,td,rd,md,Td,be=function(m){function i(L,ka){var T=L.legendItem,ra=L.legendLine,Fa=L.legendSymbol,Ja=Ka.color,Oa=ka?O.itemStyle.color:Ja,fa=ka?L.color:Ja;Ja=ka?L.pointAttr[hb]:{stroke:Ja,fill:Ja};T&&T.css({fill:Oa});ra&&ra.attr({stroke:fa});Fa&&Fa.attr(Ja)}function y(L,
+ka,T){var ra=L.legendItem,Fa=L.legendLine,Ja=L.legendSymbol;L=L.checkbox;ra&&ra.attr({x:ka,y:T});Fa&&Fa.translate(ka,T-4);Ja&&Ja.attr({x:ka+Ja.xOff,y:T+Ja.yOff});if(L){L.x=ka;L.y=T}}function x(){u(Qa,function(L){var ka=L.checkbox,T=fb.alignAttr;ka&&Na(ka,{left:T.translateX+L.legendItemWidth+ka.x-40+bb,top:T.translateY+ka.y-11+bb})})}function Q(L){var ka,T,ra,Fa,Ja=L.legendItem;Fa=L.series||L;var Oa=Fa.options,fa=Oa&&Oa.borderWidth||0;if(!Ja){Fa=/^(bar|pie|area|column)$/.test(Fa.type);L.legendItem=
+Ja=ga.text(O.labelFormatter.call(L),0,0).css(L.visible?Za:Ka).on("mouseover",function(){L.setState(Bb);Ja.css(Ga)}).on("mouseout",function(){Ja.css(L.visible?Za:Ka);L.setState()}).on("click",function(){var Gb=function(){L.setVisible()};L.firePointEvent?L.firePointEvent("legendItemClick",null,Gb):Pa(L,"legendItemClick",null,Gb)}).attr({zIndex:2}).add(fb);if(!Fa&&Oa&&Oa.lineWidth){var ca={"stroke-width":Oa.lineWidth,zIndex:2};if(Oa.dashStyle)ca.dashstyle=Oa.dashStyle;L.legendLine=ga.path([ab,-Ma-Aa,
+0,La,-Aa,0]).attr(ca).add(fb)}if(Fa)ka=ga.rect(T=-Ma-Aa,ra=-11,Ma,12,2).attr({zIndex:3}).add(fb);else if(Oa&&Oa.marker&&Oa.marker.enabled)ka=ga.symbol(L.symbol,T=-Ma/2-Aa,ra=-4,Oa.marker.radius).attr({zIndex:3}).add(fb);if(ka){ka.xOff=T+fa%2/2;ka.yOff=ra+fa%2/2}L.legendSymbol=ka;i(L,L.visible);if(Oa&&Oa.showCheckbox){L.checkbox=ib("input",{type:"checkbox",checked:L.selected,defaultChecked:L.selected},O.itemCheckboxStyle,ya);Sa(L.checkbox,"click",function(Gb){Pa(L,"checkboxClick",{checked:Gb.target.checked},
+function(){L.select()})})}}ka=Ja.getBBox();T=L.legendItemWidth=O.itemWidth||Ma+Aa+ka.width+Z;P=ka.height;if(ea&&N-v+T>(Ib||Ya-2*z-v)){N=v;F+=P}H=F;y(L,N,F);if(ea)N+=T;else F+=P;eb=Ib||Ha(ea?N-v:T,eb)}function na(){N=v;F=t;H=eb=0;fb||(fb=ga.g("legend").attr({zIndex:7}).add());Qa=[];u(Tb,function(ra){var Fa=ra.options;if(Fa.showInLegend)Qa=Qa.concat(Fa.legendType==="point"?ra.data:ra)});Qa.sort(function(ra,Fa){return(ra.options.legendIndex||0)-(Fa.options.legendIndex||0)});gc&&Qa.reverse();u(Qa,Q);
+Wb=Ib||eb;Xb=H-t+P;if(oa||ua){Wb+=2*z;Xb+=2*z;if($)Wb>0&&Xb>0&&$.animate($.crisp(null,null,null,Wb,Xb));else $=ga.rect(0,0,Wb,Xb,O.borderRadius,oa||0).attr({stroke:O.borderColor,"stroke-width":oa||0,fill:ua||jb}).add(fb).shadow(O.shadow);$[Qa.length?"show":"hide"]()}for(var L=["left","right","top","bottom"],ka,T=4;T--;){ka=L[T];if(Ra[ka]&&Ra[ka]!=="auto"){O[T<2?"align":"verticalAlign"]=ka;O[T<2?"x":"y"]=ja(Ra[ka])*(T%2?-1:1)}}fb.align(pa(O,{width:Wb,height:Xb}),true,Ob);Sc||x()}var O=m.options.legend;
+if(O.enabled){var ea=O.layout==="horizontal",Ma=O.symbolWidth,Aa=O.symbolPadding,Qa,Ra=O.style,Za=O.itemStyle,Ga=O.itemHoverStyle,Ka=O.itemHiddenStyle,z=ja(Ra.padding),Z=20,t=18,v=4+z+Ma+Aa,N,F,H,P=0,$,oa=O.borderWidth,ua=O.backgroundColor,fb,eb,Ib=O.width,Tb=m.series,gc=O.reversed;na();Sa(m,"endResize",x);return{colorizeItem:i,destroyItem:function(L){var ka=L.checkbox;u(["legendItem","legendLine","legendSymbol"],function(T){L[T]&&L[T].destroy()});ka&&Gc(L.checkbox)},renderLegend:na}}};kc=function(m,
+i){return m>=0&&m<=Ca&&i>=0&&i<=xa};Td=function(){Pa(p,"selection",{resetSelection:true},md);p.toolbar.remove("zoom")};md=function(m){var i=Wa.lang,y=p.pointCount<100;p.toolbar.add("zoom",i.resetZoom,i.resetZoomTitle,Td);!m||m.resetSelection?u(db,function(x){x.setExtremes(null,null,false,y)}):u(m.xAxis.concat(m.yAxis),function(x){var Q=x.axis;if(p.tracker[Q.isXAxis?"zoomX":"zoomY"])Q.setExtremes(x.min,x.max,false,y)});j()};vc=function(){var m=a.legend,i=C(m.margin,10),y=m.x,x=m.y,Q=m.align,na=m.verticalAlign,
+O;sd();if((p.title||p.subtitle)&&!M(B))if(O=Ha(p.title&&!Kb.floating&&!Kb.verticalAlign&&Kb.y||0,p.subtitle&&!wc.floating&&!wc.verticalAlign&&wc.y||0))ha=Ha(ha,O+C(Kb.margin,15)+za);if(m.enabled&&!m.floating)if(Q==="right")M(K)||(Hb=Ha(Hb,Wb-y+i+Da));else if(Q==="left")M(I)||(Y=Ha(Y,Wb+y+i+wb));else if(na==="top")M(B)||(ha=Ha(ha,Xb+x+i+za));else if(na==="bottom")M(S)||(sb=Ha(sb,Xb-x+i+gb));lc&&u(db,function(ea){ea.getOffset()});M(I)||(Y+=Ub[3]);M(B)||(ha+=Ub[0]);M(S)||(sb+=Ub[2]);M(K)||(Hb+=Ub[1]);
+td()};rd=function(m,i,y){var x=p.title,Q=p.subtitle;Sc+=1;ec(y,p);Pc=Ua;jd=Ya;p.chartWidth=Ya=X(m);p.chartHeight=Ua=X(i);Na(ya,{width:Ya+bb,height:Ua+bb});ga.setSize(Ya,Ua,y);Ca=Ya-Y-Hb;xa=Ua-ha-sb;Mb=null;u(db,function(na){na.isDirty=true;na.setScale()});u(Ia,function(na){na.isDirty=true});p.isDirtyLegend=true;p.isDirtyBox=true;vc();x&&x.align(null,null,Ob);Q&&Q.align(null,null,Ob);j(y);Pc=null;Pa(p,"resize");setTimeout(function(){Pa(p,"endResize",null,function(){Sc-=1})},Cc&&Cc.duration||500)};
+td=function(){p.plotLeft=Y=X(Y);p.plotTop=ha=X(ha);p.plotWidth=Ca=X(Ya-Y-Hb);p.plotHeight=xa=X(Ua-ha-sb);p.plotSizeX=qa?xa:Ca;p.plotSizeY=qa?Ca:xa;Ob={x:wb,y:za,width:Ya-wb-Da,height:Ua-za-gb}};sd=function(){ha=C(B,za);Hb=C(K,Da);sb=C(S,gb);Y=C(I,wb);Ub=[0,0,0,0]};pd=function(){var m=w.borderWidth||0,i=w.backgroundColor,y=w.plotBackgroundColor,x=w.plotBackgroundImage,Q,na={x:Y,y:ha,width:Ca,height:xa};Q=m+(w.shadow?8:0);if(m||i)if(Xc)Xc.animate(Xc.crisp(null,null,null,Ya-Q,Ua-Q));else Xc=ga.rect(Q/
+2,Q/2,Ya-Q,Ua-Q,w.borderRadius,m).attr({stroke:w.borderColor,"stroke-width":m,fill:i||jb}).add().shadow(w.shadow);if(y)if(ud)ud.animate(na);else ud=ga.rect(Y,ha,Ca,xa,0).attr({fill:y}).add().shadow(w.plotShadow);if(x)if(vd)vd.animate(na);else vd=ga.image(x,Y,ha,Ca,xa).add();if(w.plotBorderWidth)if(Yc)Yc.animate(Yc.crisp(null,Y,ha,Ca,xa));else Yc=ga.rect(Y,ha,Ca,xa,0,w.plotBorderWidth).attr({stroke:w.plotBorderColor,"stroke-width":w.plotBorderWidth,zIndex:4}).add();p.isDirtyBox=false};Sa(cb,"unload",
+E);w.reflow!==false&&Sa(p,"load",D);if(R)for(wd in R)Sa(p,wd,R[wd]);p.options=a;p.series=Ia;p.addSeries=function(m,i,y){var x;if(m){ec(y,p);i=C(i,true);Pa(p,"addSeries",{options:m},function(){x=g(m);x.isDirty=true;p.isDirtyLegend=true;i&&p.redraw()})}return x};p.animation=C(w.animation,true);p.destroy=E;p.get=function(m){var i,y,x;for(i=0;i<db.length;i++)if(db[i].options.id===m)return db[i];for(i=0;i<Ia.length;i++)if(Ia[i].options.id===m)return Ia[i];for(i=0;i<Ia.length;i++){x=Ia[i].data;for(y=0;y<
+x.length;y++)if(x[y].id===m)return x[y]}return null};p.getSelectedPoints=function(){var m=[];u(Ia,function(i){m=m.concat(yd(i.data,function(y){return y.selected}))});return m};p.getSelectedSeries=function(){return yd(Ia,function(m){return m.selected})};p.hideLoading=function(){Zc(bc,{opacity:0},{duration:a.loading.hideDuration,complete:function(){Na(bc,{display:jb})}});xd=false};p.isInsidePlot=kc;p.redraw=j;p.setSize=rd;p.setTitle=n;p.showLoading=function(m){var i=a.loading;if(!bc){bc=ib(Qb,{className:"highcharts-loading"},
+pa(i.style,{left:Y+bb,top:ha+bb,width:Ca+bb,height:xa+bb,zIndex:10,display:jb}),ya);Sd=ib("span",null,i.labelStyle,bc)}Sd.innerHTML=m||a.lang.loading;if(!xd){Na(bc,{opacity:0,display:""});Zc(bc,{opacity:i.style.opacity},{duration:i.showDuration});xd=true}};p.pointCount=0;p.counters=new Ad;da()}var wa=document,cb=window,sa=Math,X=sa.round,kb=sa.floor,fd=sa.ceil,Ha=sa.max,qb=sa.min,$a=sa.abs,nb=sa.cos,Db=sa.sin,cc=sa.PI,Ud=cc*2/360,pc=navigator.userAgent,Bc=/msie/i.test(pc)&&!cb.opera,zc=wa.documentMode===
+8,Nd=/AppleWebKit/.test(pc),Rd=/Firefox/.test(pc),yc=!!wa.createElementNS&&!!wa.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,Wc,Jb=wa.documentElement.ontouchstart!==undefined,Vd={},qd=0,rb=1,Hc,Wa,Nc,Cc,$c,Va,Qb="div",oc="absolute",Qd="relative",ub="hidden",nc="highcharts-",Ab="visible",bb="px",jb="none",ab="M",La="L",Wd="rgba(192,192,192,"+(yc?1.0E-6:0.0020)+")",hb="",Bb="hover",Dc,bd,cd,dd,sc,Ec,Fc,Cd,Dd,ed,Ed,Fd,la=cb.HighchartsAdapter,Eb=la||{},u=Eb.each,yd=Eb.grep,mc=Eb.map,
+va=Eb.merge,Sa=Eb.addEvent,Cb=Eb.removeEvent,Pa=Eb.fireEvent,Zc=Eb.animate,Tc=Eb.stop,vb={};Nc=function(a,b,c){function d(D){return D.toString().replace(/^([0-9])$/,"0$1")}if(!M(b)||isNaN(b))return"Invalid date";a=C(a,"%Y-%m-%d %H:%M:%S");b=new Date(b*rb);var e,f=b[cd](),g=b[dd](),h=b[sc](),j=b[Ec](),l=b[Fc](),n=Wa.lang,J=n.weekdays;n=n.months;b={a:J[g].substr(0,3),A:J[g],d:d(h),e:h,b:n[j].substr(0,3),B:n[j],m:d(j+1),y:l.toString().substr(2,2),Y:l,H:d(f),I:d(f%12||12),l:f%12||12,M:d(b[bd]()),p:f<
+12?"AM":"PM",P:f<12?"am":"pm",S:d(b.getSeconds())};for(e in b)a=a.replace("%"+e,b[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};Ad.prototype={wrapColor:function(a){if(this.color>=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};la&&la.init&&la.init();if(!la&&cb.jQuery){var ob=jQuery;u=function(a,b){for(var c=0,d=a.length;c<d;c++)if(b.call(a[c],a[c],c,a)===false)return c};yd=ob.grep;mc=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)c[d]=b.call(a[d],a[d],d,a);return c};
+va=function(){var a=arguments;return ob.extend(true,null,a[0],a[1],a[2],a[3])};Sa=function(a,b,c){ob(a).bind(b,c)};Cb=function(a,b,c){var d=wa.removeEventListener?"removeEventListener":"detachEvent";if(wa[d]&&!a[d])a[d]=function(){};ob(a).unbind(b,c)};Pa=function(a,b,c,d){var e=ob.Event(b),f="detached"+b;pa(e,c);if(a[b]){a[f]=a[b];a[b]=null}ob(a).trigger(e);if(a[f]){a[b]=a[f];a[f]=null}d&&!e.isDefaultPrevented()&&d(e)};Zc=function(a,b,c){var d=ob(a);if(b.d){a.toD=b.d;b.d=1}d.stop();d.animate(b,c)};
+Tc=function(a){ob(a).stop()};ob.extend(ob.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});var ce=jQuery.fx.step._default,de=jQuery.fx.prototype.cur;ob.fx.step._default=function(a){var b=a.elem;b.attr?b.attr(a.prop,a.now):ce.apply(this,arguments)};ob.fx.step.d=function(a){var b=a.elem;if(!a.started){var c=$c.init(b,b.d,b.toD);a.start=c[0];a.end=c[1];a.started=true}b.attr("d",$c.step(a.start,a.end,a.pos,b.toD))};ob.fx.prototype.cur=function(){var a=this.elem;return a.attr?a.attr(this.prop):
+de.apply(this,arguments)}}$c={init:function(a,b,c){b=b||"";var d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g;b=b.split(" ");c=[].concat(c);var h,j,l=function(n){for(g=n.length;g--;)n[g]===ab&&n.splice(g+1,0,n[g+1],n[g+2],n[g+1],n[g+2])};if(e){l(b);l(c)}if(a.isArea){h=b.splice(b.length-6,6);j=c.splice(c.length-6,6)}if(d){c=[].concat(c).splice(0,f).concat(c);a.shift=false}if(b.length)for(a=c.length;b.length<a;){d=[].concat(b).splice(b.length-f,f);if(e){d[f-6]=d[f-2];d[f-5]=d[f-1]}b=b.concat(d)}if(h){b=b.concat(h);
+c=c.concat(j)}return[b,c]},step:function(a,b,c,d){var e=[],f=a.length;if(c===1)e=d;else if(f===b.length&&c<1)for(;f--;){d=parseFloat(a[f]);e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d}else e=b;return e}};la={enabled:true,align:"center",x:0,y:15,style:{color:"#666",fontSize:"11px",lineHeight:"14px"}};Wa={colors:["#4572A7","#AA4643","#89A54E","#80699B","#3D96AE","#DB843D","#92A8CD","#A47D7C","#B5CA92"],symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January",
+"February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:true},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:true,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',
+fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0"},title:{text:"Chart title",align:"center",y:15,style:{color:"#3E576F",fontSize:"16px"}},subtitle:{text:"",align:"center",y:30,style:{color:"#6D869F"}},plotOptions:{line:{allowPointSelect:false,showCheckbox:false,animation:{duration:1E3},events:{},lineWidth:2,shadow:true,marker:{enabled:true,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:va(la,
+{enabled:false,y:-6,formatter:function(){return this.y}}),showInLegend:true,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:true}},labels:{style:{position:oc,color:"#3E576F"}},legend:{enabled:true,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,shadow:false,style:{padding:"5px"},itemStyle:{cursor:"pointer",color:"#3E576F"},itemHoverStyle:{cursor:"pointer",color:"#000000"},itemHiddenStyle:{color:"#C0C0C0"},
+itemCheckboxStyle:{position:oc,width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0},loading:{hideDuration:100,labelStyle:{fontWeight:"bold",position:Qd,top:"1em"},showDuration:100,style:{position:oc,backgroundColor:"white",opacity:0.5,textAlign:"center"}},tooltip:{enabled:true,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:2,borderRadius:5,shadow:true,snap:Jb?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},toolbar:{itemStyle:{color:"#4572A7",
+cursor:"pointer"}},credits:{enabled:true,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var Mc={dateTimeLabelFormats:{second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:false,gridLineColor:"#C0C0C0",labels:la,lineColor:"#C0D0E0",lineWidth:1,max:null,min:null,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",
+minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:false,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#6D869F",fontWeight:"bold"}},type:"linear"},hd=va(Mc,{endOnTick:true,gridLineWidth:1,tickPixelInterval:72,showLastLabel:true,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:true,tickWidth:0,
+title:{rotation:270,text:"Y-values"},stackLabels:{enabled:false,formatter:function(){return this.total},style:la.style}}),Zd={labels:{align:"right",x:-8,y:null},title:{rotation:270}},Yd={labels:{align:"left",x:8,y:null},title:{rotation:90}},Md={labels:{align:"center",x:0,y:14},title:{rotation:0}},Xd=va(Md,{labels:{y:-5}}),xb=Wa.plotOptions;la=xb.line;xb.spline=va(la);xb.scatter=va(la,{lineWidth:0,states:{hover:{lineWidth:0}}});xb.area=va(la,{});xb.areaspline=va(xb.area);xb.column=va(la,{borderColor:"#FFFFFF",
+borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,states:{hover:{brightness:0.1,shadow:false},select:{color:"#C0C0C0",borderColor:"#000000",shadow:false}},dataLabels:{y:null,verticalAlign:null}});xb.bar=va(xb.column,{dataLabels:{align:"left",x:5,y:0}});xb.pie=va(la,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:true,dataLabels:{distance:30,enabled:true,formatter:function(){return this.point.name},y:5},legendType:"point",marker:null,
+size:"75%",showInLegend:false,slicedOffset:10,states:{hover:{brightness:0.1,shadow:false}}});Bd();var Yb=function(a){var b=[],c;(function(d){if(c=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(d))b=[ja(c[1]),ja(c[2]),ja(c[3]),parseFloat(c[4],10)];else if(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(d))b=[ja(c[1],16),ja(c[2],16),ja(c[3],16),1]})(a);return{get:function(d){return b&&!isNaN(b[0])?d==="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+
+")":d==="a"?b[3]:"rgba("+b.join(",")+")":a},brighten:function(d){if(dc(d)&&d!==0){var e;for(e=0;e<3;e++){b[e]+=ja(d*255);if(b[e]<0)b[e]=0;if(b[e]>255)b[e]=255}}return this},setOpacity:function(d){b[3]=d;return this}}};Ic.prototype={init:function(a,b){this.element=wa.createElementNS("http://www.w3.org/2000/svg",b);this.renderer=a},animate:function(a,b,c){if(b=C(b,Cc,true)){b=va(b);if(c)b.complete=c;Zc(this,a,b)}else{this.attr(a);c&&c()}},attr:function(a,b){var c,d,e,f,g=this.element,h=g.nodeName,j=
+this.renderer,l,n=this.shadows,J,D=this;if(Pb(a)&&M(b)){c=a;a={};a[c]=b}if(Pb(a)){c=a;if(h==="circle")c={x:"cx",y:"cy"}[c]||c;else if(c==="strokeWidth")c="stroke-width";D=Ea(g,c)||this[c]||0;if(c!=="d"&&c!=="visibility")D=parseFloat(D)}else for(c in a){l=false;d=a[c];if(c==="d"){if(d&&d.join)d=d.join(" ");if(/(NaN| {2}|^$)/.test(d))d="M 0 0";this.d=d}else if(c==="x"&&h==="text"){for(e=0;e<g.childNodes.length;e++){f=g.childNodes[e];Ea(f,"x")===Ea(g,"x")&&Ea(f,"x",d)}if(this.rotation)Ea(g,"transform",
+"rotate("+this.rotation+" "+d+" "+ja(a.y||Ea(g,"y"))+")")}else if(c==="fill")d=j.color(d,g,c);else if(h==="circle"&&(c==="x"||c==="y"))c={x:"cx",y:"cy"}[c]||c;else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="verticalAlign"){this[c]=d;this.updateTransform();l=true}else if(c==="stroke")d=j.color(d,g,c);else if(c==="dashstyle"){c="stroke-dasharray";d=d&&d.toLowerCase();if(d==="solid")d=jb;else if(d){d=d.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot",
+"1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=d.length;e--;)d[e]=ja(d[e])*a["stroke-width"];d=d.join(",")}}else if(c==="isTracker")this[c]=d;else if(c==="width")d=ja(d);else if(c==="align"){c="text-anchor";d={left:"start",center:"middle",right:"end"}[d]}if(c==="strokeWidth")c="stroke-width";if(Nd&&c==="stroke-width"&&d===0)d=1.0E-6;if(this.symbolName&&/^(x|y|r|start|end|innerR)/.test(c)){if(!J){this.symbolAttr(a);
+J=true}l=true}if(n&&/^(width|height|visibility|x|y|d)$/.test(c))for(e=n.length;e--;)Ea(n[e],c,d);if((c==="width"||c==="height")&&h==="rect"&&d<0)d=0;if(c==="text"){this.textStr=d;this.added&&j.buildText(this)}else l||Ea(g,c,d)}return D},symbolAttr:function(a){var b=this;u(["x","y","r","start","end","width","height","innerR"],function(c){b[c]=C(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](X(b.x*2)/2,X(b.y*2)/2,b.r,{start:b.start,end:b.end,width:b.width,height:b.height,innerR:b.innerR})})},
+clip:function(a){return this.attr("clip-path","url("+this.renderer.url+"#"+a.id+")")},crisp:function(a,b,c,d,e){var f,g={},h={},j;a=a||this.strokeWidth||0;j=a%2/2;h.x=kb(b||this.x||0)+j;h.y=kb(c||this.y||0)+j;h.width=kb((d||this.width||0)-2*j);h.height=kb((e||this.height||0)-2*j);h.strokeWidth=a;for(f in h)if(this[f]!==h[f])this[f]=g[f]=h[f];return g},css:function(a){var b=this.element;b=a&&a.width&&b.nodeName==="text";var c,d="",e=function(f,g){return"-"+g.toLowerCase()};if(a&&a.color)a.fill=a.color;
+this.styles=a=pa(this.styles,a);if(Bc&&!yc){b&&delete a.width;Na(this.element,a)}else{for(c in a)d+=c.replace(/([A-Z])/g,e)+":"+a[c]+";";this.attr({style:d})}b&&this.added&&this.renderer.buildText(this);return this},on:function(a,b){var c=b;if(Jb&&a==="click"){a="touchstart";c=function(d){d.preventDefault();b()}}this.element["on"+a]=c;return this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(){this.inverted=true;this.updateTransform();return this},updateTransform:function(){var a=
+this.translateX||0,b=this.translateY||0,c=this.inverted,d=this.rotation,e=[];if(c){a+=this.attr("width");b+=this.attr("height")}if(a||b)e.push("translate("+a+","+b+")");if(c)e.push("rotate(90) scale(-1,1)");else d&&e.push("rotate("+d+" "+this.x+" "+this.y+")");e.length&&Ea(this.element,"transform",e.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){if(a){this.alignOptions=a;this.alignByTranslate=b;c||this.renderer.alignedObjects.push(this)}else{a=
+this.alignOptions;b=this.alignByTranslate}c=C(c,this.renderer);var d=a.align,e=a.verticalAlign,f=(c.x||0)+(a.x||0),g=(c.y||0)+(a.y||0),h={};if(/^(right|center)$/.test(d))f+=(c.width-(a.width||0))/{right:1,center:2}[d];h[b?"translateX":"x"]=X(f);if(/^(bottom|middle)$/.test(e))g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1);h[b?"translateY":"y"]=X(g);this[this.placed?"animate":"attr"](h);this.placed=true;this.alignAttr=h;return this},getBBox:function(){var a,b,c,d=this.rotation,e=d*Ud;try{a=
+pa({},this.element.getBBox())}catch(f){a={width:0,height:0}}b=a.width;c=a.height;if(d){a.width=$a(c*Db(e))+$a(b*nb(e));a.height=$a(c*nb(e))+$a(b*Db(e))}return a},show:function(){return this.attr({visibility:Ab})},hide:function(){return this.attr({visibility:ub})},add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=d.childNodes,f=this.element,g=Ea(f,"zIndex");this.parentInverted=a&&a.inverted;this.textStr!==undefined&&b.buildText(this);if(g){c.handleZ=true;g=ja(g)}if(c.handleZ)for(c=0;c<
+e.length;c++){a=e[c];b=Ea(a,"zIndex");if(a!==f&&(ja(b)>g||!M(g)&&M(b))){d.insertBefore(f,a);return this}}d.appendChild(f);this.added=true;return this},destroy:function(){var a=this.element||{},b=this.shadows,c=a.parentNode,d;a.onclick=a.onmouseout=a.onmouseover=a.onmousemove=null;Tc(this);c&&c.removeChild(a);b&&u(b,function(e){(c=e.parentNode)&&c.removeChild(e)});qc(this.renderer.alignedObjects,this);for(d in this)delete this[d];return null},empty:function(){for(var a=this.element,b=a.childNodes,
+c=b.length;c--;)a.removeChild(b[c])},shadow:function(a,b){var c=[],d,e,f=this.element,g=this.parentInverted?"(-1,-1)":"(1,1)";if(a){for(d=1;d<=3;d++){e=f.cloneNode(0);Ea(e,{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":0.05*d,"stroke-width":7-2*d,transform:"translate"+g,fill:jb});b?b.element.appendChild(e):f.parentNode.insertBefore(e,f);c.push(e)}this.shadows=c}return this}};var Vc=function(){this.init.apply(this,arguments)};Vc.prototype={Element:Ic,init:function(a,b,c,d){var e=location,
+f;f=this.createElement("svg").attr({xmlns:"http://www.w3.org/2000/svg",version:"1.1"});a.appendChild(f.element);this.box=f.element;this.boxWrapper=f;this.alignedObjects=[];this.url=Bc?"":e.href.replace(/#.*?$/,"");this.defs=this.createElement("defs").add();this.forExport=d;this.setSize(b,c,false)},createElement:function(a){var b=new this.Element;b.init(this,a);return b},buildText:function(a){for(var b=a.element,c=C(a.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,
+'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g),d=b.childNodes,e=/style="([^"]+)"/,f=/href="([^"]+)"/,g=Ea(b,"x"),h=a.styles,j=Rd&&h&&h.HcDirection==="rtl"&&!this.forExport&&ja(pc.split("Firefox/")[1])<4,l,n=h&&ja(h.width),J=h&&h.lineHeight,D,aa=d.length;aa--;)b.removeChild(d[aa]);n&&!a.added&&this.box.appendChild(b);u(c,function(E,da){var w,R=0,B;E=E.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");w=E.split("|||");
+u(w,function(K){if(K!==""||w.length===1){var S={},I=wa.createElementNS("http://www.w3.org/2000/svg","tspan");e.test(K)&&Ea(I,"style",K.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"));if(f.test(K)){Ea(I,"onclick",'location.href="'+K.match(f)[1]+'"');Na(I,{cursor:"pointer"})}K=(K.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"<").replace(/&gt;/g,">");if(j){l=[];for(aa=K.length;aa--;)l.push(K.charAt(aa));K=l.join("")}I.appendChild(wa.createTextNode(K));if(R)S.dx=3;else S.x=g;if(!R){if(da){!yc&&
+a.renderer.forExport&&Na(I,{display:"block"});B=cb.getComputedStyle&&ja(cb.getComputedStyle(D,null).getPropertyValue("line-height"));if(!B||isNaN(B))B=J||D.offsetHeight||18;Ea(I,"dy",B)}D=I}Ea(I,S);b.appendChild(I);R++;if(n){K=K.replace(/-/g,"- ").split(" ");for(var za,Da=[];K.length||Da.length;){za=b.getBBox().width;S=za>n;if(!S||K.length===1){K=Da;Da=[];if(K.length){I=wa.createElementNS("http://www.w3.org/2000/svg","tspan");Ea(I,{dy:J||16,x:g});b.appendChild(I);if(za>n)n=za}}else{I.removeChild(I.firstChild);
+Da.unshift(K.pop())}K.length&&I.appendChild(wa.createTextNode(K.join(" ").replace(/- /g,"-")))}}}})})},crispLine:function(a,b){if(a[1]===a[4])a[1]=a[4]=X(a[1])+b%2/2;if(a[2]===a[5])a[2]=a[5]=X(a[2])+b%2/2;return a},path:function(a){return this.createElement("path").attr({d:a,fill:jb})},circle:function(a,b,c){a=Lb(a)?a:{x:a,y:b,r:c};return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){if(Lb(a)){b=a.y;c=a.r;d=a.innerR;e=a.start;f=a.end;a=a.x}return this.symbol("arc",a||0,b||0,c||0,
+{innerR:d||0,start:e||0,end:f||0})},rect:function(a,b,c,d,e,f){if(Lb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;a=a.x}e=this.createElement("rect").attr({rx:e,ry:e,fill:jb});return e.attr(e.crisp(f,a,b,Ha(c,0),Ha(d,0)))},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[C(c,true)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){return this.createElement("g").attr(M(a)&&{"class":nc+a})},image:function(a,b,c,d,
+e){var f={preserveAspectRatio:jb};arguments.length>1&&pa(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e){var f,g=this.symbols[a];g=g&&g(X(b),X(c),d,e);var h=/^url\((.*?)\)$/,j;if(g){f=this.path(g);pa(f,{symbolName:a,x:b,y:c,r:d});e&&pa(f,e)}else if(h.test(a)){var l=function(n,J){n.attr({width:J[0],height:J[1]}).translate(-X(J[0]/
+2),-X(J[1]/2))};j=a.match(h)[1];a=Vd[j];f=this.image(j).attr({x:b,y:c});if(a)l(f,a);else{f.attr({width:0,height:0});ib("img",{onload:function(){l(f,Vd[j]=[this.width,this.height])},src:j})}}else f=this.circle(b,c,d);return f},symbols:{square:function(a,b,c){c=0.707*c;return[ab,a-c,b-c,La,a+c,b-c,a+c,b+c,a-c,b+c,"Z"]},triangle:function(a,b,c){return[ab,a,b-1.33*c,La,a+c,b+0.67*c,a-c,b+0.67*c,"Z"]},"triangle-down":function(a,b,c){return[ab,a,b+1.33*c,La,a-c,b-0.67*c,a+c,b-0.67*c,"Z"]},diamond:function(a,
+b,c){return[ab,a,b-c,La,a+c,b,a,b+c,a-c,b,"Z"]},arc:function(a,b,c,d){var e=d.start,f=d.end-1.0E-6,g=d.innerR,h=nb(e),j=Db(e),l=nb(f);f=Db(f);d=d.end-e<cc?0:1;return[ab,a+c*h,b+c*j,"A",c,c,0,d,1,a+c*l,b+c*f,La,a+g*l,b+g*f,"A",g,g,0,d,0,a+g*h,b+g*j,"Z"]}},clipRect:function(a,b,c,d){var e=nc+qd++,f=this.createElement("clipPath").attr({id:e}).add(this.defs);a=this.rect(a,b,c,d,0).add(f);a.id=e;return a},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f=this;b=a.linearGradient;c=nc+
+qd++;var g,h,j;g=f.createElement("linearGradient").attr({id:c,gradientUnits:"userSpaceOnUse",x1:b[0],y1:b[1],x2:b[2],y2:b[3]}).add(f.defs);u(a.stops,function(l){if(e.test(l[1])){d=Yb(l[1]);h=d.get("rgb");j=d.get("a")}else{h=l[1];j=1}f.createElement("stop").attr({offset:l[0],"stop-color":h,"stop-opacity":j}).add(g)});return"url("+this.url+"#"+c+")"}else if(e.test(a)){d=Yb(a);Ea(b,c+"-opacity",d.get("a"));return d.get("rgb")}else return a},text:function(a,b,c){var d=Wa.chart.style;b=X(C(b,0));c=X(C(c,
+0));a=this.createElement("text").attr({x:b,y:c,text:a}).css({fontFamily:d.fontFamily,fontSize:d.fontSize});a.x=b;a.y=c;return a}};Wc=Vc;if(!yc){Eb=yb(Ic,{init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ",oc,";"];if(b==="shape"||b===Qb)d.push("left:0;top:0;width:10px;height:10px;");if(zc)d.push("visibility: ",b===Qb?ub:Ab);c.push(' style="',d.join(""),'"/>');if(b){c=b===Qb||b==="span"||b==="img"?c.join(""):a.prepVML(c);this.element=ib(c)}this.renderer=a},add:function(a){var b=
+this.renderer,c=this.element,d=b.box;d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);zc&&d.gVis===ub&&Na(c,{visibility:ub});d.appendChild(c);this.added=true;this.alignOnAdd&&this.updateTransform();return this},attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,h=f.nodeName,j=this.renderer,l=this.symbolName,n,J,D=this.shadows,aa=this;if(Pb(a)&&M(b)){c=a;a={};a[c]=b}if(Pb(a)){c=a;aa=c==="strokeWidth"||c==="stroke-width"?this.strokeweight:this[c]}else for(c in a){d=a[c];n=false;if(l&&/^(x|y|r|start|end|width|height|innerR)/.test(c)){if(!J){this.symbolAttr(a);
+J=true}n=true}else if(c==="d"){d=d||[];this.d=d.join(" ");e=d.length;for(n=[];e--;)n[e]=dc(d[e])?X(d[e]*10)-5:d[e]==="Z"?"x":d[e];d=n.join(" ")||"x";f.path=d;if(D)for(e=D.length;e--;)D[e].path=d;n=true}else if(c==="zIndex"||c==="visibility"){if(zc&&c==="visibility"&&h==="DIV"){f.gVis=d;n=f.childNodes;for(e=n.length;e--;)Na(n[e],{visibility:d});if(d===Ab)d=null}if(d)g[c]=d;n=true}else if(/^(width|height)$/.test(c)){if(this.updateClipping){this[c]=d;this.updateClipping()}else g[c]=d;n=true}else if(/^(x|y)$/.test(c)){this[c]=
+d;if(f.tagName==="SPAN")this.updateTransform();else g[{x:"left",y:"top"}[c]]=d}else if(c==="class")f.className=d;else if(c==="stroke"){d=j.color(d,f,c);c="strokecolor"}else if(c==="stroke-width"||c==="strokeWidth"){f.stroked=d?true:false;c="strokeweight";this[c]=d;if(dc(d))d+=bb}else if(c==="dashstyle"){(f.getElementsByTagName("stroke")[0]||ib(j.prepVML(["<stroke/>"]),null,null,f))[c]=d||"solid";this.dashstyle=d;n=true}else if(c==="fill")if(h==="SPAN")g.color=d;else{f.filled=d!==jb?true:false;d=j.color(d,
+f,c);c="fillcolor"}else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="align"){if(c==="align")c="textAlign";this[c]=d;this.updateTransform();n=true}else if(c==="text"){this.bBox=null;f.innerHTML=d;n=true}if(D&&c==="visibility")for(e=D.length;e--;)D[e].style[c]=d;if(!n)if(zc)f[c]=d;else Ea(f,c,d)}return aa},clip:function(a){var b=this,c=a.members;c.push(b);b.destroyClip=function(){qc(c,b)};return b.css(a.getCSS(b.inverted))},css:function(a){var b=this.element;if(b=a&&b.tagName==="SPAN"&&
+a.width){delete a.width;this.textWidth=b;this.updateTransform()}this.styles=pa(this.styles,a);Na(this.element,a);return this},destroy:function(){this.destroyClip&&this.destroyClip();Ic.prototype.destroy.apply(this)},empty:function(){for(var a=this.element.childNodes,b=a.length,c;b--;){c=a[b];c.parentNode.removeChild(c)}},getBBox:function(){var a=this.element,b=this.bBox;if(!b){if(a.nodeName==="text")a.style.position=oc;b=this.bBox={x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}}return b},
+on:function(a,b){this.element["on"+a]=function(){var c=cb.event;c.target=c.srcElement;b(c)};return this},updateTransform:function(){if(this.added){var a=this,b=a.element,c=a.translateX||0,d=a.translateY||0,e=a.x||0,f=a.y||0,g=a.textAlign||"left",h={left:0,center:0.5,right:1}[g],j=g&&g!=="left";if(c||d)a.css({marginLeft:c,marginTop:d});a.inverted&&u(b.childNodes,function(R){a.renderer.invertChild(R,b)});if(b.tagName==="SPAN"){var l,n;c=a.rotation;var J;l=0;d=1;var D=0,aa;J=ja(a.textWidth);var E=a.xCorr||
+0,da=a.yCorr||0,w=[c,g,b.innerHTML,a.textWidth].join(",");if(w!==a.cTT){if(M(c)){l=c*Ud;d=nb(l);D=Db(l);Na(b,{filter:c?["progid:DXImageTransform.Microsoft.Matrix(M11=",d,", M12=",-D,", M21=",D,", M22=",d,", sizingMethod='auto expand')"].join(""):jb})}l=b.offsetWidth;n=b.offsetHeight;if(l>J){Na(b,{width:J+bb,display:"block",whiteSpace:"normal"});l=J}J=X((ja(b.style.fontSize)||12)*1.2);E=d<0&&-l;da=D<0&&-n;aa=d*D<0;E+=D*J*(aa?1-h:h);da-=d*J*(c?aa?h:1-h:1);if(j){E-=l*h*(d<0?-1:1);if(c)da-=n*h*(D<0?-1:
+1);Na(b,{textAlign:g})}a.xCorr=E;a.yCorr=da}Na(b,{left:e+E,top:f+da});a.cTT=w}}else this.alignOnAdd=true},shadow:function(a,b){var c=[],d,e=this.element,f=this.renderer,g,h=e.style,j,l=e.path;if(l&&typeof l.value!=="string")l="x";if(a){for(d=1;d<=3;d++){j=['<shape isShadow="true" strokeweight="',7-2*d,'" filled="false" path="',l,'" coordsize="100,100" style="',e.style.cssText,'" />'];g=ib(f.prepVML(j),null,{left:ja(h.left)+1,top:ja(h.top)+1});j=['<stroke color="black" opacity="',0.05*d,'"/>'];ib(f.prepVML(j),
+null,null,g);b?b.element.appendChild(g):e.parentNode.insertBefore(g,e);c.push(g)}this.shadows=c}return this}});la=function(){this.init.apply(this,arguments)};la.prototype=va(Vc.prototype,{Element:Eb,isIE8:pc.indexOf("MSIE 8.0")>-1,init:function(a,b,c){var d;this.alignedObjects=[];d=this.createElement(Qb);a.appendChild(d.element);this.box=d.element;this.boxWrapper=d;this.setSize(b,c,false);if(!wa.namespaces.hcv){wa.namespaces.add("hcv","urn:schemas-microsoft-com:vml");wa.createStyleSheet().cssText=
+"hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}},clipRect:function(a,b,c,d){var e=this.createElement();return pa(e,{members:[],left:a,top:b,width:c,height:d,getCSS:function(f){var g=this.top,h=this.left,j=h+this.width,l=g+this.height;g={clip:"rect("+X(f?h:g)+"px,"+X(f?l:j)+"px,"+X(f?j:l)+"px,"+X(f?g:h)+"px)"};!f&&zc&&pa(g,{width:j+bb,height:l+bb});return g},updateClipping:function(){u(e.members,function(f){f.css(e.getCSS(f.inverted))})}})},
+color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f,g,h=a.linearGradient,j,l,n,J;u(a.stops,function(D,aa){if(e.test(D[1])){d=Yb(D[1]);f=d.get("rgb");g=d.get("a")}else{f=D[1];g=1}if(aa){n=f;J=g}else{j=f;l=g}});a=90-sa.atan((h[3]-h[1])/(h[2]-h[0]))*180/cc;c=["<",c,' colors="0% ',j,",100% ",n,'" angle="',a,'" opacity="',J,'" o:opacity2="',l,'" type="gradient" focus="100%" />'];ib(this.prepVML(c),null,null,b)}else if(e.test(a)&&b.tagName!=="IMG"){d=Yb(a);c=["<",c,' opacity="',d.get("a"),
+'"/>'];ib(this.prepVML(c),null,null,b);return d.get("rgb")}else return a},prepVML:function(a){var b=this.isIE8;a=a.join("");if(b){a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />');a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')}else a=a.replace("<","<hcv:");return a},text:function(a,b,c){var d=Wa.chart.style;return this.createElement("span").attr({text:a,
+x:X(b),y:X(c)}).css({whiteSpace:"nowrap",fontFamily:d.fontFamily,fontSize:d.fontSize})},path:function(a){return this.createElement("shape").attr({coordsize:"100 100",d:a})},circle:function(a,b,c){return this.symbol("circle").attr({x:a,y:b,r:c})},g:function(a){var b;if(a)b={className:nc+a,"class":nc+a};return this.createElement(Qb).attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});arguments.length>1&&f.css({left:b,top:c,width:d,height:e});return f},rect:function(a,b,
+c,d,e,f){if(Lb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;a=a.x}var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,Ha(c,0),Ha(d,0)))},invertChild:function(a,b){var c=b.style;Na(a,{flip:"x",left:ja(c.width)-10,top:ja(c.height)-10,rotation:-90})},symbols:{arc:function(a,b,c,d){var e=d.start,f=d.end,g=nb(e),h=Db(e),j=nb(f),l=Db(f);d=d.innerR;var n=0.07/c,J=d&&0.1/d||0;if(f-e===0)return["x"];else if(2*cc-f+e<n)j=-n;else if(f-e<J)j=nb(e+J);return["wa",a-c,b-c,a+c,b+c,a+c*g,b+c*h,a+c*
+j,b+c*l,"at",a-d,b-d,a+d,b+d,a+d*j,b+d*l,a+d*g,b+d*h,"x","e"]},circle:function(a,b,c){return["wa",a-c,b-c,a+c,b+c,a+c,b,a+c,b,"e"]},rect:function(a,b,c,d){if(!M(d))return[];var e=d.width;d=d.height;var f=a+e,g=b+d;c=qb(c,e,d);return[ab,a+c,b,La,f-c,b,"wa",f-2*c,b,f,b+2*c,f-c,b,f,b+c,La,f,g-c,"wa",f-2*c,g-2*c,f,g,f,g-c,f-c,g,La,a+c,g,"wa",a,g-2*c,a+2*c,g,a+c,g,a,g-c,La,a,b+c,"wa",a,b,a+2*c,b+2*c,a,b+c,a+c,b,"x","e"]}}});Wc=la}Gd.prototype.callbacks=[];var Ac=function(){};Ac.prototype={init:function(a,
+b){var c=a.chart.counters,d;this.series=a;this.applyOptions(b);this.pointAttr={};if(a.options.colorByPoint){d=a.chart.options.colors;if(!this.options)this.options={};this.color=this.options.color=this.color||d[c.color++];c.wrapColor(d.length)}a.chart.pointCount++;return this},applyOptions:function(a){var b=this.series;this.config=a;if(dc(a)||a===null)this.y=a;else if(Lb(a)&&!dc(a.length)){pa(this,a);this.options=a}else if(Pb(a[0])){this.name=a[0];this.y=a[1]}else if(dc(a[0])){this.x=a[0];this.y=a[1]}if(this.x===
+Va)this.x=b.autoIncrement()},destroy:function(){var a=this,b=a.series,c;b.chart.pointCount--;a===b.chart.hoverPoint&&a.onMouseOut();b.chart.hoverPoints=null;Cb(a);u(["graphic","tracker","group","dataLabel","connector"],function(d){a[d]&&a[d].destroy()});a.legendItem&&a.series.chart.legend.destroyItem(a);for(c in a)a[c]=null},getLabelConfig:function(){return{x:this.category,y:this.y,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},select:function(a,b){var c=
+this,d=c.series.chart;c.selected=a=C(a,!c.selected);c.firePointEvent(a?"select":"unselect");c.setState(a&&"select");b||u(d.getSelectedPoints(),function(e){if(e.selected&&e!==c){e.selected=false;e.setState(hb);e.firePointEvent("unselect")}})},onMouseOver:function(){var a=this.series.chart,b=a.tooltip,c=a.hoverPoint;c&&c!==this&&c.onMouseOut();this.firePointEvent("mouseOver");b&&!b.shared&&b.refresh(this);this.setState(Bb);a.hoverPoint=this},onMouseOut:function(){this.firePointEvent("mouseOut");this.setState();
+this.series.chart.hoverPoint=null},tooltipFormatter:function(a){var b=this.series;return['<span style="color:'+b.color+'">',this.name||b.name,"</span>: ",!a?"<b>x = "+(this.name||this.x)+",</b> ":"","<b>",!a?"y = ":"",this.y,"</b>"].join("")},update:function(a,b,c){var d=this,e=d.series,f=d.graphic,g=e.chart;b=C(b,true);d.firePointEvent("update",{options:a},function(){d.applyOptions(a);if(Lb(a)){e.getAttribs();f&&f.attr(d.pointAttr[e.state])}e.isDirty=true;b&&g.redraw(c)})},remove:function(a,b){var c=
+this,d=c.series,e=d.chart,f=d.data;ec(b,e);a=C(a,true);c.firePointEvent("remove",null,function(){qc(f,c);c.destroy();d.isDirty=true;a&&e.redraw()})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;if(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])this.importEvents();if(a==="click"&&e.allowPointSelect)c=function(f){d.select(null,f.ctrlKey||f.metaKey||f.shiftKey)};Pa(this,a,b,c)},importEvents:function(){if(!this.hasImportedEvents){var a=va(this.series.options.point,
+this.options).events,b;this.events=a;for(b in a)Sa(this,b,a[b]);this.hasImportedEvents=true}},setState:function(a){var b=this.series,c=b.options.states,d=xb[b.type].marker&&b.options.marker,e=d&&!d.enabled,f=(d=d&&d.states[a])&&d.enabled===false,g=b.stateMarkerGraphic,h=b.chart,j=this.pointAttr;a=a||hb;if(!(a===this.state||this.selected&&a!=="select"||c[a]&&c[a].enabled===false||a&&(f||e&&!d.enabled))){if(this.graphic)this.graphic.attr(j[a]);else{if(a){if(!g)b.stateMarkerGraphic=g=h.renderer.circle(0,
+0,j[a].r).attr(j[a]).add(b.group);g.translate(this.plotX,this.plotY)}if(g)g[a?"show":"hide"]()}this.state=a}}};var pb=function(){};pb.prototype={isCartesian:true,type:"line",pointClass:Ac,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},init:function(a,b){var c,d;d=a.series.length;this.chart=a;b=this.setOptions(b);pa(this,{index:d,options:b,name:b.name||"Series "+(d+1),state:hb,pointAttr:{},visible:b.visible!==false,selected:b.selected===true});d=b.events;
+for(c in d)Sa(this,c,d[c]);if(d&&d.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=true;this.getColor();this.getSymbol();this.setData(b.data,false)},autoIncrement:function(){var a=this.options,b=this.xIncrement;b=C(b,a.pointStart,0);this.pointInterval=C(this.pointInterval,a.pointInterval,1);this.xIncrement=b+this.pointInterval;return b},cleanData:function(){var a=this.chart,b=this.data,c,d,e=a.smallestInterval,f,g;b.sort(function(h,j){return h.x-j.x});if(this.options.connectNulls)for(g=
+b.length-1;g>=0;g--)b[g].y===null&&b[g-1]&&b[g+1]&&b.splice(g,1);for(g=b.length-1;g>=0;g--)if(b[g-1]){f=b[g].x-b[g-1].x;if(f>0&&(d===Va||f<d)){d=f;c=g}}if(e===Va||d<e)a.smallestInterval=d;this.closestPoints=c},getSegments:function(){var a=-1,b=[],c=this.data;u(c,function(d,e){if(d.y===null){e>a+1&&b.push(c.slice(a+1,e));a=e}else e===c.length-1&&b.push(c.slice(a+1,e+1))});this.segments=b},setOptions:function(a){var b=this.chart.options.plotOptions;return va(b[this.type],b.series,a)},getColor:function(){var a=
+this.chart.options.colors,b=this.chart.counters;this.color=this.options.color||a[b.color++]||"#0000ff";b.wrapColor(a.length)},getSymbol:function(){var a=this.chart.options.symbols,b=this.chart.counters;this.symbol=this.options.marker.symbol||a[b.symbol++];b.wrapSymbol(a.length)},addPoint:function(a,b,c,d){var e=this.data,f=this.graph,g=this.area,h=this.chart;a=(new this.pointClass).init(this,a);ec(d,h);if(f&&c)f.shift=c;if(g){g.shift=c;g.isArea=true}b=C(b,true);e.push(a);c&&e[0].remove(false);this.getAttribs();
+this.isDirty=true;b&&h.redraw()},setData:function(a,b){var c=this,d=c.data,e=c.initialColor,f=c.chart,g=d&&d.length||0;c.xIncrement=null;if(M(e))f.counters.color=e;for(a=mc(rc(a||[]),function(h){return(new c.pointClass).init(c,h)});g--;)d[g].destroy();c.data=a;c.cleanData();c.getSegments();c.getAttribs();c.isDirty=true;f.isDirtyBox=true;C(b,true)&&f.redraw(false)},remove:function(a,b){var c=this,d=c.chart;a=C(a,true);if(!c.isRemoving){c.isRemoving=true;Pa(c,"remove",null,function(){c.destroy();d.isDirtyLegend=
+d.isDirtyBox=true;a&&d.redraw(b)})}c.isRemoving=false},translate:function(){for(var a=this.chart,b=this.options.stacking,c=this.xAxis.categories,d=this.yAxis,e=this.data,f=e.length;f--;){var g=e[f],h=g.x,j=g.y,l=g.low,n=d.stacks[(j<0?"-":"")+this.stackKey];g.plotX=this.xAxis.translate(h);if(b&&this.visible&&n&&n[h]){l=n[h];h=l.total;l.cum=l=l.cum-j;j=l+j;if(b==="percent"){l=h?l*100/h:0;j=h?j*100/h:0}g.percentage=h?g.y*100/h:0;g.stackTotal=h}if(M(l))g.yBottom=d.translate(l,0,1,0,1);if(j!==null)g.plotY=
+d.translate(j,0,1,0,1);g.clientX=a.inverted?a.plotHeight-g.plotX:g.plotX;g.category=c&&c[g.x]!==Va?c[g.x]:g.x}},setTooltipPoints:function(a){var b=this.chart,c=b.inverted,d=[],e=X((c?b.plotTop:b.plotLeft)+b.plotSizeX),f,g,h=[];if(a)this.tooltipPoints=null;u(this.segments,function(j){d=d.concat(j)});if(this.xAxis&&this.xAxis.reversed)d=d.reverse();u(d,function(j,l){f=d[l-1]?d[l-1]._high+1:0;for(g=j._high=d[l+1]?kb((j.plotX+(d[l+1]?d[l+1].plotX:e))/2):e;f<=g;)h[c?e-f++:f++]=j});this.tooltipPoints=h},
+onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(!(!Jb&&a.mouseIsDown)){b&&b!==this&&b.onMouseOut();this.options.events.mouseOver&&Pa(this,"mouseOver");this.tracker&&this.tracker.toFront();this.setState(Bb);a.hoverSeries=this}},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;d&&d.onMouseOut();this&&a.events.mouseOut&&Pa(this,"mouseOut");c&&!a.stickyTracking&&c.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this.chart,c=this.clipRect,
+d=this.options.animation;if(d&&!Lb(d))d={};if(a){if(!c.isAnimating){c.attr("width",0);c.isAnimating=true}}else{c.animate({width:b.plotSizeX},d);this.animate=null}},drawPoints:function(){var a,b=this.data,c=this.chart,d,e,f,g,h,j;if(this.options.marker.enabled)for(f=b.length;f--;){g=b[f];d=g.plotX;e=g.plotY;j=g.graphic;if(e!==Va&&!isNaN(e)){a=g.pointAttr[g.selected?"select":hb];h=a.r;if(j)j.animate({x:d,y:e,r:h});else g.graphic=c.renderer.symbol(C(g.marker&&g.marker.symbol,this.symbol),d,e,h).attr(a).add(this.group)}}},
+convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={};a=a||{};b=b||{};c=c||{};d=d||{};for(f in e){g=e[f];h[f]=C(a[g],b[f],c[f],d[f])}return h},getAttribs:function(){var a=this,b=xb[a.type].marker?a.options.marker:a.options,c=b.states,d=c[Bb],e,f=a.color,g={stroke:f,fill:f},h=a.data,j=[],l,n=a.pointAttrToOptions,J;if(a.options.marker){d.radius=d.radius||b.radius+2;d.lineWidth=d.lineWidth||b.lineWidth+1}else d.color=d.color||Yb(d.color||f).brighten(d.brightness).get();j[hb]=a.convertAttribs(b,
+g);u([Bb,"select"],function(D){j[D]=a.convertAttribs(c[D],j[hb])});a.pointAttr=j;for(f=h.length;f--;){g=h[f];if((b=g.options&&g.options.marker||g.options)&&b.enabled===false)b.radius=0;e=false;if(g.options)for(J in n)if(M(b[n[J]]))e=true;if(e){l=[];c=b.states||{};e=c[Bb]=c[Bb]||{};if(!a.options.marker)e.color=Yb(e.color||g.options.color).brighten(e.brightness||d.brightness).get();l[hb]=a.convertAttribs(b,j[hb]);l[Bb]=a.convertAttribs(c[Bb],j[Bb],l[hb]);l.select=a.convertAttribs(c.select,j.select,
+l[hb])}else l=j;g.pointAttr=l}},destroy:function(){var a=this,b=a.chart,c=/\/5[0-9\.]+ (Safari|Mobile)\//.test(pc),d,e;Pa(a,"destroy");Cb(a);a.legendItem&&a.chart.legend.destroyItem(a);u(a.data,function(f){f.destroy()});u(["area","graph","dataLabelsGroup","group","tracker"],function(f){if(a[f]){d=c&&f==="group"?"hide":"destroy";a[f][d]()}});if(b.hoverSeries===a)b.hoverSeries=null;qc(b.series,a);for(e in a)delete a[e]},drawDataLabels:function(){if(this.options.dataLabels.enabled){var a=this,b,c,d=
+a.data,e=a.options.dataLabels,f,g=a.dataLabelsGroup,h=a.chart,j=h.inverted,l=a.type,n;n=a.options.stacking;var J=l==="column"||l==="bar",D=e.verticalAlign===null,aa=e.y===null;if(J)if(n){if(D)e=va(e,{verticalAlign:"middle"});if(aa)e=va(e,{y:{top:14,middle:4,bottom:-6}[e.verticalAlign]})}else if(D)e=va(e,{verticalAlign:"top"});if(!g)g=a.dataLabelsGroup=h.renderer.g("data-labels").attr({visibility:a.visible?Ab:ub,zIndex:6}).translate(h.plotLeft,h.plotTop).add();n=e.color;if(n==="auto")n=null;e.style.color=
+C(n,a.color);u(d,function(E){var da=E.barX,w=da&&da+E.barW/2||E.plotX||-999,R=C(E.plotY,-999),B=E.dataLabel,K=e.align,S=aa?E.y>0?-6:12:e.y;f=e.formatter.call(E.getLabelConfig());b=(j?h.plotWidth-R:w)+e.x;c=(j?h.plotHeight-w:R)+S;if(l==="column")b+={left:-1,right:1}[K]*E.barW/2||0;if(j&&E.y<0){K="right";b-=10}if(B){if(j&&!e.y)c=c+ja(B.styles.lineHeight)*0.9-B.getBBox().height/2;B.attr({text:f}).animate({x:b,y:c})}else if(M(f)){B=E.dataLabel=h.renderer.text(f,b,c).attr({align:K,rotation:e.rotation,
+zIndex:1}).css(e.style).add(g);j&&!e.y&&B.attr({y:c+ja(B.styles.lineHeight)*0.9-B.getBBox().height/2})}if(J&&a.options.stacking){w=E.barY;R=E.barW;E=E.barH;B.align(e,null,{x:j?h.plotWidth-w-E:da,y:j?h.plotHeight-da-R:w,width:j?E:R,height:j?R:E})}})}},drawGraph:function(){var a=this,b=a.options,c=a.graph,d=[],e,f=a.area,g=a.group,h=b.lineColor||a.color,j=b.lineWidth,l=b.dashStyle,n,J=a.chart.renderer,D=a.yAxis.getThreshold(b.threshold||0),aa=/^area/.test(a.type),E=[],da=[];u(a.segments,function(w){n=
+[];u(w,function(S,I){if(a.getPointSpline)n.push.apply(n,a.getPointSpline(w,S,I));else{n.push(I?La:ab);I&&b.step&&n.push(S.plotX,w[I-1].plotY);n.push(S.plotX,S.plotY)}});if(w.length>1)d=d.concat(n);else E.push(w[0]);if(aa){var R=[],B,K=n.length;for(B=0;B<K;B++)R.push(n[B]);K===3&&R.push(La,n[1],n[2]);if(b.stacking&&a.type!=="areaspline")for(B=w.length-1;B>=0;B--)R.push(w[B].plotX,w[B].yBottom);else R.push(La,w[w.length-1].plotX,D,La,w[0].plotX,D);da=da.concat(R)}});a.graphPath=d;a.singlePoints=E;if(aa){e=
+C(b.fillColor,Yb(a.color).setOpacity(b.fillOpacity||0.75).get());if(f)f.animate({d:da});else a.area=a.chart.renderer.path(da).attr({fill:e}).add(g)}if(c)c.animate({d:d});else if(j){c={stroke:h,"stroke-width":j};if(l)c.dashstyle=l;a.graph=J.path(d).attr(c).add(g).shadow(b.shadow)}},render:function(){var a=this,b=a.chart,c,d,e=a.options,f=e.animation,g=f&&a.animate;f=g?f&&f.duration||500:0;var h=a.clipRect,j=b.renderer;if(!h){h=a.clipRect=!b.hasRendered&&b.clipRect?b.clipRect:j.clipRect(0,0,b.plotSizeX,
+b.plotSizeY);if(!b.clipRect)b.clipRect=h}if(!a.group){c=a.group=j.g("series");if(b.inverted){d=function(){c.attr({width:b.plotWidth,height:b.plotHeight}).invert()};d();Sa(b,"resize",d);Sa(a,"destroy",function(){Cb(b,"resize",d)})}c.clip(a.clipRect).attr({visibility:a.visible?Ab:ub,zIndex:e.zIndex}).translate(b.plotLeft,b.plotTop).add(b.seriesGroup)}a.drawDataLabels();g&&a.animate(true);a.drawGraph&&a.drawGraph();a.drawPoints();a.options.enableMouseTracking!==false&&a.drawTracker();g&&a.animate();
+setTimeout(function(){h.isAnimating=false;if((c=a.group)&&h!==b.clipRect&&h.renderer){c.clip(a.clipRect=b.clipRect);h.destroy()}},f);a.isDirty=false},redraw:function(){var a=this.chart,b=this.group;if(b){a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight});b.animate({translateX:a.plotLeft,translateY:a.plotTop})}this.translate();this.setTooltipPoints(true);this.render()},setState:function(a){var b=this.options,c=this.graph,d=b.states;b=b.lineWidth;a=a||hb;if(this.state!==a){this.state=a;if(!(d[a]&&
+d[a].enabled===false)){if(a)b=d[a].lineWidth||b+1;if(c&&!c.dashstyle)c.attr({"stroke-width":b},a?0:500)}}},setVisible:function(a,b){var c=this.chart,d=this.legendItem,e=this.group,f=this.tracker,g=this.dataLabelsGroup,h,j=this.data,l=c.options.chart.ignoreHiddenSeries;h=this.visible;h=(this.visible=a=a===Va?!h:a)?"show":"hide";e&&e[h]();if(f)f[h]();else for(e=j.length;e--;){f=j[e];f.tracker&&f.tracker[h]()}g&&g[h]();d&&c.legend.colorizeItem(this,a);this.isDirty=true;this.options.stacking&&u(c.series,
+function(n){if(n.options.stacking&&n.visible)n.isDirty=true});if(l)c.isDirtyBox=true;b!==false&&c.redraw();Pa(this,h)},show:function(){this.setVisible(true)},hide:function(){this.setVisible(false)},select:function(a){this.selected=a=a===Va?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;Pa(this,a?"select":"unselect")},drawTracker:function(){var a=this,b=a.options,c=[].concat(a.graphPath),d=c.length,e=a.chart,f=e.options.tooltip.snap,g=a.tracker,h=b.cursor;h=h&&{cursor:h};var j=a.singlePoints,
+l;if(d)for(l=d+1;l--;){c[l]===ab&&c.splice(l+1,0,c[l+1]-f,c[l+2],La);if(l&&c[l]===ab||l===d)c.splice(l,0,La,c[l-2]+f,c[l-1])}for(l=0;l<j.length;l++){d=j[l];c.push(ab,d.plotX-f,d.plotY,La,d.plotX+f,d.plotY)}if(g)g.attr({d:c});else a.tracker=e.renderer.path(c).attr({isTracker:true,stroke:Wd,fill:jb,"stroke-width":b.lineWidth+2*f,visibility:a.visible?Ab:ub,zIndex:1}).on(Jb?"touchstart":"mouseover",function(){e.hoverSeries!==a&&a.onMouseOver()}).on("mouseout",function(){b.stickyTracking||a.onMouseOut()}).css(h).add(e.trackerGroup)}};
+la=yb(pb);vb.line=la;la=yb(pb,{type:"area"});vb.area=la;la=yb(pb,{type:"spline",getPointSpline:function(a,b,c){var d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1],h,j,l,n;if(c&&c<a.length-1){a=f.plotY;l=g.plotX;g=g.plotY;var J;h=(1.5*d+f.plotX)/2.5;j=(1.5*e+a)/2.5;l=(1.5*d+l)/2.5;n=(1.5*e+g)/2.5;J=(n-j)*(l-d)/(l-h)+e-n;j+=J;n+=J;if(j>a&&j>e){j=Ha(a,e);n=2*e-j}else if(j<a&&j<e){j=qb(a,e);n=2*e-j}if(n>g&&n>e){n=Ha(g,e);j=2*e-n}else if(n<g&&n<e){n=qb(g,e);j=2*e-n}b.rightContX=l;b.rightContY=n}if(c){b=["C",f.rightContX||
+f.plotX,f.rightContY||f.plotY,h||d,j||e,d,e];f.rightContX=f.rightContY=null}else b=[ab,d,e];return b}});vb.spline=la;la=yb(la,{type:"areaspline"});vb.areaspline=la;var ad=yb(pb,{type:"column",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},init:function(){pb.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasColumn=true;b.hasRendered&&u(b.series,function(c){if(c.type===a.type)c.isDirty=true})},translate:function(){var a=this,b=a.chart,
+c=a.options,d=c.stacking,e=c.borderWidth,f=0,g=a.xAxis.reversed,h=a.xAxis.categories,j={},l,n;pb.prototype.translate.apply(a);u(b.series,function(S){if(S.type===a.type&&S.visible){if(S.options.stacking){l=S.stackKey;if(j[l]===Va)j[l]=f++;n=j[l]}else n=f++;S.columnIndex=n}});var J=a.data,D=a.closestPoints;h=$a(J[1]?J[D].plotX-J[D-1].plotX:b.plotSizeX/(h&&h.length||1));D=h*c.groupPadding;var aa=(h-2*D)/f,E=c.pointWidth,da=M(E)?(aa-E)/2:aa*c.pointPadding,w=Ha(C(E,aa-2*da),1),R=da+(D+((g?f-a.columnIndex:
+a.columnIndex)||0)*aa-h/2)*(g?-1:1),B=a.yAxis.getThreshold(c.threshold||0),K=C(c.minPointLength,5);u(J,function(S){var I=S.plotY,za=S.yBottom||B,Da=S.plotX+R,gb=fd(qb(I,za)),wb=fd(Ha(I,za)-gb),Ob=a.yAxis.stacks[(S.y<0?"-":"")+a.stackKey],Kb;d&&a.visible&&Ob&&Ob[S.x]&&Ob[S.x].setOffset(R,w);if($a(wb)<K){if(K){wb=K;gb=$a(gb-B)>K?za-K:B-(I<=B?K:0)}Kb=gb-3}pa(S,{barX:Da,barY:gb,barW:w,barH:wb});S.shapeType="rect";I=pa(b.renderer.Element.prototype.crisp.apply({},[e,Da,gb,w,wb]),{r:c.borderRadius});if(e%
+2){I.y-=1;I.height+=1}S.shapeArgs=I;S.trackerArgs=M(Kb)&&va(S.shapeArgs,{height:Ha(6,wb+3),y:Kb})})},getSymbol:function(){},drawGraph:function(){},drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer,d,e;u(a.data,function(f){var g=f.plotY;if(g!==Va&&!isNaN(g)&&f.y!==null){d=f.graphic;e=f.shapeArgs;if(d){Tc(d);d.animate(e)}else f.graphic=c[f.shapeType](e).attr(f.pointAttr[f.selected?"select":hb]).add(a.group).shadow(b.shadow)}})},drawTracker:function(){var a=this,b=a.chart,c=b.renderer,
+d,e,f=+new Date,g=a.options.cursor,h=g&&{cursor:g},j;u(a.data,function(l){e=l.tracker;d=l.trackerArgs||l.shapeArgs;delete d.strokeWidth;if(l.y!==null)if(e)e.attr(d);else l.tracker=c[l.shapeType](d).attr({isTracker:f,fill:Wd,visibility:a.visible?Ab:ub,zIndex:1}).on(Jb?"touchstart":"mouseover",function(n){j=n.relatedTarget||n.fromElement;b.hoverSeries!==a&&Ea(j,"isTracker")!==f&&a.onMouseOver();l.onMouseOver()}).on("mouseout",function(n){if(!a.options.stickyTracking){j=n.relatedTarget||n.toElement;
+Ea(j,"isTracker")!==f&&a.onMouseOut()}}).css(h).add(l.group||b.trackerGroup)})},animate:function(a){var b=this,c=b.data;if(!a){u(c,function(d){var e=d.graphic;d=d.shapeArgs;if(e){e.attr({height:0,y:b.yAxis.translate(0,0,1)});e.animate({height:d.height,y:d.y},b.options.animation)}});b.animate=null}},remove:function(){var a=this,b=a.chart;b.hasRendered&&u(b.series,function(c){if(c.type===a.type)c.isDirty=true});pb.prototype.remove.apply(a,arguments)}});vb.column=ad;la=yb(ad,{type:"bar",init:function(a){a.inverted=
+this.inverted=true;ad.prototype.init.apply(this,arguments)}});vb.bar=la;la=yb(pb,{type:"scatter",translate:function(){var a=this;pb.prototype.translate.apply(a);u(a.data,function(b){b.shapeType="circle";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){var a=this,b=a.options.cursor,c=b&&{cursor:b},d;u(a.data,function(e){(d=e.graphic)&&d.attr({isTracker:true}).on("mouseover",function(){a.onMouseOver();e.onMouseOver()}).on("mouseout",function(){a.options.stickyTracking||
+a.onMouseOut()}).css(c)})},cleanData:function(){}});vb.scatter=la;la=yb(Ac,{init:function(){Ac.prototype.init.apply(this,arguments);var a=this,b;pa(a,{visible:a.visible!==false,name:C(a.name,"Slice")});b=function(){a.slice()};Sa(a,"select",b);Sa(a,"unselect",b);return a},setVisible:function(a){var b=this.series.chart,c=this.tracker,d=this.dataLabel,e=this.connector,f=this.shadowGroup,g;g=(this.visible=a=a===Va?!this.visible:a)?"show":"hide";this.group[g]();c&&c[g]();d&&d[g]();e&&e[g]();f&&f[g]();
+this.legendItem&&b.legend.colorizeItem(this,a)},slice:function(a,b,c){var d=this.series.chart,e=this.slicedTranslation;ec(c,d);C(b,true);a=this.sliced=M(a)?a:!this.sliced;a={translateX:a?e[0]:d.plotLeft,translateY:a?e[1]:d.plotTop};this.group.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}});la=yb(pb,{type:"pie",isCartesian:false,pointClass:la,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=this.chart.counters.color},
+animate:function(){var a=this;u(a.data,function(b){var c=b.graphic;b=b.shapeArgs;var d=-cc/2;if(c){c.attr({r:0,start:d,end:d});c.animate({r:b.r,start:b.start,end:b.end},a.options.animation)}});a.animate=null},translate:function(){var a=0,b=this,c=-0.25,d=b.options,e=d.slicedOffset,f=e+d.borderWidth,g=d.center.concat([d.size,d.innerSize||0]),h=b.chart,j=h.plotWidth,l=h.plotHeight,n,J,D,aa=b.data,E=2*cc,da,w=qb(j,l),R,B,K,S=d.dataLabels.distance;g=mc(g,function(I,za){return(R=/%$/.test(I))?[j,l,w,w][za]*
+ja(I)/100:I});b.getX=function(I,za){D=sa.asin((I-g[1])/(g[2]/2+S));return g[0]+(za?-1:1)*nb(D)*(g[2]/2+S)};b.center=g;u(aa,function(I){a+=I.y});u(aa,function(I){da=a?I.y/a:0;n=X(c*E*1E3)/1E3;c+=da;J=X(c*E*1E3)/1E3;I.shapeType="arc";I.shapeArgs={x:g[0],y:g[1],r:g[2]/2,innerR:g[3]/2,start:n,end:J};D=(J+n)/2;I.slicedTranslation=mc([nb(D)*e+h.plotLeft,Db(D)*e+h.plotTop],X);B=nb(D)*g[2]/2;b.radiusY=K=Db(D)*g[2]/2;I.tooltipPos=[g[0]+B*0.7,g[1]+K*0.7];I.labelPos=[g[0]+B+nb(D)*S,g[1]+K+Db(D)*S,g[0]+B+nb(D)*
+f,g[1]+K+Db(D)*f,g[0]+B,g[1]+K,S<0?"center":D<E/4?"left":"right",D];I.percentage=da*100;I.total=a});this.setTooltipPoints()},render:function(){this.drawPoints();this.options.enableMouseTracking!==false&&this.drawTracker();this.drawDataLabels();this.options.animation&&this.animate&&this.animate();this.isDirty=false},drawPoints:function(){var a=this.chart,b=a.renderer,c,d,e,f=this.options.shadow,g,h;u(this.data,function(j){d=j.graphic;h=j.shapeArgs;e=j.group;g=j.shadowGroup;if(f&&!g)g=j.shadowGroup=
+b.g("shadow").attr({zIndex:4}).add();if(!e)e=j.group=b.g("point").attr({zIndex:5}).add();c=j.sliced?j.slicedTranslation:[a.plotLeft,a.plotTop];e.translate(c[0],c[1]);g&&g.translate(c[0],c[1]);if(d)d.animate(h);else j.graphic=b.arc(h).attr(pa(j.pointAttr[hb],{"stroke-linejoin":"round"})).add(j.group).shadow(f,g);j.visible===false&&j.setVisible(false)})},drawDataLabels:function(){var a=this.data,b,c=this.chart,d=this.options.dataLabels,e=C(d.connectorPadding,10),f=C(d.connectorWidth,1),g,h,j=d.distance,
+l=this.radiusY,n=j>0,J=this.center[1],D=[[],[]],aa,E,da,w,R=2,B;if(d.enabled){pb.prototype.drawDataLabels.apply(this);u(a,function(gb){D[gb.labelPos[7]<cc/2?0:1].push(gb)});D[1].reverse();w=function(gb,wb){return wb.y-gb.y};for(a=D[0][0]&&D[0][0].dataLabel&&ja(D[0][0].dataLabel.styles.lineHeight);R--;){var K=[],S=[],I=D[R],za=I.length,Da;for(B=J+l-j;B<=J-l+j;B+=a)K.push(B);da=K.length;if(za>da){h=[].concat(I);h.sort(w);for(B=za;B--;)h[B].rank=B;for(B=za;B--;)I[B].rank>=da&&I.splice(B,1);za=I.length}for(B=
+0;B<za;B++){b=I[B];h=b.labelPos;b=9999;for(E=0;E<da;E++){g=$a(K[E]-h[1]);if(g<b){b=g;Da=E}}if(Da<B&&K[B]!==null)Da=B;else if(da<za-B+Da&&K[B]!==null)Da=da-za+B;else for(;K[Da]===null;)Da++;S.push({i:Da,y:K[Da]});K[Da]=null}S.sort(w);for(B=0;B<za;B++){b=I[B];h=b.labelPos;g=b.dataLabel;E=S.pop();aa=h[1];da=b.visible===false?ub:Ab;Da=E.i;E=E.y;if(aa>E&&K[Da+1]!==null||aa<E&&K[Da-1]!==null)E=aa;aa=this.getX(E,R);g.attr({visibility:da,align:h[6]})[g.moved?"animate":"attr"]({x:aa+d.x+({left:e,right:-e}[h[6]]||
+0),y:E+d.y});g.moved=true;if(n&&f){g=b.connector;h=[ab,aa+(h[6]==="left"?5:-5),E,La,aa,E,La,h[2],h[3],La,h[4],h[5]];if(g){g.animate({d:h});g.attr("visibility",da)}else b.connector=g=this.chart.renderer.path(h).attr({"stroke-width":f,stroke:d.connectorColor||"#606060",visibility:da,zIndex:3}).translate(c.plotLeft,c.plotTop).add()}}}}},drawTracker:ad.prototype.drawTracker,getSymbol:function(){}});vb.pie=la;cb.Highcharts={Chart:Gd,dateFormat:Nc,pathAnim:$c,getOptions:function(){return Wa},numberFormat:zd,
+Point:Ac,Color:Yb,Renderer:Wc,seriesTypes:vb,setOptions:function(a){Wa=va(Wa,a);Bd();return Wa},Series:pb,addEvent:Sa,createElement:ib,discardElement:Gc,css:Na,each:u,extend:pa,map:mc,merge:va,pick:C,extendClass:yb,product:"Highcharts",version:"2.1.6"}})();
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_cache_MemoryCache.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_cache_MemoryCache.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_cache_MemoryCache.php.html	(revision 5888)
@@ -0,0 +1,392 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>MemoryCache.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">MemoryCache.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="api.html">api</a>/<a href="api_cache.html">cache</a>/<a href="api_cache_MemoryCache.php.html">MemoryCache.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="40.00%">
+                <div class="size butter"  style="width:40%" title="40.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">40.00%</td>
+          <td class="coverNumMed">2 / 5</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.00%">
+                <div class="size butter"  style="width:50%" title="50.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.00%</td>
+          <td class="coverNumMed">3 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">MemoryCache</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="40.00%">
+                <div class="size butter"  style="width:40%" title="40.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">40.00%</td>
+          <td class="coverNumMed">2 / 5</td>
+          <td class="crap">8.12</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.00%">
+                <div class="size butter"  style="width:50%" title="50.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.00%</td>
+          <td class="coverNumMed">3 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#43">__construct($conf=Null)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#67">put($id, $data, $expire=0, $compressed=false)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#83">get($id)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">2 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#97">clear($id)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#105">clearAll()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                             
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                : /**                                                                                               
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                :  * DooMemCache class file.                                                                        
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                :  *                                                                                                
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :  * @author Leng Sheng Hong &lt;darkredz@gmail.com&gt;                                                   
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :  * @link http://www.doophp.com/                                                                   
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :  * @copyright Copyright &amp;copy; 2009 Leng Sheng Hong                                               
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :  * @license http://www.doophp.com/license                                                         
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :  */                                                                                               
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :                                                                                                   
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                :                                                                                                   
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                : /**                                                                                               
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :  * DooMemCache provides caching methods utilizing the Memcache extension.                         
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :  *                                                                                                
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :  * If you have multiple servers for memcache, you would have to set it up in common.conf.php      
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :  * &lt;code&gt;                                                                                         
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :  * // host, port, persistent, weight                                                              
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :  * $config['MEMCACHE'] = array(                                                                   
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :  *                       array('192.168.1.31', '11211', true, 40),                                
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :  *                       array('192.168.1.23', '11211', true, 80)                                 
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :  *                     );                                                                         
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :  * &lt;/code&gt;                                                                                        
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :  *                                                                                                
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :  * @author Leng Sheng Hong &lt;darkredz@gmail.com&gt;                                                   
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :  * @version $Id: DooMemCache.php 1000 2009-08-22 19:36:10                                         
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :  * @package doo.cache                                                                             
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :  * @since 1.1                                                                                     
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :  */                                                                                               
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :                                                                                                   
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                : class MemoryCache{                                                                                
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :     /**                                                                                           
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :      * Memcached connection                                                                       
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :      * @var Memcache                                                                              
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :      */                                                                                           
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :     protected $_memcache;                                                                         
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :                                                                                                   
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :     /**                                                                                           
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span>                :      * Configurations of the connections                                                          
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :      * @var array                                                                                 
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                :      */                                                                                           
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :     protected $_config;                                                                           
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :                                                                                                   
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :     public function  __construct($conf=Null) {                                                    
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :         //$this-&gt;_memcache = new Memcache();                                                      
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                : //        $this-&gt;_config = $conf;                                                                 
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :                                                                                                   
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :         // host, port, persistent, weight                                                         
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                : //        if($conf!==Null){                                                                       
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                : //            foreach ($conf as $c){                                                              
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                : //                $result = $this-&gt;_memcache-&gt;addServer($c[0], $c[1], $c[2], $c[3]);              
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                : //            }                                                                                   
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                : //        }                                                                                       
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                : //        else{                                                                                   
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                : //            $this-&gt;_memcache-&gt;addServer('localhost', 11211);                                    
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                : //        }                                                                                       
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span><span class="lineNoCov">              0 :     }                                                                                             </span>
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :                                                                                                   
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                :     /**                                                                                           
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :      * Adds a cache with an unique Id.                                                            
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :      *                                                                                            
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :      * @param string $id Cache Id                                                                 
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :      * @param mixed $data Data to be stored                                                       
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :      * @param int $expire Seconds to expired                                                      
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :      * @param int $compressed To store the data in Zlib compressed format                         
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :      * @return bool True if success                                                               
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :      */                                                                                           
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :     public function put($id, $data, $expire=0, $compressed=false){                                
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :                                                                                                   
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :                                                                                                   
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                : //         if($compressed)                                                                        
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                : //             return $this-&gt;_memcache-&gt;set($id, $data, MEMCACHE_COMPRESSED, $expire);            
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span>                : //         else                                                                                   
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                : //             return $this-&gt;_memcache-&gt;set($id, $data, 0, $expire);                              
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span><span class="lineCov">              1 :     return false;                                                                                 </span>
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :     }                                                                                             
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :                                                                                                   
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :     /**                                                                                           
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                :      * Retrieves a value from cache with an Id.                                                   
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :      *                                                                                            
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span>                :      * @param string $id A unique key identifying the cache                                       
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                :      * @return mixed The value stored in cache. Return false if no cache found or already expired.
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span>                :      */                                                                                           
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                :     public function get($id){                                                                     
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                :                                                                                                   
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                : //         $return = $this-&gt;_memcache-&gt;get($id);                                                  
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span><span class="lineCov">              1 :       $return = false;                                                                            </span>
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span>                :                                                                                                   
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span><span class="lineCov">              1 :     return( $return );                                                                            </span>
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                :     }                                                                                             
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                :                                                                                                   
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                :     /**                                                                                           
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :      * Deletes an APC data cache with an identifying Id                                           
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span>                :      *                                                                                            
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span>                :      * @param string $id Id of the cache                                                          
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                :      * @return bool True if success                                                               
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                :      */                                                                                           
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :     public function clear($id){                                                                   
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span><span class="lineNoCov">              0 :         return $this-&gt;_memcache-&gt;delete($id);                                                     </span>
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :     }                                                                                             
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                :                                                                                                   
+<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span>                :     /**                                                                                           
+<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span>                :      * Deletes all data cache                                                                     
+<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span>                :      * @return bool True if success                                                               
+<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span>                :      */                                                                                           
+<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                :     public function clearAll(){                                                                   
+<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span><span class="lineNoCov">              0 :         return $this-&gt;_memcache-&gt;flush();                                                         </span>
+<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span>                :     }                                                                                             
+<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span>                :                                                                                                   
+<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span>                : }                                                                                                 
+<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span>                :                                                                                                   
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel74": {
+          "header": "1 test covers line 74",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel86": {
+          "header": "1 test covers line 86",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel88": {
+          "header": "1 test covers line 88",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_oauth2_lib.dashboard.html	(revision 5888)
@@ -0,0 +1,129 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>lib</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [4,0,0,0,0,0,0,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[0,130,"<a href=\"library_oauth2_lib_OAuth2.php.html#44\">OAuth2<\/a>"],[0,4,"<a href=\"library_oauth2_lib_OAuth2AuthenticateException.php.html#11\">OAuth2AuthenticateException<\/a>"],[0,14,"<a href=\"library_oauth2_lib_OAuth2RedirectException.php.html#10\">OAuth2RedirectException<\/a>"],[0,8,"<a href=\"library_oauth2_lib_OAuth2ServerException.php.html#8\">OAuth2ServerException<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">lib</td></tr>
+      <tr><td><div align="center"><p><a href="library_oauth2_lib.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#44">OAuth2</a> (17030)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#10">OAuth2RedirectException</a> (210)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#8">OAuth2ServerException</a> (72)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#11">OAuth2AuthenticateException</a> (20)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#52">OAuth2AuthenticateException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#32">OAuth2RedirectException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2AuthenticateException.php.html#30">OAuth2AuthenticateException::__construct</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1357">OAuth2::validateRedirectUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1328">OAuth2::getAuthorizationHeader</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2.php.html#1343">OAuth2::sendJsonHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#47">OAuth2RedirectException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2RedirectException.php.html#66">OAuth2RedirectException::buildUri</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#71">OAuth2ServerException::sendHeaders</a> (0%)</li>
+              <li><a href="library_oauth2_lib_OAuth2ServerException.php.html#79">OAuth2ServerException::__toString</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_controller.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_controller.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api_controller.php.html	(revision 5888)
@@ -0,0 +1,2539 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>controller.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">controller.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="api.html">api</a>/<a href="api_controller.php.html">controller.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="22.50%">
+                <div class="size scarlet_red"  style="width:22.5%" title="22.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">22.50%</td>
+          <td class="coverNumLo">9 / 40</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="52.82%">
+                <div class="size butter"  style="width:52.818991097923%" title="52.82%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">52.82%</td>
+          <td class="coverNumMed">178 / 337</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">Controller</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="22.50%">
+                <div class="size scarlet_red"  style="width:22.5%" title="22.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">22.50%</td>
+          <td class="coverNumLo">9 / 40</td>
+          <td class="crap">4022.50</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="52.82%">
+                <div class="size butter"  style="width:52.818991097923%" title="52.82%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">52.82%</td>
+          <td class="coverNumMed">178 / 337</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#33">__destruct()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#41">closeAll()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">20</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#49">clearAll()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#54">clear( $id )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#59">check( $id )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#64">store( $id, $data, $expires, $compressed )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#69">find( $URI, $params = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#77">read( $URI, $params = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#85">deleteAll( $URI, $params = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">3 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#93">delete( $URI, $params = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">3.33</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="66.67%">
+                  <div class="size butter"  style="width:66.666666666667%" title="66.67%"></div>
+              </div>
+          </td>
+          <td class="coverPerMed">66.67%</td>
+          <td class="coverNumMed">2 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#101">replace( $URI, $params, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#109">update( $URI, $params, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#117">create( $URI, $params, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#122">begin( $URI, $params = false, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#127">commit( $URI, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#132">rollback( $URI, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#137">format( $URI, $params, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#142">parse( $URI, $data, $criteria = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#147">URI( $className, $id = false, $service = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#155">links( $concept = false, $linkage = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">156</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#203">isConcept( $concept, $linkName )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#211">hasOne( $concept, $linkName )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#219">getConcept( $concept, $moduleName = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#227">loadCache( $cacheType = 'Memory' )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#234">loadConfig( $className, $isService = false)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">8 / 8</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#250">import( $path, $ext = &quot;.php&quot; )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">6 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#261">load( $path, $class = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">4.16</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="78.57%">
+                  <div class="size chameleon"  style="width:78.571428571429%" title="78.57%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">78.57%</td>
+          <td class="coverNumHi">11 / 14</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#284">wallet( $serviceName )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">4</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">7 / 7</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#299">connect( $service, $config )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">4 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#309">configure( $config, $newConfig )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">3 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#317">dispatch( $dispatcher, $data, $optionsMap = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#331">service( $serviceName, $concept = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">23 / 23</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#369">interceptor( $method, $concept = false, $serviceName = false, $isService = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">13.11</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="91.30%">
+                  <div class="size chameleon"  style="width:91.304347826087%" title="91.30%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">91.30%</td>
+          <td class="coverNumHi">21 / 23</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#407">interceptorCommit( $eventType, $commitList, $isService = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">3</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">7 / 7</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#422">fire( $eventType, $method, &amp;$params, $original, $isService = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12.69</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="64.29%">
+                  <div class="size butter"  style="width:64.285714285714%" title="64.29%"></div>
+              </div>
+          </td>
+          <td class="coverPerMed">64.29%</td>
+          <td class="coverNumMed">9 / 14</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#461">serviceName( $URI, $original = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">11.35</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="85.71%">
+                  <div class="size chameleon"  style="width:85.714285714286%" title="85.71%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">85.71%</td>
+          <td class="coverNumHi">12 / 14</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#485">call( $method, $URI, $properties = false, $options = false, $service = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">47.02</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="88.41%">
+                  <div class="size chameleon"  style="width:88.405797101449%" title="88.41%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">88.41%</td>
+          <td class="coverNumHi">61 / 69</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#598">fallback( $exception )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#604">put( $URI, $data, $txIds = false )</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">600</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 62</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#710">get()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                                             
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : if( !defined( 'ROOTPATH' ) )                                                                                                                                      
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :     define( 'ROOTPATH', dirname(__FILE__).'/..' );                                                                                                                
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                : require_once(ROOTPATH.'/api/config.php');                                                                                                                         
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                : /**                                                                                                                                                               
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                : TODO list:                                                                                                                                                        
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :   * definir de forma centralizada os caminhos e as constantes necessÃ¡rias;                                                                                       
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :   * criar um User Agent detect e um OS server detect para customizaÃ§Ãµes espeÃ§Ã­ficas de cada browser / servidor;                                               
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :   * criar um registrador para fallback handlers;                                                                                                                  
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :   * criar um dependency manager na configuraÃ§Ã£o dos serviÃ§os, para poder gerenciar os imports corretamente                                                     
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :   * criar um login e a recuperaÃ§Ã£o da sessÃ£o;                                                                                                                  
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                : */                                                                                                                                                                
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                : class Controller {                                                                                                                                                
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :     static $cache;                                                                                                                                                
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :     static $services = array();                                                                                                                                   
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :     static $interceptors = array();                                                                                                                               
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :     static $config = array();                                                                                                                                     
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :     static $includes = array();                                                                                                                                   
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :     static $tx = array();                                                                                                                                         
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :     static $isConcept = array();                                                                                                                                  
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :     static $hasOne = array();                                                                                                                                     
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :     static $txID = 0;                                                                                                                                             
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :     static $wallet;                                                                                                                                               
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :     public function __destruct()                                                                                                                                  
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                : //         if( $this-&gt;service )                                                                                                                                   
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                : //         $this-&gt;service-&gt;close();                                                                                                                               
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                : //         else                                                                                                                                                   
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span><span class="lineNoCov">              0 :         self::closeAll();                                                                                                                                         </span>
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                             </span>
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :     public static function closeAll()                                                                                                                             
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span><span class="lineNoCov">              0 :         if( self::$services )                                                                                                                                     </span>
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span><span class="lineNoCov">              0 :         foreach( self::$services as $serviceName =&gt; $service )                                                                                                    </span>
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span><span class="lineNoCov">              0 :             if( self::$config[ $serviceName ]['type'] === 'service' )                                                                                             </span>
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span><span class="lineNoCov">              0 :               $service-&gt;close();                                                                                                                                  </span>
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                             </span>
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :     public static function clearAll()                                                                                                                             
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span><span class="lineNoCov">              0 :         return self::$cache-&gt;clearAll();                                                                                                                          </span>
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :     public static function clear( $id )                                                                                                                           
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span><span class="lineNoCov">              0 :         return self::$cache-&gt;clear( $id );                                                                                                                        </span>
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :     public static function check( $id )                                                                                                                           
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span><span class="lineNoCov">              0 :         return self::$cache-&gt;get( $id );                                                                                                                          </span>
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :     public static function store( $id, $data, $expires, $compressed )                                                                                             
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span><span class="lineNoCov">              0 :         return self::$cache-&gt;put( $id, $data, $expires, $compressed );                                                                                            </span>
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :     public static function find( $URI, $params = false, $criteria = false )                                                                                       
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span><span class="lineNoCov">              0 :         if( isset($URI['id']) &amp;&amp; $URI['id'] )                                                                                                                     </span>
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span><span class="lineNoCov">              0 :         return self::read( $URI, $params, $criteria );                                                                                                            </span>
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span><span class="lineNoCov">              0 :         return self::call( 'find', $URI, $params, $criteria );                                                                                                    </span>
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :     public static function read( $URI, $params = false, $criteria = false )                                                                                       
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span><span class="lineNoCov">              0 :         if( !isset($URI['id']) || !$URI['id'] )                                                                                                                   </span>
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span><span class="lineNoCov">              0 :         return self::find( $URI, $params, $criteria );                                                                                                            </span>
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span><span class="lineNoCov">              0 :         return self::call( 'read', $URI, $params, $criteria );                                                                                                    </span>
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                :     public static function deleteAll( $URI, $params = false, $criteria = false )                                                                                  
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span><span class="lineCov">              2 :         if( isset($URI['id']) &amp;&amp; $URI['id'] )                                                                                                                     </span>
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span><span class="lineCov">              2 :         return self::delete( $URI, $params, $criteria );                                                                                                          </span>
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span><span class="lineCov">              2 :         return self::call( 'deleteAll', $URI, $params, $criteria );                                                                                               </span>
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span>                :     public static function delete( $URI, $params = false, $criteria = false )                                                                                     
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span><span class="lineCov">              2 :         if( !isset($URI['id']) || !$URI['id'] )                                                                                                                   </span>
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span><span class="lineCov">              2 :         return self::deleteAll( $URI, $params, $criteria );                                                                                                       </span>
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span><span class="lineNoCov">              0 :         return self::call( 'delete', $URI, $params, $criteria );                                                                                                  </span>
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span>                :     public static function replace( $URI, $params, $criteria = false )                                                                                            
+<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span><span class="lineNoCov">              0 :         if( isset($URI['id']) &amp;&amp; $URI['id'] )                                                                                                                     </span>
+<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span><span class="lineNoCov">              0 :         return self::update( $URI, $params, $criteria );                                                                                                          </span>
+<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span><span class="lineNoCov">              0 :         return self::call( 'replace', $URI, $params, $criteria );                                                                                                 </span>
+<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span>                :     public static function update( $URI, $params, $criteria = false )                                                                                             
+<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111">     111</a> </span><span class="lineNoCov">              0 :         if( !isset($URI['id']) || !$URI['id'] )                                                                                                                   </span>
+<span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112">     112</a> </span><span class="lineNoCov">              0 :         return self::replace( $URI, $params, $criteria );                                                                                                         </span>
+<span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113">     113</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114">     114</a> </span><span class="lineNoCov">              0 :         return self::call( 'update', $URI, $params, $criteria );                                                                                                  </span>
+<span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115">     115</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116">     116</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117">     117</a> </span>                :     public static function create( $URI, $params, $criteria = false )                                                                                             
+<span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118">     118</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119">     119</a> </span><span class="lineCov">              2 :         return self::call( 'create', $URI, $params, $criteria );                                                                                                  </span>
+<span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120">     120</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121">     121</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122">     122</a> </span>                :     public static function begin( $URI, $params = false, $criteria = false )                                                                                      
+<span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123">     123</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124">     124</a> </span><span class="lineNoCov">              0 :         return self::call( 'begin', $URI, $params, $criteria );                                                                                                   </span>
+<span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125">     125</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126">     126</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127">     127</a> </span>                :     public static function commit( $URI, $criteria = false )                                                                                                      
+<span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128">     128</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129">     129</a> </span><span class="lineNoCov">              0 :         return self::call( 'commit', $URI, false, $criteria );                                                                                                    </span>
+<span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130">     130</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131">     131</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132">     132</a> </span>                :     public static function rollback( $URI, $criteria = false )                                                                                                    
+<span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133">     133</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134">     134</a> </span><span class="lineNoCov">              0 :         return self::call( 'rollback', $URI, false, $criteria );                                                                                                  </span>
+<span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135">     135</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136">     136</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container137"><a name="137"></a><a href="#137" id="line137">     137</a> </span>                :     public static function format( $URI, $params, $criteria = false )                                                                                             
+<span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138">     138</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139">     139</a> </span><span class="lineNoCov">              0 :         return self::call( 'format', $URI, $params, $criteria );                                                                                                  </span>
+<span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140">     140</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141">     141</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142">     142</a> </span>                :     public static function parse( $URI, $data, $criteria = false )                                                                                                
+<span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143">     143</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144">     144</a> </span><span class="lineNoCov">              0 :         return self::call( 'parse', $URI, $data, $criteria );                                                                                                     </span>
+<span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145">     145</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146">     146</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147">     147</a> </span>                :     public static function URI( $className, $id = false, $service = false )                                                                                       
+<span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148">     148</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149">     149</a> </span><span class="lineNoCov">              0 :         return array( 'concept' =&gt; $className,                                                                                                                    </span>
+<span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150">     150</a> </span><span class="lineNoCov">              0 :               'service' =&gt; $service ? $service : false,                                                                                                           </span>
+<span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151">     151</a> </span><span class="lineNoCov">              0 :               'id' =&gt; $id ? $id : '' );                                                                                                                           </span>
+<span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152">     152</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153">     153</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154">     154</a> </span>                :     //TODO: Compatibilizar as configs relativas aos modulos, adicionando os mesmo nos parametros passados                                                         
+<span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155">     155</a> </span>                :     public static function links( $concept = false, $linkage = false )                                                                                            
+<span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156">     156</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157">     157</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158">     158</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159">     159</a> </span><span class="lineNoCov">              0 :         if( !isset(self::$config[ $concept ]) )                                                                                                                   </span>
+<span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160">     160</a> </span><span class="lineNoCov">              0 :           self::$config[ $concept ] = self::loadConfig( $concept );                                                                                               </span>
+<span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161">     161</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162">     162</a> </span><span class="lineNoCov">              0 :         $links = array();                                                                                                                                         </span>
+<span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163">     163</a> </span><span class="lineNoCov">              0 :         self::$isConcept[ $concept ] = array();                                                                                                                   </span>
+<span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164">     164</a> </span><span class="lineNoCov">              0 :         self::$hasOne[ $concept ] = array();                                                                                                                      </span>
+<span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165">     165</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166">     166</a> </span><span class="lineNoCov">              0 :         if( isset(self::$config[ $concept ][ 'model.hasOne' ]) )                                                                                                  </span>
+<span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167">     167</a> </span><span class="lineNoCov">              0 :         foreach( self::$config[ $concept ][ 'model.hasOne' ] as $linkName =&gt; $linkTarget )                                                                        </span>
+<span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168">     168</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169">     169</a> </span><span class="lineNoCov">              0 :             list( $target, $link ) = explode( '.', $linkTarget );                                                                                                 </span>
+<span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170">     170</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171">     171</a> </span><span class="lineNoCov">              0 :             if( $linkage === $linkName )                                                                                                                          </span>
+<span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172">     172</a> </span><span class="lineNoCov">              0 :             $return = $link;                                                                                                                                      </span>
+<span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173">     173</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174">     174</a> </span><span class="lineNoCov">              0 :             $links[$linkName] = $target;                                                                                                                          </span>
+<span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175">     175</a> </span><span class="lineNoCov">              0 :             self::$hasOne[ $concept ][ $linkName ] = true;                                                                                                        </span>
+<span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176">     176</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177">     177</a> </span><span class="lineNoCov">              0 :         if( isset(self::$config[ $concept ][ 'model.depends' ]) )                                                                                                 </span>
+<span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178">     178</a> </span><span class="lineNoCov">              0 :         foreach( self::$config[ $concept ][ 'model.depends' ] as $linkName =&gt; $linkTarget )                                                                       </span>
+<span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179">     179</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180">     180</a> </span><span class="lineNoCov">              0 :             list( $target, $link ) = explode( '.', $linkTarget );                                                                                                 </span>
+<span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181">     181</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182">     182</a> </span><span class="lineNoCov">              0 :              if( $linkage === $linkName )                                                                                                                         </span>
+<span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183">     183</a> </span><span class="lineNoCov">              0 :             $return = $link;                                                                                                                                      </span>
+<span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184">     184</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185">     185</a> </span><span class="lineNoCov">              0 :             $links[$linkName] = $target;                                                                                                                          </span>
+<span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186">     186</a> </span><span class="lineNoCov">              0 :             self::$hasOne[ $concept ][ $linkName ] = true;                                                                                                        </span>
+<span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187">     187</a> </span><span class="lineNoCov">              0 :             self::$isConcept[ $concept ][ $linkName ] = true;                                                                                                     </span>
+<span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188">     188</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189">     189</a> </span><span class="lineNoCov">              0 :         if( isset(self::$config[ $concept ][ 'model.hasMany' ]) )                                                                                                 </span>
+<span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190">     190</a> </span><span class="lineNoCov">              0 :         foreach( self::$config[ $concept ][ 'model.hasMany' ] as $linkName =&gt; $linkTarget )                                                                       </span>
+<span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191">     191</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192">     192</a> </span><span class="lineNoCov">              0 :             list( $target, $link ) = explode( '.', $linkTarget );                                                                                                 </span>
+<span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193">     193</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194">     194</a> </span><span class="lineNoCov">              0 :              if( $linkage === $linkName )                                                                                                                         </span>
+<span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195">     195</a> </span><span class="lineNoCov">              0 :             $return = $link;                                                                                                                                      </span>
+<span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196">     196</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197">     197</a> </span><span class="lineNoCov">              0 :             $links[$linkName] = $target;                                                                                                                          </span>
+<span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198">     198</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199">     199</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200">     200</a> </span><span class="lineNoCov">              0 :         return( isset($return) ? $return : $links );                                                                                                              </span>
+<span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201">     201</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202">     202</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203">     203</a> </span>                :     public static function isConcept( $concept, $linkName )                                                                                                       
+<span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204">     204</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205">     205</a> </span><span class="lineNoCov">              0 :         if( !isset( self::$isConcept[ $concept ] ) )                                                                                                              </span>
+<span class="lineNum" id="container206"><a name="206"></a><a href="#206" id="line206">     206</a> </span><span class="lineNoCov">              0 :         self::links( $concept );                                                                                                                                  </span>
+<span class="lineNum" id="container207"><a name="207"></a><a href="#207" id="line207">     207</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container208"><a name="208"></a><a href="#208" id="line208">     208</a> </span><span class="lineNoCov">              0 :         return( isset(self::$isConcept[ $concept ][ $linkName ]) );                                                                                               </span>
+<span class="lineNum" id="container209"><a name="209"></a><a href="#209" id="line209">     209</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container210"><a name="210"></a><a href="#210" id="line210">     210</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container211"><a name="211"></a><a href="#211" id="line211">     211</a> </span>                :     public static function hasOne( $concept, $linkName )                                                                                                          
+<span class="lineNum" id="container212"><a name="212"></a><a href="#212" id="line212">     212</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container213"><a name="213"></a><a href="#213" id="line213">     213</a> </span><span class="lineNoCov">              0 :         if( !isset( self::$hasOne[ $concept ] ) )                                                                                                                 </span>
+<span class="lineNum" id="container214"><a name="214"></a><a href="#214" id="line214">     214</a> </span><span class="lineNoCov">              0 :         self::links( $concept );                                                                                                                                  </span>
+<span class="lineNum" id="container215"><a name="215"></a><a href="#215" id="line215">     215</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container216"><a name="216"></a><a href="#216" id="line216">     216</a> </span><span class="lineNoCov">              0 :         return( isset(self::$hasOne[ $concept ][ $linkName ]) );                                                                                                  </span>
+<span class="lineNum" id="container217"><a name="217"></a><a href="#217" id="line217">     217</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container218"><a name="218"></a><a href="#218" id="line218">     218</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container219"><a name="219"></a><a href="#219" id="line219">     219</a> </span>                :     public static function getConcept( $concept, $moduleName = false )                                                                                            
+<span class="lineNum" id="container220"><a name="220"></a><a href="#220" id="line220">     220</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container221"><a name="221"></a><a href="#221" id="line221">     221</a> </span><span class="lineNoCov">              0 :         if( isset( self::$config[ $concept ] ) )                                                                                                                  </span>
+<span class="lineNum" id="container222"><a name="222"></a><a href="#222" id="line222">     222</a> </span><span class="lineNoCov">              0 :         return( self::$config[ $concept ] );                                                                                                                      </span>
+<span class="lineNum" id="container223"><a name="223"></a><a href="#223" id="line223">     223</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container224"><a name="224"></a><a href="#224" id="line224">     224</a> </span><span class="lineNoCov">              0 :         return( self::$config[ $concept ] = self::loadConfig( $concept, $moduleName ) );                                                                          </span>
+<span class="lineNum" id="container225"><a name="225"></a><a href="#225" id="line225">     225</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container226"><a name="226"></a><a href="#226" id="line226">     226</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container227"><a name="227"></a><a href="#227" id="line227">     227</a> </span>                :     public static function loadCache( $cacheType = 'Memory' )                                                                                                     
+<span class="lineNum" id="container228"><a name="228"></a><a href="#228" id="line228">     228</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container229"><a name="229"></a><a href="#229" id="line229">     229</a> </span><span class="lineNoCov">              0 :         include_once( &quot;cache/MemoryCache.php&quot; );                                                                                                                  </span>
+<span class="lineNum" id="container230"><a name="230"></a><a href="#230" id="line230">     230</a> </span><span class="lineNoCov">              0 :         return new MemoryCache();                                                                                                                                 </span>
+<span class="lineNum" id="container231"><a name="231"></a><a href="#231" id="line231">     231</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container232"><a name="232"></a><a href="#232" id="line232">     232</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container233"><a name="233"></a><a href="#233" id="line233">     233</a> </span>                :     //TODO: Compatibilizar as configs relativas aos modulos, adicionando os mesmo nos parametros passados                                                         
+<span class="lineNum" id="container234"><a name="234"></a><a href="#234" id="line234">     234</a> </span>                :     public static function loadConfig( $className, $isService = false)                                                                                            
+<span class="lineNum" id="container235"><a name="235"></a><a href="#235" id="line235">     235</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container236"><a name="236"></a><a href="#236" id="line236">     236</a> </span><span class="lineCov">              1 :         $fileName = $className.'.'.($isService ? 'srv' : 'ini');                                                                                                  </span>
+<span class="lineNum" id="container237"><a name="237"></a><a href="#237" id="line237">     237</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container238"><a name="238"></a><a href="#238" id="line238">     238</a> </span><span class="lineCov">              1 :         $config = self::$cache-&gt;get( $fileName );                                                                                                                 </span>
+<span class="lineNum" id="container239"><a name="239"></a><a href="#239" id="line239">     239</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container240"><a name="240"></a><a href="#240" id="line240">     240</a> </span><span class="lineCov">              1 :         if( !$config )                                                                                                                                            </span>
+<span class="lineNum" id="container241"><a name="241"></a><a href="#241" id="line241">     241</a> </span><span class="lineCov">              1 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container242"><a name="242"></a><a href="#242" id="line242">     242</a> </span><span class="lineCov">              1 :                 $config = parse_ini_file( ROOTPATH.'/config/'.$fileName, true );                                                                                  </span>
+<span class="lineNum" id="container243"><a name="243"></a><a href="#243" id="line243">     243</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container244"><a name="244"></a><a href="#244" id="line244">     244</a> </span><span class="lineCov">              1 :         self::$cache-&gt;put( $fileName, $config );                                                                                                                  </span>
+<span class="lineNum" id="container245"><a name="245"></a><a href="#245" id="line245">     245</a> </span><span class="lineCov">              1 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container246"><a name="246"></a><a href="#246" id="line246">     246</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container247"><a name="247"></a><a href="#247" id="line247">     247</a> </span><span class="lineCov">              1 :         return( $config );                                                                                                                                        </span>
+<span class="lineNum" id="container248"><a name="248"></a><a href="#248" id="line248">     248</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container249"><a name="249"></a><a href="#249" id="line249">     249</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container250"><a name="250"></a><a href="#250" id="line250">     250</a> </span>                :     public static function import( $path, $ext = &quot;.php&quot; )                                                                                                         
+<span class="lineNum" id="container251"><a name="251"></a><a href="#251" id="line251">     251</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container252"><a name="252"></a><a href="#252" id="line252">     252</a> </span><span class="lineCov">              1 :         if( !isset(self::$includes[$path]) )                                                                                                                      </span>
+<span class="lineNum" id="container253"><a name="253"></a><a href="#253" id="line253">     253</a> </span><span class="lineCov">              1 :     {                                                                                                                                                             </span>
+<span class="lineNum" id="container254"><a name="254"></a><a href="#254" id="line254">     254</a> </span><span class="lineCov">              1 :         require_once( ROOTPATH.'/'.$path.$ext );                                                                                                                  </span>
+<span class="lineNum" id="container255"><a name="255"></a><a href="#255" id="line255">     255</a> </span><span class="lineCov">              1 :         self::$includes[$path] = false;                                                                                                                           </span>
+<span class="lineNum" id="container256"><a name="256"></a><a href="#256" id="line256">     256</a> </span><span class="lineCov">              1 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container257"><a name="257"></a><a href="#257" id="line257">     257</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container258"><a name="258"></a><a href="#258" id="line258">     258</a> </span><span class="lineCov">              1 :         return( self::$includes[$path] );                                                                                                                         </span>
+<span class="lineNum" id="container259"><a name="259"></a><a href="#259" id="line259">     259</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container260"><a name="260"></a><a href="#260" id="line260">     260</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container261"><a name="261"></a><a href="#261" id="line261">     261</a> </span>                :     public static function load( $path, $class = false )                                                                                                          
+<span class="lineNum" id="container262"><a name="262"></a><a href="#262" id="line262">     262</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container263"><a name="263"></a><a href="#263" id="line263">     263</a> </span><span class="lineCov">              1 :             if( $return = self::import( $path, &quot;&quot; ) )                                                                                                             </span>
+<span class="lineNum" id="container264"><a name="264"></a><a href="#264" id="line264">     264</a> </span><span class="lineCov">              1 :         return( $return );                                                                                                                                        </span>
+<span class="lineNum" id="container265"><a name="265"></a><a href="#265" id="line265">     265</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container266"><a name="266"></a><a href="#266" id="line266">     266</a> </span><span class="lineCov">              1 :         if( !$class ){                                                                                                                                            </span>
+<span class="lineNum" id="container267"><a name="267"></a><a href="#267" id="line267">     267</a> </span><span class="lineNoCov">              0 :         preg_match( '/^\/?.*\/([^\/]+).php$/', $path, $class );                                                                                                   </span>
+<span class="lineNum" id="container268"><a name="268"></a><a href="#268" id="line268">     268</a> </span><span class="lineNoCov">              0 :         $class = $class[1];                                                                                                                                       </span>
+<span class="lineNum" id="container269"><a name="269"></a><a href="#269" id="line269">     269</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container270"><a name="270"></a><a href="#270" id="line270">     270</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container271"><a name="271"></a><a href="#271" id="line271">     271</a> </span><span class="lineCov">              1 :         $object =  self::$cache-&gt;get( $class );                                                                                                                   </span>
+<span class="lineNum" id="container272"><a name="272"></a><a href="#272" id="line272">     272</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container273"><a name="273"></a><a href="#273" id="line273">     273</a> </span><span class="lineCov">              1 :         if( !$object )                                                                                                                                            </span>
+<span class="lineNum" id="container274"><a name="274"></a><a href="#274" id="line274">     274</a> </span><span class="lineCov">              1 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container275"><a name="275"></a><a href="#275" id="line275">     275</a> </span><span class="lineCov">              1 :         $object = new $class();                                                                                                                                   </span>
+<span class="lineNum" id="container276"><a name="276"></a><a href="#276" id="line276">     276</a> </span><span class="lineCov">              1 :          self::$cache-&gt;put( $class, $object );                                                                                                                    </span>
+<span class="lineNum" id="container277"><a name="277"></a><a href="#277" id="line277">     277</a> </span><span class="lineCov">              1 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container278"><a name="278"></a><a href="#278" id="line278">     278</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container279"><a name="279"></a><a href="#279" id="line279">     279</a> </span><span class="lineCov">              1 :         self::$includes[$path] = $object;                                                                                                                         </span>
+<span class="lineNum" id="container280"><a name="280"></a><a href="#280" id="line280">     280</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container281"><a name="281"></a><a href="#281" id="line281">     281</a> </span><span class="lineCov">              1 :         return( $object );                                                                                                                                        </span>
+<span class="lineNum" id="container282"><a name="282"></a><a href="#282" id="line282">     282</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container283"><a name="283"></a><a href="#283" id="line283">     283</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container284"><a name="284"></a><a href="#284" id="line284">     284</a> </span>                :     public static function wallet( $serviceName )                                                                                                                 
+<span class="lineNum" id="container285"><a name="285"></a><a href="#285" id="line285">     285</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container286"><a name="286"></a><a href="#286" id="line286">     286</a> </span><span class="lineCov">              1 :         if( !isset( self::$wallet ) )                                                                                                                             </span>
+<span class="lineNum" id="container287"><a name="287"></a><a href="#287" id="line287">     287</a> </span><span class="lineCov">              1 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container288"><a name="288"></a><a href="#288" id="line288">     288</a> </span>                :         //// Hack //// TODO: passar o init da sessÃ£o no login do expresso                                                                                        
+<span class="lineNum" id="container289"><a name="289"></a><a href="#289" id="line289">     289</a> </span><span class="lineCov">              1 :         Config::init();                                                                                                                                           </span>
+<span class="lineNum" id="container290"><a name="290"></a><a href="#290" id="line290">     290</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container291"><a name="291"></a><a href="#291" id="line291">     291</a> </span><span class="lineCov">              1 :                 if(isset($_SESSION['wallet']))                                                                                                                    </span>
+<span class="lineNum" id="container292"><a name="292"></a><a href="#292" id="line292">     292</a> </span><span class="lineCov">              1 :                     self::$wallet = $_SESSION['wallet'];                                                                                                          </span>
+<span class="lineNum" id="container293"><a name="293"></a><a href="#293" id="line293">     293</a> </span>                :         /////////////                                                                                                                                             
+<span class="lineNum" id="container294"><a name="294"></a><a href="#294" id="line294">     294</a> </span><span class="lineCov">              1 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container295"><a name="295"></a><a href="#295" id="line295">     295</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container296"><a name="296"></a><a href="#296" id="line296">     296</a> </span><span class="lineCov">              1 :         return isset( self::$wallet[ $serviceName ] )? self::$wallet[ $serviceName ] : false;                                                                     </span>
+<span class="lineNum" id="container297"><a name="297"></a><a href="#297" id="line297">     297</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container298"><a name="298"></a><a href="#298" id="line298">     298</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container299"><a name="299"></a><a href="#299" id="line299">     299</a> </span>                :     public static function connect( $service, $config )                                                                                                           
+<span class="lineNum" id="container300"><a name="300"></a><a href="#300" id="line300">     300</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container301"><a name="301"></a><a href="#301" id="line301">     301</a> </span><span class="lineCov">              1 :         $result = $service-&gt;open( $config );                                                                                                                      </span>
+<span class="lineNum" id="container302"><a name="302"></a><a href="#302" id="line302">     302</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container303"><a name="303"></a><a href="#303" id="line303">     303</a> </span><span class="lineCov">              1 :         if( is_string( $result ) )                                                                                                                                </span>
+<span class="lineNum" id="container304"><a name="304"></a><a href="#304" id="line304">     304</a> </span><span class="lineCov">              1 :         throw new Exception( $result );                                                                                                                           </span>
+<span class="lineNum" id="container305"><a name="305"></a><a href="#305" id="line305">     305</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container306"><a name="306"></a><a href="#306" id="line306">     306</a> </span><span class="lineCov">              1 :         return( true );                                                                                                                                           </span>
+<span class="lineNum" id="container307"><a name="307"></a><a href="#307" id="line307">     307</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container308"><a name="308"></a><a href="#308" id="line308">     308</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container309"><a name="309"></a><a href="#309" id="line309">     309</a> </span>                :     public static function configure( $config, $newConfig )                                                                                                       
+<span class="lineNum" id="container310"><a name="310"></a><a href="#310" id="line310">     310</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container311"><a name="311"></a><a href="#311" id="line311">     311</a> </span><span class="lineCov">              1 :         foreach( $newConfig as $key =&gt; $value )                                                                                                                   </span>
+<span class="lineNum" id="container312"><a name="312"></a><a href="#312" id="line312">     312</a> </span><span class="lineCov">              1 :         $config[$key] = $value;                                                                                                                                   </span>
+<span class="lineNum" id="container313"><a name="313"></a><a href="#313" id="line313">     313</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container314"><a name="314"></a><a href="#314" id="line314">     314</a> </span><span class="lineCov">              1 :         return( $config );                                                                                                                                        </span>
+<span class="lineNum" id="container315"><a name="315"></a><a href="#315" id="line315">     315</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container316"><a name="316"></a><a href="#316" id="line316">     316</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container317"><a name="317"></a><a href="#317" id="line317">     317</a> </span>                :     public static function dispatch( $dispatcher, $data, $optionsMap = false )                                                                                    
+<span class="lineNum" id="container318"><a name="318"></a><a href="#318" id="line318">     318</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container319"><a name="319"></a><a href="#319" id="line319">     319</a> </span>                : //         if( $mappedTo )                                                                                                                                        
+<span class="lineNum" id="container320"><a name="320"></a><a href="#320" id="line320">     320</a> </span>                : //         $data = array( $mappedTo =&gt; $data );                                                                                                                   
+<span class="lineNum" id="container321"><a name="321"></a><a href="#321" id="line321">     321</a> </span>                : //                                                                                                                                                                
+<span class="lineNum" id="container322"><a name="322"></a><a href="#322" id="line322">     322</a> </span>                : //         foreach( $data as $method =&gt; $params )                                                                                                                 
+<span class="lineNum" id="container323"><a name="323"></a><a href="#323" id="line323">     323</a> </span>                : //         {                                                                                                                                                      
+<span class="lineNum" id="container324"><a name="324"></a><a href="#324" id="line324">     324</a> </span>                : // //         foreach( $data[ $method ] as $name =&gt; $value )                                                                                                      
+<span class="lineNum" id="container325"><a name="325"></a><a href="#325" id="line325">     325</a> </span>                : //         }                                                                                                                                                      
+<span class="lineNum" id="container326"><a name="326"></a><a href="#326" id="line326">     326</a> </span>                : //                                                                                                                                                                
+<span class="lineNum" id="container327"><a name="327"></a><a href="#327" id="line327">     327</a> </span>                : //         self::import( &quot;$dispatcher.php&quot; );                                                                                                                     
+<span class="lineNum" id="container328"><a name="328"></a><a href="#328" id="line328">     328</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                             </span>
+<span class="lineNum" id="container329"><a name="329"></a><a href="#329" id="line329">     329</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container330"><a name="330"></a><a href="#330" id="line330">     330</a> </span>                :     //TODO: Compatibilizar as configs relativas aos modulos, adicionando os mesmo nos parametros passados                                                         
+<span class="lineNum" id="container331"><a name="331"></a><a href="#331" id="line331">     331</a> </span>                :     public static function service( $serviceName, $concept = false )                                                                                              
+<span class="lineNum" id="container332"><a name="332"></a><a href="#332" id="line332">     332</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container333"><a name="333"></a><a href="#333" id="line333">     333</a> </span><span class="lineCov">              2 :         if( isset( self::$services[ $serviceName ] ) )                                                                                                            </span>
+<span class="lineNum" id="container334"><a name="334"></a><a href="#334" id="line334">     334</a> </span><span class="lineCov">              2 :         return self::$services[ $serviceName ];                                                                                                                   </span>
+<span class="lineNum" id="container335"><a name="335"></a><a href="#335" id="line335">     335</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container336"><a name="336"></a><a href="#336" id="line336">     336</a> </span><span class="lineCov">              1 :         if( !isset(self::$config[ $serviceName ]) )                                                                                                               </span>
+<span class="lineNum" id="container337"><a name="337"></a><a href="#337" id="line337">     337</a> </span><span class="lineCov">              1 :          self::$config[ $serviceName ] = self::loadConfig( $serviceName, true );                                                                                  </span>
+<span class="lineNum" id="container338"><a name="338"></a><a href="#338" id="line338">     338</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container339"><a name="339"></a><a href="#339" id="line339">     339</a> </span><span class="lineCov">              1 :         if( !isset(self::$config[ $serviceName ]) )                                                                                                               </span>
+<span class="lineNum" id="container340"><a name="340"></a><a href="#340" id="line340">     340</a> </span><span class="lineCov">              1 :         return( false );                                                                                                                                          </span>
+<span class="lineNum" id="container341"><a name="341"></a><a href="#341" id="line341">     341</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container342"><a name="342"></a><a href="#342" id="line342">     342</a> </span><span class="lineCov">              1 :         if( !isset(self::$config[ $serviceName ]['type']) )                                                                                                       </span>
+<span class="lineNum" id="container343"><a name="343"></a><a href="#343" id="line343">     343</a> </span><span class="lineCov">              1 :         self::$config[ $serviceName ]['type'] = 'service';                                                                                                        </span>
+<span class="lineNum" id="container344"><a name="344"></a><a href="#344" id="line344">     344</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container345"><a name="345"></a><a href="#345" id="line345">     345</a> </span><span class="lineCov">              1 :         self::import( 'api/'.self::$config[ $serviceName ]['type'] );   //TODO: Item 4                                                                            </span>
+<span class="lineNum" id="container346"><a name="346"></a><a href="#346" id="line346">     346</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container347"><a name="347"></a><a href="#347" id="line347">     347</a> </span><span class="lineCov">              1 :         $service = self::load( self::$config[ $serviceName ]['path'],                                                                                             </span>
+<span class="lineNum" id="container348"><a name="348"></a><a href="#348" id="line348">     348</a> </span><span class="lineCov">              1 :                    self::$config[ $serviceName ]['class'] );                                                                                                      </span>
+<span class="lineNum" id="container349"><a name="349"></a><a href="#349" id="line349">     349</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container350"><a name="350"></a><a href="#350" id="line350">     350</a> </span><span class="lineCov">              1 :           $srvConfig = array();                                                                                                                                   </span>
+<span class="lineNum" id="container351"><a name="351"></a><a href="#351" id="line351">     351</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container352"><a name="352"></a><a href="#352" id="line352">     352</a> </span><span class="lineCov">              1 :         if( isset(self::$config[ $serviceName ][ 'config' ]) )                                                                                                    </span>
+<span class="lineNum" id="container353"><a name="353"></a><a href="#353" id="line353">     353</a> </span><span class="lineCov">              1 :         $srvConfig = self::configure( $srvConfig, self::$config[ $serviceName ][ 'config' ] );                                                                    </span>
+<span class="lineNum" id="container354"><a name="354"></a><a href="#354" id="line354">     354</a> </span><span class="lineCov">              1 :         if( $wallet = self::wallet( $serviceName ) )                                                                                                              </span>
+<span class="lineNum" id="container355"><a name="355"></a><a href="#355" id="line355">     355</a> </span><span class="lineCov">              1 :         $srvConfig = self::configure( $srvConfig, $wallet );                                                                                                      </span>
+<span class="lineNum" id="container356"><a name="356"></a><a href="#356" id="line356">     356</a> </span><span class="lineCov">              1 :         if( $concept &amp;&amp; isset(self::$config[ $concept ]['service.config']) )                                                                                      </span>
+<span class="lineNum" id="container357"><a name="357"></a><a href="#357" id="line357">     357</a> </span><span class="lineCov">              1 :         $srvConfig = self::configure( $srvConfig, self::$config[ $concept ]['service.config'] );                                                                  </span>
+<span class="lineNum" id="container358"><a name="358"></a><a href="#358" id="line358">     358</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container359"><a name="359"></a><a href="#359" id="line359">     359</a> </span><span class="lineCov">              1 :         if( empty( $srvConfig ) )                                                                                                                                 </span>
+<span class="lineNum" id="container360"><a name="360"></a><a href="#360" id="line360">     360</a> </span><span class="lineCov">              1 :         $srvConfig = false;                                                                                                                                       </span>
+<span class="lineNum" id="container361"><a name="361"></a><a href="#361" id="line361">     361</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container362"><a name="362"></a><a href="#362" id="line362">     362</a> </span><span class="lineCov">              1 :         if( $service &amp;&amp; self::$config[ $serviceName ]['type'] === 'service' )                                                                                     </span>
+<span class="lineNum" id="container363"><a name="363"></a><a href="#363" id="line363">     363</a> </span><span class="lineCov">              1 :         self::connect( $service, $srvConfig );                                                                                                                    </span>
+<span class="lineNum" id="container364"><a name="364"></a><a href="#364" id="line364">     364</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container365"><a name="365"></a><a href="#365" id="line365">     365</a> </span><span class="lineCov">              1 :         return( self::$services[ $serviceName ] = $service );                                                                                                     </span>
+<span class="lineNum" id="container366"><a name="366"></a><a href="#366" id="line366">     366</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container367"><a name="367"></a><a href="#367" id="line367">     367</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container368"><a name="368"></a><a href="#368" id="line368">     368</a> </span>                :     //TODO: Compatibilizar as configs relativas aos modulos, adicionando os mesmo nos parametros passados                                                         
+<span class="lineNum" id="container369"><a name="369"></a><a href="#369" id="line369">     369</a> </span>                :     public static function interceptor( $method, $concept = false, $serviceName = false, $isService = false )                                                     
+<span class="lineNum" id="container370"><a name="370"></a><a href="#370" id="line370">     370</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container371"><a name="371"></a><a href="#371" id="line371">     371</a> </span><span class="lineCov">              2 :         if( $concept &amp;&amp; !isset(self::$config[ $concept ]) )                                                                                                       </span>
+<span class="lineNum" id="container372"><a name="372"></a><a href="#372" id="line372">     372</a> </span><span class="lineCov">              2 :           self::$config[ $concept ] = self::loadConfig( $concept );                                                                                               </span>
+<span class="lineNum" id="container373"><a name="373"></a><a href="#373" id="line373">     373</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container374"><a name="374"></a><a href="#374" id="line374">     374</a> </span><span class="lineCov">              2 :         if( !$concept ) $concept = 'global';                                                                                                                      </span>
+<span class="lineNum" id="container375"><a name="375"></a><a href="#375" id="line375">     375</a> </span><span class="lineCov">              2 :         if( !$isService || !$serviceName ) $serviceName = 'global';                                                                                               </span>
+<span class="lineNum" id="container376"><a name="376"></a><a href="#376" id="line376">     376</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container377"><a name="377"></a><a href="#377" id="line377">     377</a> </span><span class="lineCov">              2 :         if( !isset( self::$interceptors[ $concept ] ) )                                                                                                           </span>
+<span class="lineNum" id="container378"><a name="378"></a><a href="#378" id="line378">     378</a> </span><span class="lineCov">              2 :         self::$interceptors[ $concept ] = array();                                                                                                                </span>
+<span class="lineNum" id="container379"><a name="379"></a><a href="#379" id="line379">     379</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container380"><a name="380"></a><a href="#380" id="line380">     380</a> </span><span class="lineCov">              2 :         if( !isset( self::$interceptors[ $concept ][ $serviceName ] ) )                                                                                           </span>
+<span class="lineNum" id="container381"><a name="381"></a><a href="#381" id="line381">     381</a> </span><span class="lineCov">              2 :         self::$interceptors[ $concept ][ $serviceName ] = array();                                                                                                </span>
+<span class="lineNum" id="container382"><a name="382"></a><a href="#382" id="line382">     382</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container383"><a name="383"></a><a href="#383" id="line383">     383</a> </span><span class="lineCov">              2 :         if( !isset( self::$interceptors[ $concept ][ $serviceName ][ $method ] ) )                                                                                </span>
+<span class="lineNum" id="container384"><a name="384"></a><a href="#384" id="line384">     384</a> </span><span class="lineCov">              2 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container385"><a name="385"></a><a href="#385" id="line385">     385</a> </span><span class="lineCov">              1 :         $events = array( 'before', 'after' );                                                                                                                     </span>
+<span class="lineNum" id="container386"><a name="386"></a><a href="#386" id="line386">     386</a> </span><span class="lineCov">              1 :         $interceptors = array();                                                                                                                                  </span>
+<span class="lineNum" id="container387"><a name="387"></a><a href="#387" id="line387">     387</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container388"><a name="388"></a><a href="#388" id="line388">     388</a> </span><span class="lineCov">              1 :         $prefix = ( $isService )? &quot;$serviceName.&quot; : &quot;&quot;;                                                                                                           </span>
+<span class="lineNum" id="container389"><a name="389"></a><a href="#389" id="line389">     389</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container390"><a name="390"></a><a href="#390" id="line390">     390</a> </span><span class="lineCov">              1 :         foreach( $events as $i =&gt; $event )                                                                                                                        </span>
+<span class="lineNum" id="container391"><a name="391"></a><a href="#391" id="line391">     391</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container392"><a name="392"></a><a href="#392" id="line392">     392</a> </span><span class="lineCov">              1 :             $interceptors[$event] = array();                                                                                                                      </span>
+<span class="lineNum" id="container393"><a name="393"></a><a href="#393" id="line393">     393</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container394"><a name="394"></a><a href="#394" id="line394">     394</a> </span><span class="lineCov">              1 :             if( !isset(self::$config[$concept][&quot;$prefix$event.$method&quot;]) )                                                                                        </span>
+<span class="lineNum" id="container395"><a name="395"></a><a href="#395" id="line395">     395</a> </span><span class="lineCov">              1 :               continue;                                                                                                                                           </span>
+<span class="lineNum" id="container396"><a name="396"></a><a href="#396" id="line396">     396</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container397"><a name="397"></a><a href="#397" id="line397">     397</a> </span><span class="lineNoCov">              0 :             foreach( self::$config[$concept][&quot;$prefix$event.$method&quot;] as $intercept =&gt; $interceptor )                                                             </span>
+<span class="lineNum" id="container398"><a name="398"></a><a href="#398" id="line398">     398</a> </span><span class="lineNoCov">              0 :                 $interceptors[$event][$intercept] = self::load( $interceptor );                                                                                   </span>
+<span class="lineNum" id="container399"><a name="399"></a><a href="#399" id="line399">     399</a> </span><span class="lineCov">              1 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container400"><a name="400"></a><a href="#400" id="line400">     400</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container401"><a name="401"></a><a href="#401" id="line401">     401</a> </span><span class="lineCov">              1 :         self::$interceptors[ $concept ][ $serviceName ][ $method ] = $interceptors;                                                                               </span>
+<span class="lineNum" id="container402"><a name="402"></a><a href="#402" id="line402">     402</a> </span><span class="lineCov">              1 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container403"><a name="403"></a><a href="#403" id="line403">     403</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container404"><a name="404"></a><a href="#404" id="line404">     404</a> </span><span class="lineCov">              2 :         return( self::$interceptors[ $concept ][ $serviceName ][ $method ] );                                                                                     </span>
+<span class="lineNum" id="container405"><a name="405"></a><a href="#405" id="line405">     405</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container406"><a name="406"></a><a href="#406" id="line406">     406</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container407"><a name="407"></a><a href="#407" id="line407">     407</a> </span>                :     public static function interceptorCommit( $eventType, $commitList, $isService = false )                                                                       
+<span class="lineNum" id="container408"><a name="408"></a><a href="#408" id="line408">     408</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container409"><a name="409"></a><a href="#409" id="line409">     409</a> </span><span class="lineCov">              2 :         $result = array( $eventType =&gt; array() );                                                                                                                 </span>
+<span class="lineNum" id="container410"><a name="410"></a><a href="#410" id="line410">     410</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container411"><a name="411"></a><a href="#411" id="line411">     411</a> </span><span class="lineCov">              2 :         if( is_array( $commitList ) )                                                                                                                             </span>
+<span class="lineNum" id="container412"><a name="412"></a><a href="#412" id="line412">     412</a> </span><span class="lineCov">              2 :             foreach( $commitList as $i =&gt; $tx )                                                                                                                   </span>
+<span class="lineNum" id="container413"><a name="413"></a><a href="#413" id="line413">     413</a> </span>                :             {                                                                                                                                                     
+<span class="lineNum" id="container414"><a name="414"></a><a href="#414" id="line414">     414</a> </span><span class="lineCov">              2 :             $interceptors = self::interceptor( 'commit', $tx['concept'], $tx['service'], $isService );                                                            </span>
+<span class="lineNum" id="container415"><a name="415"></a><a href="#415" id="line415">     415</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container416"><a name="416"></a><a href="#416" id="line416">     416</a> </span><span class="lineCov">              2 :             $result[$eventType] = array_merge( $result[$eventType], $interceptors[$eventType] );                                                                  </span>
+<span class="lineNum" id="container417"><a name="417"></a><a href="#417" id="line417">     417</a> </span><span class="lineCov">              2 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container418"><a name="418"></a><a href="#418" id="line418">     418</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container419"><a name="419"></a><a href="#419" id="line419">     419</a> </span><span class="lineCov">              2 :         return( $result );                                                                                                                                        </span>
+<span class="lineNum" id="container420"><a name="420"></a><a href="#420" id="line420">     420</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container421"><a name="421"></a><a href="#421" id="line421">     421</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container422"><a name="422"></a><a href="#422" id="line422">     422</a> </span>                :     public static function fire( $eventType, $method, &amp;$params, $original, $isService = false )                                                                   
+<span class="lineNum" id="container423"><a name="423"></a><a href="#423" id="line423">     423</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container424"><a name="424"></a><a href="#424" id="line424">     424</a> </span><span class="lineCov">              2 :         if( $method === 'commit' )                                                                                                                                </span>
+<span class="lineNum" id="container425"><a name="425"></a><a href="#425" id="line425">     425</a> </span><span class="lineCov">              2 :         $interceptors = self::interceptorCommit( $eventType, $params['criteria'], $isService );                                                                   </span>
+<span class="lineNum" id="container426"><a name="426"></a><a href="#426" id="line426">     426</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container427"><a name="427"></a><a href="#427" id="line427">     427</a> </span>                :         else                                                                                                                                                      
+<span class="lineNum" id="container428"><a name="428"></a><a href="#428" id="line428">     428</a> </span><span class="lineCov">              2 :         $interceptors = self::interceptor( $method,                                                                                                               </span>
+<span class="lineNum" id="container429"><a name="429"></a><a href="#429" id="line429">     429</a> </span><span class="lineCov">              2 :                            isset($original['URI']['concept']) ? $original['URI']['concept'] : false,                                                              </span>
+<span class="lineNum" id="container430"><a name="430"></a><a href="#430" id="line430">     430</a> </span><span class="lineCov">              2 :                            isset($params['URI']['service']) ? $params['URI']['service'] : false, $isService );                                                    </span>
+<span class="lineNum" id="container431"><a name="431"></a><a href="#431" id="line431">     431</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container432"><a name="432"></a><a href="#432" id="line432">     432</a> </span><span class="lineCov">              2 :         if( $interceptors &amp;&amp; isset($interceptors[ $eventType ]) )                                                                                                 </span>
+<span class="lineNum" id="container433"><a name="433"></a><a href="#433" id="line433">     433</a> </span><span class="lineCov">              2 :         foreach( $interceptors[ $eventType ] as $intercept =&gt; $interceptor )                                                                                      </span>
+<span class="lineNum" id="container434"><a name="434"></a><a href="#434" id="line434">     434</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container435"><a name="435"></a><a href="#435" id="line435">     435</a> </span><span class="lineNoCov">              0 :             $return = $interceptor-&gt;$intercept( $params['URI'], $params['properties'], $params['criteria'], $original /*, $params['service'] */);                 </span>
+<span class="lineNum" id="container436"><a name="436"></a><a href="#436" id="line436">     436</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container437"><a name="437"></a><a href="#437" id="line437">     437</a> </span><span class="lineNoCov">              0 :             if( $return === false )                                                                                                                               </span>
+<span class="lineNum" id="container438"><a name="438"></a><a href="#438" id="line438">     438</a> </span><span class="lineNoCov">              0 :         return( false );                                                                                                                                          </span>
+<span class="lineNum" id="container439"><a name="439"></a><a href="#439" id="line439">     439</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container440"><a name="440"></a><a href="#440" id="line440">     440</a> </span><span class="lineNoCov">              0 :             if( isset($return) )                                                                                                                                  </span>
+<span class="lineNum" id="container441"><a name="441"></a><a href="#441" id="line441">     441</a> </span><span class="lineNoCov">              0 :             $params['properties'] = $return;                                                                                                                      </span>
+<span class="lineNum" id="container442"><a name="442"></a><a href="#442" id="line442">     442</a> </span><span class="lineCov">              2 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container443"><a name="443"></a><a href="#443" id="line443">     443</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container444"><a name="444"></a><a href="#444" id="line444">     444</a> </span><span class="lineCov">              2 :           return( $params );                                                                                                                                      </span>
+<span class="lineNum" id="container445"><a name="445"></a><a href="#445" id="line445">     445</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container446"><a name="446"></a><a href="#446" id="line446">     446</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container447"><a name="447"></a><a href="#447" id="line447">     447</a> </span>                :     /*                                                                                                                                                            
+<span class="lineNum" id="container448"><a name="448"></a><a href="#448" id="line448">     448</a> </span>                :       * ex: array                                                                                                                                                 
+<span class="lineNum" id="container449"><a name="449"></a><a href="#449" id="line449">     449</a> </span>                :       *        (                                                                                                                                                  
+<span class="lineNum" id="container450"><a name="450"></a><a href="#450" id="line450">     450</a> </span>                :       *            [0] array( 'OR', array( array( '=', 'campo', 'valor' ),                                                                                        
+<span class="lineNum" id="container451"><a name="451"></a><a href="#451" id="line451">     451</a> </span>                :                               array( 'OR', array( array( '=', 'campo', 'valor' ) ) ) )                                                                            
+<span class="lineNum" id="container452"><a name="452"></a><a href="#452" id="line452">     452</a> </span>                :       *            [1] array( '=', 'campo' , 'valor' )                                                                                                            
+<span class="lineNum" id="container453"><a name="453"></a><a href="#453" id="line453">     453</a> </span>                :       *            [2] array( 'OR' , array( array( '=' , campo', 'valor' ) ) )                                                                                    
+<span class="lineNum" id="container454"><a name="454"></a><a href="#454" id="line454">     454</a> </span>                :       *            [3] array( 'IN', 'campo', array( '1' , '2' , '3' ) )                                                                                           
+<span class="lineNum" id="container455"><a name="455"></a><a href="#455" id="line455">     455</a> </span>                :       *        )                                                                                                                                                  
+<span class="lineNum" id="container456"><a name="456"></a><a href="#456" id="line456">     456</a> </span>                :       * OR                                                                                                                                                        
+<span class="lineNum" id="container457"><a name="457"></a><a href="#457" id="line457">     457</a> </span>                :       *        array( '=' , 'campo' , 'valor' )                                                                                                                   
+<span class="lineNum" id="container458"><a name="458"></a><a href="#458" id="line458">     458</a> </span>                :     */                                                                                                                                                            
+<span class="lineNum" id="container459"><a name="459"></a><a href="#459" id="line459">     459</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container460"><a name="460"></a><a href="#460" id="line460">     460</a> </span>                :     //TODO: Compatibilizar as configs relativas aos modulos, adicionando os mesmo nos parametros passados                                                         
+<span class="lineNum" id="container461"><a name="461"></a><a href="#461" id="line461">     461</a> </span>                :     public static function serviceName( $URI, $original = false )                                                                                                 
+<span class="lineNum" id="container462"><a name="462"></a><a href="#462" id="line462">     462</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container463"><a name="463"></a><a href="#463" id="line463">     463</a> </span><span class="lineCov">              2 :          $concept = &quot;&quot;;                                                                                                                                           </span>
+<span class="lineNum" id="container464"><a name="464"></a><a href="#464" id="line464">     464</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container465"><a name="465"></a><a href="#465" id="line465">     465</a> </span><span class="lineCov">              2 :         if( $original &amp;&amp; isset($original['concept']) &amp;&amp; $original['concept'] )                                                                                    </span>
+<span class="lineNum" id="container466"><a name="466"></a><a href="#466" id="line466">     466</a> </span><span class="lineCov">              2 :         $concept = $original['concept'];                                                                                                                          </span>
+<span class="lineNum" id="container467"><a name="467"></a><a href="#467" id="line467">     467</a> </span><span class="lineNoCov">              0 :         elseif( isset($URI['concept']) &amp;&amp; $URI['concept'] )                                                                                                       </span>
+<span class="lineNum" id="container468"><a name="468"></a><a href="#468" id="line468">     468</a> </span><span class="lineNoCov">              0 :         $concept = $URI['concept'];                                                                                                                               </span>
+<span class="lineNum" id="container469"><a name="469"></a><a href="#469" id="line469">     469</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container470"><a name="470"></a><a href="#470" id="line470">     470</a> </span><span class="lineCov">              2 :         if( ( !isset($URI['service']) || !$URI['service'] ) &amp;&amp; $concept )                                                                                         </span>
+<span class="lineNum" id="container471"><a name="471"></a><a href="#471" id="line471">     471</a> </span><span class="lineCov">              2 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container472"><a name="472"></a><a href="#472" id="line472">     472</a> </span><span class="lineCov">              2 :         if( !isset(self::$config[ $concept ]) )                                                                                                                   </span>
+<span class="lineNum" id="container473"><a name="473"></a><a href="#473" id="line473">     473</a> </span><span class="lineCov">              2 :             self::$config[ $concept ] = self::loadConfig( $concept );                                                                                             </span>
+<span class="lineNum" id="container474"><a name="474"></a><a href="#474" id="line474">     474</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container475"><a name="475"></a><a href="#475" id="line475">     475</a> </span><span class="lineCov">              2 :         $URI['service'] = self::$config[ $concept ][ 'service' ];                                                                                                 </span>
+<span class="lineNum" id="container476"><a name="476"></a><a href="#476" id="line476">     476</a> </span><span class="lineCov">              2 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container477"><a name="477"></a><a href="#477" id="line477">     477</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container478"><a name="478"></a><a href="#478" id="line478">     478</a> </span><span class="lineCov">              2 :         if( !isset($URI['service']) )                                                                                                                             </span>
+<span class="lineNum" id="container479"><a name="479"></a><a href="#479" id="line479">     479</a> </span><span class="lineCov">              2 :         throw new Exception( &quot;CONFIGURATION ERROR: service name from concept '$concept' not found&quot; );                                                             </span>
+<span class="lineNum" id="container480"><a name="480"></a><a href="#480" id="line480">     480</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container481"><a name="481"></a><a href="#481" id="line481">     481</a> </span><span class="lineCov">              2 :         return( $URI );                                                                                                                                           </span>
+<span class="lineNum" id="container482"><a name="482"></a><a href="#482" id="line482">     482</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container483"><a name="483"></a><a href="#483" id="line483">     483</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container484"><a name="484"></a><a href="#484" id="line484">     484</a> </span>                :     //TODO: Compatibilizar as configs relativas aos modulos, adicionando os mesmos nas options passadas                                                           
+<span class="lineNum" id="container485"><a name="485"></a><a href="#485" id="line485">     485</a> </span>                :     public static function call( $method, $URI, $properties = false, $options = false, $service = false )                                                         
+<span class="lineNum" id="container486"><a name="486"></a><a href="#486" id="line486">     486</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container487"><a name="487"></a><a href="#487" id="line487">     487</a> </span>                :         try                                                                                                                                                       
+<span class="lineNum" id="container488"><a name="488"></a><a href="#488" id="line488">     488</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container489"><a name="489"></a><a href="#489" id="line489">     489</a> </span><span class="lineCov">              2 :         if( !isset($URI['concept']) ) $URI['concept'] = false;                                                                                                    </span>
+<span class="lineNum" id="container490"><a name="490"></a><a href="#490" id="line490">     490</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container491"><a name="491"></a><a href="#491" id="line491">     491</a> </span><span class="lineCov">              2 :         $original = $params = array( 'properties' =&gt; $properties,                                                                                                 </span>
+<span class="lineNum" id="container492"><a name="492"></a><a href="#492" id="line492">     492</a> </span><span class="lineCov">              2 :                              'criteria' =&gt; $options,                                                                                                              </span>
+<span class="lineNum" id="container493"><a name="493"></a><a href="#493" id="line493">     493</a> </span><span class="lineCov">              2 :                          'URI' =&gt; $URI,                                                                                                                           </span>
+<span class="lineNum" id="container494"><a name="494"></a><a href="#494" id="line494">     494</a> </span><span class="lineCov">              2 :                          'service' =&gt; $service );                                                                                                                 </span>
+<span class="lineNum" id="container495"><a name="495"></a><a href="#495" id="line495">     495</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container496"><a name="496"></a><a href="#496" id="line496">     496</a> </span><span class="lineCov">              2 :         if( isset($params['URI']['concept'])  &amp;&amp; !self::fire( 'before', $method, $params, $original ) )                                                           </span>
+<span class="lineNum" id="container497"><a name="497"></a><a href="#497" id="line497">     497</a> </span><span class="lineCov">              2 :             return( empty($params['properties']) ? false : $params['properties'] );                                                                               </span>
+<span class="lineNum" id="container498"><a name="498"></a><a href="#498" id="line498">     498</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container499"><a name="499"></a><a href="#499" id="line499">     499</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container500"><a name="500"></a><a href="#500" id="line500">     500</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container501"><a name="501"></a><a href="#501" id="line501">     501</a> </span><span class="lineCov">              2 :         if( $params &amp;&amp; !$params['service'] )                                                                                                                      </span>
+<span class="lineNum" id="container502"><a name="502"></a><a href="#502" id="line502">     502</a> </span><span class="lineCov">              2 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container503"><a name="503"></a><a href="#503" id="line503">     503</a> </span><span class="lineCov">              2 :             $params['URI'] = self::serviceName( $params['URI'], $original['URI'] );                                                                               </span>
+<span class="lineNum" id="container504"><a name="504"></a><a href="#504" id="line504">     504</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container505"><a name="505"></a><a href="#505" id="line505">     505</a> </span><span class="lineCov">              2 :             $params['service'] = self::service( $params['URI']['service'], $params['URI']['concept'] );                                                           </span>
+<span class="lineNum" id="container506"><a name="506"></a><a href="#506" id="line506">     506</a> </span><span class="lineCov">              2 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container507"><a name="507"></a><a href="#507" id="line507">     507</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container508"><a name="508"></a><a href="#508" id="line508">     508</a> </span><span class="lineCov">              2 :         if( isset($params['URI']['service']) )                                                                                                                    </span>
+<span class="lineNum" id="container509"><a name="509"></a><a href="#509" id="line509">     509</a> </span><span class="lineCov">              2 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container510"><a name="510"></a><a href="#510" id="line510">     510</a> </span><span class="lineCov">              2 :             if( $method === 'create' || $method === 'update' || $method === 'delete' )                                                                            </span>
+<span class="lineNum" id="container511"><a name="511"></a><a href="#511" id="line511">     511</a> </span><span class="lineCov">              2 :             {                                                                                                                                                     </span>
+<span class="lineNum" id="container512"><a name="512"></a><a href="#512" id="line512">     512</a> </span><span class="lineCov">              2 :             if( $commit = !isset(self::$tx[ $params['URI']['service'] ])  )                                                                                       </span>
+<span class="lineNum" id="container513"><a name="513"></a><a href="#513" id="line513">     513</a> </span><span class="lineCov">              2 :             {                                                                                                                                                     </span>
+<span class="lineNum" id="container514"><a name="514"></a><a href="#514" id="line514">     514</a> </span><span class="lineCov">              2 :                 self::call( 'begin', $params['URI'] );                                                                                                            </span>
+<span class="lineNum" id="container515"><a name="515"></a><a href="#515" id="line515">     515</a> </span><span class="lineCov">              2 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container516"><a name="516"></a><a href="#516" id="line516">     516</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container517"><a name="517"></a><a href="#517" id="line517">     517</a> </span><span class="lineCov">              2 :             $TX = array();                                                                                                                                        </span>
+<span class="lineNum" id="container518"><a name="518"></a><a href="#518" id="line518">     518</a> </span><span class="lineCov">              2 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container519"><a name="519"></a><a href="#519" id="line519">     519</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container520"><a name="520"></a><a href="#520" id="line520">     520</a> </span><span class="lineCov">              2 :             if( !self::fire( 'before', $method, $params, $original, true ) )                                                                                      </span>
+<span class="lineNum" id="container521"><a name="521"></a><a href="#521" id="line521">     521</a> </span><span class="lineCov">              2 :             return( empty($params['properties']) ? false : $params['properties'] );                                                                               </span>
+<span class="lineNum" id="container522"><a name="522"></a><a href="#522" id="line522">     522</a> </span><span class="lineCov">              2 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container523"><a name="523"></a><a href="#523" id="line523">     523</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container524"><a name="524"></a><a href="#524" id="line524">     524</a> </span><span class="lineCov">              2 :         if( $params['service'] )                                                                                                                                  </span>
+<span class="lineNum" id="container525"><a name="525"></a><a href="#525" id="line525">     525</a> </span><span class="lineCov">              2 :             switch( $method )                                                                                                                                     </span>
+<span class="lineNum" id="container526"><a name="526"></a><a href="#526" id="line526">     526</a> </span>                :             {                                                                                                                                                     
+<span class="lineNum" id="container527"><a name="527"></a><a href="#527" id="line527">     527</a> </span><span class="lineCov">              2 :             case 'find': $return = $params['service']-&gt;find( $params['URI'], $params['properties'], $params['criteria'] ); break;                                 </span>
+<span class="lineNum" id="container528"><a name="528"></a><a href="#528" id="line528">     528</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container529"><a name="529"></a><a href="#529" id="line529">     529</a> </span><span class="lineCov">              2 :             case 'read': $return = $params['service']-&gt;read( $params['URI'], $params['properties'] , $params['criteria'] ); break;                                </span>
+<span class="lineNum" id="container530"><a name="530"></a><a href="#530" id="line530">     530</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container531"><a name="531"></a><a href="#531" id="line531">     531</a> </span><span class="lineCov">              2 :             case 'create': $return = $params['service']-&gt;create( $params['URI'], $params['properties']/*, $criteria*/ ); break;                                   </span>
+<span class="lineNum" id="container532"><a name="532"></a><a href="#532" id="line532">     532</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container533"><a name="533"></a><a href="#533" id="line533">     533</a> </span><span class="lineCov">              2 :             case 'delete': $return = $params['service']-&gt;delete( $params['URI'], $params['properties']/*, $criteria*/ ); break;                                   </span>
+<span class="lineNum" id="container534"><a name="534"></a><a href="#534" id="line534">     534</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container535"><a name="535"></a><a href="#535" id="line535">     535</a> </span><span class="lineCov">              2 :             case 'deleteAll': $return = $params['service']-&gt;deleteAll( $params['URI'], $params['properties'], $params['criteria'] ); break;                       </span>
+<span class="lineNum" id="container536"><a name="536"></a><a href="#536" id="line536">     536</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container537"><a name="537"></a><a href="#537" id="line537">     537</a> </span><span class="lineCov">              2 :             case 'update': $return = $params['service']-&gt;update( $params['URI'], $params['properties']/*, $criteria*/ ); break;                                   </span>
+<span class="lineNum" id="container538"><a name="538"></a><a href="#538" id="line538">     538</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container539"><a name="539"></a><a href="#539" id="line539">     539</a> </span><span class="lineCov">              2 :             case 'replace': $return = $params['service']-&gt;replace( $params['URI'], $params['properties'], $params['criteria'] ); break;                           </span>
+<span class="lineNum" id="container540"><a name="540"></a><a href="#540" id="line540">     540</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container541"><a name="541"></a><a href="#541" id="line541">     541</a> </span><span class="lineCov">              2 :             case 'begin': $return = $params['service']-&gt;begin( $params['URI'] ); break;                                                                           </span>
+<span class="lineNum" id="container542"><a name="542"></a><a href="#542" id="line542">     542</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container543"><a name="543"></a><a href="#543" id="line543">     543</a> </span><span class="lineCov">              2 :             case 'commit': $return = $params['service']-&gt;commit( $params['URI'], $params['criteria'] ); break;                                                    </span>
+<span class="lineNum" id="container544"><a name="544"></a><a href="#544" id="line544">     544</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container545"><a name="545"></a><a href="#545" id="line545">     545</a> </span><span class="lineNoCov">              0 :             case 'rollback': $return = $params['service']-&gt;rollback( $params['URI'], $params['criteria'] ); break;                                                </span>
+<span class="lineNum" id="container546"><a name="546"></a><a href="#546" id="line546">     546</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container547"><a name="547"></a><a href="#547" id="line547">     547</a> </span><span class="lineNoCov">              0 :             case 'parse': $return = $params['service']-&gt;parse( $params['properties'], $params['criteria'] ); break;                                               </span>
+<span class="lineNum" id="container548"><a name="548"></a><a href="#548" id="line548">     548</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container549"><a name="549"></a><a href="#549" id="line549">     549</a> </span><span class="lineNoCov">              0 :             case 'analize': $return = $params['service']-&gt;analize( $params['properties'], $params['criteria'] ); break;                                           </span>
+<span class="lineNum" id="container550"><a name="550"></a><a href="#550" id="line550">     550</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container551"><a name="551"></a><a href="#551" id="line551">     551</a> </span><span class="lineNoCov">              0 :             case 'format': $return = $params['service']-&gt;format( $params['properties'], $params['criteria'] ); break;                                             </span>
+<span class="lineNum" id="container552"><a name="552"></a><a href="#552" id="line552">     552</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container553"><a name="553"></a><a href="#553" id="line553">     553</a> </span><span class="lineNoCov">              0 :             default : $return = $params['service']-&gt;$method( $params['properties'], $params['criteria'] );                                                        </span>
+<span class="lineNum" id="container554"><a name="554"></a><a href="#554" id="line554">     554</a> </span><span class="lineCov">              2 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container555"><a name="555"></a><a href="#555" id="line555">     555</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container556"><a name="556"></a><a href="#556" id="line556">     556</a> </span><span class="lineCov">              2 :         if( isset($return) &amp;&amp; $return !== false )                                                                                                                 </span>
+<span class="lineNum" id="container557"><a name="557"></a><a href="#557" id="line557">     557</a> </span><span class="lineCov">              2 :             $params['properties'] = $return;                                                                                                                      </span>
+<span class="lineNum" id="container558"><a name="558"></a><a href="#558" id="line558">     558</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container559"><a name="559"></a><a href="#559" id="line559">     559</a> </span><span class="lineCov">              2 :         if( isset($params['URI']['service']) )                                                                                                                    </span>
+<span class="lineNum" id="container560"><a name="560"></a><a href="#560" id="line560">     560</a> </span><span class="lineCov">              2 :             if( !self::fire( 'after', $method, $params, $original, true ) )                                                                                       </span>
+<span class="lineNum" id="container561"><a name="561"></a><a href="#561" id="line561">     561</a> </span><span class="lineCov">              2 :             return( empty($params['properties']) ? false : $params['properties'] );                                                                               </span>
+<span class="lineNum" id="container562"><a name="562"></a><a href="#562" id="line562">     562</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container563"><a name="563"></a><a href="#563" id="line563">     563</a> </span><span class="lineCov">              2 :         if( isset($URI['concept']) )                                                                                                                              </span>
+<span class="lineNum" id="container564"><a name="564"></a><a href="#564" id="line564">     564</a> </span><span class="lineCov">              2 :             self::fire( 'after', $method, $params, $original );                                                                                                   </span>
+<span class="lineNum" id="container565"><a name="565"></a><a href="#565" id="line565">     565</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container566"><a name="566"></a><a href="#566" id="line566">     566</a> </span><span class="lineCov">              2 :         if( empty($params['properties']) )                                                                                                                        </span>
+<span class="lineNum" id="container567"><a name="567"></a><a href="#567" id="line567">     567</a> </span><span class="lineCov">              2 :             $params['properties'] = false;                                                                                                                        </span>
+<span class="lineNum" id="container568"><a name="568"></a><a href="#568" id="line568">     568</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container569"><a name="569"></a><a href="#569" id="line569">     569</a> </span><span class="lineCov">              2 :         if( isset( $TX ) )                                                                                                                                        </span>
+<span class="lineNum" id="container570"><a name="570"></a><a href="#570" id="line570">     570</a> </span><span class="lineCov">              2 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container571"><a name="571"></a><a href="#571" id="line571">     571</a> </span><span class="lineCov">              2 :             $TX['rollback'] = !!!$params['properties'];                                                                                                           </span>
+<span class="lineNum" id="container572"><a name="572"></a><a href="#572" id="line572">     572</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container573"><a name="573"></a><a href="#573" id="line573">     573</a> </span><span class="lineCov">              2 :             if( $params['properties'] &amp;&amp; is_array($params['properties']) &amp;&amp; isset($params['properties']['id']) )                                                  </span>
+<span class="lineNum" id="container574"><a name="574"></a><a href="#574" id="line574">     574</a> </span><span class="lineCov">              2 :             $TX['id'] = $params['properties']['id'];                                                                                                              </span>
+<span class="lineNum" id="container575"><a name="575"></a><a href="#575" id="line575">     575</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container576"><a name="576"></a><a href="#576" id="line576">     576</a> </span><span class="lineCov">              2 :             self::$tx[ $params['URI']['service'] ][] = array_merge( $TX, $original['URI'], array( 'service' =&gt; $params['URI']['service'], 'method' =&gt; $method ) );</span>
+<span class="lineNum" id="container577"><a name="577"></a><a href="#577" id="line577">     577</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container578"><a name="578"></a><a href="#578" id="line578">     578</a> </span><span class="lineCov">              2 :             if( isset($commit) &amp;&amp; $commit )                                                                                                                       </span>
+<span class="lineNum" id="container579"><a name="579"></a><a href="#579" id="line579">     579</a> </span><span class="lineCov">              2 :             {                                                                                                                                                     </span>
+<span class="lineNum" id="container580"><a name="580"></a><a href="#580" id="line580">     580</a> </span><span class="lineCov">              2 :             if( !self::call( 'commit', $params['URI'], false, self::$tx[ $params['URI']['service'] ] ) )                                                          </span>
+<span class="lineNum" id="container581"><a name="581"></a><a href="#581" id="line581">     581</a> </span><span class="lineCov">              2 :                 self::call( 'rollback', $params['URI'] , false, self::$tx[ $params['URI']['service'] ] );                                                         </span>
+<span class="lineNum" id="container582"><a name="582"></a><a href="#582" id="line582">     582</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container583"><a name="583"></a><a href="#583" id="line583">     583</a> </span><span class="lineCov">              2 :             unset( self::$tx[ $params['URI']['service'] ] );                                                                                                      </span>
+<span class="lineNum" id="container584"><a name="584"></a><a href="#584" id="line584">     584</a> </span><span class="lineCov">              2 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container585"><a name="585"></a><a href="#585" id="line585">     585</a> </span><span class="lineCov">              2 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container586"><a name="586"></a><a href="#586" id="line586">     586</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container587"><a name="587"></a><a href="#587" id="line587">     587</a> </span><span class="lineCov">              2 :         catch( Exception $e )                                                                                                                                     </span>
+<span class="lineNum" id="container588"><a name="588"></a><a href="#588" id="line588">     588</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container589"><a name="589"></a><a href="#589" id="line589">     589</a> </span><span class="lineNoCov">              0 :         if( !self::fallback( $e ) )                                                                                                                               </span>
+<span class="lineNum" id="container590"><a name="590"></a><a href="#590" id="line590">     590</a> </span><span class="lineNoCov">              0 :             self::closeAll();                                                                                                                                     </span>
+<span class="lineNum" id="container591"><a name="591"></a><a href="#591" id="line591">     591</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container592"><a name="592"></a><a href="#592" id="line592">     592</a> </span><span class="lineNoCov">              0 :         return( false );                                                                                                                                          </span>
+<span class="lineNum" id="container593"><a name="593"></a><a href="#593" id="line593">     593</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container594"><a name="594"></a><a href="#594" id="line594">     594</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container595"><a name="595"></a><a href="#595" id="line595">     595</a> </span><span class="lineCov">              2 :         return( $params['properties'] );                                                                                                                          </span>
+<span class="lineNum" id="container596"><a name="596"></a><a href="#596" id="line596">     596</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container597"><a name="597"></a><a href="#597" id="line597">     597</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container598"><a name="598"></a><a href="#598" id="line598">     598</a> </span>                :     public static function fallback( $exception )                                                                                                                 
+<span class="lineNum" id="container599"><a name="599"></a><a href="#599" id="line599">     599</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container600"><a name="600"></a><a href="#600" id="line600">     600</a> </span><span class="lineNoCov">              0 :         error_log( $exception-&gt;getMessage() );                                                                                                                    </span>
+<span class="lineNum" id="container601"><a name="601"></a><a href="#601" id="line601">     601</a> </span><span class="lineNoCov">              0 :         return( true );                                                                                                                                           </span>
+<span class="lineNum" id="container602"><a name="602"></a><a href="#602" id="line602">     602</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container603"><a name="603"></a><a href="#603" id="line603">     603</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container604"><a name="604"></a><a href="#604" id="line604">     604</a> </span>                :     public static function put( $URI, $data, $txIds = false )                                                                                                     
+<span class="lineNum" id="container605"><a name="605"></a><a href="#605" id="line605">     605</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container606"><a name="606"></a><a href="#606" id="line606">     606</a> </span>                :         try                                                                                                                                                       
+<span class="lineNum" id="container607"><a name="607"></a><a href="#607" id="line607">     607</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container608"><a name="608"></a><a href="#608" id="line608">     608</a> </span><span class="lineNoCov">              0 :         $URI = self::serviceName( $URI );                                                                                                                         </span>
+<span class="lineNum" id="container609"><a name="609"></a><a href="#609" id="line609">     609</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container610"><a name="610"></a><a href="#610" id="line610">     610</a> </span><span class="lineNoCov">              0 :         if( $commit = !$txIds )                                                                                                                                   </span>
+<span class="lineNum" id="container611"><a name="611"></a><a href="#611" id="line611">     611</a> </span><span class="lineNoCov">              0 :             $txIds = array();                                                                                                                                     </span>
+<span class="lineNum" id="container612"><a name="612"></a><a href="#612" id="line612">     612</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container613"><a name="613"></a><a href="#613" id="line613">     613</a> </span><span class="lineNoCov">              0 :         if( !isset( self::$tx[ $URI['service'] ] ) )                                                                                                              </span>
+<span class="lineNum" id="container614"><a name="614"></a><a href="#614" id="line614">     614</a> </span><span class="lineNoCov">              0 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container615"><a name="615"></a><a href="#615" id="line615">     615</a> </span><span class="lineNoCov">              0 :             self::call( 'begin', $URI );                                                                                                                          </span>
+<span class="lineNum" id="container616"><a name="616"></a><a href="#616" id="line616">     616</a> </span><span class="lineNoCov">              0 :             self::$tx[ $txIds[] = $URI['service'] ] = array();                                                                                                    </span>
+<span class="lineNum" id="container617"><a name="617"></a><a href="#617" id="line617">     617</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container618"><a name="618"></a><a href="#618" id="line618">     618</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container619"><a name="619"></a><a href="#619" id="line619">     619</a> </span><span class="lineNoCov">              0 :         $method = $data ? isset( $data['id'] ) ?                                                                                                                  </span>
+<span class="lineNum" id="container620"><a name="620"></a><a href="#620" id="line620">     620</a> </span><span class="lineNoCov">              0 :               'update' : 'create' : 'delete';                                                                                                                     </span>
+<span class="lineNum" id="container621"><a name="621"></a><a href="#621" id="line621">     621</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container622"><a name="622"></a><a href="#622" id="line622">     622</a> </span><span class="lineNoCov">              0 :         $links = self::links( $URI['concept'] );                                                                                                                  </span>
+<span class="lineNum" id="container623"><a name="623"></a><a href="#623" id="line623">     623</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container624"><a name="624"></a><a href="#624" id="line624">     624</a> </span><span class="lineNoCov">              0 :         $order = self::$txID++;                                                                                                                                   </span>
+<span class="lineNum" id="container625"><a name="625"></a><a href="#625" id="line625">     625</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container626"><a name="626"></a><a href="#626" id="line626">     626</a> </span><span class="lineNoCov">              0 :         $postpone = array();                                                                                                                                      </span>
+<span class="lineNum" id="container627"><a name="627"></a><a href="#627" id="line627">     627</a> </span><span class="lineNoCov">              0 :         $linkNames = array();                                                                                                                                     </span>
+<span class="lineNum" id="container628"><a name="628"></a><a href="#628" id="line628">     628</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container629"><a name="629"></a><a href="#629" id="line629">     629</a> </span>                :         if( $data )                                                                                                                                               
+<span class="lineNum" id="container630"><a name="630"></a><a href="#630" id="line630">     630</a> </span><span class="lineNoCov">              0 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container631"><a name="631"></a><a href="#631" id="line631">     631</a> </span><span class="lineNoCov">              0 :             $URI['id'] = isset( $data['id'] ) ? $data['id'] : false;                                                                                              </span>
+<span class="lineNum" id="container632"><a name="632"></a><a href="#632" id="line632">     632</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container633"><a name="633"></a><a href="#633" id="line633">     633</a> </span><span class="lineNoCov">              0 :             foreach( $links as $linkName =&gt; $linkTarget )                                                                                                         </span>
+<span class="lineNum" id="container634"><a name="634"></a><a href="#634" id="line634">     634</a> </span>                :             {                                                                                                                                                     
+<span class="lineNum" id="container635"><a name="635"></a><a href="#635" id="line635">     635</a> </span><span class="lineNoCov">              0 :             if( isset( $data[$linkName] ) &amp;&amp; is_array( $data[$linkName] ) )                                                                                       </span>
+<span class="lineNum" id="container636"><a name="636"></a><a href="#636" id="line636">     636</a> </span><span class="lineNoCov">              0 :             {                                                                                                                                                     </span>
+<span class="lineNum" id="container637"><a name="637"></a><a href="#637" id="line637">     637</a> </span><span class="lineNoCov">              0 :                 if( self::isConcept( $URI['concept'], $linkName ) )                                                                                               </span>
+<span class="lineNum" id="container638"><a name="638"></a><a href="#638" id="line638">     638</a> </span><span class="lineNoCov">              0 :                     $data[$linkName] = self::put( array( 'concept' =&gt; $linkTarget ), $data[$linkName], &amp;$txIds );                                                 </span>
+<span class="lineNum" id="container639"><a name="639"></a><a href="#639" id="line639">     639</a> </span>                :                 else                                                                                                                                              
+<span class="lineNum" id="container640"><a name="640"></a><a href="#640" id="line640">     640</a> </span>                :                 {                                                                                                                                                 
+<span class="lineNum" id="container641"><a name="641"></a><a href="#641" id="line641">     641</a> </span><span class="lineNoCov">              0 :                     $postpone[ $linkTarget ] =  $data[$linkName];                                                                                                 </span>
+<span class="lineNum" id="container642"><a name="642"></a><a href="#642" id="line642">     642</a> </span><span class="lineNoCov">              0 :                     $linkNames[ $linkTarget ] = $linkName;                                                                                                        </span>
+<span class="lineNum" id="container643"><a name="643"></a><a href="#643" id="line643">     643</a> </span>                :                 }                                                                                                                                                 
+<span class="lineNum" id="container644"><a name="644"></a><a href="#644" id="line644">     644</a> </span><span class="lineNoCov">              0 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container645"><a name="645"></a><a href="#645" id="line645">     645</a> </span><span class="lineNoCov">              0 :             }                                                                                                                                                     </span>
+<span class="lineNum" id="container646"><a name="646"></a><a href="#646" id="line646">     646</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container647"><a name="647"></a><a href="#647" id="line647">     647</a> </span>                :         else                                                                                                                                                      
+<span class="lineNum" id="container648"><a name="648"></a><a href="#648" id="line648">     648</a> </span><span class="lineNoCov">              0 :           $URI['id'] = isset( $data['id'] ) ? $data['id'] : $URI['id'];                                                                                           </span>
+<span class="lineNum" id="container649"><a name="649"></a><a href="#649" id="line649">     649</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container650"><a name="650"></a><a href="#650" id="line650">     650</a> </span><span class="lineNoCov">              0 :         $result = Controller::call( $method, $URI, $data, false, false, true );                                                                                   </span>
+<span class="lineNum" id="container651"><a name="651"></a><a href="#651" id="line651">     651</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container652"><a name="652"></a><a href="#652" id="line652">     652</a> </span><span class="lineNoCov">              0 :         if( is_array( $result ) &amp;&amp; isset( $result['id'] ) )                                                                                                       </span>
+<span class="lineNum" id="container653"><a name="653"></a><a href="#653" id="line653">     653</a> </span><span class="lineNoCov">              0 :               $URI['id'] = $result['id'];                                                                                                                         </span>
+<span class="lineNum" id="container654"><a name="654"></a><a href="#654" id="line654">     654</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container655"><a name="655"></a><a href="#655" id="line655">     655</a> </span><span class="lineNoCov">              0 :         self::$tx[ $URI['service'] ][ count(self::$tx[ $URI['service'] ]) - 1 ]['order'] = $order;                                                                </span>
+<span class="lineNum" id="container656"><a name="656"></a><a href="#656" id="line656">     656</a> </span><span class="lineNoCov">              0 :         self::$tx[ $URI['service'] ][ count(self::$tx[ $URI['service'] ]) - 1 ]['id'] = $URI['id'];                                                               </span>
+<span class="lineNum" id="container657"><a name="657"></a><a href="#657" id="line657">     657</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container658"><a name="658"></a><a href="#658" id="line658">     658</a> </span><span class="lineNoCov">              0 :         foreach( $postpone as $linkTarget =&gt; $dt )                                                                                                                </span>
+<span class="lineNum" id="container659"><a name="659"></a><a href="#659" id="line659">     659</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container660"><a name="660"></a><a href="#660" id="line660">     660</a> </span><span class="lineNoCov">              0 :               if( Controller::hasOne( $URI['concept'], $linkNames[ $linkTarget ] ) )                                                                              </span>
+<span class="lineNum" id="container661"><a name="661"></a><a href="#661" id="line661">     661</a> </span><span class="lineNoCov">              0 :               $dt = array( $dt );                                                                                                                                 </span>
+<span class="lineNum" id="container662"><a name="662"></a><a href="#662" id="line662">     662</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container663"><a name="663"></a><a href="#663" id="line663">     663</a> </span><span class="lineNoCov">              0 :               foreach( $dt as $ii =&gt; $value )                                                                                                                     </span>
+<span class="lineNum" id="container664"><a name="664"></a><a href="#664" id="line664">     664</a> </span>                :               {                                                                                                                                                   
+<span class="lineNum" id="container665"><a name="665"></a><a href="#665" id="line665">     665</a> </span><span class="lineNoCov">              0 :               if( !is_array( $value ) )                                                                                                                           </span>
+<span class="lineNum" id="container666"><a name="666"></a><a href="#666" id="line666">     666</a> </span><span class="lineNoCov">              0 :                 $value = array( 'id' =&gt; $value );                                                                                                                 </span>
+<span class="lineNum" id="container667"><a name="667"></a><a href="#667" id="line667">     667</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container668"><a name="668"></a><a href="#668" id="line668">     668</a> </span><span class="lineNoCov">              0 :               $value[ self::links( $URI['concept'], $linkNames[ $linkTarget ] ) ] = $URI['id'];                                                                   </span>
+<span class="lineNum" id="container669"><a name="669"></a><a href="#669" id="line669">     669</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container670"><a name="670"></a><a href="#670" id="line670">     670</a> </span><span class="lineNoCov">              0 :               self::put( array( 'concept' =&gt; $linkTarget ), $value, &amp;$txIds );                                                                                    </span>
+<span class="lineNum" id="container671"><a name="671"></a><a href="#671" id="line671">     671</a> </span><span class="lineNoCov">              0 :               }                                                                                                                                                   </span>
+<span class="lineNum" id="container672"><a name="672"></a><a href="#672" id="line672">     672</a> </span><span class="lineNoCov">              0 :         }                                                                                                                                                         </span>
+<span class="lineNum" id="container673"><a name="673"></a><a href="#673" id="line673">     673</a> </span>                :         if( $commit )                                                                                                                                             
+<span class="lineNum" id="container674"><a name="674"></a><a href="#674" id="line674">     674</a> </span><span class="lineNoCov">              0 :         {                                                                                                                                                         </span>
+<span class="lineNum" id="container675"><a name="675"></a><a href="#675" id="line675">     675</a> </span><span class="lineNoCov">              0 :               $result = array();                                                                                                                                  </span>
+<span class="lineNum" id="container676"><a name="676"></a><a href="#676" id="line676">     676</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container677"><a name="677"></a><a href="#677" id="line677">     677</a> </span><span class="lineNoCov">              0 :               for( $i = count( $txIds ) - 1; $i &gt;= 0; $i-- )                                                                                                      </span>
+<span class="lineNum" id="container678"><a name="678"></a><a href="#678" id="line678">     678</a> </span>                :               {                                                                                                                                                   
+<span class="lineNum" id="container679"><a name="679"></a><a href="#679" id="line679">     679</a> </span><span class="lineNoCov">              0 :                   $currentTx = self::$tx[ $txIds[$i] ];                                                                                                           </span>
+<span class="lineNum" id="container680"><a name="680"></a><a href="#680" id="line680">     680</a> </span><span class="lineNoCov">              0 :                   unset( self::$tx[ $txIds[$i] ] );                                                                                                               </span>
+<span class="lineNum" id="container681"><a name="681"></a><a href="#681" id="line681">     681</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container682"><a name="682"></a><a href="#682" id="line682">     682</a> </span><span class="lineNoCov">              0 :                   if( !self::commit( array( 'service' =&gt; $txIds[$i] ), $currentTx ) )                                                                             </span>
+<span class="lineNum" id="container683"><a name="683"></a><a href="#683" id="line683">     683</a> </span><span class="lineNoCov">              0 :                   {                                                                                                                                               </span>
+<span class="lineNum" id="container684"><a name="684"></a><a href="#684" id="line684">     684</a> </span><span class="lineNoCov">              0 :                   self::rollback( array( 'service' =&gt; $txIds[$i] ), $currentTx );                                                                                 </span>
+<span class="lineNum" id="container685"><a name="685"></a><a href="#685" id="line685">     685</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container686"><a name="686"></a><a href="#686" id="line686">     686</a> </span><span class="lineNoCov">              0 :                   foreach( $currentTx as $i =&gt; $st )                                                                                                              </span>
+<span class="lineNum" id="container687"><a name="687"></a><a href="#687" id="line687">     687</a> </span><span class="lineNoCov">              0 :                       $currentTx[$i][ 'rollback' ] = true;                                                                                                        </span>
+<span class="lineNum" id="container688"><a name="688"></a><a href="#688" id="line688">     688</a> </span><span class="lineNoCov">              0 :                   }                                                                                                                                               </span>
+<span class="lineNum" id="container689"><a name="689"></a><a href="#689" id="line689">     689</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container690"><a name="690"></a><a href="#690" id="line690">     690</a> </span><span class="lineNoCov">              0 :                   $result = array_merge( $result, $currentTx );                                                                                                   </span>
+<span class="lineNum" id="container691"><a name="691"></a><a href="#691" id="line691">     691</a> </span><span class="lineNoCov">              0 :               }                                                                                                                                                   </span>
+<span class="lineNum" id="container692"><a name="692"></a><a href="#692" id="line692">     692</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container693"><a name="693"></a><a href="#693" id="line693">     693</a> </span><span class="lineNoCov">              0 :               self::$txID = 0;                                                                                                                                    </span>
+<span class="lineNum" id="container694"><a name="694"></a><a href="#694" id="line694">     694</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container695"><a name="695"></a><a href="#695" id="line695">     695</a> </span><span class="lineNoCov">              0 :               return( $result );                                                                                                                                  </span>
+<span class="lineNum" id="container696"><a name="696"></a><a href="#696" id="line696">     696</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container697"><a name="697"></a><a href="#697" id="line697">     697</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container698"><a name="698"></a><a href="#698" id="line698">     698</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container699"><a name="699"></a><a href="#699" id="line699">     699</a> </span><span class="lineNoCov">              0 :         catch( Exception $e )                                                                                                                                     </span>
+<span class="lineNum" id="container700"><a name="700"></a><a href="#700" id="line700">     700</a> </span>                :         {                                                                                                                                                         
+<span class="lineNum" id="container701"><a name="701"></a><a href="#701" id="line701">     701</a> </span><span class="lineNoCov">              0 :         if( !self::fallback( $e ) )                                                                                                                               </span>
+<span class="lineNum" id="container702"><a name="702"></a><a href="#702" id="line702">     702</a> </span><span class="lineNoCov">              0 :             self::closeAll();                                                                                                                                     </span>
+<span class="lineNum" id="container703"><a name="703"></a><a href="#703" id="line703">     703</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container704"><a name="704"></a><a href="#704" id="line704">     704</a> </span><span class="lineNoCov">              0 :         return( false );                                                                                                                                          </span>
+<span class="lineNum" id="container705"><a name="705"></a><a href="#705" id="line705">     705</a> </span>                :         }                                                                                                                                                         
+<span class="lineNum" id="container706"><a name="706"></a><a href="#706" id="line706">     706</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container707"><a name="707"></a><a href="#707" id="line707">     707</a> </span><span class="lineNoCov">              0 :         return( $URI['id'] );                                                                                                                                     </span>
+<span class="lineNum" id="container708"><a name="708"></a><a href="#708" id="line708">     708</a> </span>                :     }                                                                                                                                                             
+<span class="lineNum" id="container709"><a name="709"></a><a href="#709" id="line709">     709</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container710"><a name="710"></a><a href="#710" id="line710">     710</a> </span>                :     public static function get()                                                                                                                                  
+<span class="lineNum" id="container711"><a name="711"></a><a href="#711" id="line711">     711</a> </span>                :     {                                                                                                                                                             
+<span class="lineNum" id="container712"><a name="712"></a><a href="#712" id="line712">     712</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container713"><a name="713"></a><a href="#713" id="line713">     713</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                                             </span>
+<span class="lineNum" id="container714"><a name="714"></a><a href="#714" id="line714">     714</a> </span>                : }                                                                                                                                                                 
+<span class="lineNum" id="container715"><a name="715"></a><a href="#715" id="line715">     715</a> </span>                :                                                                                                                                                                   
+<span class="lineNum" id="container716"><a name="716"></a><a href="#716" id="line716">     716</a> </span>                : Controller::$cache = Controller::loadCache();                                                                                                                     
+<span class="lineNum" id="container717"><a name="717"></a><a href="#717" id="line717">     717</a> </span>                : // ?&gt;                                                                                                                                                             
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel87": {
+          "header": "2 tests cover line 87",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel88": {
+          "header": "2 tests cover line 88",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel90": {
+          "header": "2 tests cover line 90",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel95": {
+          "header": "2 tests cover line 95",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel96": {
+          "header": "2 tests cover line 96",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel119": {
+          "header": "2 tests cover line 119",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel236": {
+          "header": "1 test covers line 236",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel238": {
+          "header": "1 test covers line 238",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel240": {
+          "header": "1 test covers line 240",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel241": {
+          "header": "1 test covers line 241",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel242": {
+          "header": "1 test covers line 242",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel244": {
+          "header": "1 test covers line 244",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel245": {
+          "header": "1 test covers line 245",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel247": {
+          "header": "1 test covers line 247",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel252": {
+          "header": "1 test covers line 252",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel253": {
+          "header": "1 test covers line 253",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel254": {
+          "header": "1 test covers line 254",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel255": {
+          "header": "1 test covers line 255",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel256": {
+          "header": "1 test covers line 256",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel258": {
+          "header": "1 test covers line 258",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel263": {
+          "header": "1 test covers line 263",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel264": {
+          "header": "1 test covers line 264",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel266": {
+          "header": "1 test covers line 266",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel271": {
+          "header": "1 test covers line 271",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel273": {
+          "header": "1 test covers line 273",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel274": {
+          "header": "1 test covers line 274",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel275": {
+          "header": "1 test covers line 275",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel276": {
+          "header": "1 test covers line 276",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel277": {
+          "header": "1 test covers line 277",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel279": {
+          "header": "1 test covers line 279",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel281": {
+          "header": "1 test covers line 281",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel286": {
+          "header": "1 test covers line 286",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel287": {
+          "header": "1 test covers line 287",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel289": {
+          "header": "1 test covers line 289",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel291": {
+          "header": "1 test covers line 291",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel292": {
+          "header": "1 test covers line 292",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel294": {
+          "header": "1 test covers line 294",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel296": {
+          "header": "1 test covers line 296",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel301": {
+          "header": "1 test covers line 301",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel303": {
+          "header": "1 test covers line 303",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel304": {
+          "header": "1 test covers line 304",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel306": {
+          "header": "1 test covers line 306",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel311": {
+          "header": "1 test covers line 311",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel312": {
+          "header": "1 test covers line 312",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel314": {
+          "header": "1 test covers line 314",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel333": {
+          "header": "2 tests cover line 333",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel334": {
+          "header": "2 tests cover line 334",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel336": {
+          "header": "1 test covers line 336",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel337": {
+          "header": "1 test covers line 337",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel339": {
+          "header": "1 test covers line 339",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel340": {
+          "header": "1 test covers line 340",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel342": {
+          "header": "1 test covers line 342",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel343": {
+          "header": "1 test covers line 343",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel345": {
+          "header": "1 test covers line 345",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel347": {
+          "header": "1 test covers line 347",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel348": {
+          "header": "1 test covers line 348",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel350": {
+          "header": "1 test covers line 350",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel352": {
+          "header": "1 test covers line 352",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel353": {
+          "header": "1 test covers line 353",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel354": {
+          "header": "1 test covers line 354",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel355": {
+          "header": "1 test covers line 355",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel356": {
+          "header": "1 test covers line 356",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel357": {
+          "header": "1 test covers line 357",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel359": {
+          "header": "1 test covers line 359",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel360": {
+          "header": "1 test covers line 360",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel362": {
+          "header": "1 test covers line 362",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel363": {
+          "header": "1 test covers line 363",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel365": {
+          "header": "1 test covers line 365",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel371": {
+          "header": "2 tests cover line 371",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel372": {
+          "header": "2 tests cover line 372",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel374": {
+          "header": "2 tests cover line 374",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel375": {
+          "header": "2 tests cover line 375",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel377": {
+          "header": "2 tests cover line 377",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel378": {
+          "header": "2 tests cover line 378",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel380": {
+          "header": "2 tests cover line 380",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel381": {
+          "header": "2 tests cover line 381",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel383": {
+          "header": "2 tests cover line 383",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel384": {
+          "header": "2 tests cover line 384",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel385": {
+          "header": "1 test covers line 385",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel386": {
+          "header": "1 test covers line 386",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel388": {
+          "header": "1 test covers line 388",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel390": {
+          "header": "1 test covers line 390",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel392": {
+          "header": "1 test covers line 392",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel394": {
+          "header": "1 test covers line 394",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel395": {
+          "header": "1 test covers line 395",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel399": {
+          "header": "1 test covers line 399",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel401": {
+          "header": "1 test covers line 401",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel402": {
+          "header": "1 test covers line 402",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li></ul>",
+          "footer": ""
+        },
+        "panel404": {
+          "header": "2 tests cover line 404",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel409": {
+          "header": "2 tests cover line 409",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel411": {
+          "header": "2 tests cover line 411",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel412": {
+          "header": "2 tests cover line 412",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel414": {
+          "header": "2 tests cover line 414",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel416": {
+          "header": "2 tests cover line 416",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel417": {
+          "header": "2 tests cover line 417",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel419": {
+          "header": "2 tests cover line 419",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel424": {
+          "header": "2 tests cover line 424",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel425": {
+          "header": "2 tests cover line 425",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel428": {
+          "header": "2 tests cover line 428",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel429": {
+          "header": "2 tests cover line 429",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel430": {
+          "header": "2 tests cover line 430",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel432": {
+          "header": "2 tests cover line 432",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel433": {
+          "header": "2 tests cover line 433",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel442": {
+          "header": "2 tests cover line 442",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel444": {
+          "header": "2 tests cover line 444",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel463": {
+          "header": "2 tests cover line 463",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel465": {
+          "header": "2 tests cover line 465",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel466": {
+          "header": "2 tests cover line 466",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel470": {
+          "header": "2 tests cover line 470",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel471": {
+          "header": "2 tests cover line 471",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel472": {
+          "header": "2 tests cover line 472",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel473": {
+          "header": "2 tests cover line 473",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel475": {
+          "header": "2 tests cover line 475",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel476": {
+          "header": "2 tests cover line 476",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel478": {
+          "header": "2 tests cover line 478",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel479": {
+          "header": "2 tests cover line 479",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel481": {
+          "header": "2 tests cover line 481",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel489": {
+          "header": "2 tests cover line 489",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel491": {
+          "header": "2 tests cover line 491",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel492": {
+          "header": "2 tests cover line 492",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel493": {
+          "header": "2 tests cover line 493",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel494": {
+          "header": "2 tests cover line 494",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel496": {
+          "header": "2 tests cover line 496",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel497": {
+          "header": "2 tests cover line 497",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel501": {
+          "header": "2 tests cover line 501",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel502": {
+          "header": "2 tests cover line 502",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel503": {
+          "header": "2 tests cover line 503",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel505": {
+          "header": "2 tests cover line 505",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel506": {
+          "header": "2 tests cover line 506",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel508": {
+          "header": "2 tests cover line 508",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel509": {
+          "header": "2 tests cover line 509",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel510": {
+          "header": "2 tests cover line 510",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel511": {
+          "header": "2 tests cover line 511",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel512": {
+          "header": "2 tests cover line 512",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel513": {
+          "header": "2 tests cover line 513",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel514": {
+          "header": "2 tests cover line 514",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel515": {
+          "header": "2 tests cover line 515",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel517": {
+          "header": "2 tests cover line 517",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel518": {
+          "header": "2 tests cover line 518",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel520": {
+          "header": "2 tests cover line 520",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel521": {
+          "header": "2 tests cover line 521",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel522": {
+          "header": "2 tests cover line 522",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel524": {
+          "header": "2 tests cover line 524",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel525": {
+          "header": "2 tests cover line 525",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel527": {
+          "header": "2 tests cover line 527",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel529": {
+          "header": "2 tests cover line 529",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel531": {
+          "header": "2 tests cover line 531",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel533": {
+          "header": "2 tests cover line 533",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel535": {
+          "header": "2 tests cover line 535",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel537": {
+          "header": "2 tests cover line 537",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel539": {
+          "header": "2 tests cover line 539",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel541": {
+          "header": "2 tests cover line 541",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel543": {
+          "header": "2 tests cover line 543",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel554": {
+          "header": "2 tests cover line 554",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel556": {
+          "header": "2 tests cover line 556",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel557": {
+          "header": "2 tests cover line 557",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel559": {
+          "header": "2 tests cover line 559",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel560": {
+          "header": "2 tests cover line 560",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel561": {
+          "header": "2 tests cover line 561",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel563": {
+          "header": "2 tests cover line 563",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel564": {
+          "header": "2 tests cover line 564",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel566": {
+          "header": "2 tests cover line 566",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel567": {
+          "header": "2 tests cover line 567",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel569": {
+          "header": "2 tests cover line 569",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel570": {
+          "header": "2 tests cover line 570",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel571": {
+          "header": "2 tests cover line 571",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel573": {
+          "header": "2 tests cover line 573",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel574": {
+          "header": "2 tests cover line 574",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel576": {
+          "header": "2 tests cover line 576",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel578": {
+          "header": "2 tests cover line 578",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel579": {
+          "header": "2 tests cover line 579",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel580": {
+          "header": "2 tests cover line 580",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel581": {
+          "header": "2 tests cover line 581",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel583": {
+          "header": "2 tests cover line 583",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel584": {
+          "header": "2 tests cover line 584",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel585": {
+          "header": "2 tests cover line 585",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel587": {
+          "header": "2 tests cover line 587",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel595": {
+          "header": "2 tests cover line 595",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest.dashboard.html	(revision 5888)
@@ -0,0 +1,123 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>rest</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [0,0,0,0,0,0,1,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[50.877192982456,19,"<a href=\"rest_oauth_OAuth2StorageUserCredential.php.html#11\">OAuth2StorageUserCredential<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">rest</td></tr>
+      <tr><td><div align="center"><p><a href="rest.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#11">OAuth2StorageUserCredential</a> (61)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#217">OAuth2StorageUserCredential::getRefreshToken</a> (0%)</li>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#258">OAuth2StorageUserCredential::getToken</a> (0%)</li>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#187">OAuth2StorageUserCredential::checkRestrictedGrantType</a> (0%)</li>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#99">OAuth2StorageUserCredential::getAccessToken</a> (0%)</li>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#42">OAuth2StorageUserCredential::checkClientCredentials</a> (0%)</li>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#72">OAuth2StorageUserCredential::getClientDetails</a> (0%)</li>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#13">OAuth2StorageUserCredential::checkUserCredentials</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_oauth.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_oauth.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_oauth.dashboard.html	(revision 5888)
@@ -0,0 +1,123 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>oauth</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [0,0,0,0,0,0,1,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[50.877192982456,19,"<a href=\"rest_oauth_OAuth2StorageUserCredential.php.html#11\">OAuth2StorageUserCredential<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">oauth</td></tr>
+      <tr><td><div align="center"><p><a href="rest_oauth.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#11">OAuth2StorageUserCredential</a> (61)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#217">OAuth2StorageUserCredential::getRefreshToken</a> (0%)</li>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#258">OAuth2StorageUserCredential::getToken</a> (0%)</li>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#187">OAuth2StorageUserCredential::checkRestrictedGrantType</a> (0%)</li>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#99">OAuth2StorageUserCredential::getAccessToken</a> (0%)</li>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#42">OAuth2StorageUserCredential::checkClientCredentials</a> (0%)</li>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#72">OAuth2StorageUserCredential::getClientDetails</a> (0%)</li>
+              <li><a href="rest_oauth_OAuth2StorageUserCredential.php.html#13">OAuth2StorageUserCredential::checkUserCredentials</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library.html	(revision 5888)
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>library</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">library</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a> (<a href="library.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 296</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="library_oauth2.html">oauth2</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 296</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_oauth_OAuth2StorageUserCredential.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_oauth_OAuth2StorageUserCredential.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_oauth_OAuth2StorageUserCredential.php.html	(revision 5888)
@@ -0,0 +1,805 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>OAuth2StorageUserCredential.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">OAuth2StorageUserCredential.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="rest.html">rest</a>/<a href="rest_oauth.html">oauth</a>/<a href="rest_oauth_OAuth2StorageUserCredential.php.html">OAuth2StorageUserCredential.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="36.36%">
+                <div class="size butter"  style="width:36.363636363636%" title="36.36%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">36.36%</td>
+          <td class="coverNumMed">4 / 11</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.88%">
+                <div class="size butter"  style="width:50.877192982456%" title="50.88%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.88%</td>
+          <td class="coverNumMed">29 / 57</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">OAuth2StorageUserCredential</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="36.36%">
+                <div class="size butter"  style="width:36.363636363636%" title="36.36%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">36.36%</td>
+          <td class="coverNumMed">4 / 11</td>
+          <td class="crap">61.79</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.88%">
+                <div class="size butter"  style="width:50.877192982456%" title="50.88%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.88%</td>
+          <td class="coverNumMed">29 / 57</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#13">checkUserCredentials($client_id, $username, $password)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#42">checkClientCredentials($client_id, $client_secret = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">20</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#72">getClientDetails($client_id)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#99">getAccessToken($oauth_token)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#125">setRefreshToken($refresh_token, $client_id, $user_id, $expires, $scope = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">8 / 8</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#155">setAccessToken($oauth_token, $client_id, $user_id, $expires, $scope = NULL, $refresh_token)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">9 / 9</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#187">checkRestrictedGrantType($client_id, $grant_type)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#217">getRefreshToken($refresh_token)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#237">unsetRefreshToken($refresh_token)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">6 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#244">unsetAccessToken($refresh_token)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">1</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">6 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#258">getToken($token, $isRefresh = true)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">20</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 10</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                                                                                                                              
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                : require ROOTPATH . '/library/oauth2/lib/OAuth2.php';                                                                                                                                                                                               
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                : require ROOTPATH . '/library/oauth2/lib/IOAuth2Storage.php';                                                                                                                                                                                       
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                : require ROOTPATH . '/library/oauth2/lib/IOAuth2GrantCode.php';                                                                                                                                                                                     
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                : require ROOTPATH . '/library/oauth2/lib/IOAuth2RefreshTokens.php';                                                                                                                                                                                 
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                : require ROOTPATH . '/library/oauth2/lib/IOAuth2GrantUser.php';                                                                                                                                                                                     
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                : class OAuth2StorageUserCredential implements IOAuth2GrantUser, IOAuth2RefreshTokens {                                                                                                                                                              
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                :     public function checkUserCredentials($client_id, $username, $password) {                                                                                                                                                                       
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                :         //Authentica no LDAP                                                                                                                                                                                                                       
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span><span class="lineNoCov">              0 :         $usuario =  Controller::find(array('concept'=&gt;'user' , 'service' =&gt; 'OpenLDAP'), false , array('filter' =&gt; array('AND', array('=' , 'uid' , $username ), array('=' , 'password', '{md5}' . base64_encode(pack(&quot;H*&quot;,md5($password))))  ) ));</span>
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span><span class="lineNoCov">              0 :         if(isset($usuario[0]['id']))                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span><span class="lineNoCov">              0 :         {                                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span><span class="lineNoCov">              0 :             return array('scope' =&gt; 'all' , 'user_id' =&gt; $usuario[0]['id']);                                                                                                                                                                       </span>
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span><span class="lineNoCov">              0 :         return false;                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :      * Make sure that the client credentials is valid.                                                                                                                                                                                             
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :      * @param $client_id                                                                                                                                                                                                                           
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :      * Client identifier to be check with.                                                                                                                                                                                                         
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :      * @param $client_secret                                                                                                                                                                                                                       
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :      * (optional) If a secret is required, check that they've given the right one.                                                                                                                                                                 
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :      * @return                                                                                                                                                                                                                                     
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :      * TRUE if the client credentials are valid, and MUST return FALSE if it isn't.                                                                                                                                                                
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :      * @endcode                                                                                                                                                                                                                                    
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-3.1                                                                                                                                                                          
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                :      * @ingroup oauth2_section_3                                                                                                                                                                                                                   
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :     public function checkClientCredentials($client_id, $client_secret = NULL) {                                                                                                                                                                    
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span><span class="lineNoCov">              0 :         if($client_secret == NULL) {                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span><span class="lineNoCov">              0 :             return false;                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span><span class="lineNoCov">              0 :         $res =  Controller::find(array('concept' =&gt; 'oauthCliente'), array('client_secret') , array('filter' =&gt; array('=' , 'client_id' , $client_id)) );                                                                                          </span>
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span><span class="lineNoCov">              0 :         if(isset($res[0]['client_secret']) &amp;&amp; $res[0]['client_secret'] == $client_secret) {                                                                                                                                                        </span>
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span><span class="lineNoCov">              0 :             return true;                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :         else {                                                                                                                                                                                                                                     
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span><span class="lineNoCov">              0 :             return false;                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                :      * Get client details corresponding client_id.                                                                                                                                                                                                 
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :      * OAuth says we should store request URIs for each registered client.                                                                                                                                                                         
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :      * Implement this function to grab the stored URI for a given client id.                                                                                                                                                                       
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :      * @param $client_id                                                                                                                                                                                                                           
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :      * Client identifier to be check with.                                                                                                                                                                                                         
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :      * @return array                                                                                                                                                                                                                               
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :      * Client details. Only mandatory item is the &quot;registered redirect URI&quot;, and MUST                                                                                                                                                              
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :      * return FALSE if the given client does not exist or is invalid.                                                                                                                                                                              
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                   
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span>                :     public function getClientDetails($client_id) {                                                                                                                                                                                                 
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span><span class="lineNoCov">              0 :         $res =  Controller::find(array('concept' =&gt; 'oauthCliente'), array('redirect_uri') , array('filter' =&gt; array('=' , 'client_id' , $client_id)));                                                                                            </span>
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span><span class="lineNoCov">              0 :         if(isset($res[0]['redirect_uri'])) {                                                                                                                                                                                                       </span>
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span><span class="lineNoCov">              0 :             return $res[0]['redirect_uri'];                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :         else {                                                                                                                                                                                                                                     
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span><span class="lineNoCov">              0 :             return false;                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                :      * Look up the supplied oauth_token from storage.                                                                                                                                                                                              
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                :      * We need to retrieve access token data as we create and verify tokens.                                                                                                                                                                       
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span>                :      * @param $oauth_token                                                                                                                                                                                                                         
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span>                :      * oauth_token to be check with.                                                                                                                                                                                                               
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                :      * @return                                                                                                                                                                                                                                     
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                :      * An associative array as below, and return NULL if the supplied oauth_token                                                                                                                                                                  
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :      * is invalid:                                                                                                                                                                                                                                 
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span>                :      * - client_id: Stored client identifier.                                                                                                                                                                                                      
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span>                :      * - expires: Stored expiration in unix timestamp.                                                                                                                                                                                             
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                :      * - scope: (optional) Stored scope values in space-separated string.                                                                                                                                                                          
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :      * @ingroup oauth2_section_7                                                                                                                                                                                                                   
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :     public function getAccessToken($oauth_token) {                                                                                                                                                                                                 
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span><span class="lineNoCov">              0 :         return $this-&gt;getToken($oauth_token, false);                                                                                                                                                                                               </span>
+<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span>                :      * Take the provided refresh token values and store them somewhere.                                                                                                                                                                            
+<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span>                :      * This function should be the storage counterpart to getRefreshToken().                                                                                                                                                                       
+<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span>                :      * If storage fails for some reason, we're not currently checking for                                                                                                                                                                          
+<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span>                :      * any sort of success/failure, so you should bail out of the script                                                                                                                                                                           
+<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span>                :      * and provide a descriptive fail message.                                                                                                                                                                                                     
+<span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111">     111</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112">     112</a> </span>                :      * Required for OAuth2::GRANT_TYPE_REFRESH_TOKEN.                                                                                                                                                                                              
+<span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113">     113</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114">     114</a> </span>                :      * @param $refresh_token                                                                                                                                                                                                                       
+<span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115">     115</a> </span>                :      * Refresh token to be stored.                                                                                                                                                                                                                 
+<span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116">     116</a> </span>                :      * @param $client_id                                                                                                                                                                                                                           
+<span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117">     117</a> </span>                :      * Client identifier to be stored.                                                                                                                                                                                                             
+<span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118">     118</a> </span>                :      * @param $expires                                                                                                                                                                                                                             
+<span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119">     119</a> </span>                :      * expires to be stored.                                                                                                                                                                                                                       
+<span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120">     120</a> </span>                :      * @param $scope                                                                                                                                                                                                                               
+<span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121">     121</a> </span>                :      * (optional) Scopes to be stored in space-separated string.                                                                                                                                                                                   
+<span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122">     122</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123">     123</a> </span>                :      * @ingroup oauth2_section_6                                                                                                                                                                                                                   
+<span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124">     124</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125">     125</a> </span>                :     public function setRefreshToken($refresh_token, $client_id, $user_id, $expires, $scope = NULL) {                                                                                                                                               
+<span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126">     126</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127">     127</a> </span><span class="lineCov">              2 :         $data = array();                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128">     128</a> </span><span class="lineCov">              2 :         $data['refresh_token']  = $refresh_token;                                                                                                                                                                                                  </span>
+<span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129">     129</a> </span><span class="lineCov">              2 :         $data['client_id'] = $client_id;                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130">     130</a> </span><span class="lineCov">              2 :         $data['user_id'] = $user_id;                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131">     131</a> </span><span class="lineCov">              2 :         $data['expires'] = $expires;                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132">     132</a> </span><span class="lineCov">              2 :         $data['scope'] = $scope;                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133">     133</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134">     134</a> </span><span class="lineCov">              2 :             Controller::create(array('concept' =&gt; 'oauthRefreshToken'), $data);                                                                                                                                                                    </span>
+<span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135">     135</a> </span><span class="lineCov">              2 :     }                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136">     136</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container137"><a name="137"></a><a href="#137" id="line137">     137</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138">     138</a> </span>                :      * Store the supplied access token values to storage.                                                                                                                                                                                          
+<span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139">     139</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140">     140</a> </span>                :      * We need to store access token data as we create and verify tokens.                                                                                                                                                                          
+<span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141">     141</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142">     142</a> </span>                :      * @param $oauth_token                                                                                                                                                                                                                         
+<span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143">     143</a> </span>                :      * oauth_token to be stored.                                                                                                                                                                                                                   
+<span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144">     144</a> </span>                :      * @param $client_id                                                                                                                                                                                                                           
+<span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145">     145</a> </span>                :      * Client identifier to be stored.                                                                                                                                                                                                             
+<span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146">     146</a> </span>                :      * @param $user_id                                                                                                                                                                                                                             
+<span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147">     147</a> </span>                :      * User identifier to be stored.                                                                                                                                                                                                               
+<span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148">     148</a> </span>                :      * @param $expires                                                                                                                                                                                                                             
+<span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149">     149</a> </span>                :      * Expiration to be stored.                                                                                                                                                                                                                    
+<span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150">     150</a> </span>                :      * @param $scope                                                                                                                                                                                                                               
+<span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151">     151</a> </span>                :      * (optional) Scopes to be stored in space-separated string.                                                                                                                                                                                   
+<span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152">     152</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153">     153</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                   
+<span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154">     154</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155">     155</a> </span>                :     public function setAccessToken($oauth_token, $client_id, $user_id, $expires, $scope = NULL, $refresh_token) {                                                                                                                                  
+<span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156">     156</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157">     157</a> </span><span class="lineCov">              2 :         $data = array();                                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158">     158</a> </span><span class="lineCov">              2 :         $data['oauth_token']  = $oauth_token;                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159">     159</a> </span><span class="lineCov">              2 :         $data['client_id'] = $client_id;                                                                                                                                                                                                           </span>
+<span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160">     160</a> </span><span class="lineCov">              2 :         $data['user_id'] = $user_id;                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161">     161</a> </span><span class="lineCov">              2 :         $data['expires'] = $expires;                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162">     162</a> </span><span class="lineCov">              2 :         $data['scope'] = $scope;                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163">     163</a> </span><span class="lineCov">              2 :         $data['refresh_token'] = $refresh_token;                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164">     164</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165">     165</a> </span><span class="lineCov">              2 :         Controller::create(array('concept' =&gt; 'oauthToken'), $data);                                                                                                                                                                               </span>
+<span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166">     166</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167">     167</a> </span><span class="lineCov">              2 :     }                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168">     168</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169">     169</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170">     170</a> </span>                :      * Check restricted grant types of corresponding client identifier.                                                                                                                                                                            
+<span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171">     171</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172">     172</a> </span>                :      * If you want to restrict clients to certain grant types, override this                                                                                                                                                                       
+<span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173">     173</a> </span>                :      * function.                                                                                                                                                                                                                                   
+<span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174">     174</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175">     175</a> </span>                :      * @param $client_id                                                                                                                                                                                                                           
+<span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176">     176</a> </span>                :      * Client identifier to be check with.                                                                                                                                                                                                         
+<span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177">     177</a> </span>                :      * @param $grant_type                                                                                                                                                                                                                          
+<span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178">     178</a> </span>                :      * Grant type to be check with, would be one of the values contained in                                                                                                                                                                        
+<span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179">     179</a> </span>                :      * OAuth2::GRANT_TYPE_REGEXP.                                                                                                                                                                                                                  
+<span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180">     180</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181">     181</a> </span>                :      * @return                                                                                                                                                                                                                                     
+<span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182">     182</a> </span>                :      * TRUE if the grant type is supported by this client identifier, and                                                                                                                                                                          
+<span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183">     183</a> </span>                :      * FALSE if it isn't.                                                                                                                                                                                                                          
+<span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184">     184</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185">     185</a> </span>                :      * @ingroup oauth2_section_4                                                                                                                                                                                                                   
+<span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186">     186</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187">     187</a> </span>                :     public function checkRestrictedGrantType($client_id, $grant_type) {                                                                                                                                                                            
+<span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188">     188</a> </span>                :         /*TODO: essa funÃ§Ã£o deve verificar se o cliente tem permissao para realizar o login via 'password'                                                                                                                                       
+<span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189">     189</a> </span>                :          * deixe para implementar no prox. sprint, quando trataremos de seguranca. Deve-se criar um campo extra no banco para guardar quais tipos                                                                                                  
+<span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190">     190</a> </span>                :          * de grant_type o cliente esta autorizado a fazer                                                                                                                                                                                         
+<span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191">     191</a> </span>                :         */                                                                                                                                                                                                                                         
+<span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192">     192</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193">     193</a> </span><span class="lineNoCov">              0 :         return true;                                                                                                                                                                                                                               </span>
+<span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194">     194</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195">     195</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196">     196</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197">     197</a> </span>                :      * Grant refresh access tokens.                                                                                                                                                                                                                
+<span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198">     198</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199">     199</a> </span>                :      * Retrieve the stored data for the given refresh token.                                                                                                                                                                                       
+<span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200">     200</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201">     201</a> </span>                :      * Required for OAuth2::GRANT_TYPE_REFRESH_TOKEN.                                                                                                                                                                                              
+<span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202">     202</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203">     203</a> </span>                :      * @param $refresh_token                                                                                                                                                                                                                       
+<span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204">     204</a> </span>                :      * Refresh token to be check with.                                                                                                                                                                                                             
+<span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205">     205</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container206"><a name="206"></a><a href="#206" id="line206">     206</a> </span>                :      * @return                                                                                                                                                                                                                                     
+<span class="lineNum" id="container207"><a name="207"></a><a href="#207" id="line207">     207</a> </span>                :      * An associative array as below, and NULL if the refresh_token is                                                                                                                                                                             
+<span class="lineNum" id="container208"><a name="208"></a><a href="#208" id="line208">     208</a> </span>                :      * invalid:                                                                                                                                                                                                                                    
+<span class="lineNum" id="container209"><a name="209"></a><a href="#209" id="line209">     209</a> </span>                :      * - client_id: Stored client identifier.                                                                                                                                                                                                      
+<span class="lineNum" id="container210"><a name="210"></a><a href="#210" id="line210">     210</a> </span>                :      * - expires: Stored expiration unix timestamp.                                                                                                                                                                                                
+<span class="lineNum" id="container211"><a name="211"></a><a href="#211" id="line211">     211</a> </span>                :      * - scope: (optional) Stored scope values in space-separated string.                                                                                                                                                                          
+<span class="lineNum" id="container212"><a name="212"></a><a href="#212" id="line212">     212</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container213"><a name="213"></a><a href="#213" id="line213">     213</a> </span>                :      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-6                                                                                                                                                                            
+<span class="lineNum" id="container214"><a name="214"></a><a href="#214" id="line214">     214</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container215"><a name="215"></a><a href="#215" id="line215">     215</a> </span>                :      * @ingroup oauth2_section_6                                                                                                                                                                                                                   
+<span class="lineNum" id="container216"><a name="216"></a><a href="#216" id="line216">     216</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container217"><a name="217"></a><a href="#217" id="line217">     217</a> </span>                :     public function getRefreshToken($refresh_token) {                                                                                                                                                                                              
+<span class="lineNum" id="container218"><a name="218"></a><a href="#218" id="line218">     218</a> </span><span class="lineNoCov">              0 :         return $this-&gt;getToken($refresh_token, true);                                                                                                                                                                                              </span>
+<span class="lineNum" id="container219"><a name="219"></a><a href="#219" id="line219">     219</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container220"><a name="220"></a><a href="#220" id="line220">     220</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container221"><a name="221"></a><a href="#221" id="line221">     221</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container222"><a name="222"></a><a href="#222" id="line222">     222</a> </span>                :      * Expire a used refresh token.                                                                                                                                                                                                                
+<span class="lineNum" id="container223"><a name="223"></a><a href="#223" id="line223">     223</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container224"><a name="224"></a><a href="#224" id="line224">     224</a> </span>                :      * This is not explicitly required in the spec, but is almost implied.                                                                                                                                                                         
+<span class="lineNum" id="container225"><a name="225"></a><a href="#225" id="line225">     225</a> </span>                :      * After granting a new refresh token, the old one is no longer useful and                                                                                                                                                                     
+<span class="lineNum" id="container226"><a name="226"></a><a href="#226" id="line226">     226</a> </span>                :      * so should be forcibly expired in the data store so it can't be used again.                                                                                                                                                                  
+<span class="lineNum" id="container227"><a name="227"></a><a href="#227" id="line227">     227</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container228"><a name="228"></a><a href="#228" id="line228">     228</a> </span>                :      * If storage fails for some reason, we're not currently checking for                                                                                                                                                                          
+<span class="lineNum" id="container229"><a name="229"></a><a href="#229" id="line229">     229</a> </span>                :      * any sort of success/failure, so you should bail out of the script                                                                                                                                                                           
+<span class="lineNum" id="container230"><a name="230"></a><a href="#230" id="line230">     230</a> </span>                :      * and provide a descriptive fail message.                                                                                                                                                                                                     
+<span class="lineNum" id="container231"><a name="231"></a><a href="#231" id="line231">     231</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container232"><a name="232"></a><a href="#232" id="line232">     232</a> </span>                :      * @param $refresh_token                                                                                                                                                                                                                       
+<span class="lineNum" id="container233"><a name="233"></a><a href="#233" id="line233">     233</a> </span>                :      * Refresh token to be expirse.                                                                                                                                                                                                                
+<span class="lineNum" id="container234"><a name="234"></a><a href="#234" id="line234">     234</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container235"><a name="235"></a><a href="#235" id="line235">     235</a> </span>                :      * @ingroup oauth2_section_6                                                                                                                                                                                                                   
+<span class="lineNum" id="container236"><a name="236"></a><a href="#236" id="line236">     236</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container237"><a name="237"></a><a href="#237" id="line237">     237</a> </span>                :     public function unsetRefreshToken($refresh_token) {                                                                                                                                                                                            
+<span class="lineNum" id="container238"><a name="238"></a><a href="#238" id="line238">     238</a> </span><span class="lineCov">              2 :         Controller::delete(                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container239"><a name="239"></a><a href="#239" id="line239">     239</a> </span><span class="lineCov">              2 :             array('concept' =&gt; 'oauthRefreshToken'),                                                                                                                                                                                               </span>
+<span class="lineNum" id="container240"><a name="240"></a><a href="#240" id="line240">     240</a> </span><span class="lineCov">              2 :             false,                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container241"><a name="241"></a><a href="#241" id="line241">     241</a> </span><span class="lineCov">              2 :             array('filter' =&gt; array('=', 'refresh_token', $refresh_token ))                                                                                                                                                                        </span>
+<span class="lineNum" id="container242"><a name="242"></a><a href="#242" id="line242">     242</a> </span><span class="lineCov">              2 :         );                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container243"><a name="243"></a><a href="#243" id="line243">     243</a> </span><span class="lineCov">              2 :     }                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container244"><a name="244"></a><a href="#244" id="line244">     244</a> </span>                :     public function unsetAccessToken($refresh_token) {                                                                                                                                                                                             
+<span class="lineNum" id="container245"><a name="245"></a><a href="#245" id="line245">     245</a> </span><span class="lineCov">              2 :         Controller::delete(                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container246"><a name="246"></a><a href="#246" id="line246">     246</a> </span><span class="lineCov">              2 :             array('concept' =&gt; 'oauthToken'),                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container247"><a name="247"></a><a href="#247" id="line247">     247</a> </span><span class="lineCov">              2 :             false,                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container248"><a name="248"></a><a href="#248" id="line248">     248</a> </span><span class="lineCov">              2 :             array('filter' =&gt; array('=', 'oauth_token', $refresh_token ))                                                                                                                                                                          </span>
+<span class="lineNum" id="container249"><a name="249"></a><a href="#249" id="line249">     249</a> </span><span class="lineCov">              2 :         );                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container250"><a name="250"></a><a href="#250" id="line250">     250</a> </span><span class="lineCov">              2 :     }                                                                                                                                                                                                                                              </span>
+<span class="lineNum" id="container251"><a name="251"></a><a href="#251" id="line251">     251</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container252"><a name="252"></a><a href="#252" id="line252">     252</a> </span>                :     /**                                                                                                                                                                                                                                            
+<span class="lineNum" id="container253"><a name="253"></a><a href="#253" id="line253">     253</a> </span>                :      * Retrieves an access or refresh token.                                                                                                                                                                                                       
+<span class="lineNum" id="container254"><a name="254"></a><a href="#254" id="line254">     254</a> </span>                :      *                                                                                                                                                                                                                                             
+<span class="lineNum" id="container255"><a name="255"></a><a href="#255" id="line255">     255</a> </span>                :      * @param string $token                                                                                                                                                                                                                        
+<span class="lineNum" id="container256"><a name="256"></a><a href="#256" id="line256">     256</a> </span>                :      * @param bool $refresh                                                                                                                                                                                                                        
+<span class="lineNum" id="container257"><a name="257"></a><a href="#257" id="line257">     257</a> </span>                :      */                                                                                                                                                                                                                                            
+<span class="lineNum" id="container258"><a name="258"></a><a href="#258" id="line258">     258</a> </span>                :     protected function getToken($token, $isRefresh = true) {                                                                                                                                                                                       
+<span class="lineNum" id="container259"><a name="259"></a><a href="#259" id="line259">     259</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container260"><a name="260"></a><a href="#260" id="line260">     260</a> </span><span class="lineNoCov">              0 :         $tokenConcept = $isRefresh ? 'oauthRefreshToken' : 'oauthToken';                                                                                                                                                                           </span>
+<span class="lineNum" id="container261"><a name="261"></a><a href="#261" id="line261">     261</a> </span><span class="lineNoCov">              0 :         $filter =  $isRefresh ? 'refresh_token' : 'oauth_token';                                                                                                                                                                                   </span>
+<span class="lineNum" id="container262"><a name="262"></a><a href="#262" id="line262">     262</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container263"><a name="263"></a><a href="#263" id="line263">     263</a> </span><span class="lineNoCov">              0 :         $res = Controller::find(                                                                                                                                                                                                                   </span>
+<span class="lineNum" id="container264"><a name="264"></a><a href="#264" id="line264">     264</a> </span><span class="lineNoCov">              0 :             array('concept' =&gt; $tokenConcept),                                                                                                                                                                                                     </span>
+<span class="lineNum" id="container265"><a name="265"></a><a href="#265" id="line265">     265</a> </span><span class="lineNoCov">              0 :             false,                                                                                                                                                                                                                                 </span>
+<span class="lineNum" id="container266"><a name="266"></a><a href="#266" id="line266">     266</a> </span><span class="lineNoCov">              0 :             array('filter' =&gt; array('=' , $filter , $token))                                                                                                                                                                                       </span>
+<span class="lineNum" id="container267"><a name="267"></a><a href="#267" id="line267">     267</a> </span><span class="lineNoCov">              0 :         );                                                                                                                                                                                                                                         </span>
+<span class="lineNum" id="container268"><a name="268"></a><a href="#268" id="line268">     268</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container269"><a name="269"></a><a href="#269" id="line269">     269</a> </span>                :         /*return (!empty($res[0]))? $res[0] : false;*/                                                                                                                                                                                             
+<span class="lineNum" id="container270"><a name="270"></a><a href="#270" id="line270">     270</a> </span><span class="lineNoCov">              0 :         if(!empty($res[0])) {                                                                                                                                                                                                                      </span>
+<span class="lineNum" id="container271"><a name="271"></a><a href="#271" id="line271">     271</a> </span><span class="lineNoCov">              0 :             return $res[0];                                                                                                                                                                                                                        </span>
+<span class="lineNum" id="container272"><a name="272"></a><a href="#272" id="line272">     272</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container273"><a name="273"></a><a href="#273" id="line273">     273</a> </span>                :         else {                                                                                                                                                                                                                                     
+<span class="lineNum" id="container274"><a name="274"></a><a href="#274" id="line274">     274</a> </span><span class="lineNoCov">              0 :             return false;                                                                                                                                                                                                                          </span>
+<span class="lineNum" id="container275"><a name="275"></a><a href="#275" id="line275">     275</a> </span>                :         }                                                                                                                                                                                                                                          
+<span class="lineNum" id="container276"><a name="276"></a><a href="#276" id="line276">     276</a> </span>                :     }                                                                                                                                                                                                                                              
+<span class="lineNum" id="container277"><a name="277"></a><a href="#277" id="line277">     277</a> </span>                : }                                                                                                                                                                                                                                                  
+<span class="lineNum" id="container278"><a name="278"></a><a href="#278" id="line278">     278</a> </span>                :                                                                                                                                                                                                                                                    
+<span class="lineNum" id="container279"><a name="279"></a><a href="#279" id="line279">     279</a> </span>                :                                                                                                                                                                                                                                                    
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel127": {
+          "header": "2 tests cover line 127",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel128": {
+          "header": "2 tests cover line 128",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel129": {
+          "header": "2 tests cover line 129",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel130": {
+          "header": "2 tests cover line 130",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel131": {
+          "header": "2 tests cover line 131",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel132": {
+          "header": "2 tests cover line 132",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel134": {
+          "header": "2 tests cover line 134",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel135": {
+          "header": "2 tests cover line 135",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel157": {
+          "header": "2 tests cover line 157",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel158": {
+          "header": "2 tests cover line 158",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel159": {
+          "header": "2 tests cover line 159",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel160": {
+          "header": "2 tests cover line 160",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel161": {
+          "header": "2 tests cover line 161",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel162": {
+          "header": "2 tests cover line 162",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel163": {
+          "header": "2 tests cover line 163",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel165": {
+          "header": "2 tests cover line 165",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel167": {
+          "header": "2 tests cover line 167",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel238": {
+          "header": "2 tests cover line 238",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel239": {
+          "header": "2 tests cover line 239",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel240": {
+          "header": "2 tests cover line 240",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel241": {
+          "header": "2 tests cover line 241",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel242": {
+          "header": "2 tests cover line 242",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel243": {
+          "header": "2 tests cover line 243",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel245": {
+          "header": "2 tests cover line 245",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel246": {
+          "header": "2 tests cover line 246",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel247": {
+          "header": "2 tests cover line 247",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel248": {
+          "header": "2 tests cover line 248",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel249": {
+          "header": "2 tests cover line 249",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel250": {
+          "header": "2 tests cover line 250",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_mail.dashboard.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_mail.dashboard.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/rest_mail.dashboard.html	(revision 5888)
@@ -0,0 +1,120 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>mail</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <script src="jquery.min.js" type="text/javascript"></script>
+    <script src="highcharts.js" type="text/javascript"></script>
+    <script type="text/javascript">
+    $(document).ready(function() {
+          var classCoverageDistribution = new Highcharts.Chart({
+             chart: {
+                renderTo: 'classCoverageDistribution',
+                type: 'column'
+             },
+             title: {text: ''},
+             legend: {enabled: false},
+             credits: {enabled: false},
+             tooltip: {enabled: false},
+             xAxis: {
+                 labels: {style: {fontSize: '8px'}},
+                 categories: [
+                 '0%','0-10%','10-20%','20-30%','30-40%','40-50%','50-60%','60-70%','70-80%','80-90%','90-100%','100%'
+                 ]
+            },
+            yAxis: {
+                title: '',
+                labels: {style: {fontSize: '8px'}},
+            },
+            series: [{
+                data: [1,0,0,0,0,0,0,0,0,0,0,0]
+            }],
+          });
+
+        var classComplexity = new Highcharts.Chart({
+            chart: {
+              renderTo: 'classComplexity',
+              type: 'scatter'
+            },
+            title: {text: ''},
+            legend: {enabled: false},
+            credits: {enabled: false},
+            xAxis: {
+               labels: {enabled: false},
+            },
+            yAxis: {
+              title: '',
+              labels: {enabled: false},
+            },
+            tooltip: {
+                formatter: function() {
+                    return this.point.config[2];
+                }
+            },
+            series: [{
+              data: [[0,16,"<a href=\"rest_mail_MailLastResource.php.html#3\">MailLastResource<\/a>"]],
+              marker: {
+                  symbol: 'diamond'
+              }
+            }],
+        });
+    });
+    </script>
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">mail</td></tr>
+      <tr><td><div align="center"><p><a href="rest_mail.html">Back to Code Coverage report</a></p></div></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td valign="top">
+            <h2>Class Coverage Distribution</h2>
+            <div id="classCoverageDistribution"></div>
+          </td>
+
+          <td valign="top">
+            <h2>Class Complexity</h2>
+            <div id="classComplexity"></div>
+          </td>
+        </tr>
+        <tr>
+          <td valign="top">
+            <h2>Top Project Risks</h2>
+            <ul>
+              <li><a href="rest_mail_MailLastResource.php.html#3">MailLastResource</a> (272)</li>
+
+            </ul>
+          </td>
+
+          <td valign="top">
+            <h2>Least Tested Methods</h2>
+            <ul>
+              <li><a href="rest_mail_MailLastResource.php.html#90">MailLastResource::formatMailObject</a> (0%)</li>
+              <li><a href="rest_mail_MailLastResource.php.html#74">MailLastResource::decodeMimeString</a> (0%)</li>
+              <li><a href="rest_mail_MailLastResource.php.html#58">MailLastResource::decodeMimeStringCallback</a> (0%)</li>
+              <li><a href="rest_mail_MailLastResource.php.html#15">MailLastResource::get</a> (0%)</li>
+
+            </ul>
+          </td>
+        </tr>
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 14:52:11 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/container.css
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/container.css	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/container.css	(revision 5888)
@@ -0,0 +1,324 @@
+/*
+Copyright (c) 2011, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.9.0
+*/
+.yui-overlay,
+.yui-panel-container {
+    visibility:hidden;
+    position:absolute;
+    z-index: 2;
+}
+
+.yui-tt {
+    visibility:hidden;
+    position:absolute;
+    color:#333;
+    background-color:#FDFFB4;
+    font-family:arial,helvetica,verdana,sans-serif;
+    padding:2px;
+    border:1px solid #FCC90D;
+    font:100% sans-serif;
+    width:auto;
+}
+
+/*
+    PLEASE NOTE: The <DIV> element used for a Tooltip's shadow is appended
+    to its root element via JavaScript once it has been rendered.  The
+    code that creates the shadow lives in the Tooltip's public "onRender"
+    event handler that is a prototype method of YAHOO.widget.Tooltip.
+    Implementers wishing to remove a Tooltip's shadow or add any other markup
+    required for a given skin for Tooltip should override the "onRender" method.
+*/
+
+.yui-tt-shadow {
+    display: none;
+}
+
+* html body.masked select {
+    visibility:hidden;
+}
+
+* html div.yui-panel-container select {
+    visibility:inherit;
+}
+
+* html div.drag select {
+    visibility:hidden;
+}
+
+* html div.hide-select select {
+    visibility:hidden;
+}
+
+.mask {
+    z-index: 1;
+    display:none;
+    position:absolute;
+    top:0;
+    left:0;
+    -moz-opacity: 0.5;
+    opacity:.50;
+    filter: alpha(opacity=50);
+    background-color:#CCC;
+}
+
+/*
+
+There are two known issues with YAHOO.widget.Overlay (and its subclasses) that
+manifest in Gecko-based browsers on Mac OS X:
+
+    1) Elements with scrollbars will poke through Overlay instances floating
+       above them.
+
+    2) An Overlay's scrollbars and the scrollbars of its child nodes remain
+       visible when the Overlay is hidden.
+
+To fix these bugs:
+
+    1) The "overflow" property of an Overlay instance's root element and child
+       nodes is toggled between "hidden" and "auto" (through the application
+       and removal of the "hide-scrollbars" and "show-scrollbars" CSS classes)
+       as its "visibility" configuration property is toggled between
+       "false" and "true."
+
+    2) The "display" property of <SELECT> elements that are child nodes of the
+       Overlay instance's root element is set to "none" when it is hidden.
+
+PLEASE NOTE:
+
+    1) The "hide-scrollbars" and "show-scrollbars" CSS classes classes are
+       applied only for Gecko on Mac OS X and are added/removed to/from the
+       Overlay's root HTML element (DIV) via the "hideMacGeckoScrollbars" and
+       "showMacGeckoScrollbars" methods of YAHOO.widget.Overlay.
+
+    2) There may be instances where the CSS for a web page or application
+       contains style rules whose specificity override the rules implemented by
+       the Container CSS files to fix this bug.  In such cases, is necessary to
+       leverage the provided "hide-scrollbars" and "show-scrollbars" classes to
+       write custom style rules to guard against this bug.
+
+** For more information on this issue, see:
+   + https://bugzilla.mozilla.org/show_bug.cgi?id=187435
+   + YUILibrary bug #1723530
+
+*/
+
+.hide-scrollbars,
+.hide-scrollbars * {
+
+    overflow: hidden;
+
+}
+
+.hide-scrollbars select {
+
+    display: none;
+
+}
+
+.show-scrollbars {
+
+    overflow: auto;
+
+}
+
+.yui-panel-container.show-scrollbars {
+
+    overflow: visible;
+
+}
+
+.yui-panel-container.show-scrollbars .underlay {
+
+    overflow: auto;
+
+}
+
+.yui-panel-container.focused {
+
+}
+
+
+/* Panel underlay styles */
+
+.yui-panel-container .underlay {
+
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+
+}
+
+.yui-panel-container.matte {
+
+    padding: 3px;
+    background-color: #fff;
+
+}
+
+.yui-panel-container.shadow .underlay {
+
+    top: 3px;
+    bottom: -3px;
+    right: -3px;
+    left: 3px;
+    background-color: #000;
+    opacity: .12;
+    filter: alpha(opacity=12);  /* For IE */
+
+}
+
+/*
+   Workaround for Safari 2.x - the yui-force-redraw class is applied, and then removed when
+   the Panel's content changes, to force Safari 2.x to redraw the underlay.
+   We attempt to choose a CSS property which has no visual impact when added,
+   removed, but still causes Safari to redraw
+*/
+.yui-panel-container.shadow .underlay.yui-force-redraw {
+    padding-bottom: 1px;
+}
+
+.yui-effect-fade .underlay {
+    display:none;
+}
+
+.yui-panel {
+    visibility:hidden;
+    border-collapse:separate;
+    position:relative;
+    left:0;
+    top:0;
+    font:1em Arial;
+    background-color:#FFF;
+    border:1px solid #000;
+    z-index:1;
+    overflow:hidden;
+}
+
+.yui-panel .hd {
+    background-color:#3d77cb;
+    color:#FFF;
+    font-size:100%;
+    line-height:100%;
+    border:1px solid #FFF;
+    border-bottom:1px solid #000;
+    font-weight:bold;
+    padding:4px;
+    white-space:nowrap;
+}
+
+.yui-panel .bd {
+    overflow:hidden;
+    padding:4px;
+}
+
+.yui-panel .bd p {
+    margin:0 0 1em;
+}
+
+.yui-panel .container-close {
+    position:absolute;
+    top:5px;
+    right:4px;
+    z-index:6;
+    height:12px;
+    width:12px;
+    margin:0px;
+    padding:0px;
+    background:url(close12_1.gif) no-repeat;
+    cursor:pointer;
+    visibility:inherit;
+    text-indent:-10000em;
+    overflow:hidden;
+    text-decoration:none;
+}
+
+.yui-panel .ft {
+    padding:4px;
+    overflow:hidden;
+}
+
+.yui-simple-dialog .bd .yui-icon {
+    background-repeat:no-repeat;
+    width:16px;
+    height:16px;
+    margin-right:10px;
+    float:left;
+}
+
+.yui-simple-dialog .bd span.blckicon {
+    background: url("blck16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.alrticon {
+    background: url("alrt16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.hlpicon {
+    background: url("hlp16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.infoicon {
+    background: url("info16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.warnicon {
+    background: url("warn16_1.gif") no-repeat;
+}
+
+.yui-simple-dialog .bd span.tipicon {
+    background: url("tip16_1.gif") no-repeat;
+}
+
+.yui-dialog .ft,
+.yui-simple-dialog .ft {
+    padding-bottom:5px;
+    padding-right:5px;
+    text-align:right;
+}
+
+.yui-dialog form,
+.yui-simple-dialog form {
+    margin:0;
+}
+
+.button-group button {
+    font:100 76% verdana;
+    text-decoration:none;
+    background-color: #E4E4E4;
+    color: #333;
+    cursor: hand;
+    vertical-align: middle;
+    border: 2px solid #797979;
+    border-top-color:#FFF;
+    border-left-color:#FFF;
+    margin:2px;
+    padding:2px;
+}
+
+.button-group button.default {
+    font-weight:bold;
+}
+
+.button-group button:hover,
+.button-group button.hover {
+    border:2px solid #90A029;
+    background-color:#EBF09E;
+    border-top-color:#FFF;
+    border-left-color:#FFF;
+}
+
+.button-group button:active {
+    border:2px solid #E4E4E4;
+    background-color:#BBB;
+    border-top-color:#333;
+    border-left-color:#333;
+}
+
+.yui-override-padding {
+    padding:0 !important;
+}
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/index.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/index.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/index.html	(revision 5888)
@@ -0,0 +1,196 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title></title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title"></td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a> (<a href="index.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="35.01%">
+              <div class="size butter"  style="width:35.005701254276%" title="35.01%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">35.01%</td>
+          <td class="coverNumMed">307 / 877</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="20.51%">
+                <div class="size scarlet_red"  style="width:20.512820512821%" title="20.51%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">20.51%</td>
+          <td class="coverNumLo">24 / 117</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 9</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="api.html">api</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="53.12%">
+              <div class="size butter"  style="width:53.116531165312%" title="53.12%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">53.12%</td>
+          <td class="coverNumMed">196 / 369</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="26.92%">
+                <div class="size scarlet_red"  style="width:26.923076923077%" title="26.92%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">26.92%</td>
+          <td class="coverNumLo">14 / 52</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="library.html">library</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+              <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 296</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="rest.html">rest</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.88%">
+              <div class="size butter"  style="width:50.877192982456%" title="50.88%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.88%</td>
+          <td class="coverNumMed">29 / 57</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="36.36%">
+                <div class="size butter"  style="width:36.363636363636%" title="36.36%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">36.36%</td>
+          <td class="coverNumMed">4 / 11</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="services.html">services</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="52.90%">
+              <div class="size butter"  style="width:52.903225806452%" title="52.90%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">52.90%</td>
+          <td class="coverNumMed">82 / 155</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="25.00%">
+                <div class="size scarlet_red"  style="width:25%" title="25.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">25.00%</td>
+          <td class="coverNumLo">6 / 24</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic_lib_tonic.php.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic_lib_tonic.php.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/library_tonic_lib_tonic.php.html	(revision 5888)
@@ -0,0 +1,1806 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>tonic.php</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+    <link rel="stylesheet" type="text/css" href="container.css">
+    <script type="text/javascript" src="yahoo-dom-event.js"></script>
+    <script type="text/javascript" src="container-min.js"></script>
+  </head>
+
+  <body class="yui-skin-sam">
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">tonic.php</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current file:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="library.html">library</a>/<a href="library_tonic.html">tonic</a>/<a href="library_tonic_lib.html">lib</a>/<a href="library_tonic_lib_tonic.php.html">tonic.php</a></td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="legendCov">executed</span>
+                <span class="legendNoCov">not executed</span>
+                <span class="legendDeadCode">dead code</span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="10">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Classes</td>
+          <td class="tableHead" colspan="4">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Lines</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 16</td>
+          <td class="crap"><acronym title="Change Risk Anti-Patterns (CRAP) Index">CRAP</acronym></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="22.38%">
+                <div class="size scarlet_red"  style="width:22.377622377622%" title="22.38%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">22.38%</td>
+          <td class="coverNumLo">64 / 286</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">Request</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="12.50%">
+                <div class="size scarlet_red"  style="width:12.5%" title="12.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">12.50%</td>
+          <td class="coverNumLo">1 / 8</td>
+          <td class="crap">3838.43</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="28.44%">
+                <div class="size scarlet_red"  style="width:28.444444444444%" title="28.44%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">28.44%</td>
+          <td class="coverNumLo">64 / 225</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#155">getConfig($config, $configVar, $serverVar = NULL, $default = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">5.02</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="60.00%">
+                  <div class="size butter"  style="width:60%" title="60.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerMed">60.00%</td>
+          <td class="coverNumMed">3 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#189">__construct($config = array()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">480.41</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="43.57%">
+                  <div class="size butter"  style="width:43.571428571429%" title="43.57%"></div>
+              </div>
+          </td>
+          <td class="coverPerMed">43.57%</td>
+          <td class="coverNumMed">61 / 140</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#379">getResourceClassDetails($className)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">30</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 22</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#423">__toString()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">19</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">0 / 0</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#487">loadResource()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">240</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 47</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#559">ifMatch($etag)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#571">ifNoneMatch($etag)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#584">mostAcceptable($formats, $default = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">Resource</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="25.00%">
+                <div class="size scarlet_red"  style="width:25%" title="25.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">25.00%</td>
+          <td class="coverNumLo">1 / 4</td>
+          <td class="crap">210</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 35</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#607">__construct($parameters)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#616">__toString()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">0 / 0</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#624">secured()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 6</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#644">exec($request)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">90</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 27</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">Response</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="28.57%">
+                <div class="size scarlet_red"  style="width:28.571428571429%" title="28.57%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">28.57%</td>
+          <td class="coverNumLo">2 / 7</td>
+          <td class="crap">272</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 22</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#752">__construct($request, $uri = NULL)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">12</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 8</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#770">__toString()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">0 / 0</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#783">addHeader($header, $value)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#791">addCacheHeader($time = 86400)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#803">addEtag($etag)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 2</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#807">addVary($header)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">6</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 5</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#819">output()</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="crap">5</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                  <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">0 / 0</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory">ResponseException</td>
+          <td class="coverBar">
+             <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+             </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile" colspan="4">&nbsp;<a href="#848">response($request)</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="0.00%">
+                <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+          <td class="crap">2</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                  <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 4</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table cellpadding="0" cellspacing="0" border="0">
+      <tr>
+        <td><br /></td>
+      </tr>
+      <tr>
+        <td>
+<pre class="source">
+<span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1">       1</a> </span>                : &lt;?php                                                                                                                                   
+<span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2">       2</a> </span>                : /*                                                                                                                                      
+<span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3">       3</a> </span>                :  * This file is part of the Tonic.                                                                                                      
+<span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4">       4</a> </span>                :  * (c) Paul James &lt;paul@peej.co.uk&gt;                                                                                                     
+<span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5">       5</a> </span>                :  *                                                                                                                                      
+<span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6">       6</a> </span>                :  * For the full copyright and license information, please view the LICENSE                                                              
+<span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7">       7</a> </span>                :  * file that was distributed with this source code.                                                                                     
+<span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8">       8</a> </span>                :  */                                                                                                                                     
+<span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9">       9</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10">      10</a> </span>                : /* Turn on namespace in PHP5.3 if you have namespace collisions from the Tonic classnames                                               
+<span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11">      11</a> </span>                : namespace Tonic;                                                                                                                        
+<span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12">      12</a> </span>                : use \ReflectionClass as ReflectionClass;                                                                                                
+<span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13">      13</a> </span>                : use \ReflectionMethod as ReflectionMethod;                                                                                              
+<span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14">      14</a> </span>                : use \Exception as Exception;                                                                                                            
+<span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15">      15</a> </span>                : //*/                                                                                                                                    
+<span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16">      16</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17">      17</a> </span>                : /**                                                                                                                                     
+<span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18">      18</a> </span>                :  * Model the data of the incoming HTTP request                                                                                          
+<span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19">      19</a> </span>                :  * @namespace Tonic\Lib                                                                                                                 
+<span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20">      20</a> </span>                :  */                                                                                                                                     
+<span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21">      21</a> </span>                : class Request {                                                                                                                         
+<span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22">      22</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23">      23</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24">      24</a> </span>                :      * The requested URI                                                                                                                
+<span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25">      25</a> </span>                :      * @var str                                                                                                                         
+<span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26">      26</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27">      27</a> </span>                :     public $uri;                                                                                                                        
+<span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28">      28</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29">      29</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30">      30</a> </span>                :      * The URI where the front controller is positioned in the server URI-space                                                         
+<span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31">      31</a> </span>                :      * @var str                                                                                                                         
+<span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32">      32</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33">      33</a> </span>                :     public $baseUri = '';                                                                                                               
+<span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34">      34</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35">      35</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36">      36</a> </span>                :      * Array of possible URIs based upon accept and accept-language request headers in order of preference                              
+<span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37">      37</a> </span>                :      * @var str[]                                                                                                                       
+<span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38">      38</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39">      39</a> </span>                :     public $negotiatedUris = array();                                                                                                   
+<span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40">      40</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41">      41</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42">      42</a> </span>                :      * Array of possible URIs based upon accept request headers in order of preference                                                  
+<span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43">      43</a> </span>                :      * @var str[]                                                                                                                       
+<span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44">      44</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45">      45</a> </span>                :     public $formatNegotiatedUris = array();                                                                                             
+<span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46">      46</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47">      47</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48">      48</a> </span>                :      * Array of possible URIs based upon accept-language request headers in order of preference                                         
+<span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49">      49</a> </span>                :      * @var str[]                                                                                                                       
+<span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50">      50</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51">      51</a> </span>                :     public $languageNegotiatedUris = array();                                                                                           
+<span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52">      52</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53">      53</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54">      54</a> </span>                :      * Array of accept headers in order of preference                                                                                   
+<span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55">      55</a> </span>                :      * @var str[][]                                                                                                                     
+<span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56">      56</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57">      57</a> </span>                :     public $accept = array();                                                                                                           
+<span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58">      58</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59">      59</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60">      60</a> </span>                :      * Array of accept-language headers in order of preference                                                                          
+<span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61">      61</a> </span>                :      * @var str[][]                                                                                                                     
+<span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62">      62</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63">      63</a> </span>                :     public $acceptLang = array();                                                                                                       
+<span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64">      64</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65">      65</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66">      66</a> </span>                :      * Array of accept-encoding headers in order of preference                                                                          
+<span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67">      67</a> </span>                :      * @var str[]                                                                                                                       
+<span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68">      68</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69">      69</a> </span>                :     public $acceptEncoding = array();                                                                                                   
+<span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70">      70</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71">      71</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72">      72</a> </span>                :      * Map of file/URI extensions to mimetypes                                                                                          
+<span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73">      73</a> </span>                :      * @var str[]                                                                                                                       
+<span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74">      74</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75">      75</a> </span>                :     public $mimetypes = array(                                                                                                          
+<span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76">      76</a> </span>                :         'html' =&gt; 'text/html',                                                                                                          
+<span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77">      77</a> </span>                :         'txt' =&gt; 'text/plain',                                                                                                          
+<span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78">      78</a> </span>                :         'php' =&gt; 'application/php',                                                                                                     
+<span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79">      79</a> </span>                :         'css' =&gt; 'text/css',                                                                                                            
+<span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80">      80</a> </span>                :         'js' =&gt; 'application/javascript',                                                                                               
+<span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81">      81</a> </span>                :         'json' =&gt; 'application/json',                                                                                                   
+<span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82">      82</a> </span>                :         'xml' =&gt; 'application/xml',                                                                                                     
+<span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83">      83</a> </span>                :         'rss' =&gt; 'application/rss+xml',                                                                                                 
+<span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84">      84</a> </span>                :         'atom' =&gt; 'application/atom+xml',                                                                                               
+<span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85">      85</a> </span>                :         'gz' =&gt; 'application/x-gzip',                                                                                                   
+<span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86">      86</a> </span>                :         'tar' =&gt; 'application/x-tar',                                                                                                   
+<span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87">      87</a> </span>                :         'zip' =&gt; 'application/zip',                                                                                                     
+<span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88">      88</a> </span>                :         'gif' =&gt; 'image/gif',                                                                                                           
+<span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89">      89</a> </span>                :         'png' =&gt; 'image/png',                                                                                                           
+<span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90">      90</a> </span>                :         'jpg' =&gt; 'image/jpeg',                                                                                                          
+<span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91">      91</a> </span>                :         'ico' =&gt; 'image/x-icon',                                                                                                        
+<span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92">      92</a> </span>                :         'swf' =&gt; 'application/x-shockwave-flash',                                                                                       
+<span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93">      93</a> </span>                :         'flv' =&gt; 'video/x-flv',                                                                                                         
+<span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94">      94</a> </span>                :         'avi' =&gt; 'video/mpeg',                                                                                                          
+<span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95">      95</a> </span>                :         'mpeg' =&gt; 'video/mpeg',                                                                                                         
+<span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96">      96</a> </span>                :         'mpg' =&gt; 'video/mpeg',                                                                                                          
+<span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97">      97</a> </span>                :         'mov' =&gt; 'video/quicktime',                                                                                                     
+<span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98">      98</a> </span>                :         'mp3' =&gt; 'audio/mpeg'                                                                                                           
+<span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99">      99</a> </span>                :     );                                                                                                                                  
+<span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100">     100</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101">     101</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102">     102</a> </span>                :      * Supported HTTP methods                                                                                                           
+<span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103">     103</a> </span>                :      * @var str[]                                                                                                                       
+<span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104">     104</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105">     105</a> </span>                :     public $HTTPMethods = array(                                                                                                        
+<span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106">     106</a> </span>                :         'GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS'                                                                               
+<span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107">     107</a> </span>                :     );                                                                                                                                  
+<span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108">     108</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109">     109</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110">     110</a> </span>                :      * Allowed resource methods                                                                                                         
+<span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111">     111</a> </span>                :      * @var str[]                                                                                                                       
+<span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112">     112</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113">     113</a> </span>                :     public $allowedMethods = array();                                                                                                   
+<span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114">     114</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115">     115</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116">     116</a> </span>                :      * HTTP request method of incoming request                                                                                          
+<span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117">     117</a> </span>                :      * @var str                                                                                                                         
+<span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118">     118</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119">     119</a> </span>                :     public $method = 'GET';                                                                                                             
+<span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120">     120</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121">     121</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122">     122</a> </span>                :      * Body data of incoming request                                                                                                    
+<span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123">     123</a> </span>                :      * @var str                                                                                                                         
+<span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124">     124</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125">     125</a> </span>                :     public $data;                                                                                                                       
+<span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126">     126</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127">     127</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128">     128</a> </span>                :      * Array of if-match etags                                                                                                          
+<span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129">     129</a> </span>                :      * @var str[]                                                                                                                       
+<span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130">     130</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131">     131</a> </span>                :     public $ifMatch = array();                                                                                                          
+<span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132">     132</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133">     133</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134">     134</a> </span>                :      * Array of if-none-match etags                                                                                                     
+<span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135">     135</a> </span>                :      * @var str[]                                                                                                                       
+<span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136">     136</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container137"><a name="137"></a><a href="#137" id="line137">     137</a> </span>                :     public $ifNoneMatch = array();                                                                                                      
+<span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138">     138</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139">     139</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140">     140</a> </span>                :      * The resource classes loaded and how they are wired to URIs                                                                       
+<span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141">     141</a> </span>                :      * @var str[]                                                                                                                       
+<span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142">     142</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143">     143</a> </span>                :     public $resources = array();                                                                                                        
+<span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144">     144</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145">     145</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146">     146</a> </span>                :      * A list of URL to namespace/package mappings for routing requests to a                                                            
+<span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147">     147</a> </span>                :      * group of resources that are wired into a different URL-space                                                                     
+<span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148">     148</a> </span>                :      * @var str[]                                                                                                                       
+<span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149">     149</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150">     150</a> </span>                :     public $mounts = array();                                                                                                           
+<span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151">     151</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152">     152</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153">     153</a> </span>                :      * Set a default configuration option                                                                                               
+<span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154">     154</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155">     155</a> </span>                :     protected function getConfig($config, $configVar, $serverVar = NULL, $default = NULL) {                                             
+<span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156">     156</a> </span><span class="lineCov">              2 :         if (isset($config[$configVar])) {                                                                                               </span>
+<span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157">     157</a> </span><span class="lineNoCov">              0 :             return $config[$configVar];                                                                                                 </span>
+<span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158">     158</a> </span><span class="lineCov">              2 :         } elseif (isset($_SERVER[$serverVar]) &amp;&amp; $_SERVER[$serverVar] != '') {                                                          </span>
+<span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159">     159</a> </span><span class="lineNoCov">              0 :             return $_SERVER[$serverVar];                                                                                                </span>
+<span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160">     160</a> </span>                :         } else {                                                                                                                        
+<span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161">     161</a> </span><span class="lineCov">              2 :             return $default;                                                                                                            </span>
+<span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162">     162</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163">     163</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164">     164</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165">     165</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166">     166</a> </span>                :      * Create a request object using the given configuration options.                                                                   
+<span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167">     167</a> </span>                :      *                                                                                                                                  
+<span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168">     168</a> </span>                :      * The configuration options array can contain the following:                                                                       
+<span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169">     169</a> </span>                :      *                                                                                                                                  
+<span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170">     170</a> </span>                :      * &lt;dl&gt;                                                                                                                             
+<span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171">     171</a> </span>                :      * &lt;dt&gt;uri&lt;/dt&gt; &lt;dd&gt;The URI of the request&lt;/dd&gt;                                                                                     
+<span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172">     172</a> </span>                :      * &lt;dt&gt;method&lt;/dt&gt; &lt;dd&gt;The HTTP method of the request&lt;/dd&gt;                                                                          
+<span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173">     173</a> </span>                :      * &lt;dt&gt;data&lt;/dt&gt; &lt;dd&gt;The body data of the request&lt;/dd&gt;                                                                              
+<span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174">     174</a> </span>                :      * &lt;dt&gt;accept&lt;/dt&gt; &lt;dd&gt;An accept header&lt;/dd&gt;                                                                                        
+<span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175">     175</a> </span>                :      * &lt;dt&gt;acceptLang&lt;/dt&gt; &lt;dd&gt;An accept-language header&lt;/dd&gt;                                                                           
+<span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176">     176</a> </span>                :      * &lt;dt&gt;acceptEncoding&lt;/dt&gt; &lt;dd&gt;An accept-encoding header&lt;/dd&gt;                                                                       
+<span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177">     177</a> </span>                :      * &lt;dt&gt;ifMatch&lt;/dt&gt; &lt;dd&gt;An if-match header&lt;/dd&gt;                                                                                     
+<span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178">     178</a> </span>                :      * &lt;dt&gt;ifNoneMatch&lt;/dt&gt; &lt;dd&gt;An if-none-match header&lt;/dd&gt;                                                                            
+<span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179">     179</a> </span>                :      * &lt;dt&gt;mimetypes&lt;/dt&gt; &lt;dd&gt;A map of file/URI extenstions to mimetypes, these                                                         
+<span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180">     180</a> </span>                :      * will be added to the default map of mimetypes&lt;/dd&gt;                                                                               
+<span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181">     181</a> </span>                :      * &lt;dt&gt;baseUri&lt;/dt&gt; &lt;dd&gt;The base relative URI to use when dispatcher isn't                                                          
+<span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182">     182</a> </span>                :      * at the root of the domain. Do not put a trailing slash&lt;/dd&gt;                                                                      
+<span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183">     183</a> </span>                :      * &lt;dt&gt;mounts&lt;/dt&gt; &lt;dd&gt;an array of namespace to baseUri prefix mappings&lt;/dd&gt;                                                        
+<span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184">     184</a> </span>                :      * &lt;dt&gt;HTTPMethods&lt;/dt&gt; &lt;dd&gt;an array of HTTP methods to support&lt;/dd&gt;                                                                
+<span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185">     185</a> </span>                :      * &lt;/dl&gt;                                                                                                                            
+<span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186">     186</a> </span>                :      *                                                                                                                                  
+<span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187">     187</a> </span>                :      * @param mixed[] config Configuration options                                                                                      
+<span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188">     188</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189">     189</a> </span>                :     function __construct($config = array()) {                                                                                           
+<span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190">     190</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191">     191</a> </span>                :         // set defaults                                                                                                                 
+<span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192">     192</a> </span><span class="lineCov">              2 :         $config['uri'] = parse_url($this-&gt;getConfig($config, 'uri', 'REQUEST_URI'), PHP_URL_PATH);                                      </span>
+<span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193">     193</a> </span><span class="lineCov">              2 :         $config['baseUri'] = $this-&gt;getConfig($config, 'baseUri', '');                                                                  </span>
+<span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194">     194</a> </span><span class="lineCov">              2 :         $config['accept'] = $this-&gt;getConfig($config, 'accept', 'HTTP_ACCEPT');                                                         </span>
+<span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195">     195</a> </span><span class="lineCov">              2 :         $config['acceptLang'] = $this-&gt;getConfig($config, 'acceptLang', 'HTTP_ACCEPT_LANGUAGE');                                        </span>
+<span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196">     196</a> </span><span class="lineCov">              2 :         $config['acceptEncoding'] = $this-&gt;getConfig($config, 'acceptEncoding', 'HTTP_ACCEPT_ENCODING');                                </span>
+<span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197">     197</a> </span><span class="lineCov">              2 :         $config['ifMatch'] = $this-&gt;getConfig($config, 'ifMatch', 'HTTP_IF_MATCH');                                                     </span>
+<span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198">     198</a> </span><span class="lineCov">              2 :         $config['ifNoneMatch'] = $this-&gt;getConfig($config, 'ifNoneMatch', 'HTTP_IF_NONE_MATCH');                                        </span>
+<span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199">     199</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200">     200</a> </span><span class="lineCov">              2 :         if (isset($config['mimetypes']) &amp;&amp; is_array($config['mimetypes'])) {                                                            </span>
+<span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201">     201</a> </span><span class="lineNoCov">              0 :             foreach ($config['mimetypes'] as $ext =&gt; $mimetype) {                                                                       </span>
+<span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202">     202</a> </span><span class="lineNoCov">              0 :                 $this-&gt;mimetypes[$ext] = $mimetype;                                                                                     </span>
+<span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203">     203</a> </span><span class="lineNoCov">              0 :             }                                                                                                                           </span>
+<span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204">     204</a> </span><span class="lineNoCov">              0 :         }                                                                                                                               </span>
+<span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205">     205</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container206"><a name="206"></a><a href="#206" id="line206">     206</a> </span>                :         // set baseUri                                                                                                                  
+<span class="lineNum" id="container207"><a name="207"></a><a href="#207" id="line207">     207</a> </span><span class="lineCov">              2 :         $this-&gt;baseUri = $config['baseUri'];                                                                                            </span>
+<span class="lineNum" id="container208"><a name="208"></a><a href="#208" id="line208">     208</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container209"><a name="209"></a><a href="#209" id="line209">     209</a> </span>                :         // get request URI                                                                                                              
+<span class="lineNum" id="container210"><a name="210"></a><a href="#210" id="line210">     210</a> </span><span class="lineCov">              2 :         $parts = explode('/', $config['uri']);                                                                                          </span>
+<span class="lineNum" id="container211"><a name="211"></a><a href="#211" id="line211">     211</a> </span><span class="lineCov">              2 :         $lastPart = array_pop($parts);                                                                                                  </span>
+<span class="lineNum" id="container212"><a name="212"></a><a href="#212" id="line212">     212</a> </span><span class="lineCov">              2 :         $this-&gt;uri = join('/', $parts);                                                                                                 </span>
+<span class="lineNum" id="container213"><a name="213"></a><a href="#213" id="line213">     213</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container214"><a name="214"></a><a href="#214" id="line214">     214</a> </span><span class="lineCov">              2 :         $parts = explode('.', $lastPart);                                                                                               </span>
+<span class="lineNum" id="container215"><a name="215"></a><a href="#215" id="line215">     215</a> </span><span class="lineCov">              2 :         $this-&gt;uri .= '/'.$parts[0];                                                                                                    </span>
+<span class="lineNum" id="container216"><a name="216"></a><a href="#216" id="line216">     216</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container217"><a name="217"></a><a href="#217" id="line217">     217</a> </span><span class="lineCov">              2 :         if ($this-&gt;uri != '/' &amp;&amp; substr($this-&gt;uri, -1, 1) == '/') { // remove trailing slash problem                                   </span>
+<span class="lineNum" id="container218"><a name="218"></a><a href="#218" id="line218">     218</a> </span><span class="lineNoCov">              0 :             $this-&gt;uri = substr($this-&gt;uri, 0, -1);                                                                                     </span>
+<span class="lineNum" id="container219"><a name="219"></a><a href="#219" id="line219">     219</a> </span><span class="lineNoCov">              0 :         }                                                                                                                               </span>
+<span class="lineNum" id="container220"><a name="220"></a><a href="#220" id="line220">     220</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container221"><a name="221"></a><a href="#221" id="line221">     221</a> </span><span class="lineCov">              2 :         array_shift($parts);                                                                                                            </span>
+<span class="lineNum" id="container222"><a name="222"></a><a href="#222" id="line222">     222</a> </span><span class="lineCov">              2 :         foreach ($parts as $part) {                                                                                                     </span>
+<span class="lineNum" id="container223"><a name="223"></a><a href="#223" id="line223">     223</a> </span><span class="lineNoCov">              0 :             $this-&gt;accept[10][] = $part;                                                                                                </span>
+<span class="lineNum" id="container224"><a name="224"></a><a href="#224" id="line224">     224</a> </span><span class="lineNoCov">              0 :             $this-&gt;acceptLang[10][] = $part;                                                                                            </span>
+<span class="lineNum" id="container225"><a name="225"></a><a href="#225" id="line225">     225</a> </span><span class="lineCov">              2 :         }                                                                                                                               </span>
+<span class="lineNum" id="container226"><a name="226"></a><a href="#226" id="line226">     226</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container227"><a name="227"></a><a href="#227" id="line227">     227</a> </span>                :         // sort accept headers                                                                                                          
+<span class="lineNum" id="container228"><a name="228"></a><a href="#228" id="line228">     228</a> </span><span class="lineCov">              2 :         $accept = explode(',', strtolower($config['accept']));                                                                          </span>
+<span class="lineNum" id="container229"><a name="229"></a><a href="#229" id="line229">     229</a> </span><span class="lineCov">              2 :         foreach ($accept as $mimetype) {                                                                                                </span>
+<span class="lineNum" id="container230"><a name="230"></a><a href="#230" id="line230">     230</a> </span><span class="lineCov">              2 :             $parts = explode(';q=', $mimetype);                                                                                         </span>
+<span class="lineNum" id="container231"><a name="231"></a><a href="#231" id="line231">     231</a> </span><span class="lineCov">              2 :             if (isset($parts) &amp;&amp; isset($parts[1]) &amp;&amp; $parts[1]) {                                                                       </span>
+<span class="lineNum" id="container232"><a name="232"></a><a href="#232" id="line232">     232</a> </span><span class="lineNoCov">              0 :                 $num = $parts[1] * 10;                                                                                                  </span>
+<span class="lineNum" id="container233"><a name="233"></a><a href="#233" id="line233">     233</a> </span><span class="lineNoCov">              0 :             } else {                                                                                                                    </span>
+<span class="lineNum" id="container234"><a name="234"></a><a href="#234" id="line234">     234</a> </span><span class="lineCov">              2 :                 $num = 10;                                                                                                              </span>
+<span class="lineNum" id="container235"><a name="235"></a><a href="#235" id="line235">     235</a> </span>                :             }                                                                                                                           
+<span class="lineNum" id="container236"><a name="236"></a><a href="#236" id="line236">     236</a> </span><span class="lineCov">              2 :             $key = array_search($parts[0], $this-&gt;mimetypes);                                                                           </span>
+<span class="lineNum" id="container237"><a name="237"></a><a href="#237" id="line237">     237</a> </span><span class="lineCov">              2 :             if ($key) {                                                                                                                 </span>
+<span class="lineNum" id="container238"><a name="238"></a><a href="#238" id="line238">     238</a> </span><span class="lineNoCov">              0 :                 $this-&gt;accept[$num][] = $key;                                                                                           </span>
+<span class="lineNum" id="container239"><a name="239"></a><a href="#239" id="line239">     239</a> </span><span class="lineNoCov">              0 :             }                                                                                                                           </span>
+<span class="lineNum" id="container240"><a name="240"></a><a href="#240" id="line240">     240</a> </span><span class="lineCov">              2 :         }                                                                                                                               </span>
+<span class="lineNum" id="container241"><a name="241"></a><a href="#241" id="line241">     241</a> </span><span class="lineCov">              2 :         krsort($this-&gt;accept);                                                                                                          </span>
+<span class="lineNum" id="container242"><a name="242"></a><a href="#242" id="line242">     242</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container243"><a name="243"></a><a href="#243" id="line243">     243</a> </span>                :         // sort lang accept headers                                                                                                     
+<span class="lineNum" id="container244"><a name="244"></a><a href="#244" id="line244">     244</a> </span><span class="lineCov">              2 :         $accept = explode(',', strtolower($config['acceptLang']));                                                                      </span>
+<span class="lineNum" id="container245"><a name="245"></a><a href="#245" id="line245">     245</a> </span><span class="lineCov">              2 :         foreach ($accept as $mimetype) {                                                                                                </span>
+<span class="lineNum" id="container246"><a name="246"></a><a href="#246" id="line246">     246</a> </span><span class="lineCov">              2 :             $parts = explode(';q=', $mimetype);                                                                                         </span>
+<span class="lineNum" id="container247"><a name="247"></a><a href="#247" id="line247">     247</a> </span><span class="lineCov">              2 :             if (isset($parts) &amp;&amp; isset($parts[1]) &amp;&amp; $parts[1]) {                                                                       </span>
+<span class="lineNum" id="container248"><a name="248"></a><a href="#248" id="line248">     248</a> </span><span class="lineNoCov">              0 :                 $num = $parts[1] * 10;                                                                                                  </span>
+<span class="lineNum" id="container249"><a name="249"></a><a href="#249" id="line249">     249</a> </span><span class="lineNoCov">              0 :             } else {                                                                                                                    </span>
+<span class="lineNum" id="container250"><a name="250"></a><a href="#250" id="line250">     250</a> </span><span class="lineCov">              2 :                 $num = 10;                                                                                                              </span>
+<span class="lineNum" id="container251"><a name="251"></a><a href="#251" id="line251">     251</a> </span>                :             }                                                                                                                           
+<span class="lineNum" id="container252"><a name="252"></a><a href="#252" id="line252">     252</a> </span><span class="lineCov">              2 :             $this-&gt;acceptLang[$num][] = $parts[0];                                                                                      </span>
+<span class="lineNum" id="container253"><a name="253"></a><a href="#253" id="line253">     253</a> </span><span class="lineCov">              2 :         }                                                                                                                               </span>
+<span class="lineNum" id="container254"><a name="254"></a><a href="#254" id="line254">     254</a> </span><span class="lineCov">              2 :         krsort($this-&gt;acceptLang);                                                                                                      </span>
+<span class="lineNum" id="container255"><a name="255"></a><a href="#255" id="line255">     255</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container256"><a name="256"></a><a href="#256" id="line256">     256</a> </span>                :         // get encoding accept headers                                                                                                  
+<span class="lineNum" id="container257"><a name="257"></a><a href="#257" id="line257">     257</a> </span><span class="lineCov">              2 :         if ($config['acceptEncoding']) {                                                                                                </span>
+<span class="lineNum" id="container258"><a name="258"></a><a href="#258" id="line258">     258</a> </span><span class="lineNoCov">              0 :             foreach (explode(',', $config['acceptEncoding']) as $key =&gt; $accept) {                                                      </span>
+<span class="lineNum" id="container259"><a name="259"></a><a href="#259" id="line259">     259</a> </span><span class="lineNoCov">              0 :                 $this-&gt;acceptEncoding[$key] = trim($accept);                                                                            </span>
+<span class="lineNum" id="container260"><a name="260"></a><a href="#260" id="line260">     260</a> </span><span class="lineNoCov">              0 :             }                                                                                                                           </span>
+<span class="lineNum" id="container261"><a name="261"></a><a href="#261" id="line261">     261</a> </span><span class="lineNoCov">              0 :         }                                                                                                                               </span>
+<span class="lineNum" id="container262"><a name="262"></a><a href="#262" id="line262">     262</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container263"><a name="263"></a><a href="#263" id="line263">     263</a> </span>                :         // create negotiated URI lists from accept headers and request URI                                                              
+<span class="lineNum" id="container264"><a name="264"></a><a href="#264" id="line264">     264</a> </span><span class="lineCov">              2 :         foreach ($this-&gt;accept as $typeOrder) {                                                                                         </span>
+<span class="lineNum" id="container265"><a name="265"></a><a href="#265" id="line265">     265</a> </span><span class="lineNoCov">              0 :             foreach ($typeOrder as $type) {                                                                                             </span>
+<span class="lineNum" id="container266"><a name="266"></a><a href="#266" id="line266">     266</a> </span><span class="lineNoCov">              0 :                 if ($type) {                                                                                                            </span>
+<span class="lineNum" id="container267"><a name="267"></a><a href="#267" id="line267">     267</a> </span><span class="lineNoCov">              0 :                     foreach ($this-&gt;acceptLang as $langOrder) {                                                                         </span>
+<span class="lineNum" id="container268"><a name="268"></a><a href="#268" id="line268">     268</a> </span><span class="lineNoCov">              0 :                         foreach ($langOrder as $lang) {                                                                                 </span>
+<span class="lineNum" id="container269"><a name="269"></a><a href="#269" id="line269">     269</a> </span><span class="lineNoCov">              0 :                             if ($lang &amp;&amp; $lang != $type) {                                                                              </span>
+<span class="lineNum" id="container270"><a name="270"></a><a href="#270" id="line270">     270</a> </span><span class="lineNoCov">              0 :                                 $this-&gt;negotiatedUris[] = $this-&gt;uri.'.'.$type.'.'.$lang;                                               </span>
+<span class="lineNum" id="container271"><a name="271"></a><a href="#271" id="line271">     271</a> </span><span class="lineNoCov">              0 :                             }                                                                                                           </span>
+<span class="lineNum" id="container272"><a name="272"></a><a href="#272" id="line272">     272</a> </span><span class="lineNoCov">              0 :                         }                                                                                                               </span>
+<span class="lineNum" id="container273"><a name="273"></a><a href="#273" id="line273">     273</a> </span><span class="lineNoCov">              0 :                     }                                                                                                                   </span>
+<span class="lineNum" id="container274"><a name="274"></a><a href="#274" id="line274">     274</a> </span><span class="lineNoCov">              0 :                     $this-&gt;negotiatedUris[] = $this-&gt;uri.'.'.$type;                                                                     </span>
+<span class="lineNum" id="container275"><a name="275"></a><a href="#275" id="line275">     275</a> </span><span class="lineNoCov">              0 :                     $this-&gt;formatNegotiatedUris[] = $this-&gt;uri.'.'.$type;                                                               </span>
+<span class="lineNum" id="container276"><a name="276"></a><a href="#276" id="line276">     276</a> </span><span class="lineNoCov">              0 :                 }                                                                                                                       </span>
+<span class="lineNum" id="container277"><a name="277"></a><a href="#277" id="line277">     277</a> </span><span class="lineNoCov">              0 :             }                                                                                                                           </span>
+<span class="lineNum" id="container278"><a name="278"></a><a href="#278" id="line278">     278</a> </span><span class="lineCov">              2 :         }                                                                                                                               </span>
+<span class="lineNum" id="container279"><a name="279"></a><a href="#279" id="line279">     279</a> </span><span class="lineCov">              2 :         foreach ($this-&gt;acceptLang as $langOrder) {                                                                                     </span>
+<span class="lineNum" id="container280"><a name="280"></a><a href="#280" id="line280">     280</a> </span><span class="lineCov">              2 :             foreach ($langOrder as $lang) {                                                                                             </span>
+<span class="lineNum" id="container281"><a name="281"></a><a href="#281" id="line281">     281</a> </span><span class="lineCov">              2 :                 if ($lang) {                                                                                                            </span>
+<span class="lineNum" id="container282"><a name="282"></a><a href="#282" id="line282">     282</a> </span><span class="lineNoCov">              0 :                     $this-&gt;negotiatedUris[] = $this-&gt;uri.'.'.$lang;                                                                     </span>
+<span class="lineNum" id="container283"><a name="283"></a><a href="#283" id="line283">     283</a> </span><span class="lineNoCov">              0 :                     $this-&gt;languageNegotiatedUris[] = $this-&gt;uri.'.'.$lang;                                                             </span>
+<span class="lineNum" id="container284"><a name="284"></a><a href="#284" id="line284">     284</a> </span><span class="lineNoCov">              0 :                 }                                                                                                                       </span>
+<span class="lineNum" id="container285"><a name="285"></a><a href="#285" id="line285">     285</a> </span><span class="lineCov">              2 :             }                                                                                                                           </span>
+<span class="lineNum" id="container286"><a name="286"></a><a href="#286" id="line286">     286</a> </span><span class="lineCov">              2 :         }                                                                                                                               </span>
+<span class="lineNum" id="container287"><a name="287"></a><a href="#287" id="line287">     287</a> </span><span class="lineCov">              2 :         $this-&gt;negotiatedUris[] = $this-&gt;uri;                                                                                           </span>
+<span class="lineNum" id="container288"><a name="288"></a><a href="#288" id="line288">     288</a> </span><span class="lineCov">              2 :         $this-&gt;formatNegotiatedUris[] = $this-&gt;uri;                                                                                     </span>
+<span class="lineNum" id="container289"><a name="289"></a><a href="#289" id="line289">     289</a> </span><span class="lineCov">              2 :         $this-&gt;languageNegotiatedUris[] = $this-&gt;uri;                                                                                   </span>
+<span class="lineNum" id="container290"><a name="290"></a><a href="#290" id="line290">     290</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container291"><a name="291"></a><a href="#291" id="line291">     291</a> </span><span class="lineCov">              2 :         $this-&gt;negotiatedUris = array_values(array_unique($this-&gt;negotiatedUris));                                                      </span>
+<span class="lineNum" id="container292"><a name="292"></a><a href="#292" id="line292">     292</a> </span><span class="lineCov">              2 :         $this-&gt;formatNegotiatedUris = array_values(array_unique($this-&gt;formatNegotiatedUris));                                          </span>
+<span class="lineNum" id="container293"><a name="293"></a><a href="#293" id="line293">     293</a> </span><span class="lineCov">              2 :         $this-&gt;languageNegotiatedUris = array_values(array_unique($this-&gt;languageNegotiatedUris));                                      </span>
+<span class="lineNum" id="container294"><a name="294"></a><a href="#294" id="line294">     294</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container295"><a name="295"></a><a href="#295" id="line295">     295</a> </span><span class="lineCov">              2 :         $this-&gt;HTTPMethods = $this-&gt;getConfig($config, 'HTTPMethods', NULL, $this-&gt;HTTPMethods);                                        </span>
+<span class="lineNum" id="container296"><a name="296"></a><a href="#296" id="line296">     296</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container297"><a name="297"></a><a href="#297" id="line297">     297</a> </span>                :         // get HTTP method                                                                                                              
+<span class="lineNum" id="container298"><a name="298"></a><a href="#298" id="line298">     298</a> </span><span class="lineCov">              2 :         $this-&gt;method = strtoupper($this-&gt;getConfig($config, 'method', 'REQUEST_METHOD', $this-&gt;method));                               </span>
+<span class="lineNum" id="container299"><a name="299"></a><a href="#299" id="line299">     299</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container300"><a name="300"></a><a href="#300" id="line300">     300</a> </span>                :         // get HTTP request data                                                                                                        
+<span class="lineNum" id="container301"><a name="301"></a><a href="#301" id="line301">     301</a> </span><span class="lineCov">              2 :         $this-&gt;data = $this-&gt;getConfig($config, 'data', NULL, file_get_contents(&quot;php://input&quot;));                                        </span>
+<span class="lineNum" id="container302"><a name="302"></a><a href="#302" id="line302">     302</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container303"><a name="303"></a><a href="#303" id="line303">     303</a> </span>                :         // conditional requests                                                                                                         
+<span class="lineNum" id="container304"><a name="304"></a><a href="#304" id="line304">     304</a> </span><span class="lineCov">              2 :         if ($config['ifMatch']) {                                                                                                       </span>
+<span class="lineNum" id="container305"><a name="305"></a><a href="#305" id="line305">     305</a> </span><span class="lineNoCov">              0 :             $ifMatch = explode(',', $config['ifMatch']);                                                                                </span>
+<span class="lineNum" id="container306"><a name="306"></a><a href="#306" id="line306">     306</a> </span><span class="lineNoCov">              0 :             foreach ($ifMatch as $etag) {                                                                                               </span>
+<span class="lineNum" id="container307"><a name="307"></a><a href="#307" id="line307">     307</a> </span><span class="lineNoCov">              0 :                 $this-&gt;ifMatch[] = trim($etag, '&quot; ');                                                                                   </span>
+<span class="lineNum" id="container308"><a name="308"></a><a href="#308" id="line308">     308</a> </span><span class="lineNoCov">              0 :             }                                                                                                                           </span>
+<span class="lineNum" id="container309"><a name="309"></a><a href="#309" id="line309">     309</a> </span><span class="lineNoCov">              0 :         }                                                                                                                               </span>
+<span class="lineNum" id="container310"><a name="310"></a><a href="#310" id="line310">     310</a> </span><span class="lineCov">              2 :         if ($config['ifNoneMatch']) {                                                                                                   </span>
+<span class="lineNum" id="container311"><a name="311"></a><a href="#311" id="line311">     311</a> </span><span class="lineNoCov">              0 :             $ifNoneMatch = explode(',', $config['ifNoneMatch']);                                                                        </span>
+<span class="lineNum" id="container312"><a name="312"></a><a href="#312" id="line312">     312</a> </span><span class="lineNoCov">              0 :             foreach ($ifNoneMatch as $etag) {                                                                                           </span>
+<span class="lineNum" id="container313"><a name="313"></a><a href="#313" id="line313">     313</a> </span><span class="lineNoCov">              0 :                 $this-&gt;ifNoneMatch[] = trim($etag, '&quot; ');                                                                               </span>
+<span class="lineNum" id="container314"><a name="314"></a><a href="#314" id="line314">     314</a> </span><span class="lineNoCov">              0 :             }                                                                                                                           </span>
+<span class="lineNum" id="container315"><a name="315"></a><a href="#315" id="line315">     315</a> </span><span class="lineNoCov">              0 :         }                                                                                                                               </span>
+<span class="lineNum" id="container316"><a name="316"></a><a href="#316" id="line316">     316</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container317"><a name="317"></a><a href="#317" id="line317">     317</a> </span>                :         // mounts                                                                                                                       
+<span class="lineNum" id="container318"><a name="318"></a><a href="#318" id="line318">     318</a> </span><span class="lineCov">              2 :         if (isset($config['mount']) &amp;&amp; is_array($config['mount'])) {                                                                    </span>
+<span class="lineNum" id="container319"><a name="319"></a><a href="#319" id="line319">     319</a> </span><span class="lineNoCov">              0 :             $this-&gt;mounts = $config['mount'];                                                                                           </span>
+<span class="lineNum" id="container320"><a name="320"></a><a href="#320" id="line320">     320</a> </span><span class="lineNoCov">              0 :         }                                                                                                                               </span>
+<span class="lineNum" id="container321"><a name="321"></a><a href="#321" id="line321">     321</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container322"><a name="322"></a><a href="#322" id="line322">     322</a> </span>                :         // prime named resources for autoloading                                                                                        
+<span class="lineNum" id="container323"><a name="323"></a><a href="#323" id="line323">     323</a> </span><span class="lineCov">              2 :         if (isset($config['autoload']) &amp;&amp; is_array($config['autoload'])) {                                                              </span>
+<span class="lineNum" id="container324"><a name="324"></a><a href="#324" id="line324">     324</a> </span><span class="lineNoCov">              0 :             foreach ($config['autoload'] as $uri =&gt; $className) {                                                                       </span>
+<span class="lineNum" id="container325"><a name="325"></a><a href="#325" id="line325">     325</a> </span><span class="lineNoCov">              0 :                 $this-&gt;resources[$uri] = array(                                                                                         </span>
+<span class="lineNum" id="container326"><a name="326"></a><a href="#326" id="line326">     326</a> </span><span class="lineNoCov">              0 :                     'class' =&gt; $className,                                                                                              </span>
+<span class="lineNum" id="container327"><a name="327"></a><a href="#327" id="line327">     327</a> </span>                :                     'loaded' =&gt; FALSE                                                                                                   
+<span class="lineNum" id="container328"><a name="328"></a><a href="#328" id="line328">     328</a> </span><span class="lineNoCov">              0 :                 );                                                                                                                      </span>
+<span class="lineNum" id="container329"><a name="329"></a><a href="#329" id="line329">     329</a> </span><span class="lineNoCov">              0 :             }                                                                                                                           </span>
+<span class="lineNum" id="container330"><a name="330"></a><a href="#330" id="line330">     330</a> </span><span class="lineNoCov">              0 :         }                                                                                                                               </span>
+<span class="lineNum" id="container331"><a name="331"></a><a href="#331" id="line331">     331</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container332"><a name="332"></a><a href="#332" id="line332">     332</a> </span>                :         // load definitions of already loaded resource classes                                                                          
+<span class="lineNum" id="container333"><a name="333"></a><a href="#333" id="line333">     333</a> </span><span class="lineCov">              2 :         $resourceClassName = class_exists('Tonic\\Resource', false) ? 'Tonic\\Resource' : 'Resource';                                   </span>
+<span class="lineNum" id="container334"><a name="334"></a><a href="#334" id="line334">     334</a> </span><span class="lineCov">              2 :         foreach (get_declared_classes() as $className) {                                                                                </span>
+<span class="lineNum" id="container335"><a name="335"></a><a href="#335" id="line335">     335</a> </span><span class="lineCov">              2 :             if (is_subclass_of($className, $resourceClassName)) {                                                                       </span>
+<span class="lineNum" id="container336"><a name="336"></a><a href="#336" id="line336">     336</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container337"><a name="337"></a><a href="#337" id="line337">     337</a> </span><span class="lineNoCov">              0 :                 $resourceDetails = $this-&gt;getResourceClassDetails($className);                                                          </span>
+<span class="lineNum" id="container338"><a name="338"></a><a href="#338" id="line338">     338</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container339"><a name="339"></a><a href="#339" id="line339">     339</a> </span><span class="lineNoCov">              0 :                 preg_match_all('/@uri\s+([^\s]+)(?:\s([0-9]+))?/', $resourceDetails['comment'], $annotations);                          </span>
+<span class="lineNum" id="container340"><a name="340"></a><a href="#340" id="line340">     340</a> </span><span class="lineNoCov">              0 :                 if (isset($annotations[1]) &amp;&amp; $annotations[1]) {                                                                        </span>
+<span class="lineNum" id="container341"><a name="341"></a><a href="#341" id="line341">     341</a> </span><span class="lineNoCov">              0 :                     $uris = $annotations[1];                                                                                            </span>
+<span class="lineNum" id="container342"><a name="342"></a><a href="#342" id="line342">     342</a> </span><span class="lineNoCov">              0 :                 } else {                                                                                                                </span>
+<span class="lineNum" id="container343"><a name="343"></a><a href="#343" id="line343">     343</a> </span><span class="lineNoCov">              0 :                     $uris = array();                                                                                                    </span>
+<span class="lineNum" id="container344"><a name="344"></a><a href="#344" id="line344">     344</a> </span>                :                 }                                                                                                                       
+<span class="lineNum" id="container345"><a name="345"></a><a href="#345" id="line345">     345</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container346"><a name="346"></a><a href="#346" id="line346">     346</a> </span><span class="lineNoCov">              0 :                 foreach ($uris as $index =&gt; $uri) {                                                                                     </span>
+<span class="lineNum" id="container347"><a name="347"></a><a href="#347" id="line347">     347</a> </span><span class="lineNoCov">              0 :                     if ($uri != '/' &amp;&amp; substr($uri, -1, 1) == '/') { // remove trailing slash problem                                   </span>
+<span class="lineNum" id="container348"><a name="348"></a><a href="#348" id="line348">     348</a> </span><span class="lineNoCov">              0 :                         $uri = substr($uri, 0, -1);                                                                                     </span>
+<span class="lineNum" id="container349"><a name="349"></a><a href="#349" id="line349">     349</a> </span><span class="lineNoCov">              0 :                     }                                                                                                                   </span>
+<span class="lineNum" id="container350"><a name="350"></a><a href="#350" id="line350">     350</a> </span><span class="lineNoCov">              0 :                     if (isset($annotations[2][$index]) &amp;&amp; is_numeric($annotations[2][$index])) {                                        </span>
+<span class="lineNum" id="container351"><a name="351"></a><a href="#351" id="line351">     351</a> </span><span class="lineNoCov">              0 :                         $priority = intval($annotations[2][$index]);                                                                    </span>
+<span class="lineNum" id="container352"><a name="352"></a><a href="#352" id="line352">     352</a> </span><span class="lineNoCov">              0 :                     } else {                                                                                                            </span>
+<span class="lineNum" id="container353"><a name="353"></a><a href="#353" id="line353">     353</a> </span><span class="lineNoCov">              0 :                         $priority = 0;                                                                                                  </span>
+<span class="lineNum" id="container354"><a name="354"></a><a href="#354" id="line354">     354</a> </span>                :                     }                                                                                                                   
+<span class="lineNum" id="container355"><a name="355"></a><a href="#355" id="line355">     355</a> </span>                :                     if (                                                                                                                
+<span class="lineNum" id="container356"><a name="356"></a><a href="#356" id="line356">     356</a> </span><span class="lineNoCov">              0 :                         !isset($this-&gt;resources[$resourceDetails['mountPoint'].$uri]) ||                                                </span>
+<span class="lineNum" id="container357"><a name="357"></a><a href="#357" id="line357">     357</a> </span><span class="lineNoCov">              0 :                         $this-&gt;resources[$resourceDetails['mountPoint'].$uri]['priority'] &lt; $priority                                   </span>
+<span class="lineNum" id="container358"><a name="358"></a><a href="#358" id="line358">     358</a> </span><span class="lineNoCov">              0 :                     ) {                                                                                                                 </span>
+<span class="lineNum" id="container359"><a name="359"></a><a href="#359" id="line359">     359</a> </span><span class="lineNoCov">              0 :                         $this-&gt;resources[$resourceDetails['mountPoint'].$uri] = array(                                                  </span>
+<span class="lineNum" id="container360"><a name="360"></a><a href="#360" id="line360">     360</a> </span><span class="lineNoCov">              0 :                             'namespace' =&gt; $resourceDetails['namespaceName'],                                                           </span>
+<span class="lineNum" id="container361"><a name="361"></a><a href="#361" id="line361">     361</a> </span><span class="lineNoCov">              0 :                             'class' =&gt; $resourceDetails['className'],                                                                   </span>
+<span class="lineNum" id="container362"><a name="362"></a><a href="#362" id="line362">     362</a> </span><span class="lineNoCov">              0 :                             'filename' =&gt; $resourceDetails['filename'],                                                                 </span>
+<span class="lineNum" id="container363"><a name="363"></a><a href="#363" id="line363">     363</a> </span><span class="lineNoCov">              0 :                             'line' =&gt; $resourceDetails['line'],                                                                         </span>
+<span class="lineNum" id="container364"><a name="364"></a><a href="#364" id="line364">     364</a> </span><span class="lineNoCov">              0 :                             'priority' =&gt; $priority,                                                                                    </span>
+<span class="lineNum" id="container365"><a name="365"></a><a href="#365" id="line365">     365</a> </span>                :                             'loaded' =&gt; TRUE                                                                                            
+<span class="lineNum" id="container366"><a name="366"></a><a href="#366" id="line366">     366</a> </span><span class="lineNoCov">              0 :                         );                                                                                                              </span>
+<span class="lineNum" id="container367"><a name="367"></a><a href="#367" id="line367">     367</a> </span><span class="lineNoCov">              0 :                     }                                                                                                                   </span>
+<span class="lineNum" id="container368"><a name="368"></a><a href="#368" id="line368">     368</a> </span><span class="lineNoCov">              0 :                 }                                                                                                                       </span>
+<span class="lineNum" id="container369"><a name="369"></a><a href="#369" id="line369">     369</a> </span><span class="lineNoCov">              0 :             }                                                                                                                           </span>
+<span class="lineNum" id="container370"><a name="370"></a><a href="#370" id="line370">     370</a> </span><span class="lineCov">              2 :         }                                                                                                                               </span>
+<span class="lineNum" id="container371"><a name="371"></a><a href="#371" id="line371">     371</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container372"><a name="372"></a><a href="#372" id="line372">     372</a> </span><span class="lineCov">              2 :     }                                                                                                                                   </span>
+<span class="lineNum" id="container373"><a name="373"></a><a href="#373" id="line373">     373</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container374"><a name="374"></a><a href="#374" id="line374">     374</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container375"><a name="375"></a><a href="#375" id="line375">     375</a> </span>                :      * Get the details of a Resource class by reflection                                                                                
+<span class="lineNum" id="container376"><a name="376"></a><a href="#376" id="line376">     376</a> </span>                :      * @param str className                                                                                                             
+<span class="lineNum" id="container377"><a name="377"></a><a href="#377" id="line377">     377</a> </span>                :      * @return str[]                                                                                                                    
+<span class="lineNum" id="container378"><a name="378"></a><a href="#378" id="line378">     378</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container379"><a name="379"></a><a href="#379" id="line379">     379</a> </span>                :     protected function getResourceClassDetails($className) {                                                                            
+<span class="lineNum" id="container380"><a name="380"></a><a href="#380" id="line380">     380</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container381"><a name="381"></a><a href="#381" id="line381">     381</a> </span><span class="lineNoCov">              0 :         $resourceReflector = new ReflectionClass($className);                                                                           </span>
+<span class="lineNum" id="container382"><a name="382"></a><a href="#382" id="line382">     382</a> </span><span class="lineNoCov">              0 :         $comment = $resourceReflector-&gt;getDocComment();                                                                                 </span>
+<span class="lineNum" id="container383"><a name="383"></a><a href="#383" id="line383">     383</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container384"><a name="384"></a><a href="#384" id="line384">     384</a> </span><span class="lineNoCov">              0 :         $className = $resourceReflector-&gt;getName();                                                                                     </span>
+<span class="lineNum" id="container385"><a name="385"></a><a href="#385" id="line385">     385</a> </span><span class="lineNoCov">              0 :         if (method_exists($resourceReflector, 'getNamespaceName')) {                                                                    </span>
+<span class="lineNum" id="container386"><a name="386"></a><a href="#386" id="line386">     386</a> </span><span class="lineNoCov">              0 :             $namespaceName = $resourceReflector-&gt;getNamespaceName();                                                                    </span>
+<span class="lineNum" id="container387"><a name="387"></a><a href="#387" id="line387">     387</a> </span><span class="lineNoCov">              0 :         } else {                                                                                                                        </span>
+<span class="lineNum" id="container388"><a name="388"></a><a href="#388" id="line388">     388</a> </span>                :             // @codeCoverageIgnoreStart                                                                                                 
+<span class="lineNum" id="container389"><a name="389"></a><a href="#389" id="line389">     389</a> </span>                :             $namespaceName = FALSE;                                                                                                     
+<span class="lineNum" id="container390"><a name="390"></a><a href="#390" id="line390">     390</a> </span>                :             // @codeCoverageIgnoreEnd                                                                                                   
+<span class="lineNum" id="container391"><a name="391"></a><a href="#391" id="line391">     391</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container392"><a name="392"></a><a href="#392" id="line392">     392</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container393"><a name="393"></a><a href="#393" id="line393">     393</a> </span><span class="lineNoCov">              0 :         if (!$namespaceName) {                                                                                                          </span>
+<span class="lineNum" id="container394"><a name="394"></a><a href="#394" id="line394">     394</a> </span><span class="lineNoCov">              0 :             preg_match('/@(?:package|namespace)\s+([^\s]+)/', $comment, $package);                                                      </span>
+<span class="lineNum" id="container395"><a name="395"></a><a href="#395" id="line395">     395</a> </span><span class="lineNoCov">              0 :             if (isset($package[1])) {                                                                                                   </span>
+<span class="lineNum" id="container396"><a name="396"></a><a href="#396" id="line396">     396</a> </span><span class="lineNoCov">              0 :                 $namespaceName = $package[1];                                                                                           </span>
+<span class="lineNum" id="container397"><a name="397"></a><a href="#397" id="line397">     397</a> </span><span class="lineNoCov">              0 :             }                                                                                                                           </span>
+<span class="lineNum" id="container398"><a name="398"></a><a href="#398" id="line398">     398</a> </span><span class="lineNoCov">              0 :         }                                                                                                                               </span>
+<span class="lineNum" id="container399"><a name="399"></a><a href="#399" id="line399">     399</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container400"><a name="400"></a><a href="#400" id="line400">     400</a> </span>                :         // adjust URI for mountpoint                                                                                                    
+<span class="lineNum" id="container401"><a name="401"></a><a href="#401" id="line401">     401</a> </span><span class="lineNoCov">              0 :         if (isset($this-&gt;mounts[$namespaceName])) {                                                                                     </span>
+<span class="lineNum" id="container402"><a name="402"></a><a href="#402" id="line402">     402</a> </span><span class="lineNoCov">              0 :             $mountPoint = $this-&gt;mounts[$namespaceName];                                                                                </span>
+<span class="lineNum" id="container403"><a name="403"></a><a href="#403" id="line403">     403</a> </span><span class="lineNoCov">              0 :         } else {                                                                                                                        </span>
+<span class="lineNum" id="container404"><a name="404"></a><a href="#404" id="line404">     404</a> </span><span class="lineNoCov">              0 :             $mountPoint = '';                                                                                                           </span>
+<span class="lineNum" id="container405"><a name="405"></a><a href="#405" id="line405">     405</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container406"><a name="406"></a><a href="#406" id="line406">     406</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container407"><a name="407"></a><a href="#407" id="line407">     407</a> </span>                :         return array(                                                                                                                   
+<span class="lineNum" id="container408"><a name="408"></a><a href="#408" id="line408">     408</a> </span><span class="lineNoCov">              0 :             'comment' =&gt; $comment,                                                                                                      </span>
+<span class="lineNum" id="container409"><a name="409"></a><a href="#409" id="line409">     409</a> </span><span class="lineNoCov">              0 :             'className' =&gt; $className,                                                                                                  </span>
+<span class="lineNum" id="container410"><a name="410"></a><a href="#410" id="line410">     410</a> </span><span class="lineNoCov">              0 :             'namespaceName' =&gt; $namespaceName,                                                                                          </span>
+<span class="lineNum" id="container411"><a name="411"></a><a href="#411" id="line411">     411</a> </span><span class="lineNoCov">              0 :             'filename' =&gt; $resourceReflector-&gt;getFileName(),                                                                            </span>
+<span class="lineNum" id="container412"><a name="412"></a><a href="#412" id="line412">     412</a> </span><span class="lineNoCov">              0 :             'line' =&gt; $resourceReflector-&gt;getStartLine(),                                                                               </span>
+<span class="lineNum" id="container413"><a name="413"></a><a href="#413" id="line413">     413</a> </span>                :             'mountPoint' =&gt; $mountPoint                                                                                                 
+<span class="lineNum" id="container414"><a name="414"></a><a href="#414" id="line414">     414</a> </span><span class="lineNoCov">              0 :         );                                                                                                                              </span>
+<span class="lineNum" id="container415"><a name="415"></a><a href="#415" id="line415">     415</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container416"><a name="416"></a><a href="#416" id="line416">     416</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container417"><a name="417"></a><a href="#417" id="line417">     417</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container418"><a name="418"></a><a href="#418" id="line418">     418</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container419"><a name="419"></a><a href="#419" id="line419">     419</a> </span>                :      * Convert the object into a string suitable for printing                                                                           
+<span class="lineNum" id="container420"><a name="420"></a><a href="#420" id="line420">     420</a> </span>                :      * @return str                                                                                                                      
+<span class="lineNum" id="container421"><a name="421"></a><a href="#421" id="line421">     421</a> </span>                :      * @codeCoverageIgnore                                                                                                              
+<span class="lineNum" id="container422"><a name="422"></a><a href="#422" id="line422">     422</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container423"><a name="423"></a><a href="#423" id="line423">     423</a> </span>                :     function __toString() {                                                                                                             
+<span class="lineNum" id="container424"><a name="424"></a><a href="#424" id="line424">     424</a> </span>                :         $str = 'URI: '.$this-&gt;uri.&quot;\n&quot;;                                                                                                 
+<span class="lineNum" id="container425"><a name="425"></a><a href="#425" id="line425">     425</a> </span>                :         $str .= 'Method: '.$this-&gt;method.&quot;\n&quot;;                                                                                          
+<span class="lineNum" id="container426"><a name="426"></a><a href="#426" id="line426">     426</a> </span>                :         if ($this-&gt;data) {                                                                                                              
+<span class="lineNum" id="container427"><a name="427"></a><a href="#427" id="line427">     427</a> </span>                :             $str .= 'Data: '.$this-&gt;data.&quot;\n&quot;;                                                                                          
+<span class="lineNum" id="container428"><a name="428"></a><a href="#428" id="line428">     428</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container429"><a name="429"></a><a href="#429" id="line429">     429</a> </span>                :         $str .= 'Acceptable Formats:';                                                                                                  
+<span class="lineNum" id="container430"><a name="430"></a><a href="#430" id="line430">     430</a> </span>                :         foreach ($this-&gt;accept as $accept) {                                                                                            
+<span class="lineNum" id="container431"><a name="431"></a><a href="#431" id="line431">     431</a> </span>                :             foreach ($accept as $a) {                                                                                                   
+<span class="lineNum" id="container432"><a name="432"></a><a href="#432" id="line432">     432</a> </span>                :                 $str .= ' .'.$a;                                                                                                        
+<span class="lineNum" id="container433"><a name="433"></a><a href="#433" id="line433">     433</a> </span>                :                 if (isset($this-&gt;mimetypes[$a])) $str .= ' ('.$this-&gt;mimetypes[$a].')';                                                 
+<span class="lineNum" id="container434"><a name="434"></a><a href="#434" id="line434">     434</a> </span>                :             }                                                                                                                           
+<span class="lineNum" id="container435"><a name="435"></a><a href="#435" id="line435">     435</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container436"><a name="436"></a><a href="#436" id="line436">     436</a> </span>                :         $str .= &quot;\n&quot;;                                                                                                                   
+<span class="lineNum" id="container437"><a name="437"></a><a href="#437" id="line437">     437</a> </span>                :         $str .= 'Acceptable Languages:';                                                                                                
+<span class="lineNum" id="container438"><a name="438"></a><a href="#438" id="line438">     438</a> </span>                :         foreach ($this-&gt;acceptLang as $accept) {                                                                                        
+<span class="lineNum" id="container439"><a name="439"></a><a href="#439" id="line439">     439</a> </span>                :             foreach ($accept as $a) {                                                                                                   
+<span class="lineNum" id="container440"><a name="440"></a><a href="#440" id="line440">     440</a> </span>                :                 $str .= ' '.$a;                                                                                                         
+<span class="lineNum" id="container441"><a name="441"></a><a href="#441" id="line441">     441</a> </span>                :             }                                                                                                                           
+<span class="lineNum" id="container442"><a name="442"></a><a href="#442" id="line442">     442</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container443"><a name="443"></a><a href="#443" id="line443">     443</a> </span>                :         $str .= &quot;\n&quot;;                                                                                                                   
+<span class="lineNum" id="container444"><a name="444"></a><a href="#444" id="line444">     444</a> </span>                :         $str .= 'Negotated URIs:'.&quot;\n&quot;;                                                                                                 
+<span class="lineNum" id="container445"><a name="445"></a><a href="#445" id="line445">     445</a> </span>                :         foreach ($this-&gt;negotiatedUris as $uri) {                                                                                       
+<span class="lineNum" id="container446"><a name="446"></a><a href="#446" id="line446">     446</a> </span>                :             $str .= &quot;\t&quot;.$uri.&quot;\n&quot;;                                                                                                     
+<span class="lineNum" id="container447"><a name="447"></a><a href="#447" id="line447">     447</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container448"><a name="448"></a><a href="#448" id="line448">     448</a> </span>                :         $str .= 'Format Negotated URIs:'.&quot;\n&quot;;                                                                                          
+<span class="lineNum" id="container449"><a name="449"></a><a href="#449" id="line449">     449</a> </span>                :         foreach ($this-&gt;formatNegotiatedUris as $uri) {                                                                                 
+<span class="lineNum" id="container450"><a name="450"></a><a href="#450" id="line450">     450</a> </span>                :             $str .= &quot;\t&quot;.$uri.&quot;\n&quot;;                                                                                                     
+<span class="lineNum" id="container451"><a name="451"></a><a href="#451" id="line451">     451</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container452"><a name="452"></a><a href="#452" id="line452">     452</a> </span>                :         $str .= 'Language Negotated URIs:'.&quot;\n&quot;;                                                                                        
+<span class="lineNum" id="container453"><a name="453"></a><a href="#453" id="line453">     453</a> </span>                :         foreach ($this-&gt;languageNegotiatedUris as $uri) {                                                                               
+<span class="lineNum" id="container454"><a name="454"></a><a href="#454" id="line454">     454</a> </span>                :             $str .= &quot;\t&quot;.$uri.&quot;\n&quot;;                                                                                                     
+<span class="lineNum" id="container455"><a name="455"></a><a href="#455" id="line455">     455</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container456"><a name="456"></a><a href="#456" id="line456">     456</a> </span>                :         if ($this-&gt;ifMatch) {                                                                                                           
+<span class="lineNum" id="container457"><a name="457"></a><a href="#457" id="line457">     457</a> </span>                :             $str .= 'If Match:';                                                                                                        
+<span class="lineNum" id="container458"><a name="458"></a><a href="#458" id="line458">     458</a> </span>                :             foreach ($this-&gt;ifMatch as $etag) {                                                                                         
+<span class="lineNum" id="container459"><a name="459"></a><a href="#459" id="line459">     459</a> </span>                :                 $str .= ' '.$etag;                                                                                                      
+<span class="lineNum" id="container460"><a name="460"></a><a href="#460" id="line460">     460</a> </span>                :             }                                                                                                                           
+<span class="lineNum" id="container461"><a name="461"></a><a href="#461" id="line461">     461</a> </span>                :             $str .= &quot;\n&quot;;                                                                                                               
+<span class="lineNum" id="container462"><a name="462"></a><a href="#462" id="line462">     462</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container463"><a name="463"></a><a href="#463" id="line463">     463</a> </span>                :         if ($this-&gt;ifNoneMatch) {                                                                                                       
+<span class="lineNum" id="container464"><a name="464"></a><a href="#464" id="line464">     464</a> </span>                :             $str .= 'If None Match:';                                                                                                   
+<span class="lineNum" id="container465"><a name="465"></a><a href="#465" id="line465">     465</a> </span>                :             foreach ($this-&gt;ifNoneMatch as $etag) {                                                                                     
+<span class="lineNum" id="container466"><a name="466"></a><a href="#466" id="line466">     466</a> </span>                :                 $str .= ' '.$etag;                                                                                                      
+<span class="lineNum" id="container467"><a name="467"></a><a href="#467" id="line467">     467</a> </span>                :             }                                                                                                                           
+<span class="lineNum" id="container468"><a name="468"></a><a href="#468" id="line468">     468</a> </span>                :             $str .= &quot;\n&quot;;                                                                                                               
+<span class="lineNum" id="container469"><a name="469"></a><a href="#469" id="line469">     469</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container470"><a name="470"></a><a href="#470" id="line470">     470</a> </span>                :         $str .= 'Loaded Resources:'.&quot;\n&quot;;                                                                                               
+<span class="lineNum" id="container471"><a name="471"></a><a href="#471" id="line471">     471</a> </span>                :         foreach ($this-&gt;resources as $uri =&gt; $resource) {                                                                               
+<span class="lineNum" id="container472"><a name="472"></a><a href="#472" id="line472">     472</a> </span>                :             $str .= &quot;\t&quot;.$uri.&quot;\n&quot;;                                                                                                     
+<span class="lineNum" id="container473"><a name="473"></a><a href="#473" id="line473">     473</a> </span>                :             if (isset($resource['namespace']) &amp;&amp; $resource['namespace']) $str .= &quot;\t\tNamespace: &quot;.$resource['namespace'].&quot;\n&quot;;         
+<span class="lineNum" id="container474"><a name="474"></a><a href="#474" id="line474">     474</a> </span>                :             $str .= &quot;\t\tClass: &quot;.$resource['class'].&quot;\n&quot;;                                                                              
+<span class="lineNum" id="container475"><a name="475"></a><a href="#475" id="line475">     475</a> </span>                :             $str .= &quot;\t\tFile: &quot;.$resource['filename'];                                                                                 
+<span class="lineNum" id="container476"><a name="476"></a><a href="#476" id="line476">     476</a> </span>                :             if (isset($resource['line']) &amp;&amp; $resource['line']) $str .= '#'.$resource['line'];                                           
+<span class="lineNum" id="container477"><a name="477"></a><a href="#477" id="line477">     477</a> </span>                :             $str .= &quot;\n&quot;;                                                                                                               
+<span class="lineNum" id="container478"><a name="478"></a><a href="#478" id="line478">     478</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container479"><a name="479"></a><a href="#479" id="line479">     479</a> </span>                :         return $str;                                                                                                                    
+<span class="lineNum" id="container480"><a name="480"></a><a href="#480" id="line480">     480</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container481"><a name="481"></a><a href="#481" id="line481">     481</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container482"><a name="482"></a><a href="#482" id="line482">     482</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container483"><a name="483"></a><a href="#483" id="line483">     483</a> </span>                :      * Instantiate the resource class that matches the request URI the best                                                             
+<span class="lineNum" id="container484"><a name="484"></a><a href="#484" id="line484">     484</a> </span>                :      * @return Resource                                                                                                                 
+<span class="lineNum" id="container485"><a name="485"></a><a href="#485" id="line485">     485</a> </span>                :      * @throws ResponseException If the resource does not exist, a 404 exception is thrown                                              
+<span class="lineNum" id="container486"><a name="486"></a><a href="#486" id="line486">     486</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container487"><a name="487"></a><a href="#487" id="line487">     487</a> </span>                :     function loadResource() {                                                                                                           
+<span class="lineNum" id="container488"><a name="488"></a><a href="#488" id="line488">     488</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container489"><a name="489"></a><a href="#489" id="line489">     489</a> </span><span class="lineNoCov">              0 :         $uriMatches = array();                                                                                                          </span>
+<span class="lineNum" id="container490"><a name="490"></a><a href="#490" id="line490">     490</a> </span><span class="lineNoCov">              0 :         foreach ($this-&gt;resources as $uri =&gt; $resource) {                                                                               </span>
+<span class="lineNum" id="container491"><a name="491"></a><a href="#491" id="line491">     491</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container492"><a name="492"></a><a href="#492" id="line492">     492</a> </span><span class="lineNoCov">              0 :             preg_match_all('#((?&lt;!\?):[^/]+|{[^0-9][^}]*}|\(.+?\))#', $uri, $params, PREG_PATTERN_ORDER);                               </span>
+<span class="lineNum" id="container493"><a name="493"></a><a href="#493" id="line493">     493</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container494"><a name="494"></a><a href="#494" id="line494">     494</a> </span><span class="lineNoCov">              0 :             $uri = $this-&gt;baseUri.$uri;                                                                                                 </span>
+<span class="lineNum" id="container495"><a name="495"></a><a href="#495" id="line495">     495</a> </span><span class="lineNoCov">              0 :             if ($uri != '/' &amp;&amp; substr($uri, -1, 1) == '/') { // remove trailing slash problem                                           </span>
+<span class="lineNum" id="container496"><a name="496"></a><a href="#496" id="line496">     496</a> </span><span class="lineNoCov">              0 :                 $uri = substr($uri, 0, -1);                                                                                             </span>
+<span class="lineNum" id="container497"><a name="497"></a><a href="#497" id="line497">     497</a> </span><span class="lineNoCov">              0 :             }                                                                                                                           </span>
+<span class="lineNum" id="container498"><a name="498"></a><a href="#498" id="line498">     498</a> </span><span class="lineNoCov">              0 :             $uriRegex = preg_replace('#((?&lt;!\?):[^(/]+|{[^0-9][^}]*})#', '(.+)', $uri);                                                 </span>
+<span class="lineNum" id="container499"><a name="499"></a><a href="#499" id="line499">     499</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container500"><a name="500"></a><a href="#500" id="line500">     500</a> </span><span class="lineNoCov">              0 :             if (preg_match('#^'.$uriRegex.'$#', $this-&gt;uri, $matches)) {                                                                </span>
+<span class="lineNum" id="container501"><a name="501"></a><a href="#501" id="line501">     501</a> </span><span class="lineNoCov">              0 :                 array_shift($matches);                                                                                                  </span>
+<span class="lineNum" id="container502"><a name="502"></a><a href="#502" id="line502">     502</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container503"><a name="503"></a><a href="#503" id="line503">     503</a> </span><span class="lineNoCov">              0 :                 if (isset($params[1])) {                                                                                                </span>
+<span class="lineNum" id="container504"><a name="504"></a><a href="#504" id="line504">     504</a> </span><span class="lineNoCov">              0 :                     foreach ($params[1] as $index =&gt; $param) {                                                                          </span>
+<span class="lineNum" id="container505"><a name="505"></a><a href="#505" id="line505">     505</a> </span><span class="lineNoCov">              0 :                         if (isset($matches[$index])) {                                                                                  </span>
+<span class="lineNum" id="container506"><a name="506"></a><a href="#506" id="line506">     506</a> </span><span class="lineNoCov">              0 :                             if (substr($param, 0, 1) == ':') {                                                                          </span>
+<span class="lineNum" id="container507"><a name="507"></a><a href="#507" id="line507">     507</a> </span><span class="lineNoCov">              0 :                                 $matches[substr($param, 1)] = $matches[$index];                                                         </span>
+<span class="lineNum" id="container508"><a name="508"></a><a href="#508" id="line508">     508</a> </span><span class="lineNoCov">              0 :                                 unset($matches[$index]);                                                                                </span>
+<span class="lineNum" id="container509"><a name="509"></a><a href="#509" id="line509">     509</a> </span><span class="lineNoCov">              0 :                             } elseif (substr($param, 0, 1) == '{' &amp;&amp; substr($param, -1, 1) == '}') {                                    </span>
+<span class="lineNum" id="container510"><a name="510"></a><a href="#510" id="line510">     510</a> </span><span class="lineNoCov">              0 :                                 $matches[substr($param, 1, -1)] = $matches[$index];                                                     </span>
+<span class="lineNum" id="container511"><a name="511"></a><a href="#511" id="line511">     511</a> </span><span class="lineNoCov">              0 :                                 unset($matches[$index]);                                                                                </span>
+<span class="lineNum" id="container512"><a name="512"></a><a href="#512" id="line512">     512</a> </span><span class="lineNoCov">              0 :                             }                                                                                                           </span>
+<span class="lineNum" id="container513"><a name="513"></a><a href="#513" id="line513">     513</a> </span><span class="lineNoCov">              0 :                         }                                                                                                               </span>
+<span class="lineNum" id="container514"><a name="514"></a><a href="#514" id="line514">     514</a> </span><span class="lineNoCov">              0 :                     }                                                                                                                   </span>
+<span class="lineNum" id="container515"><a name="515"></a><a href="#515" id="line515">     515</a> </span><span class="lineNoCov">              0 :                 }                                                                                                                       </span>
+<span class="lineNum" id="container516"><a name="516"></a><a href="#516" id="line516">     516</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container517"><a name="517"></a><a href="#517" id="line517">     517</a> </span><span class="lineNoCov">              0 :                 $uriMatches[isset($resource['priority']) ? $resource['priority'] : 0] = array(                                          </span>
+<span class="lineNum" id="container518"><a name="518"></a><a href="#518" id="line518">     518</a> </span><span class="lineNoCov">              0 :                     $uri,                                                                                                               </span>
+<span class="lineNum" id="container519"><a name="519"></a><a href="#519" id="line519">     519</a> </span><span class="lineNoCov">              0 :                     $resource,                                                                                                          </span>
+<span class="lineNum" id="container520"><a name="520"></a><a href="#520" id="line520">     520</a> </span>                :                     $matches                                                                                                            
+<span class="lineNum" id="container521"><a name="521"></a><a href="#521" id="line521">     521</a> </span><span class="lineNoCov">              0 :                 );                                                                                                                      </span>
+<span class="lineNum" id="container522"><a name="522"></a><a href="#522" id="line522">     522</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container523"><a name="523"></a><a href="#523" id="line523">     523</a> </span><span class="lineNoCov">              0 :             }                                                                                                                           </span>
+<span class="lineNum" id="container524"><a name="524"></a><a href="#524" id="line524">     524</a> </span><span class="lineNoCov">              0 :         }                                                                                                                               </span>
+<span class="lineNum" id="container525"><a name="525"></a><a href="#525" id="line525">     525</a> </span><span class="lineNoCov">              0 :         krsort($uriMatches);                                                                                                            </span>
+<span class="lineNum" id="container526"><a name="526"></a><a href="#526" id="line526">     526</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container527"><a name="527"></a><a href="#527" id="line527">     527</a> </span><span class="lineNoCov">              0 :         if ($uriMatches) {                                                                                                              </span>
+<span class="lineNum" id="container528"><a name="528"></a><a href="#528" id="line528">     528</a> </span><span class="lineNoCov">              0 :             list($uri, $resource, $parameters) = array_shift($uriMatches);                                                              </span>
+<span class="lineNum" id="container529"><a name="529"></a><a href="#529" id="line529">     529</a> </span><span class="lineNoCov">              0 :             if (!$resource['loaded']) { // autoload                                                                                     </span>
+<span class="lineNum" id="container530"><a name="530"></a><a href="#530" id="line530">     530</a> </span><span class="lineNoCov">              0 :                 if (!class_exists($resource['class'])) {                                                                                </span>
+<span class="lineNum" id="container531"><a name="531"></a><a href="#531" id="line531">     531</a> </span><span class="lineNoCov">              0 :                     throw new Exception('Unable to load resource' . $resource['class']);                                                </span>
+<span class="lineNum" id="container532"><a name="532"></a><a href="#532" id="line532">     532</a> </span>                :                 }                                                                                                                       
+<span class="lineNum" id="container533"><a name="533"></a><a href="#533" id="line533">     533</a> </span><span class="lineNoCov">              0 :                 $resourceDetails = $this-&gt;getResourceClassDetails($resource['class']);                                                  </span>
+<span class="lineNum" id="container534"><a name="534"></a><a href="#534" id="line534">     534</a> </span><span class="lineNoCov">              0 :                 $resource = $this-&gt;resources[$uri] = array(                                                                             </span>
+<span class="lineNum" id="container535"><a name="535"></a><a href="#535" id="line535">     535</a> </span><span class="lineNoCov">              0 :                     'namespace' =&gt; $resourceDetails['namespaceName'],                                                                   </span>
+<span class="lineNum" id="container536"><a name="536"></a><a href="#536" id="line536">     536</a> </span><span class="lineNoCov">              0 :                     'class' =&gt; $resourceDetails['className'],                                                                           </span>
+<span class="lineNum" id="container537"><a name="537"></a><a href="#537" id="line537">     537</a> </span><span class="lineNoCov">              0 :                     'filename' =&gt; $resourceDetails['filename'],                                                                         </span>
+<span class="lineNum" id="container538"><a name="538"></a><a href="#538" id="line538">     538</a> </span><span class="lineNoCov">              0 :                     'line' =&gt; $resourceDetails['line'],                                                                                 </span>
+<span class="lineNum" id="container539"><a name="539"></a><a href="#539" id="line539">     539</a> </span><span class="lineNoCov">              0 :                     'priority' =&gt; 0,                                                                                                    </span>
+<span class="lineNum" id="container540"><a name="540"></a><a href="#540" id="line540">     540</a> </span>                :                     'loaded' =&gt; TRUE                                                                                                    
+<span class="lineNum" id="container541"><a name="541"></a><a href="#541" id="line541">     541</a> </span><span class="lineNoCov">              0 :                 );                                                                                                                      </span>
+<span class="lineNum" id="container542"><a name="542"></a><a href="#542" id="line542">     542</a> </span><span class="lineNoCov">              0 :             }                                                                                                                           </span>
+<span class="lineNum" id="container543"><a name="543"></a><a href="#543" id="line543">     543</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container544"><a name="544"></a><a href="#544" id="line544">     544</a> </span><span class="lineNoCov">              0 :             $this-&gt;allowedMethods = array_intersect(array_map('strtoupper', get_class_methods($resource['class'])), $this-&gt;HTTPMethods);</span>
+<span class="lineNum" id="container545"><a name="545"></a><a href="#545" id="line545">     545</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container546"><a name="546"></a><a href="#546" id="line546">     546</a> </span><span class="lineNoCov">              0 :             return new $resource['class']($parameters);                                                                                 </span>
+<span class="lineNum" id="container547"><a name="547"></a><a href="#547" id="line547">     547</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container548"><a name="548"></a><a href="#548" id="line548">     548</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container549"><a name="549"></a><a href="#549" id="line549">     549</a> </span>                :         // no resource found, throw response exception                                                                                  
+<span class="lineNum" id="container550"><a name="550"></a><a href="#550" id="line550">     550</a> </span><span class="lineNoCov">              0 :         throw new ResponseException('A resource matching URI &quot;'.$this-&gt;uri.'&quot; was not found', Response::NOTFOUND);                      </span>
+<span class="lineNum" id="container551"><a name="551"></a><a href="#551" id="line551">     551</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container552"><a name="552"></a><a href="#552" id="line552">     552</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container553"><a name="553"></a><a href="#553" id="line553">     553</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container554"><a name="554"></a><a href="#554" id="line554">     554</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container555"><a name="555"></a><a href="#555" id="line555">     555</a> </span>                :      * Check if an etag matches the requests if-match header                                                                            
+<span class="lineNum" id="container556"><a name="556"></a><a href="#556" id="line556">     556</a> </span>                :      * @param str etag Etag to match                                                                                                    
+<span class="lineNum" id="container557"><a name="557"></a><a href="#557" id="line557">     557</a> </span>                :      * @return bool                                                                                                                     
+<span class="lineNum" id="container558"><a name="558"></a><a href="#558" id="line558">     558</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container559"><a name="559"></a><a href="#559" id="line559">     559</a> </span>                :     function ifMatch($etag) {                                                                                                           
+<span class="lineNum" id="container560"><a name="560"></a><a href="#560" id="line560">     560</a> </span><span class="lineNoCov">              0 :         if (isset($this-&gt;ifMatch[0]) &amp;&amp; $this-&gt;ifMatch[0] == '*') {                                                                     </span>
+<span class="lineNum" id="container561"><a name="561"></a><a href="#561" id="line561">     561</a> </span><span class="lineNoCov">              0 :             return TRUE;                                                                                                                </span>
+<span class="lineNum" id="container562"><a name="562"></a><a href="#562" id="line562">     562</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container563"><a name="563"></a><a href="#563" id="line563">     563</a> </span><span class="lineNoCov">              0 :         return in_array($etag, $this-&gt;ifMatch);                                                                                         </span>
+<span class="lineNum" id="container564"><a name="564"></a><a href="#564" id="line564">     564</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container565"><a name="565"></a><a href="#565" id="line565">     565</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container566"><a name="566"></a><a href="#566" id="line566">     566</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container567"><a name="567"></a><a href="#567" id="line567">     567</a> </span>                :      * Check if an etag matches the requests if-none-match header                                                                       
+<span class="lineNum" id="container568"><a name="568"></a><a href="#568" id="line568">     568</a> </span>                :      * @param str etag Etag to match                                                                                                    
+<span class="lineNum" id="container569"><a name="569"></a><a href="#569" id="line569">     569</a> </span>                :      * @return bool                                                                                                                     
+<span class="lineNum" id="container570"><a name="570"></a><a href="#570" id="line570">     570</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container571"><a name="571"></a><a href="#571" id="line571">     571</a> </span>                :     function ifNoneMatch($etag) {                                                                                                       
+<span class="lineNum" id="container572"><a name="572"></a><a href="#572" id="line572">     572</a> </span><span class="lineNoCov">              0 :         if (isset($this-&gt;ifMatch[0]) &amp;&amp; $this-&gt;ifMatch[0] == '*') {                                                                     </span>
+<span class="lineNum" id="container573"><a name="573"></a><a href="#573" id="line573">     573</a> </span><span class="lineNoCov">              0 :             return FALSE;                                                                                                               </span>
+<span class="lineNum" id="container574"><a name="574"></a><a href="#574" id="line574">     574</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container575"><a name="575"></a><a href="#575" id="line575">     575</a> </span><span class="lineNoCov">              0 :         return in_array($etag, $this-&gt;ifNoneMatch);                                                                                     </span>
+<span class="lineNum" id="container576"><a name="576"></a><a href="#576" id="line576">     576</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container577"><a name="577"></a><a href="#577" id="line577">     577</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container578"><a name="578"></a><a href="#578" id="line578">     578</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container579"><a name="579"></a><a href="#579" id="line579">     579</a> </span>                :      * Return the most acceptable of the given formats based on the accept array                                                        
+<span class="lineNum" id="container580"><a name="580"></a><a href="#580" id="line580">     580</a> </span>                :      * @param str[] formats                                                                                                             
+<span class="lineNum" id="container581"><a name="581"></a><a href="#581" id="line581">     581</a> </span>                :      * @param str default The default format if the requested format does not match $formats                                            
+<span class="lineNum" id="container582"><a name="582"></a><a href="#582" id="line582">     582</a> </span>                :      * @return str                                                                                                                      
+<span class="lineNum" id="container583"><a name="583"></a><a href="#583" id="line583">     583</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container584"><a name="584"></a><a href="#584" id="line584">     584</a> </span>                :     function mostAcceptable($formats, $default = NULL) {                                                                                
+<span class="lineNum" id="container585"><a name="585"></a><a href="#585" id="line585">     585</a> </span><span class="lineNoCov">              0 :         foreach (call_user_func_array('array_merge', $this-&gt;accept) as $format) {                                                       </span>
+<span class="lineNum" id="container586"><a name="586"></a><a href="#586" id="line586">     586</a> </span><span class="lineNoCov">              0 :             if (in_array($format, $formats)) {                                                                                          </span>
+<span class="lineNum" id="container587"><a name="587"></a><a href="#587" id="line587">     587</a> </span><span class="lineNoCov">              0 :                 return $format;                                                                                                         </span>
+<span class="lineNum" id="container588"><a name="588"></a><a href="#588" id="line588">     588</a> </span>                :             }                                                                                                                           
+<span class="lineNum" id="container589"><a name="589"></a><a href="#589" id="line589">     589</a> </span><span class="lineNoCov">              0 :         }                                                                                                                               </span>
+<span class="lineNum" id="container590"><a name="590"></a><a href="#590" id="line590">     590</a> </span><span class="lineNoCov">              0 :         return $default;                                                                                                                </span>
+<span class="lineNum" id="container591"><a name="591"></a><a href="#591" id="line591">     591</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container592"><a name="592"></a><a href="#592" id="line592">     592</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container593"><a name="593"></a><a href="#593" id="line593">     593</a> </span>                : }                                                                                                                                       
+<span class="lineNum" id="container594"><a name="594"></a><a href="#594" id="line594">     594</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container595"><a name="595"></a><a href="#595" id="line595">     595</a> </span>                : /**                                                                                                                                     
+<span class="lineNum" id="container596"><a name="596"></a><a href="#596" id="line596">     596</a> </span>                :  * Base resource class                                                                                                                  
+<span class="lineNum" id="container597"><a name="597"></a><a href="#597" id="line597">     597</a> </span>                :  * @namespace Tonic\Lib                                                                                                                 
+<span class="lineNum" id="container598"><a name="598"></a><a href="#598" id="line598">     598</a> </span>                :  */                                                                                                                                     
+<span class="lineNum" id="container599"><a name="599"></a><a href="#599" id="line599">     599</a> </span>                : class Resource {                                                                                                                        
+<span class="lineNum" id="container600"><a name="600"></a><a href="#600" id="line600">     600</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container601"><a name="601"></a><a href="#601" id="line601">     601</a> </span>                :     private $parameters;                                                                                                                
+<span class="lineNum" id="container602"><a name="602"></a><a href="#602" id="line602">     602</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container603"><a name="603"></a><a href="#603" id="line603">     603</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container604"><a name="604"></a><a href="#604" id="line604">     604</a> </span>                :      * Resource constructor                                                                                                             
+<span class="lineNum" id="container605"><a name="605"></a><a href="#605" id="line605">     605</a> </span>                :      * @param str[] parameters Parameters passed in from the URL as matched from the URI regex                                          
+<span class="lineNum" id="container606"><a name="606"></a><a href="#606" id="line606">     606</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container607"><a name="607"></a><a href="#607" id="line607">     607</a> </span>                :     function  __construct($parameters) {                                                                                                
+<span class="lineNum" id="container608"><a name="608"></a><a href="#608" id="line608">     608</a> </span><span class="lineNoCov">              0 :         $this-&gt;parameters = $parameters;                                                                                                </span>
+<span class="lineNum" id="container609"><a name="609"></a><a href="#609" id="line609">     609</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                   </span>
+<span class="lineNum" id="container610"><a name="610"></a><a href="#610" id="line610">     610</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container611"><a name="611"></a><a href="#611" id="line611">     611</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container612"><a name="612"></a><a href="#612" id="line612">     612</a> </span>                :      * Convert the object into a string suitable for printing                                                                           
+<span class="lineNum" id="container613"><a name="613"></a><a href="#613" id="line613">     613</a> </span>                :      * @return str                                                                                                                      
+<span class="lineNum" id="container614"><a name="614"></a><a href="#614" id="line614">     614</a> </span>                :      * @codeCoverageIgnore                                                                                                              
+<span class="lineNum" id="container615"><a name="615"></a><a href="#615" id="line615">     615</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container616"><a name="616"></a><a href="#616" id="line616">     616</a> </span>                :     function __toString() {                                                                                                             
+<span class="lineNum" id="container617"><a name="617"></a><a href="#617" id="line617">     617</a> </span>                :         $str = get_class($this);                                                                                                        
+<span class="lineNum" id="container618"><a name="618"></a><a href="#618" id="line618">     618</a> </span>                :         foreach ($this-&gt;parameters as $name =&gt; $value) {                                                                                
+<span class="lineNum" id="container619"><a name="619"></a><a href="#619" id="line619">     619</a> </span>                :             $str .= &quot;\n&quot;.$name.': '.$value;                                                                                             
+<span class="lineNum" id="container620"><a name="620"></a><a href="#620" id="line620">     620</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container621"><a name="621"></a><a href="#621" id="line621">     621</a> </span>                :         return $str;                                                                                                                    
+<span class="lineNum" id="container622"><a name="622"></a><a href="#622" id="line622">     622</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container623"><a name="623"></a><a href="#623" id="line623">     623</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container624"><a name="624"></a><a href="#624" id="line624">     624</a> </span>                :     function secured()                                                                                                                  
+<span class="lineNum" id="container625"><a name="625"></a><a href="#625" id="line625">     625</a> </span>                :     {                                                                                                                                   
+<span class="lineNum" id="container626"><a name="626"></a><a href="#626" id="line626">     626</a> </span>                :     try                                                                                                                                 
+<span class="lineNum" id="container627"><a name="627"></a><a href="#627" id="line627">     627</a> </span>                :     {                                                                                                                                   
+<span class="lineNum" id="container628"><a name="628"></a><a href="#628" id="line628">     628</a> </span><span class="lineNoCov">              0 :         $oauth = new OAuth2(new OAuth2StorageUserCredential());                                                                         </span>
+<span class="lineNum" id="container629"><a name="629"></a><a href="#629" id="line629">     629</a> </span><span class="lineNoCov">              0 :         $token = $oauth-&gt;getBearerToken();                                                                                              </span>
+<span class="lineNum" id="container630"><a name="630"></a><a href="#630" id="line630">     630</a> </span><span class="lineNoCov">              0 :         $oauth-&gt;verifyAccessToken($token);                                                                                              </span>
+<span class="lineNum" id="container631"><a name="631"></a><a href="#631" id="line631">     631</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container632"><a name="632"></a><a href="#632" id="line632">     632</a> </span><span class="lineNoCov">              0 :     catch (OAuth2ServerException $oauthError)                                                                                           </span>
+<span class="lineNum" id="container633"><a name="633"></a><a href="#633" id="line633">     633</a> </span>                :     {                                                                                                                                   
+<span class="lineNum" id="container634"><a name="634"></a><a href="#634" id="line634">     634</a> </span><span class="lineNoCov">              0 :         $oauthError-&gt;sendHttpResponse();                                                                                                </span>
+<span class="lineNum" id="container635"><a name="635"></a><a href="#635" id="line635">     635</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container636"><a name="636"></a><a href="#636" id="line636">     636</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                   </span>
+<span class="lineNum" id="container637"><a name="637"></a><a href="#637" id="line637">     637</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container638"><a name="638"></a><a href="#638" id="line638">     638</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container639"><a name="639"></a><a href="#639" id="line639">     639</a> </span>                :      * Execute a request on this resource.                                                                                              
+<span class="lineNum" id="container640"><a name="640"></a><a href="#640" id="line640">     640</a> </span>                :      * @param Request request The request to execute the resource in the context of                                                     
+<span class="lineNum" id="container641"><a name="641"></a><a href="#641" id="line641">     641</a> </span>                :      * @return Response                                                                                                                 
+<span class="lineNum" id="container642"><a name="642"></a><a href="#642" id="line642">     642</a> </span>                :      * @throws ResponseException If the HTTP method is not allowed on the resource, a 405 exception is thrown                           
+<span class="lineNum" id="container643"><a name="643"></a><a href="#643" id="line643">     643</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container644"><a name="644"></a><a href="#644" id="line644">     644</a> </span>                :     function exec($request) {                                                                                                           
+<span class="lineNum" id="container645"><a name="645"></a><a href="#645" id="line645">     645</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container646"><a name="646"></a><a href="#646" id="line646">     646</a> </span>                :         if (                                                                                                                            
+<span class="lineNum" id="container647"><a name="647"></a><a href="#647" id="line647">     647</a> </span><span class="lineNoCov">              0 :             in_array(strtoupper($request-&gt;method), $request-&gt;HTTPMethods) &amp;&amp;                                                            </span>
+<span class="lineNum" id="container648"><a name="648"></a><a href="#648" id="line648">     648</a> </span><span class="lineNoCov">              0 :             method_exists($this, $request-&gt;method)                                                                                      </span>
+<span class="lineNum" id="container649"><a name="649"></a><a href="#649" id="line649">     649</a> </span><span class="lineNoCov">              0 :         ) {                                                                                                                             </span>
+<span class="lineNum" id="container650"><a name="650"></a><a href="#650" id="line650">     650</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container651"><a name="651"></a><a href="#651" id="line651">     651</a> </span><span class="lineNoCov">              0 :             $method = new ReflectionMethod($this, $request-&gt;method);                                                                    </span>
+<span class="lineNum" id="container652"><a name="652"></a><a href="#652" id="line652">     652</a> </span><span class="lineNoCov">              0 :             $parameters = array();                                                                                                      </span>
+<span class="lineNum" id="container653"><a name="653"></a><a href="#653" id="line653">     653</a> </span><span class="lineNoCov">              0 :             foreach ($method-&gt;getParameters() as $param) {                                                                              </span>
+<span class="lineNum" id="container654"><a name="654"></a><a href="#654" id="line654">     654</a> </span><span class="lineNoCov">              0 :                 if ($param-&gt;name == 'request') {                                                                                        </span>
+<span class="lineNum" id="container655"><a name="655"></a><a href="#655" id="line655">     655</a> </span><span class="lineNoCov">              0 :                     $parameters[] = $request;                                                                                           </span>
+<span class="lineNum" id="container656"><a name="656"></a><a href="#656" id="line656">     656</a> </span><span class="lineNoCov">              0 :                 } elseif (isset($this-&gt;parameters[$param-&gt;name])) {                                                                     </span>
+<span class="lineNum" id="container657"><a name="657"></a><a href="#657" id="line657">     657</a> </span><span class="lineNoCov">              0 :                     $parameters[] = $this-&gt;parameters[$param-&gt;name];                                                                    </span>
+<span class="lineNum" id="container658"><a name="658"></a><a href="#658" id="line658">     658</a> </span><span class="lineNoCov">              0 :                     unset($this-&gt;parameters[$param-&gt;name]);                                                                             </span>
+<span class="lineNum" id="container659"><a name="659"></a><a href="#659" id="line659">     659</a> </span><span class="lineNoCov">              0 :                 } else {                                                                                                                </span>
+<span class="lineNum" id="container660"><a name="660"></a><a href="#660" id="line660">     660</a> </span><span class="lineNoCov">              0 :                     $parameters[] = reset($this-&gt;parameters);                                                                           </span>
+<span class="lineNum" id="container661"><a name="661"></a><a href="#661" id="line661">     661</a> </span><span class="lineNoCov">              0 :                     array_shift($this-&gt;parameters);                                                                                     </span>
+<span class="lineNum" id="container662"><a name="662"></a><a href="#662" id="line662">     662</a> </span>                :                 }                                                                                                                       
+<span class="lineNum" id="container663"><a name="663"></a><a href="#663" id="line663">     663</a> </span><span class="lineNoCov">              0 :             }                                                                                                                           </span>
+<span class="lineNum" id="container664"><a name="664"></a><a href="#664" id="line664">     664</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container665"><a name="665"></a><a href="#665" id="line665">     665</a> </span><span class="lineNoCov">              0 :             $response = call_user_func_array(                                                                                           </span>
+<span class="lineNum" id="container666"><a name="666"></a><a href="#666" id="line666">     666</a> </span><span class="lineNoCov">              0 :                 array($this, $request-&gt;method),                                                                                         </span>
+<span class="lineNum" id="container667"><a name="667"></a><a href="#667" id="line667">     667</a> </span>                :                 $parameters                                                                                                             
+<span class="lineNum" id="container668"><a name="668"></a><a href="#668" id="line668">     668</a> </span><span class="lineNoCov">              0 :             );                                                                                                                          </span>
+<span class="lineNum" id="container669"><a name="669"></a><a href="#669" id="line669">     669</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container670"><a name="670"></a><a href="#670" id="line670">     670</a> </span><span class="lineNoCov">              0 :             $responseClassName = class_exists('Tonic\\Response', false) ? 'Tonic\\Response' : 'Response';                               </span>
+<span class="lineNum" id="container671"><a name="671"></a><a href="#671" id="line671">     671</a> </span><span class="lineNoCov">              0 :             if (!$response || !($response instanceof $responseClassName)) {                                                             </span>
+<span class="lineNum" id="container672"><a name="672"></a><a href="#672" id="line672">     672</a> </span><span class="lineNoCov">              0 :                 throw new Exception('Method '.$request-&gt;method.' of '.get_class($this).' did not return a Response object');            </span>
+<span class="lineNum" id="container673"><a name="673"></a><a href="#673" id="line673">     673</a> </span>                :             }                                                                                                                           
+<span class="lineNum" id="container674"><a name="674"></a><a href="#674" id="line674">     674</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container675"><a name="675"></a><a href="#675" id="line675">     675</a> </span><span class="lineNoCov">              0 :         } else {                                                                                                                        </span>
+<span class="lineNum" id="container676"><a name="676"></a><a href="#676" id="line676">     676</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container677"><a name="677"></a><a href="#677" id="line677">     677</a> </span>                :             // send 405 method not allowed                                                                                              
+<span class="lineNum" id="container678"><a name="678"></a><a href="#678" id="line678">     678</a> </span><span class="lineNoCov">              0 :             throw new ResponseException(                                                                                                </span>
+<span class="lineNum" id="container679"><a name="679"></a><a href="#679" id="line679">     679</a> </span><span class="lineNoCov">              0 :                 'The HTTP method &quot;'.$request-&gt;method.'&quot; is not allowed for the resource &quot;'.$request-&gt;uri.'&quot;.',                          </span>
+<span class="lineNum" id="container680"><a name="680"></a><a href="#680" id="line680">     680</a> </span>                :                 Response::METHODNOTALLOWED                                                                                              
+<span class="lineNum" id="container681"><a name="681"></a><a href="#681" id="line681">     681</a> </span><span class="lineNoCov">              0 :             );                                                                                                                          </span>
+<span class="lineNum" id="container682"><a name="682"></a><a href="#682" id="line682">     682</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container683"><a name="683"></a><a href="#683" id="line683">     683</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container684"><a name="684"></a><a href="#684" id="line684">     684</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container685"><a name="685"></a><a href="#685" id="line685">     685</a> </span>                :         # good for debugging, remove this at some point                                                                                 
+<span class="lineNum" id="container686"><a name="686"></a><a href="#686" id="line686">     686</a> </span><span class="lineNoCov">              0 :         $response-&gt;addHeader('X-Resource', get_class($this));                                                                           </span>
+<span class="lineNum" id="container687"><a name="687"></a><a href="#687" id="line687">     687</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container688"><a name="688"></a><a href="#688" id="line688">     688</a> </span><span class="lineNoCov">              0 :         return $response;                                                                                                               </span>
+<span class="lineNum" id="container689"><a name="689"></a><a href="#689" id="line689">     689</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container690"><a name="690"></a><a href="#690" id="line690">     690</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container691"><a name="691"></a><a href="#691" id="line691">     691</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container692"><a name="692"></a><a href="#692" id="line692">     692</a> </span>                : }                                                                                                                                       
+<span class="lineNum" id="container693"><a name="693"></a><a href="#693" id="line693">     693</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container694"><a name="694"></a><a href="#694" id="line694">     694</a> </span>                : /**                                                                                                                                     
+<span class="lineNum" id="container695"><a name="695"></a><a href="#695" id="line695">     695</a> </span>                :  * Model the data of the outgoing HTTP response                                                                                         
+<span class="lineNum" id="container696"><a name="696"></a><a href="#696" id="line696">     696</a> </span>                :  * @namespace Tonic\Lib                                                                                                                 
+<span class="lineNum" id="container697"><a name="697"></a><a href="#697" id="line697">     697</a> </span>                :  */                                                                                                                                     
+<span class="lineNum" id="container698"><a name="698"></a><a href="#698" id="line698">     698</a> </span>                : class Response {                                                                                                                        
+<span class="lineNum" id="container699"><a name="699"></a><a href="#699" id="line699">     699</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container700"><a name="700"></a><a href="#700" id="line700">     700</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container701"><a name="701"></a><a href="#701" id="line701">     701</a> </span>                :      * HTTP response code constant                                                                                                      
+<span class="lineNum" id="container702"><a name="702"></a><a href="#702" id="line702">     702</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container703"><a name="703"></a><a href="#703" id="line703">     703</a> </span>                :     const OK = 200,                                                                                                                     
+<span class="lineNum" id="container704"><a name="704"></a><a href="#704" id="line704">     704</a> </span>                :           CREATED = 201,                                                                                                                
+<span class="lineNum" id="container705"><a name="705"></a><a href="#705" id="line705">     705</a> </span>                :           NOCONTENT = 204,                                                                                                              
+<span class="lineNum" id="container706"><a name="706"></a><a href="#706" id="line706">     706</a> </span>                :           MOVEDPERMANENTLY = 301,                                                                                                       
+<span class="lineNum" id="container707"><a name="707"></a><a href="#707" id="line707">     707</a> </span>                :           FOUND = 302,                                                                                                                  
+<span class="lineNum" id="container708"><a name="708"></a><a href="#708" id="line708">     708</a> </span>                :           SEEOTHER = 303,                                                                                                               
+<span class="lineNum" id="container709"><a name="709"></a><a href="#709" id="line709">     709</a> </span>                :           NOTMODIFIED = 304,                                                                                                            
+<span class="lineNum" id="container710"><a name="710"></a><a href="#710" id="line710">     710</a> </span>                :           TEMPORARYREDIRECT = 307,                                                                                                      
+<span class="lineNum" id="container711"><a name="711"></a><a href="#711" id="line711">     711</a> </span>                :           BADREQUEST = 400,                                                                                                             
+<span class="lineNum" id="container712"><a name="712"></a><a href="#712" id="line712">     712</a> </span>                :           UNAUTHORIZED = 401,                                                                                                           
+<span class="lineNum" id="container713"><a name="713"></a><a href="#713" id="line713">     713</a> </span>                :           FORBIDDEN = 403,                                                                                                              
+<span class="lineNum" id="container714"><a name="714"></a><a href="#714" id="line714">     714</a> </span>                :           NOTFOUND = 404,                                                                                                               
+<span class="lineNum" id="container715"><a name="715"></a><a href="#715" id="line715">     715</a> </span>                :           METHODNOTALLOWED = 405,                                                                                                       
+<span class="lineNum" id="container716"><a name="716"></a><a href="#716" id="line716">     716</a> </span>                :           NOTACCEPTABLE = 406,                                                                                                          
+<span class="lineNum" id="container717"><a name="717"></a><a href="#717" id="line717">     717</a> </span>                :           GONE = 410,                                                                                                                   
+<span class="lineNum" id="container718"><a name="718"></a><a href="#718" id="line718">     718</a> </span>                :           LENGTHREQUIRED = 411,                                                                                                         
+<span class="lineNum" id="container719"><a name="719"></a><a href="#719" id="line719">     719</a> </span>                :           PRECONDITIONFAILED = 412,                                                                                                     
+<span class="lineNum" id="container720"><a name="720"></a><a href="#720" id="line720">     720</a> </span>                :           UNSUPPORTEDMEDIATYPE = 415,                                                                                                   
+<span class="lineNum" id="container721"><a name="721"></a><a href="#721" id="line721">     721</a> </span>                :           INTERNALSERVERERROR = 500;                                                                                                    
+<span class="lineNum" id="container722"><a name="722"></a><a href="#722" id="line722">     722</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container723"><a name="723"></a><a href="#723" id="line723">     723</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container724"><a name="724"></a><a href="#724" id="line724">     724</a> </span>                :      * The request object generating this response                                                                                      
+<span class="lineNum" id="container725"><a name="725"></a><a href="#725" id="line725">     725</a> </span>                :      * @var Request                                                                                                                     
+<span class="lineNum" id="container726"><a name="726"></a><a href="#726" id="line726">     726</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container727"><a name="727"></a><a href="#727" id="line727">     727</a> </span>                :     public $request;                                                                                                                    
+<span class="lineNum" id="container728"><a name="728"></a><a href="#728" id="line728">     728</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container729"><a name="729"></a><a href="#729" id="line729">     729</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container730"><a name="730"></a><a href="#730" id="line730">     730</a> </span>                :      * The HTTP response code to send                                                                                                   
+<span class="lineNum" id="container731"><a name="731"></a><a href="#731" id="line731">     731</a> </span>                :      * @var int                                                                                                                         
+<span class="lineNum" id="container732"><a name="732"></a><a href="#732" id="line732">     732</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container733"><a name="733"></a><a href="#733" id="line733">     733</a> </span>                :     public $code = Response::OK;                                                                                                        
+<span class="lineNum" id="container734"><a name="734"></a><a href="#734" id="line734">     734</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container735"><a name="735"></a><a href="#735" id="line735">     735</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container736"><a name="736"></a><a href="#736" id="line736">     736</a> </span>                :      * The HTTP headers to send                                                                                                         
+<span class="lineNum" id="container737"><a name="737"></a><a href="#737" id="line737">     737</a> </span>                :      * @var str[]                                                                                                                       
+<span class="lineNum" id="container738"><a name="738"></a><a href="#738" id="line738">     738</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container739"><a name="739"></a><a href="#739" id="line739">     739</a> </span>                :     public $headers = array();                                                                                                          
+<span class="lineNum" id="container740"><a name="740"></a><a href="#740" id="line740">     740</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container741"><a name="741"></a><a href="#741" id="line741">     741</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container742"><a name="742"></a><a href="#742" id="line742">     742</a> </span>                :      * The HTTP response body to send                                                                                                   
+<span class="lineNum" id="container743"><a name="743"></a><a href="#743" id="line743">     743</a> </span>                :      * @var str                                                                                                                         
+<span class="lineNum" id="container744"><a name="744"></a><a href="#744" id="line744">     744</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container745"><a name="745"></a><a href="#745" id="line745">     745</a> </span>                :     public $body;                                                                                                                       
+<span class="lineNum" id="container746"><a name="746"></a><a href="#746" id="line746">     746</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container747"><a name="747"></a><a href="#747" id="line747">     747</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container748"><a name="748"></a><a href="#748" id="line748">     748</a> </span>                :      * Create a response object.                                                                                                        
+<span class="lineNum" id="container749"><a name="749"></a><a href="#749" id="line749">     749</a> </span>                :      * @param Request request The request object generating this response                                                               
+<span class="lineNum" id="container750"><a name="750"></a><a href="#750" id="line750">     750</a> </span>                :      * @param str uri The URL of the actual resource being used to build the response                                                   
+<span class="lineNum" id="container751"><a name="751"></a><a href="#751" id="line751">     751</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container752"><a name="752"></a><a href="#752" id="line752">     752</a> </span>                :     function __construct($request, $uri = NULL) {                                                                                       
+<span class="lineNum" id="container753"><a name="753"></a><a href="#753" id="line753">     753</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container754"><a name="754"></a><a href="#754" id="line754">     754</a> </span><span class="lineNoCov">              0 :         $this-&gt;request = $request;                                                                                                      </span>
+<span class="lineNum" id="container755"><a name="755"></a><a href="#755" id="line755">     755</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container756"><a name="756"></a><a href="#756" id="line756">     756</a> </span><span class="lineNoCov">              0 :         if ($uri &amp;&amp; $uri != $request-&gt;uri) { // add content location header                                                             </span>
+<span class="lineNum" id="container757"><a name="757"></a><a href="#757" id="line757">     757</a> </span><span class="lineNoCov">              0 :             $this-&gt;addHeader('Content-Location', $uri);                                                                                 </span>
+<span class="lineNum" id="container758"><a name="758"></a><a href="#758" id="line758">     758</a> </span><span class="lineNoCov">              0 :             $this-&gt;addVary('Accept');                                                                                                   </span>
+<span class="lineNum" id="container759"><a name="759"></a><a href="#759" id="line759">     759</a> </span><span class="lineNoCov">              0 :             $this-&gt;addVary('Accept-Language');                                                                                          </span>
+<span class="lineNum" id="container760"><a name="760"></a><a href="#760" id="line760">     760</a> </span><span class="lineNoCov">              0 :         }                                                                                                                               </span>
+<span class="lineNum" id="container761"><a name="761"></a><a href="#761" id="line761">     761</a> </span><span class="lineNoCov">              0 :         $this-&gt;addHeader('Allow', implode(', ', $request-&gt;allowedMethods));                                                             </span>
+<span class="lineNum" id="container762"><a name="762"></a><a href="#762" id="line762">     762</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container763"><a name="763"></a><a href="#763" id="line763">     763</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                   </span>
+<span class="lineNum" id="container764"><a name="764"></a><a href="#764" id="line764">     764</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container765"><a name="765"></a><a href="#765" id="line765">     765</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container766"><a name="766"></a><a href="#766" id="line766">     766</a> </span>                :      * Convert the object into a string suitable for printing                                                                           
+<span class="lineNum" id="container767"><a name="767"></a><a href="#767" id="line767">     767</a> </span>                :      * @return str                                                                                                                      
+<span class="lineNum" id="container768"><a name="768"></a><a href="#768" id="line768">     768</a> </span>                :      * @codeCoverageIgnore                                                                                                              
+<span class="lineNum" id="container769"><a name="769"></a><a href="#769" id="line769">     769</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container770"><a name="770"></a><a href="#770" id="line770">     770</a> </span>                :     function __toString() {                                                                                                             
+<span class="lineNum" id="container771"><a name="771"></a><a href="#771" id="line771">     771</a> </span>                :         $str = 'HTTP/1.1 '.$this-&gt;code;                                                                                                 
+<span class="lineNum" id="container772"><a name="772"></a><a href="#772" id="line772">     772</a> </span>                :         foreach ($this-&gt;headers as $name =&gt; $value) {                                                                                   
+<span class="lineNum" id="container773"><a name="773"></a><a href="#773" id="line773">     773</a> </span>                :             $str .= &quot;\n&quot;.$name.': '.$value;                                                                                             
+<span class="lineNum" id="container774"><a name="774"></a><a href="#774" id="line774">     774</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container775"><a name="775"></a><a href="#775" id="line775">     775</a> </span>                :         return $str;                                                                                                                    
+<span class="lineNum" id="container776"><a name="776"></a><a href="#776" id="line776">     776</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container777"><a name="777"></a><a href="#777" id="line777">     777</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container778"><a name="778"></a><a href="#778" id="line778">     778</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container779"><a name="779"></a><a href="#779" id="line779">     779</a> </span>                :      * Add a header to the response                                                                                                     
+<span class="lineNum" id="container780"><a name="780"></a><a href="#780" id="line780">     780</a> </span>                :      * @param str header                                                                                                                
+<span class="lineNum" id="container781"><a name="781"></a><a href="#781" id="line781">     781</a> </span>                :      * @param str value                                                                                                                 
+<span class="lineNum" id="container782"><a name="782"></a><a href="#782" id="line782">     782</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container783"><a name="783"></a><a href="#783" id="line783">     783</a> </span>                :     function addHeader($header, $value) {                                                                                               
+<span class="lineNum" id="container784"><a name="784"></a><a href="#784" id="line784">     784</a> </span><span class="lineNoCov">              0 :         $this-&gt;headers[$header] = $value;                                                                                               </span>
+<span class="lineNum" id="container785"><a name="785"></a><a href="#785" id="line785">     785</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                   </span>
+<span class="lineNum" id="container786"><a name="786"></a><a href="#786" id="line786">     786</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container787"><a name="787"></a><a href="#787" id="line787">     787</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container788"><a name="788"></a><a href="#788" id="line788">     788</a> </span>                :      * Send a cache control header with the response                                                                                    
+<span class="lineNum" id="container789"><a name="789"></a><a href="#789" id="line789">     789</a> </span>                :      * @param int time Cache length in seconds                                                                                          
+<span class="lineNum" id="container790"><a name="790"></a><a href="#790" id="line790">     790</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container791"><a name="791"></a><a href="#791" id="line791">     791</a> </span>                :     function addCacheHeader($time = 86400) {                                                                                            
+<span class="lineNum" id="container792"><a name="792"></a><a href="#792" id="line792">     792</a> </span><span class="lineNoCov">              0 :         if ($time) {                                                                                                                    </span>
+<span class="lineNum" id="container793"><a name="793"></a><a href="#793" id="line793">     793</a> </span><span class="lineNoCov">              0 :             $this-&gt;addHeader('Cache-Control', 'max-age='.$time.', must-revalidate');                                                    </span>
+<span class="lineNum" id="container794"><a name="794"></a><a href="#794" id="line794">     794</a> </span><span class="lineNoCov">              0 :         } else {                                                                                                                        </span>
+<span class="lineNum" id="container795"><a name="795"></a><a href="#795" id="line795">     795</a> </span><span class="lineNoCov">              0 :             $this-&gt;addHeader('Cache-Control', 'no-cache');                                                                              </span>
+<span class="lineNum" id="container796"><a name="796"></a><a href="#796" id="line796">     796</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container797"><a name="797"></a><a href="#797" id="line797">     797</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                   </span>
+<span class="lineNum" id="container798"><a name="798"></a><a href="#798" id="line798">     798</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container799"><a name="799"></a><a href="#799" id="line799">     799</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container800"><a name="800"></a><a href="#800" id="line800">     800</a> </span>                :      * Send an etag with the response                                                                                                   
+<span class="lineNum" id="container801"><a name="801"></a><a href="#801" id="line801">     801</a> </span>                :      * @param str etag Etag value                                                                                                       
+<span class="lineNum" id="container802"><a name="802"></a><a href="#802" id="line802">     802</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container803"><a name="803"></a><a href="#803" id="line803">     803</a> </span>                :     function addEtag($etag) {                                                                                                           
+<span class="lineNum" id="container804"><a name="804"></a><a href="#804" id="line804">     804</a> </span><span class="lineNoCov">              0 :         $this-&gt;addHeader('Etag', '&quot;'.$etag.'&quot;');                                                                                        </span>
+<span class="lineNum" id="container805"><a name="805"></a><a href="#805" id="line805">     805</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                   </span>
+<span class="lineNum" id="container806"><a name="806"></a><a href="#806" id="line806">     806</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container807"><a name="807"></a><a href="#807" id="line807">     807</a> </span>                :     function addVary($header) {                                                                                                         
+<span class="lineNum" id="container808"><a name="808"></a><a href="#808" id="line808">     808</a> </span><span class="lineNoCov">              0 :         if (isset($this-&gt;headers['Vary'])) {                                                                                            </span>
+<span class="lineNum" id="container809"><a name="809"></a><a href="#809" id="line809">     809</a> </span><span class="lineNoCov">              0 :             $this-&gt;headers['Vary'] .= ', '.$header;                                                                                     </span>
+<span class="lineNum" id="container810"><a name="810"></a><a href="#810" id="line810">     810</a> </span><span class="lineNoCov">              0 :         } else {                                                                                                                        </span>
+<span class="lineNum" id="container811"><a name="811"></a><a href="#811" id="line811">     811</a> </span><span class="lineNoCov">              0 :             $this-&gt;addHeader('Vary', $header);                                                                                          </span>
+<span class="lineNum" id="container812"><a name="812"></a><a href="#812" id="line812">     812</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container813"><a name="813"></a><a href="#813" id="line813">     813</a> </span><span class="lineNoCov">              0 :     }                                                                                                                                   </span>
+<span class="lineNum" id="container814"><a name="814"></a><a href="#814" id="line814">     814</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container815"><a name="815"></a><a href="#815" id="line815">     815</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container816"><a name="816"></a><a href="#816" id="line816">     816</a> </span>                :      * Output the response                                                                                                              
+<span class="lineNum" id="container817"><a name="817"></a><a href="#817" id="line817">     817</a> </span>                :      * @codeCoverageIgnore                                                                                                              
+<span class="lineNum" id="container818"><a name="818"></a><a href="#818" id="line818">     818</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container819"><a name="819"></a><a href="#819" id="line819">     819</a> </span>                :     function output() {                                                                                                                 
+<span class="lineNum" id="container820"><a name="820"></a><a href="#820" id="line820">     820</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container821"><a name="821"></a><a href="#821" id="line821">     821</a> </span>                :         if (php_sapi_name() != 'cli' &amp;&amp; !headers_sent()) {                                                                              
+<span class="lineNum" id="container822"><a name="822"></a><a href="#822" id="line822">     822</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container823"><a name="823"></a><a href="#823" id="line823">     823</a> </span>                :             header('HTTP/1.1 '.$this-&gt;code);                                                                                            
+<span class="lineNum" id="container824"><a name="824"></a><a href="#824" id="line824">     824</a> </span>                :             foreach ($this-&gt;headers as $header =&gt; $value) {                                                                             
+<span class="lineNum" id="container825"><a name="825"></a><a href="#825" id="line825">     825</a> </span>                :                 header($header.': '.$value);                                                                                            
+<span class="lineNum" id="container826"><a name="826"></a><a href="#826" id="line826">     826</a> </span>                :             }                                                                                                                           
+<span class="lineNum" id="container827"><a name="827"></a><a href="#827" id="line827">     827</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container828"><a name="828"></a><a href="#828" id="line828">     828</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container829"><a name="829"></a><a href="#829" id="line829">     829</a> </span>                :         if (strtoupper($this-&gt;request-&gt;method) !== 'HEAD') {                                                                            
+<span class="lineNum" id="container830"><a name="830"></a><a href="#830" id="line830">     830</a> </span>                :             echo $this-&gt;body;                                                                                                           
+<span class="lineNum" id="container831"><a name="831"></a><a href="#831" id="line831">     831</a> </span>                :         }                                                                                                                               
+<span class="lineNum" id="container832"><a name="832"></a><a href="#832" id="line832">     832</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container833"><a name="833"></a><a href="#833" id="line833">     833</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container834"><a name="834"></a><a href="#834" id="line834">     834</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container835"><a name="835"></a><a href="#835" id="line835">     835</a> </span>                : }                                                                                                                                       
+<span class="lineNum" id="container836"><a name="836"></a><a href="#836" id="line836">     836</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container837"><a name="837"></a><a href="#837" id="line837">     837</a> </span>                : /**                                                                                                                                     
+<span class="lineNum" id="container838"><a name="838"></a><a href="#838" id="line838">     838</a> </span>                :  * Exception class for HTTP response errors                                                                                             
+<span class="lineNum" id="container839"><a name="839"></a><a href="#839" id="line839">     839</a> </span>                :  * @namespace Tonic\Lib                                                                                                                 
+<span class="lineNum" id="container840"><a name="840"></a><a href="#840" id="line840">     840</a> </span>                :  */                                                                                                                                     
+<span class="lineNum" id="container841"><a name="841"></a><a href="#841" id="line841">     841</a> </span>                : class ResponseException extends Exception {                                                                                             
+<span class="lineNum" id="container842"><a name="842"></a><a href="#842" id="line842">     842</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container843"><a name="843"></a><a href="#843" id="line843">     843</a> </span>                :     /**                                                                                                                                 
+<span class="lineNum" id="container844"><a name="844"></a><a href="#844" id="line844">     844</a> </span>                :      * Generate a default response for this exception                                                                                   
+<span class="lineNum" id="container845"><a name="845"></a><a href="#845" id="line845">     845</a> </span>                :      * @param Request request                                                                                                           
+<span class="lineNum" id="container846"><a name="846"></a><a href="#846" id="line846">     846</a> </span>                :      * @return Response                                                                                                                 
+<span class="lineNum" id="container847"><a name="847"></a><a href="#847" id="line847">     847</a> </span>                :      */                                                                                                                                 
+<span class="lineNum" id="container848"><a name="848"></a><a href="#848" id="line848">     848</a> </span>                :     function response($request) {                                                                                                       
+<span class="lineNum" id="container849"><a name="849"></a><a href="#849" id="line849">     849</a> </span><span class="lineNoCov">              0 :         $response = new Response($request);                                                                                             </span>
+<span class="lineNum" id="container850"><a name="850"></a><a href="#850" id="line850">     850</a> </span><span class="lineNoCov">              0 :         $response-&gt;code = $this-&gt;code;                                                                                                  </span>
+<span class="lineNum" id="container851"><a name="851"></a><a href="#851" id="line851">     851</a> </span><span class="lineNoCov">              0 :         $response-&gt;body = $this-&gt;message;                                                                                               </span>
+<span class="lineNum" id="container852"><a name="852"></a><a href="#852" id="line852">     852</a> </span><span class="lineNoCov">              0 :         return $response;                                                                                                               </span>
+<span class="lineNum" id="container853"><a name="853"></a><a href="#853" id="line853">     853</a> </span>                :     }                                                                                                                                   
+<span class="lineNum" id="container854"><a name="854"></a><a href="#854" id="line854">     854</a> </span>                :                                                                                                                                         
+<span class="lineNum" id="container855"><a name="855"></a><a href="#855" id="line855">     855</a> </span>                : }                                                                                                                                       
+<span class="lineNum" id="container856"><a name="856"></a><a href="#856" id="line856">     856</a> </span>                :                                                                                                                                         
+
+</pre>
+        </td>
+      </tr>
+    </table>
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:14 BRT 2012.</td></tr>
+    </table>
+
+    <br />
+
+    <script type="text/javascript">
+      //<![CDATA[
+      $E = YAHOO.util.Event;
+      YAHOO.namespace("phpunit.container");
+      YAHOO.phpunit.container.panelsData = {
+        "panel156": {
+          "header": "2 tests cover line 156",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel158": {
+          "header": "2 tests cover line 158",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel161": {
+          "header": "2 tests cover line 161",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel192": {
+          "header": "2 tests cover line 192",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel193": {
+          "header": "2 tests cover line 193",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel194": {
+          "header": "2 tests cover line 194",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel195": {
+          "header": "2 tests cover line 195",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel196": {
+          "header": "2 tests cover line 196",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel197": {
+          "header": "2 tests cover line 197",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel198": {
+          "header": "2 tests cover line 198",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel200": {
+          "header": "2 tests cover line 200",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel207": {
+          "header": "2 tests cover line 207",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel210": {
+          "header": "2 tests cover line 210",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel211": {
+          "header": "2 tests cover line 211",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel212": {
+          "header": "2 tests cover line 212",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel214": {
+          "header": "2 tests cover line 214",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel215": {
+          "header": "2 tests cover line 215",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel217": {
+          "header": "2 tests cover line 217",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel221": {
+          "header": "2 tests cover line 221",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel222": {
+          "header": "2 tests cover line 222",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel225": {
+          "header": "2 tests cover line 225",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel228": {
+          "header": "2 tests cover line 228",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel229": {
+          "header": "2 tests cover line 229",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel230": {
+          "header": "2 tests cover line 230",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel231": {
+          "header": "2 tests cover line 231",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel234": {
+          "header": "2 tests cover line 234",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel236": {
+          "header": "2 tests cover line 236",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel237": {
+          "header": "2 tests cover line 237",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel240": {
+          "header": "2 tests cover line 240",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel241": {
+          "header": "2 tests cover line 241",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel244": {
+          "header": "2 tests cover line 244",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel245": {
+          "header": "2 tests cover line 245",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel246": {
+          "header": "2 tests cover line 246",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel247": {
+          "header": "2 tests cover line 247",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel250": {
+          "header": "2 tests cover line 250",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel252": {
+          "header": "2 tests cover line 252",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel253": {
+          "header": "2 tests cover line 253",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel254": {
+          "header": "2 tests cover line 254",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel257": {
+          "header": "2 tests cover line 257",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel264": {
+          "header": "2 tests cover line 264",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel278": {
+          "header": "2 tests cover line 278",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel279": {
+          "header": "2 tests cover line 279",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel280": {
+          "header": "2 tests cover line 280",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel281": {
+          "header": "2 tests cover line 281",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel285": {
+          "header": "2 tests cover line 285",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel286": {
+          "header": "2 tests cover line 286",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel287": {
+          "header": "2 tests cover line 287",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel288": {
+          "header": "2 tests cover line 288",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel289": {
+          "header": "2 tests cover line 289",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel291": {
+          "header": "2 tests cover line 291",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel292": {
+          "header": "2 tests cover line 292",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel293": {
+          "header": "2 tests cover line 293",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel295": {
+          "header": "2 tests cover line 295",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel298": {
+          "header": "2 tests cover line 298",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel301": {
+          "header": "2 tests cover line 301",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel304": {
+          "header": "2 tests cover line 304",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel310": {
+          "header": "2 tests cover line 310",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel318": {
+          "header": "2 tests cover line 318",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel323": {
+          "header": "2 tests cover line 323",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel333": {
+          "header": "2 tests cover line 333",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel334": {
+          "header": "2 tests cover line 334",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel335": {
+          "header": "2 tests cover line 335",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel370": {
+          "header": "2 tests cover line 370",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+        "panel372": {
+          "header": "2 tests cover line 372",
+          "body": "<ul><li class=\"testPassed\">MailLastResourceTest::testGet_emptyFolder</li><li class=\"testPassed\">MailLastResourceTest::testGet_oneMSG</li></ul>",
+          "footer": ""
+        },
+      "dummy": ""
+      };
+
+      YAHOO.phpunit.container.prepare = function (e) {
+        var elemId = $E.getTarget(e).id;
+        var line = elemId.substr(4);
+        var panelId = "panel" + line;
+        var containerId = "container" + line;
+
+        var panelData = YAHOO.phpunit.container.panelsData[panelId];
+
+        var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
+        panel.setHeader(panelData["header"]);
+        panel.setBody(panelData["body"]);
+        panel.setFooter(panelData["footer"]);
+        panel.render(containerId);
+
+        $E.addListener(elemId, "click", panel.show, panel, true);
+        $E.removeListener(elemId, "mouseover");
+      };
+
+      function init() {
+        var ypc = YAHOO.phpunit.container;
+        for (var panelId in ypc.panelsData) {
+          var elemId = "line" + panelId.substr(5);
+          $E.addListener(elemId, "mouseover", ypc.prepare);
+        }
+      }
+
+      $E.addListener(window, "load", init);
+      //]]>
+    </script>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/code-coverage/api.html	(revision 5888)
@@ -0,0 +1,196 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>api</title>
+    <link rel="stylesheet" type="text/css" href="style.css">
+  </head>
+
+  <body>
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="title">api</td></tr>
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+
+      <tr>
+        <td width="100%">
+          <table cellpadding="1" border="0" width="100%">
+            <tr>
+              <td class="headerItem" width="20%">Current directory:</td>
+              <td class="headerValue" width="80%"><a href="index.html">/home/cristiano/expresso-api/prototype</a>/<a href="api.html">api</a> (<a href="api.dashboard.html">dashboard</a>)</td>
+            </tr>
+            <tr>
+              <td class="legendItem" width="20%">Legend:</td>
+              <td class="legendValue" width="80%">
+                <span class="coverLegendLo">
+                  <b>Low:</b> 0% to 35%
+                </span>
+                <span class="coverLegendMed">
+                  <b>Medium:</b> 35% to 70%
+                </span>
+                <span class="coverLegendHi">
+                  <b>High:</b> 70% to 100%
+                </span>
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+      <tr>
+        <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
+      </tr>
+    </table>
+
+    <br />
+
+    <center>
+      <table width="90%" cellpadding="2" cellspacing="1" border="0">
+        <tr>
+          <td class="tableHead" width="30%">&nbsp;</td>
+          <td class="tableHead" colspan="9">Coverage</td>
+        </tr>
+        <tr>
+          <td class="tableHead">&nbsp;</td>
+          <td class="tableHead" colspan="3">Lines</td>
+          <td class="tableHead" colspan="3">Functions / Methods</td>
+          <td class="tableHead" colspan="3">Classes</td>
+        </tr>
+        <tr>
+          <td class="coverDirectory">Total</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="53.12%">
+              <div class="size butter"  style="width:53.116531165312%" title="53.12%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">53.12%</td>
+          <td class="coverNumMed">196 / 369</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="26.92%">
+                <div class="size scarlet_red"  style="width:26.923076923077%" title="26.92%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">26.92%</td>
+          <td class="coverNumLo">14 / 52</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 3</td>
+        </tr>
+
+        <tr>
+          <td class="coverDirectory"><img alt="directory" src="directory.png"/> <a href="api_cache.html">cache</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="50.00%">
+              <div class="size butter"  style="width:50%" title="50.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">50.00%</td>
+          <td class="coverNumMed">3 / 6</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="40.00%">
+                <div class="size butter"  style="width:40%" title="40.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">40.00%</td>
+          <td class="coverNumMed">2 / 5</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="api_config.php.html">config.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="56.00%">
+              <div class="size butter"  style="width:56%" title="56.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">56.00%</td>
+          <td class="coverNumMed">14 / 25</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="42.86%">
+                <div class="size butter"  style="width:42.857142857143%" title="42.86%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">42.86%</td>
+          <td class="coverNumMed">3 / 7</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="api_controller.php.html">controller.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="52.82%">
+              <div class="size butter"  style="width:52.818991097923%" title="52.82%"></div>
+            </div>
+          </td>
+          <td class="coverPerMed">52.82%</td>
+          <td class="coverNumMed">178 / 337</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="22.50%">
+                <div class="size scarlet_red"  style="width:22.5%" title="22.50%"></div>
+            </div>
+          </td>
+          <td class="coverPerLo">22.50%</td>
+          <td class="coverNumLo">9 / 40</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="0.00%">
+                 <div class="size scarlet_red"  style="width:0%" title="0.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerLo">0.00%</td>
+          <td class="coverNumLo">0 / 1</td>
+        </tr>
+
+        <tr>
+          <td class="coverFile"><img alt="file" src="file.png"/> <a href="api_service.php.html">service.php</a></td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+              <div class="size chameleon"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerHi">100.00%</td>
+          <td class="coverNumHi">1 / 1</td>
+          <td class="coverBar">
+            <div class="coverBarOutline" title="100.00%">
+                <div class="size snow"  style="width:100%" title="100.00%"></div>
+            </div>
+          </td>
+          <td class="coverPerNone">100.00%</td>
+          <td class="coverNumNone">&nbsp;</td>
+          <td class="coverBar">
+              <div class="coverBarOutline" title="100.00%">
+                 <div class="size snow"  style="width:100%" title="100.00%"></div>
+              </div>
+          </td>
+          <td class="coverPerNone">100.00%</td>
+          <td class="coverNumNone">&nbsp;</td>
+        </tr>
+
+
+      </table>
+    </center>
+
+    <br />
+
+    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
+      <tr><td class="versionInfo">Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.1.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10</a> and PHPUnit 3.6.10 at Thu Mar 29 15:14:42 BRT 2012.</td></tr>
+    </table>
+
+    <br/>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/mail/MailLastResourceTest.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/mail/MailLastResourceTest.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/mail/MailLastResourceTest.php	(revision 5888)
@@ -0,0 +1,114 @@
+<?php
+require_once(__DIR__ . '/../../../api/controller.php');
+require_once(__DIR__ . '/../../../rest/oauth/OAuth2StorageUserCredential.php');
+
+class MailLastResourceTest extends PHPUnit_Framework_TestCase {
+
+	private $user = 'user2';
+	private $pass = 'prognus';
+	private $mbox = null;
+	private $cyrusConf = null;
+	private $cyrusOPTS = null;
+	private $accessToken = 'aaaaaa259f553ac148f01b6bbcbb101';
+	private $refreshToken = 'rrrrrr03fff3b8cdc51206244529abd';
+	private $url = 'http://expressodev.prognus.com.br/cristiano/expresso-api/rest/maillast';
+	private $curlOPT;
+	private $client_id = 666;
+	private $user_id = 666;
+	
+	//configura classe para testes
+	public function setUp() 
+	{
+	    
+	    $this->classOAuth = new OAuth2StorageUserCredential();
+	    
+	    session_id('rrrrrr03fff3b8cdc51206244529abd');
+	    $_SESSION['wallet']['user']['uid']	=   $this->user;
+	    $_SESSION['wallet']['user']['password'] =	$this->pass;
+	    
+	    $this->cyrusConf = Config::service('Cyrus', 'config');
+	    $this->cyrusOPTS = ($this->cyrusConf['tlsEncryption']) ? '/tls/novalidate-cert' : '/notls/novalidate-cert'; 
+	    $this->mbox = imap_open( '{'.$this->cyrusConf['host'].":".$this->cyrusConf['port'].$this->cyrusOPTS.'}INBOX' , Config::me('uid') , Config::me('password') ); 
+	
+	    $messages = imap_sort( $this->mbox , SORTDATE , 1 , null , "UNSEEN" , 'UTF-8');
+	    if (is_array($messages))
+		    foreach ($messages as $msg_number)
+			    imap_delete($this->mbox, $msg_number);
+		    
+	     imap_expunge (  $this->mbox );
+	     
+	    //insere access token
+	    $this->classOAuth->setAccessToken($this->accessToken, $this->client_id, $this->user_id, (time() + 3600), 'all', $this->refreshToken);
+
+	    //insere refresh token
+	    $this->classOAuth->setRefreshToken($this->refreshToken, $this->client_id, $this->user_id, (time() + 3600), 'all');
+	    $this->curlOPT = array( CURLOPT_URL => $this->url,  CURLOPT_HEADER => 0,  CURLOPT_RETURNTRANSFER => TRUE,  CURLOPT_TIMEOUT => 4 , CURLOPT_HTTPHEADER => array( 'Authorization: OAUTH Bearer aaaaaa259f553ac148f01b6bbcbb101'));
+	    
+	}
+	//finaliza classe
+	public function tearDown() 
+	{
+	    $messages = imap_sort( $this->mbox , SORTDATE , 1 , null , "UNSEEN" , 'UTF-8');
+	    if (is_array($messages))
+		    foreach ($messages as $msg_number)
+			    imap_delete($this->mbox, $msg_number);
+
+	    imap_expunge (  $this->mbox );
+	    
+	    $this->classOAuth->unsetRefreshToken($this->refreshToken);
+	    $this->classOAuth->unsetAccessToken($this->accessToken);
+	}
+
+	/*
+	 * 
+	 */
+	//(sem mensagens novas)
+	public function testGet_emptyFolder() 
+	{
+	  $c = curl_init(); 
+	  curl_setopt_array($c, $this->curlOPT); 
+	  $r = curl_exec($c);
+	  curl_close($c); 
+
+	  $body = json_decode($r);
+	  $this->assertCount(0, $body);
+	}
+	
+	/*
+	 * 
+	 */
+	//(uma mensagem nova)
+	public function testGet_oneMSG() 
+	{
+	    $msg = (" MIME-Version: 1.0\r\n"
+		    . "Content-Type: text/plain; charset=ISO-8859-1\r\n"
+		    . "Content-Transfer-Encoding: quoted-printable\r\n"
+		    . "Subject: This is the subject\r\n"
+		    . "From: =?ISO-8859-1?Q?jo=E3o_Silva?= <teste@teste.com.br>\r\n"
+		    . "To: teste@test\r\n"
+		    . "Cc:\r\n"
+		    . "Bcc:\r\n"
+		    . "\r\n\r\n"
+		    . "Corpo\r\n\r\n"); 
+	    
+	   imap_append($this->mbox,'{'.$this->cyrusConf['host'].":".$this->cyrusConf['port'].$this->cyrusOPTS.'}INBOX',$msg); 	
+
+	   $c = curl_init(); 
+	   curl_setopt_array($c, $this->curlOPT); 
+	   $r = curl_exec($c);
+	   curl_close($c); 
+	   
+	   $body = json_decode($r,true);
+	   $this->assertCount(1, $body);	   
+	   $body = $body[0];
+	   $this->assertEquals($body['subject'], 'This is the subject'); 
+	   $this->assertEquals($body['from']['mail'], 'teste@teste.com.br'); 
+	   $this->assertEquals($body['from']['name'], 'joÃ£o Silva'); 
+	   $this->assertInternalType('int', $body['date']);
+	   
+	}
+
+}
+
+
+?>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/calendar/CalendarLastResourceTest.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/calendar/CalendarLastResourceTest.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/calendar/CalendarLastResourceTest.php	(revision 5888)
@@ -0,0 +1,150 @@
+<?php
+require_once(__DIR__ . '/../../../api/controller.php');
+//require_once(__DIR__ . '/../../../modules/calendar/interceptors/DBMapping.php');
+require_once(__DIR__ . '/../../../rest/oauth/OAuth2StorageUserCredential.php');
+
+
+class CalendarLastResourceTest extends PHPUnit_Framework_TestCase {
+
+	private $classOAuth = null;
+	
+	private $user = 'user2';
+	private $pass = 'prognus';
+	private $accessToken = 'aaaaaa259f553ac148f01b6bbcbb101';
+	private $refreshToken = 'rrrrrr03fff3b8cdc51206244529agb';
+	private $url = 'http://expressodev.prognus.com.br/cristiano/expresso-api/rest/calendarlast';
+	private $curlOPT;
+	private $client_id = 666;
+	private $user_id = 666;
+
+	
+	public function setUp(){
+	    $this->classOAuth = new OAuth2StorageUserCredential();
+		
+		session_id('rrrrrr03fff3b8cdc51206244529agb');
+
+	    $_SESSION['wallet']['user']['uid']	=   $this->user;
+	    $_SESSION['wallet']['user']['password'] =	$this->pass;
+		$_SESSION['wallet']['user']['uidNumber'] = 42798 ;
+		
+	    //insere access token
+	    $this->classOAuth->setAccessToken($this->accessToken, $this->client_id, $this->user_id, (time() + 3600), 'all', $this->refreshToken);
+
+	    //insere refresh token
+	    $this->classOAuth->setRefreshToken($this->refreshToken, $this->client_id, $this->user_id, (time() + 3600), 'all');
+	    $this->curlOPT = array( CURLOPT_URL => $this->url,  CURLOPT_HEADER => 0,  CURLOPT_RETURNTRANSFER => TRUE,  CURLOPT_TIMEOUT => 4 , CURLOPT_HTTPHEADER => array( 'Authorization: OAUTH Bearer aaaaaa259f553ac148f01b6bbcbb101'));
+	}
+
+	public function testcreateResource() {
+	    
+	    $calendar = Controller::service('PostgreSQL')->execResultSql("INSERT INTO calendar (location, tzid, name, dtstamp, description) values 
+		('location', 'America/Sao_Paulo', 'PHP-UNIt Teste', '".time()."000', 'Agenda de teste :D') returning id;");
+	    
+	    if(is_array($calendar))
+			$calendar = $calendar[0]['id'];
+	    
+	    $signature = Controller::create(array('concept' => 'calendarSignature'), 
+	      array('calendar' => $calendar, 
+		    'user' => 42798, 
+		    'isOwner' => '1', 
+		    'fontColor' => '000000',
+		    'backgroundColor' => '000000',
+		    'borderColor' => '000000'
+		));
+
+		for($i = 0; $i < 10; $i++){	
+		
+			$date   = date('Ymd\THisT');
+            $unique = substr(microtime(), 2, 4);
+            $base   = 'aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPrRsStTuUvVxXuUvVwWzZ1234567890';
+            $start  = 0;
+            $end    = strlen( $base ) - 1;
+            $length = 6;
+            $str    = null;
+            for( $p = 0; $p < $length; $p++ )
+              $unique .= $base{mt_rand( $start, $end )};
+
+            $uid = $date.$unique.'@expresso-calendar';
+		
+		
+			$idEvent = Controller::service('PostgreSQL')->execResultSql("INSERT INTO calendar_object (location, cal_uid, class_id,
+				dtstamp, description, dtstart, dtend, allday, range_start, range_end, summary, type_id, last_update, tzid ) values 
+				('PHP UNIT', '".$uid."', '1', 
+				'".time()."000', 'Evento de teste PHP-Unit', 
+				'".time()."000', '".(time() - 400)."000', '0', 
+				'".time()."000', '".(time() + 400)."000', 
+				'Eventos de teste aqui', '1', '".time()."000', 'America/Sao_Paulo') returning id;");
+		
+			Controller::service('PostgreSQL')->execResultSql("INSERT INTO calendar_to_calendar_object (calendar_id, calendar_object_id)
+			values ('".$calendar."', '".$idEvent[0]['id']."')");
+		
+		}
+		
+		Controller::commit( array( 'service' => 'PostgreSQL' ) );
+	}
+
+	public function testCheckMaxResource() {
+	    $c = curl_init(); 
+	    curl_setopt_array($c, $this->curlOPT); 
+		$r = curl_exec($c);
+	    curl_close($c); 
+
+	    $body = json_decode($r,true);		
+	    $this->assertCount(10, $body);
+	}
+	
+	public function testCheckResource() {
+	    $c = curl_init(); 
+	    curl_setopt_array($c, $this->curlOPT); 
+	    $r = curl_exec($c);
+	    curl_close($c); 
+
+	    $body = json_decode($r,true);
+ 
+	    foreach($body as $key => $value){
+			$this->assertArrayHasKey('allDay', $body[$key]);
+			$this->assertArrayHasKey('calendar', $body[$key]);
+			$this->assertArrayHasKey('class', $body[$key]);
+			$this->assertArrayHasKey('description', $body[$key]);
+			$this->assertArrayHasKey('dtstamp', $body[$key]);
+			$this->assertArrayHasKey('id', $body[$key]);
+			$this->assertArrayHasKey('lastUpdate', $body[$key]);
+			$this->assertArrayHasKey('location', $body[$key]);
+			$this->assertArrayHasKey('rangeEnd', $body[$key]);
+			$this->assertArrayHasKey('rangeStart', $body[$key]);
+			$this->assertArrayHasKey('sequence', $body[$key]);
+	    }
+
+	}
+	
+	public function testCheckFinish() {    
+	    
+		$calendar = Controller::service('PostgreSQL')->execResultSql("SELECT calendar_id from calendar_signature where user_uidnumber = 42798");
+		$relation = Controller::service('PostgreSQL')->execResultSql("SELECT calendar_object_id from calendar_to_calendar_object where calendar_id = ".$calendar[0]['calendar_id']);
+			
+		$objects = "";
+		$count = count($relation);
+		
+		for($i = 0; $i < $count; $i++)
+			$objects .=  $relation[$i]['calendar_object_id']. ($i == ($count-1) ? '' : ',');
+
+		Controller::service('PostgreSQL')->execResultSql("DELETE from calendar_object where id IN (". $objects .")");
+
+	    $c = curl_init(); 
+	    curl_setopt_array($c, $this->curlOPT); 
+	    $r = curl_exec($c);
+	    curl_close($c); 
+		$body = json_decode($r,true);
+		
+		Controller::service('PostgreSQL')->execResultSql("DELETE from calendar_signature where user_uidnumber = 42798");
+		Controller::service('PostgreSQL')->execResultSql("DELETE from calendar where id = ".$calendar[0]['calendar_id']);
+
+	    $this->assertCount(0 , $body);
+	}
+
+	public function tearDown() {
+	    $this->classOAuth->unsetRefreshToken($this->refreshToken);
+	    $this->classOAuth->unsetAccessToken($this->accessToken);	    
+	}
+}
+?>
Index: sandbox/2.4-expresso-api/prototype/tests/rest/news/NewsLastResourceTest.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/tests/rest/news/NewsLastResourceTest.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/tests/rest/news/NewsLastResourceTest.php	(revision 5888)
@@ -0,0 +1,115 @@
+<?php
+require_once(__DIR__ . '/../../../api/controller.php');
+require_once(__DIR__ . '/../../../rest/oauth/OAuth2StorageUserCredential.php');
+
+
+class NewsLastResourceTest extends PHPUnit_Framework_TestCase {
+
+	private $classOAuth = null;
+	
+	private $user = 'user2';
+	private $pass = 'prognus';
+	private $accessToken = 'aaaaaa259f553ac148f01b6bbcbb101';
+	private $refreshToken = 'rrrrrr03fff3b8cdc51206244529abd';
+	private $url = 'http://expressodev.prognus.com.br/cristiano/expresso-api/rest/newslast';
+	private $curlOPT;
+	private $client_id = 666;
+	private $user_id = 666;
+
+	
+	public function setUp(){
+	    $this->classOAuth = new OAuth2StorageUserCredential();
+
+	    $_SESSION['wallet']['user']['uid']	=   $this->user;
+	    $_SESSION['wallet']['user']['password'] =	$this->pass;
+		
+	    //insere access token
+	    $this->classOAuth->setAccessToken($this->accessToken, $this->client_id, $this->user_id, (time() + 3600), 'all', $this->refreshToken);
+
+	    //insere refresh token
+	    $this->classOAuth->setRefreshToken($this->refreshToken, $this->client_id, $this->user_id, (time() + 3600), 'all');
+	    $this->curlOPT = array( CURLOPT_URL => $this->url,  CURLOPT_HEADER => 0,  CURLOPT_RETURNTRANSFER => TRUE,  CURLOPT_TIMEOUT => 4 , CURLOPT_HTTPHEADER => array( 'Authorization: OAUTH Bearer aaaaaa259f553ac148f01b6bbcbb101'));
+		
+		
+	}
+
+	public $provider=
+		array(
+		    array( 1332877974, 'teste de aplicaÃ§Ã£o 1', 'php unit teste', '<div>Teste de funcionamento</div>', '0', 2147483647, 1, 1),
+		    array( 1332877974, 'teste de aplicaÃ§Ã£o 2', 'php unit teste', '<div>Teste de funcionamento</div>', '0', 2147483647, 1, 1),
+		    array( 1332877974, 'teste de aplicaÃ§Ã£o 3', 'php unit teste', '<div>Teste de funcionamento</div>', '0', 2147483647, 1, 1),
+		    array( 1332877974, 'teste de aplicaÃ§Ã£o 4', 'php unit teste', '<div>Teste de funcionamento</div>', '0', 2147483647, 1, 1),
+		    array( 1332877974, 'teste de aplicaÃ§Ã£o 5', 'php unit teste', '<div>Teste de funcionamento</div>', '0', 2147483647, 1, 1),
+		    array( 1332877974, 'teste de aplicaÃ§Ã£o 6', 'php unit teste', '<div>Teste de funcionamento</div>', '0', 2147483647, 1, 1),
+		    array( 1332877974, 'teste de aplicaÃ§Ã£o 7', 'php unit teste', '<div>Teste de funcionamento</div>', '0', 2147483647, 1, 1),
+		    array( 1332877974, 'teste de aplicaÃ§Ã£o 8', 'php unit teste', '<div>Teste de funcionamento</div>', '0', 2147483647, 1, 1),
+		    array( 1332877974, 'teste de aplicaÃ§Ã£o 9', 'php unit teste', '<div>Teste de funcionamento</div>', '0', 2147483647, 1, 1),
+		    array( 1332877974, 'teste de aplicaÃ§Ã£o 10', 'php unit teste', '<div>Teste de funcionamento</div>', '0', 2147483647, 1, 1),
+		    array( 1332877974, 'teste de aplicaÃ§Ã£o 11', 'php unit teste', '<div>Teste de funcionamento</div>', '0', 2147483647, 1, 1)
+		);
+
+	public function testcreateResource() {
+	    foreach($this->provider as $key => $value){
+		    Controller::service('PostgreSQL')->execResultSql( "INSERT INTO phpgw_news (news_date,news_subject,
+		    news_submittedby, news_content, news_begin, news_end, news_cat, is_html)VALUES('".$value[0]."',
+		    '".$value[1]."', '".$value[2]."','".$value[3]."','".$value[4]."','".$value[5]."', '".$value[6]."', '".$value[7]."')");
+	    }
+	    //Controller::service('PostgreSQL')->commit();
+	}
+
+	public function testCheckMaxResource() {
+	    $c = curl_init(); 
+	    curl_setopt_array($c, $this->curlOPT); 
+	    $r = curl_exec($c);
+	    curl_close($c); 
+
+	    $body = json_decode($r,true);	   
+	    $this->assertCount(10, $body);
+	}
+	
+	public function testCheckResource() {
+	    $c = curl_init(); 
+	    curl_setopt_array($c, $this->curlOPT); 
+	    $r = curl_exec($c);
+	    curl_close($c); 
+
+	    $body = json_decode($r,true);
+ 
+	    foreach($body as $key => $value){
+		$this->assertArrayHasKey('subject', $body[$key]);
+		$this->assertArrayHasKey('content', $body[$key]);
+		$this->assertArrayHasKey('startTime', $body[$key]);
+		$this->assertArrayHasKey('endTime', $body[$key]);
+		$this->assertArrayHasKey('id', $body[$key]);
+		$this->assertArrayHasKey('subject', $body[$key]);
+	    }
+
+	}
+	
+	public function testCheckFinish() {
+
+	    $c = curl_init(); 
+	    curl_setopt_array($c, $this->curlOPT); 
+	    $r = curl_exec($c);
+	    curl_close($c); 
+
+	    $body = json_decode($r,true);
+	    $countCurrent = count($body) - 9;
+	    
+	    Controller::service('PostgreSQL')->execResultSql( "DELETE FROM phpgw_news where news_submittedby = 'php unit teste'");
+
+	    $c = curl_init(); 
+	    curl_setopt_array($c, $this->curlOPT); 
+	    $r = curl_exec($c);
+	    curl_close($c); 
+
+	    $body = json_decode($r,true);
+	    $this->assertCount($countCurrent , $body);
+	}
+
+	public function tearDown() {
+	    $this->classOAuth->unsetRefreshToken($this->refreshToken);
+	    $this->classOAuth->unsetAccessToken($this->accessToken);	    
+	}
+}
+?>
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/LICENSE.txt
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/LICENSE.txt	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/LICENSE.txt	(revision 5888)
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2010 Tim Ridgely <tim@opendining.net>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/tests/All_OAuth2_Tests.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/tests/All_OAuth2_Tests.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/tests/All_OAuth2_Tests.php	(revision 5888)
@@ -0,0 +1,29 @@
+<?php
+
+/**
+ * Static test suite.
+ */
+
+class All_OAuth2_Tests extends PHPUnit_Framework_TestSuite {
+  
+  /**
+   * Constructs the test suite handler.
+   */
+  public function __construct() {
+    $this->setName ( 'OAuth2Suite' );
+
+    foreach (glob(__DIR__.'/*Test.php') as $filename) {
+      require $filename;
+      $class = basename($filename, '.php');
+      $this->addTestSuite($class);
+    }
+  }
+  
+  /**
+   * Creates the suite.
+   */
+  public static function suite() {
+    return new self ();
+  }
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/tests/OAuth2Test.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/tests/OAuth2Test.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/tests/OAuth2Test.php	(revision 5888)
@@ -0,0 +1,453 @@
+<?php
+require __DIR__ . '/../lib/OAuth2.php';
+require __DIR__ . '/../lib/IOAuth2Storage.php';
+require __DIR__ . '/../lib/IOAuth2GrantCode.php';
+
+/**
+ * OAuth2 test case.
+ */
+class OAuth2Test extends PHPUnit_Framework_TestCase {
+  
+  /**
+   * @var OAuth2
+   */
+  private $fixture;
+  
+  /**
+   * The actual token ID is irrelevant, so choose one:
+   * @var string
+   */
+  private $tokenId = 'my_token';
+  
+  /**
+   * Tests OAuth2->verifyAccessToken() with a missing token
+   */
+  public function testVerifyAccessTokenWithNoParam() {
+    $mockStorage = $this->getMock('IOAuth2Storage');
+    $this->fixture = new OAuth2($mockStorage);
+    
+    $scope = null;
+    $this->setExpectedException('OAuth2AuthenticateException');
+    $this->fixture->verifyAccessToken('', $scope);
+  }
+  
+  /**
+   * Tests OAuth2->verifyAccessToken() with a invalid token
+   */
+  public function testVerifyAccessTokenInvalidToken() {
+    
+    // Set up the mock storage to say this token does not exist
+    $mockStorage = $this->getMock('IOAuth2Storage');
+    $mockStorage->expects($this->once())
+      ->method('getAccessToken')
+      ->will($this->returnValue(false));
+      
+    $this->fixture = new OAuth2($mockStorage);
+    
+    $scope = null;
+    $this->setExpectedException('OAuth2AuthenticateException');
+    $this->fixture->verifyAccessToken($this->tokenId, $scope);
+  }
+  
+  /**
+   * Tests OAuth2->verifyAccessToken() with a malformed token
+   * 
+   * @dataProvider generateMalformedTokens
+   */
+  public function testVerifyAccessTokenMalformedToken($token) {
+    
+    // Set up the mock storage to say this token does not exist
+    $mockStorage = $this->getMock('IOAuth2Storage');
+    $mockStorage->expects($this->once())
+      ->method('getAccessToken')
+      ->will($this->returnValue($token));
+      
+    $this->fixture = new OAuth2($mockStorage);
+    
+    $scope = null;
+    $this->setExpectedException('OAuth2AuthenticateException');
+    $this->fixture->verifyAccessToken($this->tokenId, $scope);
+  }
+  
+	/**
+   * Tests OAuth2->verifyAccessToken() with different expiry dates
+   * 
+   * @dataProvider generateExpiryTokens
+   */
+  public function testVerifyAccessTokenCheckExpiry($token, $expectedToPass) {
+    
+    // Set up the mock storage to say this token does not exist
+    $mockStorage = $this->getMock('IOAuth2Storage');
+    $mockStorage->expects($this->once())
+      ->method('getAccessToken')
+      ->will($this->returnValue($token));
+      
+    $this->fixture = new OAuth2($mockStorage);
+    
+    $scope = null;
+    
+    
+    // When valid, we just want any sort of token
+    if ($expectedToPass) { 
+      $actual = $this->fixture->verifyAccessToken($this->tokenId, $scope);
+      $this->assertNotEmpty($actual, "verifyAccessToken() was expected to PASS, but it failed");
+      $this->assertInternalType('array', $actual);
+    }
+    else {
+      $this->setExpectedException('OAuth2AuthenticateException');
+      $this->fixture->verifyAccessToken($this->tokenId, $scope);
+    }
+  }
+  
+	/**
+   * Tests OAuth2->verifyAccessToken() with different scopes
+   * 
+   * @dataProvider generateScopes
+   */
+  public function testVerifyAccessTokenCheckScope($scopeRequired, $token, $expectedToPass) {
+    
+    // Set up the mock storage to say this token does not exist
+    $mockStorage = $this->getMock('IOAuth2Storage');
+    $mockStorage->expects($this->once())
+      ->method('getAccessToken')
+      ->will($this->returnValue($token));
+      
+    $this->fixture = new OAuth2($mockStorage);
+    
+    // When valid, we just want any sort of token
+    if ($expectedToPass) {
+      $actual = $this->fixture->verifyAccessToken($this->tokenId, $scopeRequired);
+      $this->assertNotEmpty($actual, "verifyAccessToken() was expected to PASS, but it failed");
+      $this->assertInternalType('array', $actual);
+    }
+    else {
+      $this->setExpectedException('OAuth2AuthenticateException');
+      $this->fixture->verifyAccessToken($this->tokenId, $scopeRequired);
+    }
+  }
+  
+  /**
+   * Tests OAuth2->grantAccessToken() for missing data
+   * 
+   * @dataProvider generateEmptyDataForGrant
+   */
+  public function testGrantAccessTokenMissingData($inputData, $authHeaders) {
+    $mockStorage = $this->getMock('IOAuth2Storage');
+    $this->fixture = new OAuth2($mockStorage);
+    
+    $this->setExpectedException('OAuth2ServerException');
+    $this->fixture->grantAccessToken($inputData, $authHeaders);
+  }
+  
+  /**
+   * Tests OAuth2->grantAccessToken()
+   * 
+   * Tests the different ways client credentials can be provided.
+   */
+  public function testGrantAccessTokenCheckClientCredentials() {
+    $mockStorage = $this->getMock('IOAuth2Storage');
+    $mockStorage->expects($this->any())
+      ->method('checkClientCredentials')
+      ->will($this->returnValue(TRUE)); // Always return true for any combination of user/pass
+    $this->fixture = new OAuth2($mockStorage);
+    
+    $inputData = array('grant_type' => OAuth2::GRANT_TYPE_AUTH_CODE);
+    $authHeaders = array();
+    
+    // First, confirm that an non-client related error is thrown:
+    try {
+      $this->fixture->grantAccessToken($inputData, $authHeaders);
+      $this->fail('The expected exception OAuth2ServerException was not thrown');
+    } catch ( OAuth2ServerException $e ) {
+      $this->assertEquals(OAuth2::ERROR_INVALID_CLIENT, $e->getMessage());
+    }
+
+    // Confirm Auth header
+    $authHeaders = array('PHP_AUTH_USER' => 'dev-abc', 'PHP_AUTH_PW' => 'pass');
+    $inputData = array('grant_type' => OAuth2::GRANT_TYPE_AUTH_CODE, 'client_id' => 'dev-abc'); // When using auth, client_id must match
+    try {
+      $this->fixture->grantAccessToken($inputData, $authHeaders);
+      $this->fail('The expected exception OAuth2ServerException was not thrown');
+    } catch ( OAuth2ServerException $e ) {
+      $this->assertNotEquals(OAuth2::ERROR_INVALID_CLIENT, $e->getMessage());
+    }
+    
+    // Confirm GET/POST
+    $authHeaders = array();
+    $inputData = array('grant_type' => OAuth2::GRANT_TYPE_AUTH_CODE, 'client_id' => 'dev-abc', 'client_secret' => 'foo'); // When using auth, client_id must match
+    try {
+      $this->fixture->grantAccessToken($inputData, $authHeaders);
+      $this->fail('The expected exception OAuth2ServerException was not thrown');
+    } catch ( OAuth2ServerException $e ) {
+      $this->assertNotEquals(OAuth2::ERROR_INVALID_CLIENT, $e->getMessage());
+    }
+  }
+  
+  /**
+   * Tests OAuth2->grantAccessToken() with Auth code grant
+   * 
+   */
+  public function testGrantAccessTokenWithGrantAuthCodeMandatoryParams() {
+    $mockStorage = $this->createBaseMock('IOAuth2GrantCode');
+    $inputData = array('grant_type' => OAuth2::GRANT_TYPE_AUTH_CODE, 'client_id' => 'a', 'client_secret' => 'b');
+    $fakeAuthCode = array('client_id' => $inputData['client_id'], 'redirect_uri' => '/foo', 'expires' => time() + 60);
+    $fakeAccessToken = array('access_token' => 'abcde');
+    
+    // Ensure redirect URI and auth-code is mandatory
+    try {
+      $this->fixture = new OAuth2($mockStorage);
+      $this->fixture->setVariable(OAuth2::CONFIG_ENFORCE_INPUT_REDIRECT, true); // Only required when this is set
+      $this->fixture->grantAccessToken($inputData + array('code' => 'foo'), array());
+      $this->fail('The expected exception OAuth2ServerException was not thrown');
+    } catch ( OAuth2ServerException $e ) {
+      $this->assertEquals(OAuth2::ERROR_INVALID_REQUEST, $e->getMessage());
+    }
+    try {
+      $this->fixture = new OAuth2($mockStorage);
+      $this->fixture->grantAccessToken($inputData + array('redirect_uri' => 'foo'), array());
+      $this->fail('The expected exception OAuth2ServerException was not thrown');
+    } catch ( OAuth2ServerException $e ) {
+      $this->assertEquals(OAuth2::ERROR_INVALID_REQUEST, $e->getMessage());
+    }
+  }
+  
+   /**
+   * Tests OAuth2->grantAccessToken() with Auth code grant
+   * 
+   */
+  public function testGrantAccessTokenWithGrantAuthCodeNoToken() {
+    $mockStorage = $this->createBaseMock('IOAuth2GrantCode');
+    $inputData = array('grant_type' => OAuth2::GRANT_TYPE_AUTH_CODE, 'client_id' => 'a', 'client_secret' => 'b', 'redirect_uri' => 'foo', 'code'=> 'foo');
+    
+    // Ensure missing auth code raises an error
+    try {
+      $this->fixture = new OAuth2($mockStorage);
+      $this->fixture->grantAccessToken($inputData + array(), array());
+      $this->fail('The expected exception OAuth2ServerException was not thrown');
+    }
+    catch ( OAuth2ServerException $e ) {
+      $this->assertEquals(OAuth2::ERROR_INVALID_GRANT, $e->getMessage());
+    }
+  }
+  
+  /**
+   * Tests OAuth2->grantAccessToken() with checks the redirect URI
+   * 
+   */
+  public function testGrantAccessTokenWithGrantAuthCodeRedirectChecked() {
+    $inputData = array('redirect_uri' => 'http://www.crossdomain.com/my/subdir', 'grant_type' => OAuth2::GRANT_TYPE_AUTH_CODE, 'client_id' => 'my_little_app', 'client_secret' => 'b', 'code'=> 'foo');
+    $storedToken = array('redirect_uri' => 'http://www.example.com', 'client_id' => 'my_little_app', 'expires' => time() + 60);
+    
+    $mockStorage = $this->createBaseMock('IOAuth2GrantCode');
+    $mockStorage->expects($this->any())
+      ->method('getAuthCode')
+      ->will($this->returnValue($storedToken));
+      
+    // Ensure that the redirect_uri is checked
+    try {
+      $this->fixture = new OAuth2($mockStorage);
+      $this->fixture->grantAccessToken($inputData, array());
+      
+      $this->fail('The expected exception OAuth2ServerException was not thrown');
+    }
+    catch ( OAuth2ServerException $e ) {
+      $this->assertEquals(OAuth2::ERROR_REDIRECT_URI_MISMATCH, $e->getMessage());
+    }
+  }
+  
+	/**
+   * Tests OAuth2->grantAccessToken() with checks the client ID is matched
+   * 
+   */
+  public function testGrantAccessTokenWithGrantAuthCodeClientIdChecked() {
+    $inputData = array('client_id' => 'another_app', 'grant_type' => OAuth2::GRANT_TYPE_AUTH_CODE, 'redirect_uri' => 'http://www.example.com/my/subdir', 'client_secret' => 'b', 'code'=> 'foo');
+    $storedToken = array('client_id' => 'my_little_app', 'redirect_uri' => 'http://www.example.com', 'expires' => time() + 60);
+    
+    $mockStorage = $this->createBaseMock('IOAuth2GrantCode');
+    $mockStorage->expects($this->any())
+      ->method('getAuthCode')
+      ->will($this->returnValue($storedToken));
+      
+    // Ensure the client ID is checked
+    try {
+      $this->fixture = new OAuth2($mockStorage);
+      $this->fixture->grantAccessToken($inputData, array());
+      
+      $this->fail('The expected exception OAuth2ServerException was not thrown');
+    }
+    catch ( OAuth2ServerException $e ) {
+      $this->assertEquals(OAuth2::ERROR_INVALID_GRANT, $e->getMessage());
+    }
+  }
+  
+  /**
+   * Tests OAuth2->grantAccessToken() with implicit
+   * 
+   */
+  public function testGrantAccessTokenWithGrantImplicit() {
+    $this->markTestIncomplete ( "grantAccessToken test not implemented" );
+    
+    $this->fixture->grantAccessToken(/* parameters */);
+  }
+  
+	/**
+   * Tests OAuth2->grantAccessToken() with user credentials
+   * 
+   */
+  public function testGrantAccessTokenWithGrantUser() {
+    $this->markTestIncomplete ( "grantAccessToken test not implemented" );
+    
+    $this->fixture->grantAccessToken(/* parameters */);
+  }
+  
+  
+	/**
+   * Tests OAuth2->grantAccessToken() with client credentials
+   * 
+   */
+  public function testGrantAccessTokenWithGrantClient() {
+    $this->markTestIncomplete ( "grantAccessToken test not implemented" );
+    
+    $this->fixture->grantAccessToken(/* parameters */);
+  }
+  
+	/**
+   * Tests OAuth2->grantAccessToken() with refresh token
+   * 
+   */
+  public function testGrantAccessTokenWithGrantRefresh() {
+    $this->markTestIncomplete ( "grantAccessToken test not implemented" );
+    
+    $this->fixture->grantAccessToken(/* parameters */);
+  }
+  
+	/**
+   * Tests OAuth2->grantAccessToken() with extension
+   * 
+   */
+  public function testGrantAccessTokenWithGrantExtension() {
+    $this->markTestIncomplete ( "grantAccessToken test not implemented" );
+    
+    $this->fixture->grantAccessToken(/* parameters */);
+  }
+  
+  /**
+   * Tests OAuth2->getAuthorizeParams()
+   */
+  public function testGetAuthorizeParams() {
+    // TODO Auto-generated OAuth2Test->testGetAuthorizeParams()
+    $this->markTestIncomplete ( "getAuthorizeParams test not implemented" );
+    
+    $this->fixture->getAuthorizeParams(/* parameters */);
+  
+  }
+  
+  /**
+   * Tests OAuth2->finishClientAuthorization()
+   */
+  public function testFinishClientAuthorization() {
+    // TODO Auto-generated OAuth2Test->testFinishClientAuthorization()
+    $this->markTestIncomplete ( "finishClientAuthorization test not implemented" );
+    
+    $this->fixture->finishClientAuthorization(/* parameters */);
+  
+  }
+
+  // Utility methods
+  
+  /**
+   * 
+   * @param string $interfaceName
+   */
+  protected function createBaseMock($interfaceName) {
+    $mockStorage = $this->getMock($interfaceName);
+    $mockStorage->expects($this->any())
+      ->method('checkClientCredentials')
+      ->will($this->returnValue(TRUE)); // Always return true for any combination of user/pass
+    $mockStorage->expects($this->any())
+      ->method('checkRestrictedGrantType')
+      ->will($this->returnValue(TRUE)); // Always return true for any combination of user/pass
+      
+     return $mockStorage;
+  }
+  
+  // Data Providers below:
+  
+  /**
+   * Dataprovider for testVerifyAccessTokenMalformedToken().
+   * 
+   * Produces malformed access tokens
+   */
+  public function generateMalformedTokens() {
+    return array(
+      array(array()), // an empty array as a token
+      array(array('expires' => 5)), // missing client_id
+      array(array('client_id' => 6)), // missing expires
+      array(array('something' => 6)), // missing both 'expires' and 'client_id'
+    );
+  }
+  
+  /**
+   * Dataprovider for testVerifyAccessTokenCheckExpiry().
+   * 
+   * Produces malformed access tokens
+   */
+  public function generateExpiryTokens() {
+    return array(
+      array(array('client_id' => 'blah', 'expires' => time() - 30),                 FALSE), // 30 seconds ago should fail
+      array(array('client_id' => 'blah', 'expires' => time() - 1),                  FALSE), // now-ish should fail
+      array(array('client_id' => 'blah', 'expires' => 0),                           FALSE), // 1970 should fail
+      array(array('client_id' => 'blah', 'expires' => time() + 30),                 TRUE),  // 30 seconds in the future should be valid
+      array(array('client_id' => 'blah', 'expires' => time() + 86400),              TRUE),  // 1 day in the future should be valid
+      array(array('client_id' => 'blah', 'expires' => time() + (365 * 86400)),      TRUE),  // 1 year should be valid
+      array(array('client_id' => 'blah', 'expires' => time() + (10 * 365 * 86400)), TRUE),  // 10 years should be valid
+    );
+  }
+  
+  /**
+   * Dataprovider for testVerifyAccessTokenCheckExpiry().
+   * 
+   * Produces malformed access tokens
+   */
+  public function generateScopes() {
+    $baseToken = array('client_id' => 'blah', 'expires' => time() + 60);
+    
+    return array(
+      array(null,   $baseToken + array(),                               TRUE), // missing scope is valif
+      array(null,   $baseToken + array('scope' => null),                TRUE), // null scope is valid
+      array('',     $baseToken + array('scope' => ''),                  TRUE), // empty scope is valid
+      array('read', $baseToken + array('scope' => 'read'),              TRUE), // exact same scope is valid
+      array('read', $baseToken + array('scope' => ' read '),            TRUE), // exact same scope is valid
+      array(' read ', $baseToken + array('scope' => 'read'),            TRUE), // exact same scope is valid
+      array('read', $baseToken + array('scope' => 'read write delete'), TRUE), // contains scope 
+      array('read', $baseToken + array('scope' => 'write read delete'), TRUE), // contains scope 
+      array('read', $baseToken + array('scope' => 'delete write read'), TRUE), // contains scope
+      
+      // Invalid combinations
+      array('read', $baseToken + array('scope' => 'write'),            FALSE),
+      array('read', $baseToken + array('scope' => 'apple banana'),     FALSE),
+      array('read', $baseToken + array('scope' => 'apple read-write'), FALSE),
+      array('read', $baseToken + array('scope' => 'apple read,write'), FALSE),
+      array('read', $baseToken + array('scope' => null),               FALSE),
+      array('read', $baseToken + array('scope' => ''),                 FALSE),
+    );
+  }
+  
+  /**
+   * Provider for OAuth2->grantAccessToken()
+   */
+  public function generateEmptyDataForGrant() {
+    return array(
+      array(
+        array(), array()
+      ),
+      array(
+        array(), array('grant_type' => OAuth2::GRANT_TYPE_AUTH_CODE) // grant_type in auth headers should be ignored
+      ),
+      array(
+        array('not_grant_type' => 5), array()
+      ),
+    );
+  }
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/tests/OAuth2OutputTest.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/tests/OAuth2OutputTest.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/tests/OAuth2OutputTest.php	(revision 5888)
@@ -0,0 +1,72 @@
+<?php
+require __DIR__ . '/../lib/OAuth2.php';
+require __DIR__ . '/../lib/IOAuth2Storage.php';
+require __DIR__ . '/../lib/IOAuth2GrantCode.php';
+
+/**
+ * OAuth2 test cases that invovle capturing output.
+ */
+class OAuth2OutputTest extends PHPUnit_Extensions_OutputTestCase {
+  
+  /**
+   * @var OAuth2
+   */
+  private $fixture;
+  
+  /**
+   * Tests OAuth2->grantAccessToken() with successful Auth code grant
+   * 
+   */
+  public function testGrantAccessTokenWithGrantAuthCodeSuccess() {
+    $inputData = array('grant_type' => OAuth2::GRANT_TYPE_AUTH_CODE, 'redirect_uri' => 'http://www.example.com/my/subdir', 'client_id' => 'my_little_app', 'client_secret' => 'b', 'code'=> 'foo');
+    $storedToken = array('redirect_uri' => 'http://www.example.com', 'client_id' => 'my_little_app', 'expires' => time() + 60);
+    
+    $mockStorage = $this->createBaseMock('IOAuth2GrantCode');
+    $mockStorage->expects($this->any())
+      ->method('getAuthCode')
+      ->will($this->returnValue($storedToken));
+      
+    // Successful token grant will return a JSON encoded token:
+    $this->expectOutputRegex('/{"access_token":".*","expires_in":\d+,"token_type":"bearer"/');
+    $this->fixture = new OAuth2($mockStorage);
+    $this->fixture->grantAccessToken($inputData, array());
+  }
+  
+  /**
+   * Tests OAuth2->grantAccessToken() with successful Auth code grant, but without redreict_uri in the input
+   */
+  public function testGrantAccessTokenWithGrantAuthCodeSuccessWithoutRedirect() {
+    $inputData = array('grant_type' => OAuth2::GRANT_TYPE_AUTH_CODE, 'client_id' => 'my_little_app', 'client_secret' => 'b', 'code'=> 'foo');
+    $storedToken = array('redirect_uri' => 'http://www.example.com', 'client_id' => 'my_little_app', 'expires' => time() + 60);
+    
+    $mockStorage = $this->createBaseMock('IOAuth2GrantCode');
+    $mockStorage->expects($this->any())
+      ->method('getAuthCode')
+      ->will($this->returnValue($storedToken));
+      
+    // Successful token grant will return a JSON encoded token:
+    $this->expectOutputRegex('/{"access_token":".*","expires_in":\d+,"token_type":"bearer"/');
+    $this->fixture = new OAuth2($mockStorage);
+    $this->fixture->setVariable(OAuth2::CONFIG_ENFORCE_INPUT_REDIRECT, false); 
+    $this->fixture->grantAccessToken($inputData, array());
+  }
+  
+// Utility methods
+  
+  /**
+   * 
+   * @param string $interfaceName
+   */
+  protected function createBaseMock($interfaceName) {
+    $mockStorage = $this->getMock($interfaceName);
+    $mockStorage->expects($this->any())
+      ->method('checkClientCredentials')
+      ->will($this->returnValue(TRUE)); // Always return true for any combination of user/pass
+    $mockStorage->expects($this->any())
+      ->method('checkRestrictedGrantType')
+      ->will($this->returnValue(TRUE)); // Always return true for any combination of user/pass
+      
+     return $mockStorage;
+  }
+  
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/CHANGELOG.txt
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/CHANGELOG.txt	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/CHANGELOG.txt	(revision 5888)
@@ -0,0 +1,98 @@
+oauth2-php revision xxx, xxxx-xx-xx (development version)
+----------------------
+
+oauth2-php revision 23, 2011-01-25
+----------------------
+* introduce Drupal style getVariable() and setVariable, replace legacy
+  variable get/set functions.
+* remove hardcode PHP display_error and errror_reporting, as this should
+  be manually implement within 3rd party integration.
+* make verbose error as configurable and default disable, as this should
+  be manually enable within 3rd party integration.
+* add lib/OAuth2Client.inc and lib/OAuth2Exception.inc for client-side
+  implementation.
+
+oauth2-php revision 21, 2010-12-18
+----------------------
+* cleanup tabs and trailing whitespace at the end.
+* remove server/examples/mongo/lib/oauth.php and
+  server/examples/pdo/lib/oauth.php, so only keep single copy as
+  lib /oauth.php.
+* issue #5: Wrong variable name in get_access_token() in pdo_oatuh.php.
+* issue #6: mysql_create_tables.sql should allow scope to be NULL.
+* issue #7: authorize_client_response_type() is never used.
+* issue #9: Change "redirect_uri" filtering from FILTER_VALIDATE_URL to
+  FILTER_SANITIZE_URL.
+* better coding syntax for error() and callback_error().
+* better pdo_oauth2.php variable naming with change to
+  mysql_create_tables.sql.
+* change REGEX_CLIENT_ID as 3-32 characters long, so will work with md5()
+  result directly.
+* debug linkage to oauth2.php during previous commit.
+* debug redirect_uri check for AUTH_CODE_GRANT_TYPE, clone from
+  get_authorize_params().
+* update mysql_create_tables.sql with phpmyadmin export format.
+* rename library files, prepare for adding client-side implementation.
+* code cleanup with indent and spacing.
+* code cleanup true/false/null with TRUE/FALSE/NULL.
+* rename constants with OAUTH2_ prefix, prevent 3rd party integration
+  conflict.
+* remove HTTP 400 response constant, as useless refer to draft v10.
+* merge ERROR_INVALID_CLIENT_ID and ERROR_UNAUTHORIZED_CLIENT as
+  OAUTH2_ERROR_INVALID_CLIENT, as refer to that of draft v9 to v10 changes.
+* improve constants comment with doxygen syntax.
+* update class function call naming.
+* coding style clean up.
+* update part of documents.
+* change expirseRefreshToken() as unsetRefreshToken().
+* update token and auth code generation as md5() result, simpler for manual
+  debug with web browser.
+* update all documents.
+* restructure @ingroup.
+* rename checkRestrictedClientResponseTypes() as
+  checkRestrictedAuthResponseType().
+* rename checkRestrictedClientGrantTypes() as checkRestrictedGrantType().
+* rename error() as errorJsonResponse().
+* rename errorCallback() as errorDoRedirectUriCallback().
+* rename send401Unauthorized() as errorWWWAuthenticateResponseHeader(),
+  update support with different HTTP status code.
+* update __construct() with array input.
+* update finishClientAuthorization() with array input.
+* add get/set functions for $access_token_lifetime, $auth_code_lifetime and
+  $refresh_token_lifetime.
+* fix a lots of typos.
+* document all sample server implementation.
+* more documents.
+* add config.doxy for doxygen default setup.
+* add MIT LICENSE.txt.
+* add CHANGELOG.txt.
+
+oauth2-php revision 9, 2010-09-04
+----------------------
+- fixes for issues #2 and #4, updates oauth lib in the example folders to
+  the latest version in the 'lib' folder.
+- updates server library to revision 10 of the OAuth 2.0 spec.
+- adds an option for more verbose error messages to be returned in the JSON
+  response.
+- adds method to be overridden for expiring used refresh tokens.
+- fixes bug checking token expiration.
+- makes some more methods protected instead of private so they can be
+  overridden.
+- fixes issue #1 http://code.google.com/p/oauth2-php/issues/detail?id=1
+
+oauth2-php revision 7, 2010-06-29
+----------------------
+- fixed mongo connection constants.
+- updated store_refresh_token to include expires time.
+- changed example server directory structure
+- corrected "false" return result on get_stored_auth_code.
+- implemented PDO example adapter.
+- corrected an error in assertion grant type.
+- updated for ietf draft v9:
+  http://tools.ietf.org/html/draft-ietf-oauth-v2-09.
+- updated updated to support v9 lib.
+- added mysql table creation script.
+
+oauth2-php revision 0, 2010-06-27
+----------------------
+- initial commit.
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2RefreshTokens.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2RefreshTokens.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2RefreshTokens.php	(revision 5888)
@@ -0,0 +1,77 @@
+<?php
+
+/**
+ * Storage engines that want to support refresh tokens should
+ * implement this interface.
+ * 
+ * @author Dave Rochwerger <catch.dave@gmail.com>
+ * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-6
+ * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-1.5
+ */
+interface IOAuth2RefreshTokens extends IOAuth2Storage {
+
+	/**
+	 * Grant refresh access tokens.
+	 *
+	 * Retrieve the stored data for the given refresh token.
+	 *
+	 * Required for OAuth2::GRANT_TYPE_REFRESH_TOKEN.
+	 *
+	 * @param $refresh_token
+	 * Refresh token to be check with.
+	 *
+	 * @return
+	 * An associative array as below, and NULL if the refresh_token is
+	 * invalid:
+	 * - client_id: Stored client identifier.
+	 * - expires: Stored expiration unix timestamp.
+	 * - scope: (optional) Stored scope values in space-separated string.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-6
+	 *
+	 * @ingroup oauth2_section_6
+	 */
+	public function getRefreshToken($refresh_token);
+
+	/**
+	 * Take the provided refresh token values and store them somewhere.
+	 *
+	 * This function should be the storage counterpart to getRefreshToken().
+	 *
+	 * If storage fails for some reason, we're not currently checking for
+	 * any sort of success/failure, so you should bail out of the script
+	 * and provide a descriptive fail message.
+	 *
+	 * Required for OAuth2::GRANT_TYPE_REFRESH_TOKEN.
+	 *
+	 * @param $refresh_token
+	 * Refresh token to be stored.
+	 * @param $client_id
+	 * Client identifier to be stored.
+	 * @param $expires
+	 * expires to be stored.
+	 * @param $scope
+	 * (optional) Scopes to be stored in space-separated string.
+	 *
+	 * @ingroup oauth2_section_6
+	 */
+	public function setRefreshToken($refresh_token, $client_id, $user_id, $expires, $scope = NULL);
+
+	/**
+	 * Expire a used refresh token.
+	 *
+	 * This is not explicitly required in the spec, but is almost implied.
+	 * After granting a new refresh token, the old one is no longer useful and
+	 * so should be forcibly expired in the data store so it can't be used again.
+	 *
+	 * If storage fails for some reason, we're not currently checking for
+	 * any sort of success/failure, so you should bail out of the script
+	 * and provide a descriptive fail message.
+	 *
+	 * @param $refresh_token
+	 * Refresh token to be expirse.
+	 *
+	 * @ingroup oauth2_section_6
+	 */
+	public function unsetRefreshToken($refresh_token);
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2Storage.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2Storage.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2Storage.php	(revision 5888)
@@ -0,0 +1,103 @@
+<?php
+
+/**
+ * All storage engines need to implement this interface in order to use OAuth2 server
+ * 
+ * @author David Rochwerger <catch.dave@gmail.com>
+ */
+interface IOAuth2Storage {
+
+	/**
+	 * Make sure that the client credentials is valid.
+	 * 
+	 * @param $client_id
+	 * Client identifier to be check with.
+	 * @param $client_secret
+	 * (optional) If a secret is required, check that they've given the right one.
+	 *
+	 * @return
+	 * TRUE if the client credentials are valid, and MUST return FALSE if it isn't.
+	 * @endcode
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-3.1
+	 *
+	 * @ingroup oauth2_section_3
+	 */
+	public function checkClientCredentials($client_id, $client_secret = NULL);
+
+	/**
+	 * Get client details corresponding client_id.
+	 *
+	 * OAuth says we should store request URIs for each registered client.
+	 * Implement this function to grab the stored URI for a given client id.
+	 *
+	 * @param $client_id
+	 * Client identifier to be check with.
+	 *
+	 * @return array
+	 * Client details. Only mandatory item is the "registered redirect URI", and MUST
+	 * return FALSE if the given client does not exist or is invalid.
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	public function getClientDetails($client_id);
+
+	/**
+	 * Look up the supplied oauth_token from storage.
+	 *
+	 * We need to retrieve access token data as we create and verify tokens.
+	 *
+	 * @param $oauth_token
+	 * oauth_token to be check with.
+	 *
+	 * @return
+	 * An associative array as below, and return NULL if the supplied oauth_token
+	 * is invalid:
+	 * - client_id: Stored client identifier.
+	 * - expires: Stored expiration in unix timestamp.
+	 * - scope: (optional) Stored scope values in space-separated string.
+	 *
+	 * @ingroup oauth2_section_7
+	 */
+	public function getAccessToken($oauth_token);
+
+	/**
+	 * Store the supplied access token values to storage.
+	 *
+	 * We need to store access token data as we create and verify tokens.
+	 *
+	 * @param $oauth_token
+	 * oauth_token to be stored.
+	 * @param $client_id
+	 * Client identifier to be stored.
+	 * @param $user_id
+	 * User identifier to be stored.
+	 * @param $expires
+	 * Expiration to be stored.
+	 * @param $scope
+	 * (optional) Scopes to be stored in space-separated string.
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	public function setAccessToken($oauth_token, $client_id, $user_id, $expires, $scope = NULL, $refresh_token);
+
+	/**
+	 * Check restricted grant types of corresponding client identifier.
+	 *
+	 * If you want to restrict clients to certain grant types, override this
+	 * function.
+	 *
+	 * @param $client_id
+	 * Client identifier to be check with.
+	 * @param $grant_type
+	 * Grant type to be check with, would be one of the values contained in
+	 * OAuth2::GRANT_TYPE_REGEXP.
+	 *
+	 * @return
+	 * TRUE if the grant type is supported by this client identifier, and
+	 * FALSE if it isn't.
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	public function checkRestrictedGrantType($client_id, $grant_type);
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2AuthenticateException.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2AuthenticateException.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2AuthenticateException.php	(revision 5888)
@@ -0,0 +1,55 @@
+<?php
+
+/**
+ * Send an error header with the given realm and an error, if provided.
+ * Suitable for the bearer token type.
+ *
+ * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-04#section-2.4
+ *
+ * @ingroup oauth2_error
+ */
+class OAuth2AuthenticateException extends OAuth2ServerException {
+	
+	protected $header;
+
+	/**
+	 * 
+	 * @param $http_status_code
+	 * HTTP status code message as predefined.
+	 * @param $error
+	 * The "error" attribute is used to provide the client with the reason
+	 * why the access request was declined.
+	 * @param $error_description
+	 * (optional) The "error_description" attribute provides a human-readable text
+	 * containing additional information, used to assist in the understanding
+	 * and resolution of the error occurred.
+	 * @param $scope
+	 * A space-delimited list of scope values indicating the required scope
+	 * of the access token for accessing the requested resource.
+	 */
+	public function __construct($httpCode, $tokenType, $realm, $error, $error_description = NULL, $scope = NULL) {
+		parent::__construct($httpCode, $error, $error_description);
+		
+		if ($scope) {
+			$this->errorData['scope'] = $scope;
+		}
+		
+		// Build header
+		$this->header = sprintf('WWW-Authenticate: %s realm="%s"', ucwords($tokenType), $realm);
+		foreach ( $this->errorData as $key => $value ) {
+			$this->header .= ", $key=\"$value\"";
+		}
+	}
+
+	/**
+	 * Send out HTTP headers for JSON.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2
+	 *
+	 * @ingroup oauth2_section_5
+	 */
+	protected function sendHeaders() {
+		header($this->header);
+	}
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2Client.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2Client.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2Client.php	(revision 5888)
@@ -0,0 +1,692 @@
+<?php
+
+/**
+ * OAuth2.0 draft v10 client-side implementation.
+ *
+ * @author Originally written by Naitik Shah <naitik@facebook.com>.
+ * @author Update to draft v10 by Edison Wong <hswong3i@pantarei-design.com>.
+ *
+ * @sa <a href="https://github.com/facebook/php-sdk">Facebook PHP SDK</a>.
+ */
+abstract class OAuth2Client {
+	
+	/**
+	 * The default Cache Lifetime (in seconds).
+	 */
+	const DEFAULT_EXPIRES_IN = 3600;
+	
+	/**
+	 * The default Base domain for the Cookie.
+	 */
+	const DEFAULT_BASE_DOMAIN = '';
+	
+	/**
+	 * Array of persistent variables stored.
+	 */
+	protected $conf = array();
+
+	/**
+	 * Returns a persistent variable.
+	 *
+	 * To avoid problems, always use lower case for persistent variable names.
+	 *
+	 * @param $name
+	 * The name of the variable to return.
+	 * @param $default
+	 * The default value to use if this variable has never been set.
+	 *
+	 * @return
+	 * The value of the variable.
+	 */
+	public function getVariable($name, $default = NULL) {
+		return isset($this->conf[$name]) ? $this->conf[$name] : $default;
+	}
+
+	/**
+	 * Sets a persistent variable.
+	 *
+	 * To avoid problems, always use lower case for persistent variable names.
+	 *
+	 * @param $name
+	 * The name of the variable to set.
+	 * @param $value
+	 * The value to set.
+	 */
+	public function setVariable($name, $value) {
+		$this->conf[$name] = $value;
+		return $this;
+	}
+
+	// Stuff that should get overridden by subclasses.
+	//
+	// I don't want to make these abstract, because then subclasses would have
+	// to implement all of them, which is too much work.
+	//
+	// So they're just stubs. Override the ones you need.
+	
+
+	/**
+	 * Initialize a Drupal OAuth2.0 Application.
+	 *
+	 * @param $config
+	 * An associative array as below:
+	 * - base_uri: The base URI for the OAuth2.0 endpoints.
+	 * - code: (optional) The authorization code.
+	 * - username: (optional) The username.
+	 * - password: (optional) The password.
+	 * - client_id: (optional) The application ID.
+	 * - client_secret: (optional) The application secret.
+	 * - authorize_uri: (optional) The end-user authorization endpoint URI.
+	 * - access_token_uri: (optional) The token endpoint URI.
+	 * - services_uri: (optional) The services endpoint URI.
+	 * - cookie_support: (optional) TRUE to enable cookie support.
+	 * - base_domain: (optional) The domain for the cookie.
+	 * - file_upload_support: (optional) TRUE if file uploads are enabled.
+	 */
+	public function __construct($config = array()) {
+		// We must set base_uri first.
+		$this->setVariable('base_uri', $config['base_uri']);
+		unset($config['base_uri']);
+		
+		// Use predefined OAuth2.0 params, or get it from $_REQUEST.
+		foreach ( array('code', 'username', 'password') as $name ) {
+			if (isset($config[$name])) {
+				$this->setVariable($name, $config[$name]);
+			} else if (isset($_REQUEST[$name]) && !empty($_REQUEST[$name])) {
+				$this->setVariable($name, $_REQUEST[$name]);
+			}
+			unset($config[$name]);
+		}
+		
+		// Endpoint URIs.
+		foreach ( array('authorize_uri', 'access_token_uri', 'services_uri') as $name ) {
+			if (isset($config[$name]))
+				if (substr($config[$name], 0, 4) == "http") {
+					$this->setVariable($name, $config[$name]);
+				} else {
+					$this->setVariable($name, $this->getVariable('base_uri') . $config[$name]);
+				}
+			unset($config[$name]);
+		}
+		
+		// Other else configurations.
+		foreach ( $config as $name => $value ) {
+			$this->setVariable($name, $value);
+		}
+	}
+
+	/**
+	 * Try to get session object from custom method.
+	 *
+	 * By default we generate session object based on access_token response, or
+	 * if it is provided from server with $_REQUEST. For sure, if it is provided
+	 * by server it should follow our session object format.
+	 *
+	 * Session object provided by server can ensure the correct expires and
+	 * base_domain setup as predefined in server, also you may get more useful
+	 * information for custom functionality, too. BTW, this may require for
+	 * additional remote call overhead.
+	 *
+	 * You may wish to override this function with your custom version due to
+	 * your own server-side implementation.
+	 *
+	 * @param $access_token
+	 * (optional) A valid access token in associative array as below:
+	 * - access_token: A valid access_token generated by OAuth2.0
+	 * authorization endpoint.
+	 * - expires_in: (optional) A valid expires_in generated by OAuth2.0
+	 * authorization endpoint.
+	 * - refresh_token: (optional) A valid refresh_token generated by OAuth2.0
+	 * authorization endpoint.
+	 * - scope: (optional) A valid scope generated by OAuth2.0
+	 * authorization endpoint.
+	 *
+	 * @return
+	 * A valid session object in associative array for setup cookie, and
+	 * NULL if not able to generate it with custom method.
+	 */
+	protected function getSessionObject($access_token = NULL) {
+		$session = NULL;
+		
+		// Try generate local version of session cookie.
+		if (!empty($access_token) && isset($access_token['access_token'])) {
+			$session['access_token'] = $access_token['access_token'];
+			$session['base_domain'] = $this->getVariable('base_domain', self::DEFAULT_BASE_DOMAIN);
+			$session['expires'] = isset($access_token['expires_in']) ? time() + $access_token['expires_in'] : time() + $this->getVariable('expires_in', self::DEFAULT_EXPIRES_IN);
+			$session['refresh_token'] = isset($access_token['refresh_token']) ? $access_token['refresh_token'] : '';
+			$session['scope'] = isset($access_token['scope']) ? $access_token['scope'] : '';
+			$session['secret'] = md5(base64_encode(pack('N6', mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), uniqid())));
+			
+			// Provide our own signature.
+			$sig = self::generateSignature($session, $this->getVariable('client_secret'));
+			$session['sig'] = $sig;
+		}
+		
+		// Try loading session from $_REQUEST.
+		if (!$session && isset($_REQUEST['session'])) {
+			$session = json_decode(get_magic_quotes_gpc() ? stripslashes($_REQUEST['session']) : $_REQUEST['session'], TRUE);
+		}
+		
+		return $session;
+	}
+
+	/**
+	 * Make an API call.
+	 *
+	 * Support both OAuth2.0 or normal GET/POST API call, with relative
+	 * or absolute URI.
+	 *
+	 * If no valid OAuth2.0 access token found in session object, this function
+	 * will automatically switch as normal remote API call without "oauth_token"
+	 * parameter.
+	 *
+	 * Assume server reply in JSON object and always decode during return. If
+	 * you hope to issue a raw query, please use makeRequest().
+	 *
+	 * @param $path
+	 * The target path, relative to base_path/service_uri or an absolute URI.
+	 * @param $method
+	 * (optional) The HTTP method (default 'GET').
+	 * @param $params
+	 * (optional The GET/POST parameters.
+	 *
+	 * @return
+	 * The JSON decoded response object.
+	 *
+	 * @throws OAuth2Exception
+	 */
+	public function api($path, $method = 'GET', $params = array()) {
+		if (is_array($method) && empty($params)) {
+			$params = $method;
+			$method = 'GET';
+		}
+		
+		// json_encode all params values that are not strings.
+		foreach ( $params as $key => $value ) {
+			if (!is_string($value)) {
+				$params[$key] = json_encode($value);
+			}
+		}
+		
+		$result = json_decode($this->makeOAuth2Request($this->getUri($path), $method, $params), TRUE);
+		
+		// Results are returned, errors are thrown.
+		if (is_array($result) && isset($result['error'])) {
+			$e = new OAuth2Exception($result);
+			switch ($e->getType()) {
+				// OAuth 2.0 Draft 10 style.
+				case 'invalid_token':
+					$this->setSession(NULL);
+				default :
+					$this->setSession(NULL);
+			}
+			throw $e;
+		}
+		return $result;
+	}
+	
+	// End stuff that should get overridden.
+	
+
+	/**
+	 * Default options for cURL.
+	 */
+	public static $CURL_OPTS = array(
+		CURLOPT_CONNECTTIMEOUT => 10,
+		CURLOPT_RETURNTRANSFER => TRUE,
+		CURLOPT_HEADER => TRUE,
+		CURLOPT_TIMEOUT => 60,
+		CURLOPT_USERAGENT => 'oauth2-draft-v10',
+		CURLOPT_HTTPHEADER => array("Accept: application/json")
+	);
+
+	/**
+	 * Set the Session.
+	 *
+	 * @param $session
+	 * (optional) The session object to be set. NULL if hope to frush existing
+	 * session object.
+	 * @param $write_cookie
+	 * (optional) TRUE if a cookie should be written. This value is ignored
+	 * if cookie support has been disabled.
+	 *
+	 * @return
+	 * The current OAuth2.0 client-side instance.
+	 */
+	public function setSession($session = NULL, $write_cookie = TRUE) {
+		$this->setVariable('_session', $this->validateSessionObject($session));
+		$this->setVariable('_session_loaded', TRUE);
+		if ($write_cookie) {
+			$this->setCookieFromSession($this->getVariable('_session'));
+		}
+		return $this;
+	}
+
+	/**
+	 * Get the session object.
+	 *
+	 * This will automatically look for a signed session via custom method,
+	 * OAuth2.0 grant type with authorization_code, OAuth2.0 grant type with
+	 * password, or cookie that we had already setup.
+	 *
+	 * @return
+	 * The valid session object with OAuth2.0 infomration, and NULL if not
+	 * able to discover any cases.
+	 */
+	public function getSession() {
+		if (!$this->getVariable('_session_loaded')) {
+			$session = NULL;
+			$write_cookie = TRUE;
+			
+			// Try obtain login session by custom method.
+			$session = $this->getSessionObject(NULL);
+			$session = $this->validateSessionObject($session);
+			
+			// grant_type == authorization_code.
+			if (!$session && $this->getVariable('code')) {
+				$access_token = $this->getAccessTokenFromAuthorizationCode($this->getVariable('code'));
+				$session = $this->getSessionObject($access_token);
+				$session = $this->validateSessionObject($session);
+			}
+			
+			// grant_type == password.
+			if (!$session && $this->getVariable('username') && $this->getVariable('password')) {
+				$access_token = $this->getAccessTokenFromPassword($this->getVariable('username'), $this->getVariable('password'));
+				$session = $this->getSessionObject($access_token);
+				$session = $this->validateSessionObject($session);
+			}
+			
+			// Try loading session from cookie if necessary.
+			if (!$session && $this->getVariable('cookie_support')) {
+				$cookie_name = $this->getSessionCookieName();
+				if (isset($_COOKIE[$cookie_name])) {
+					$session = array();
+					parse_str(trim(get_magic_quotes_gpc() ? stripslashes($_COOKIE[$cookie_name]) : $_COOKIE[$cookie_name], '"'), $session);
+					$session = $this->validateSessionObject($session);
+					// Write only if we need to delete a invalid session cookie.
+					$write_cookie = empty($session);
+				}
+			}
+			
+			$this->setSession($session, $write_cookie);
+		}
+		
+		return $this->getVariable('_session');
+	}
+
+	/**
+	 * Gets an OAuth2.0 access token from session.
+	 *
+	 * This will trigger getSession() and so we MUST initialize with required
+	 * configuration.
+	 *
+	 * @return
+	 * The valid OAuth2.0 access token, and NULL if not exists in session.
+	 */
+	public function getAccessToken() {
+		$session = $this->getSession();
+		return isset($session['access_token']) ? $session['access_token'] : NULL;
+	}
+
+	/**
+	 * Get access token from OAuth2.0 token endpoint with authorization code.
+	 *
+	 * This function will only be activated if both access token URI, client
+	 * identifier and client secret are setup correctly.
+	 *
+	 * @param $code
+	 * Authorization code issued by authorization server's authorization
+	 * endpoint.
+	 *
+	 * @return
+	 * A valid OAuth2.0 JSON decoded access token in associative array, and
+	 * NULL if not enough parameters or JSON decode failed.
+	 */
+	private function getAccessTokenFromAuthorizationCode($code) {
+		if ($this->getVariable('access_token_uri') && $this->getVariable('client_id') && $this->getVariable('client_secret')) {
+			return json_decode($this->makeRequest(
+				$this->getVariable('access_token_uri'),
+				'POST',
+				array(
+					'grant_type' => 'authorization_code',
+					'client_id' => $this->getVariable('client_id'),
+					'client_secret' => $this->getVariable('client_secret'),
+					'code' => $code,
+					'redirect_uri' => $this->getCurrentUri()
+				)
+			), TRUE);
+		}
+		return NULL;
+	}
+
+	/**
+	 * Get access token from OAuth2.0 token endpoint with basic user
+	 * credentials.
+	 *
+	 * This function will only be activated if both username and password
+	 * are setup correctly.
+	 *
+	 * @param $username
+	 * Username to be check with.
+	 * @param $password
+	 * Password to be check with.
+	 *
+	 * @return
+	 * A valid OAuth2.0 JSON decoded access token in associative array, and
+	 * NULL if not enough parameters or JSON decode failed.
+	 */
+	private function getAccessTokenFromPassword($username, $password) {
+		if ($this->getVariable('access_token_uri') && $this->getVariable('client_id') && $this->getVariable('client_secret')) {
+			return json_decode($this->makeRequest(
+				$this->getVariable('access_token_uri'),
+				'POST',
+				array(
+					'grant_type' => 'password',
+					'client_id' => $this->getVariable('client_id'),
+					'client_secret' => $this->getVariable('client_secret'),
+					'username' => $username,
+					'password' => $password
+				)
+			), TRUE);
+		}
+		return NULL;
+	}
+
+	/**
+	 * Make an OAuth2.0 Request.
+	 *
+	 * Automatically append "oauth_token" in query parameters if not yet
+	 * exists and able to discover a valid access token from session. Otherwise
+	 * just ignore setup with "oauth_token" and handle the API call AS-IS, and
+	 * so may issue a plain API call without OAuth2.0 protection.
+	 *
+	 * @param $path
+	 * The target path, relative to base_path/service_uri or an absolute URI.
+	 * @param $method
+	 * (optional) The HTTP method (default 'GET').
+	 * @param $params
+	 * (optional The GET/POST parameters.
+	 *
+	 * @return
+	 * The JSON decoded response object.
+	 *
+	 * @throws OAuth2Exception
+	 */
+	protected function makeOAuth2Request($path, $method = 'GET', $params = array()) {
+		if ((!isset($params['oauth_token']) || empty($params['oauth_token'])) && $oauth_token = $this->getAccessToken()) {
+			$params['oauth_token'] = $oauth_token;
+		}
+		return $this->makeRequest($path, $method, $params);
+	}
+
+	/**
+	 * Makes an HTTP request.
+	 *
+	 * This method can be overriden by subclasses if developers want to do
+	 * fancier things or use something other than cURL to make the request.
+	 *
+	 * @param $path
+	 * The target path, relative to base_path/service_uri or an absolute URI.
+	 * @param $method
+	 * (optional) The HTTP method (default 'GET').
+	 * @param $params
+	 * (optional The GET/POST parameters.
+	 * @param $ch
+	 * (optional) An initialized curl handle
+	 *
+	 * @return
+	 * The JSON decoded response object.
+	 */
+	protected function makeRequest($path, $method = 'GET', $params = array(), $ch = NULL) {
+		if (!$ch)
+			$ch = curl_init();
+		
+		$opts = self::$CURL_OPTS;
+		if ($params) {
+			switch ($method) {
+				case 'GET':
+					$path .= '?' . http_build_query($params, NULL, '&');
+					break;
+				// Method override as we always do a POST.
+				default :
+					if ($this->getVariable('file_upload_support')) {
+						$opts[CURLOPT_POSTFIELDS] = $params;
+					} else {
+						$opts[CURLOPT_POSTFIELDS] = http_build_query($params, NULL, '&');
+					}
+			}
+		}
+		$opts[CURLOPT_URL] = $path;
+		
+		// Disable the 'Expect: 100-continue' behaviour. This causes CURL to wait
+		// for 2 seconds if the server does not support this header.
+		if (isset($opts[CURLOPT_HTTPHEADER])) {
+			$existing_headers = $opts[CURLOPT_HTTPHEADER];
+			$existing_headers[] = 'Expect:';
+			$opts[CURLOPT_HTTPHEADER] = $existing_headers;
+		} else {
+			$opts[CURLOPT_HTTPHEADER] = array('Expect:');
+		}
+		
+		curl_setopt_array($ch, $opts);
+		$result = curl_exec($ch);
+		
+		if (curl_errno($ch) == 60) { // CURLE_SSL_CACERT
+			error_log('Invalid or no certificate authority found, using bundled information');
+			curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt');
+			$result = curl_exec($ch);
+		}
+		
+		if ($result === FALSE) {
+			$e = new OAuth2Exception(array('code' => curl_errno($ch), 'message' => curl_error($ch)));
+			curl_close($ch);
+			throw $e;
+		}
+		curl_close($ch);
+		
+		// Split the HTTP response into header and body.
+		list($headers, $body) = explode("\r\n\r\n", $result);
+		$headers = explode("\r\n", $headers);
+		
+		// We catch HTTP/1.1 4xx or HTTP/1.1 5xx error response.
+		if (strpos($headers[0], 'HTTP/1.1 4') !== FALSE || strpos($headers[0], 'HTTP/1.1 5') !== FALSE) {
+			$result = array('code' => 0, 'message' => '');
+			
+			if (preg_match('/^HTTP\/1.1 ([0-9]{3,3}) (.*)$/', $headers[0], $matches)) {
+				$result['code'] = $matches[1];
+				$result['message'] = $matches[2];
+			}
+			
+			// In case retrun with WWW-Authenticate replace the description.
+			foreach ( $headers as $header ) {
+				if (preg_match("/^WWW-Authenticate:.*error='(.*)'/", $header, $matches)) {
+					$result['error'] = $matches[1];
+				}
+			}
+			
+			return json_encode($result);
+		}
+		
+		return $body;
+	}
+
+	/**
+	 * The name of the cookie that contains the session object.
+	 *
+	 * @return
+	 * The cookie name.
+	 */
+	private function getSessionCookieName() {
+		return 'oauth2_' . $this->getVariable('client_id');
+	}
+
+	/**
+	 * Set a JS Cookie based on the _passed in_ session.
+	 *
+	 * It does not use the currently stored session - you need to explicitly
+	 * pass it in.
+	 *
+	 * @param $session
+	 * The session to use for setting the cookie.
+	 */
+	protected function setCookieFromSession($session = NULL) {
+		if (!$this->getVariable('cookie_support'))
+			return;
+		
+		$cookie_name = $this->getSessionCookieName();
+		$value = 'deleted';
+		$expires = time() - 3600;
+		$base_domain = $this->getVariable('base_domain', self::DEFAULT_BASE_DOMAIN);
+		if ($session) {
+			$value = '"' . http_build_query($session, NULL, '&') . '"';
+			$base_domain = isset($session['base_domain']) ? $session['base_domain'] : $base_domain;
+			$expires = isset($session['expires']) ? $session['expires'] : time() + $this->getVariable('expires_in', self::DEFAULT_EXPIRES_IN);
+		}
+		
+		// Prepend dot if a domain is found.
+		if ($base_domain)
+			$base_domain = '.' . $base_domain;
+		
+		// If an existing cookie is not set, we dont need to delete it.
+		if ($value == 'deleted' && empty($_COOKIE[$cookie_name]))
+			return;
+		
+		if (headers_sent())
+			error_log('Could not set cookie. Headers already sent.');
+		else
+			setcookie($cookie_name, $value, $expires, '/', $base_domain);
+	}
+
+	/**
+	 * Validates a session_version = 3 style session object.
+	 *
+	 * @param $session
+	 * The session object.
+	 *
+	 * @return
+	 * The session object if it validates, NULL otherwise.
+	 */
+	protected function validateSessionObject($session) {
+		// Make sure some essential fields exist.
+		if (is_array($session) && isset($session['access_token']) && isset($session['sig'])) {
+			// Validate the signature.
+			$session_without_sig = $session;
+			unset($session_without_sig['sig']);
+			
+			$expected_sig = self::generateSignature($session_without_sig, $this->getVariable('client_secret'));
+			
+			if ($session['sig'] != $expected_sig) {
+				error_log('Got invalid session signature in cookie.');
+				$session = NULL;
+			}
+		} else {
+			$session = NULL;
+		}
+		return $session;
+	}
+
+	/**
+	 * Since $_SERVER['REQUEST_URI'] is only available on Apache, we
+	 * generate an equivalent using other environment variables.
+	 */
+	function getRequestUri() {
+		if (isset($_SERVER['REQUEST_URI'])) {
+			$uri = $_SERVER['REQUEST_URI'];
+		} else {
+			if (isset($_SERVER['argv'])) {
+				$uri = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['argv'][0];
+			} elseif (isset($_SERVER['QUERY_STRING'])) {
+				$uri = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
+			} else {
+				$uri = $_SERVER['SCRIPT_NAME'];
+			}
+		}
+		// Prevent multiple slashes to avoid cross site requests via the Form API.
+		$uri = '/' . ltrim($uri, '/');
+		
+		return $uri;
+	}
+
+	/**
+	 * Returns the Current URL.
+	 *
+	 * @return
+	 * The current URL.
+	 */
+	protected function getCurrentUri() {
+		$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
+		$current_uri = $protocol . $_SERVER['HTTP_HOST'] . $this->getRequestUri();
+		$parts = parse_url($current_uri);
+		
+		$query = '';
+		if (!empty($parts['query'])) {
+			$params = array();
+			parse_str($parts['query'], $params);
+			$params = array_filter($params);
+			if (!empty($params)) {
+				$query = '?' . http_build_query($params, NULL, '&');
+			}
+		}
+		
+		// Use port if non default.
+		$port = '';
+		if (isset($parts['port']) && (($protocol === 'http://' && $parts['port'] !== 80) || ($protocol === 'https://' && $parts['port'] !== 443))) {
+			$port = ':' . $parts['port'];
+		}
+		
+		
+		// Rebuild.
+		return $protocol . $parts['host'] . $port . $parts['path'] . $query;
+	}
+
+	/**
+	 * Build the URL for given path and parameters.
+	 *
+	 * @param $path
+	 * (optional) The path.
+	 * @param $params
+	 * (optional) The query parameters in associative array.
+	 *
+	 * @return
+	 * The URL for the given parameters.
+	 */
+	protected function getUri($path = '', $params = array()) {
+		$url = $this->getVariable('services_uri') ? $this->getVariable('services_uri') : $this->getVariable('base_uri');
+		
+		if (!empty($path))
+			if (substr($path, 0, 4) == "http")
+				$url = $path;
+			else
+				$url = rtrim($url, '/') . '/' . ltrim($path, '/');
+		
+		if (!empty($params))
+			$url .= '?' . http_build_query($params, NULL, '&');
+		
+		return $url;
+	}
+
+	/**
+	 * Generate a signature for the given params and secret.
+	 *
+	 * @param $params
+	 * The parameters to sign.
+	 * @param $secret
+	 * The secret to sign with.
+	 *
+	 * @return
+	 * The generated signature
+	 */
+	protected function generateSignature($params, $secret) {
+		// Work with sorted data.
+		ksort($params);
+		
+		// Generate the base string.
+		$base_string = '';
+		foreach ( $params as $key => $value ) {
+			$base_string .= $key . '=' . $value;
+		}
+		$base_string .= $secret;
+		
+		return md5($base_string);
+	}
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2Exception.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2Exception.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2Exception.php	(revision 5888)
@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * OAuth2.0 draft v10 exception handling.
+ *
+ * @author Originally written by Naitik Shah <naitik@facebook.com>.
+ * @author Update to draft v10 by Edison Wong <hswong3i@pantarei-design.com>.
+ *
+ * @sa <a href="https://github.com/facebook/php-sdk">Facebook PHP SDK</a>.
+ */
+class OAuth2Exception extends Exception {
+	
+	/**
+	 * The result from the API server that represents the exception information.
+	 */
+	protected $result;
+
+	/**
+	 * Make a new API Exception with the given result.
+	 *
+	 * @param $result
+	 * The result from the API server.
+	 */
+	public function __construct($result) {
+		$this->result = $result;
+		
+		$code = isset($result['code']) ? $result['code'] : 0;
+		
+		if (isset($result['error'])) {
+			// OAuth 2.0 Draft 10 style
+			$message = $result['error'];
+		} elseif (isset($result['message'])) {
+			// cURL style
+			$message = $result['message'];
+		} else {
+			$message = 'Unknown Error. Check getResult()';
+		}
+		
+		parent::__construct($message, $code);
+	}
+
+	/**
+	 * Return the associated result object returned by the API server.
+	 *
+	 * @returns
+	 * The result from the API server.
+	 */
+	public function getResult() {
+		return $this->result;
+	}
+
+	/**
+	 * Returns the associated type for the error. This will default to
+	 * 'Exception' when a type is not available.
+	 *
+	 * @return
+	 * The type for the error.
+	 */
+	public function getType() {
+		if (isset($this->result['error'])) {
+			$message = $this->result['error'];
+			if (is_string($message)) {
+				// OAuth 2.0 Draft 10 style
+				return $message;
+			}
+		}
+		return 'Exception';
+	}
+
+	/**
+	 * To make debugging easier.
+	 *
+	 * @returns
+	 * The string representation of the error.
+	 */
+	public function __toString() {
+		$str = $this->getType() . ': ';
+		if ($this->code != 0) {
+			$str .= $this->code . ': ';
+		}
+		return $str . $this->message;
+	}
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantCode.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantCode.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantCode.php	(revision 5888)
@@ -0,0 +1,72 @@
+<?php
+
+/**
+ * Storage engines that support the "Authorization Code"
+ * grant type should implement this interface
+ * 
+ * @author Dave Rochwerger <catch.dave@gmail.com>
+ * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1
+ */
+interface IOAuth2GrantCode extends IOAuth2Storage {
+	
+	/**
+	 * The Authorization Code grant type supports a response type of "code". 
+	 * 
+	 * @var string
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-1.4.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2
+	 */
+	const RESPONSE_TYPE_CODE = OAuth2::RESPONSE_TYPE_AUTH_CODE;
+
+	/**
+	 * Fetch authorization code data (probably the most common grant type).
+	 *
+	 * Retrieve the stored data for the given authorization code.
+	 *
+	 * Required for OAuth2::GRANT_TYPE_AUTH_CODE.
+	 *
+	 * @param $code
+	 * Authorization code to be check with.
+	 *
+	 * @return
+	 * An associative array as below, and NULL if the code is invalid:
+	 * - client_id: Stored client identifier.
+	 * - redirect_uri: Stored redirect URI.
+	 * - expires: Stored expiration in unix timestamp.
+	 * - scope: (optional) Stored scope values in space-separated string.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	public function getAuthCode($code);
+
+	/**
+	 * Take the provided authorization code values and store them somewhere.
+	 *
+	 * This function should be the storage counterpart to getAuthCode().
+	 *
+	 * If storage fails for some reason, we're not currently checking for
+	 * any sort of success/failure, so you should bail out of the script
+	 * and provide a descriptive fail message.
+	 *
+	 * Required for OAuth2::GRANT_TYPE_AUTH_CODE.
+	 *
+	 * @param $code
+	 * Authorization code to be stored.
+	 * @param $client_id
+	 * Client identifier to be stored.
+	 * @param $user_id
+	 * User identifier to be stored.
+	 * @param $redirect_uri
+	 * Redirect URI to be stored.
+	 * @param $expires
+	 * Expiration to be stored.
+	 * @param $scope
+	 * (optional) Scopes to be stored in space-separated string.
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	public function setAuthCode($code, $client_id, $user_id, $redirect_uri, $expires, $scope = NULL);
+
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantImplicit.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantImplicit.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantImplicit.php	(revision 5888)
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * Storage engines that support the "Implicit"
+ * grant type should implement this interface
+ * 
+ * @author Dave Rochwerger <catch.dave@gmail.com>
+ * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2
+ */
+interface IOAuth2GrantImplicit extends IOAuth2Storage {
+	
+	/**
+	 * The Implicit grant type supports a response type of "token". 
+	 * 
+	 * @var string
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-1.4.2
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2
+	 */
+	const RESPONSE_TYPE_TOKEN = OAuth2::RESPONSE_TYPE_ACCESS_TOKEN;
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2.php	(revision 5888)
@@ -0,0 +1,1363 @@
+<?php
+require_once ROOTPATH . '/library/oauth2/lib/OAuth2ServerException.php';
+require_once ROOTPATH . '/library/oauth2/lib/OAuth2AuthenticateException.php';
+require_once ROOTPATH . '/library/oauth2/lib/OAuth2RedirectException.php';
+
+/**
+ * @mainpage
+ * OAuth 2.0 server in PHP, originally written for
+ * <a href="http://www.opendining.net/"> Open Dining</a>. Supports
+ * <a href="http://tools.ietf.org/html/draft-ietf-oauth-v2-20">IETF draft v20</a>.
+ *
+ * Source repo has sample servers implementations for
+ * <a href="http://php.net/manual/en/book.pdo.php"> PHP Data Objects</a> and
+ * <a href="http://www.mongodb.org/">MongoDB</a>. Easily adaptable to other
+ * storage engines.
+ *
+ * PHP Data Objects supports a variety of databases, including MySQL,
+ * Microsoft SQL Server, SQLite, and Oracle, so you can try out the sample
+ * to see how it all works.
+ *
+ * We're expanding the wiki to include more helpful documentation, but for
+ * now, your best bet is to view the oauth.php source - it has lots of
+ * comments.
+ *
+ * @author Tim Ridgely <tim.ridgely@gmail.com>
+ * @author Aaron Parecki <aaron@parecki.com>
+ * @author Edison Wong <hswong3i@pantarei-design.com>
+ * @author David Rochwerger <catch.dave@gmail.com>
+ *
+ * @see http://code.google.com/p/oauth2-php/
+ * @see https://github.com/quizlet/oauth2-php
+ */
+
+/**
+ * OAuth2.0 draft v20 server-side implementation.
+ * 
+ * @todo Add support for Message Authentication Code (MAC) token type.
+ *
+ * @author Originally written by Tim Ridgely <tim.ridgely@gmail.com>.
+ * @author Updated to draft v10 by Aaron Parecki <aaron@parecki.com>.
+ * @author Debug, coding style clean up and documented by Edison Wong <hswong3i@pantarei-design.com>.
+ * @author Refactored (including separating from raw POST/GET) and updated to draft v20 by David Rochwerger <catch.dave@gmail.com>.
+ */
+class OAuth2 {
+	
+	/**
+	 * Array of persistent variables stored.
+	 */
+	protected $conf = array();
+	
+	/**
+	 * Storage engine for authentication server
+	 * 
+	 * @var IOAuth2Storage
+	 */
+	protected $storage;
+	
+	/**
+	 * Keep track of the old refresh token. So we can unset
+	 * the old refresh tokens when a new one is issued.
+	 * 
+	 * @var string
+	 */
+	protected $oldRefreshToken;
+	
+	/**
+	 * Default values for configuration options.
+	 * 
+	 * @var int
+	 * @see OAuth2::setDefaultOptions()
+	 */
+	const DEFAULT_ACCESS_TOKEN_LIFETIME = 3600;
+	const DEFAULT_REFRESH_TOKEN_LIFETIME = 1209600;
+	const DEFAULT_AUTH_CODE_LIFETIME = 3600;
+	const DEFAULT_WWW_REALM = 'Service';
+	
+	/**
+	 * Configurable options.
+	 * 
+	 * @var string
+	 */
+	const CONFIG_ACCESS_LIFETIME = 3600; // The lifetime of access token in seconds.
+	const CONFIG_REFRESH_LIFETIME = 3600; // The lifetime of refresh token in seconds.
+	const CONFIG_AUTH_LIFETIME = 3600; // The lifetime of auth code in seconds.
+	const CONFIG_SUPPORTED_SCOPES = 'supported_scopes'; // Array of scopes you want to support
+	const CONFIG_TOKEN_TYPE = 'token_type'; // Token type to respond with. Currently only "Bearer" supported.
+	const CONFIG_WWW_REALM = 'realm';
+	const CONFIG_ENFORCE_INPUT_REDIRECT = 'enforce_redirect'; // Set to true to enforce redirect_uri on input for both authorize and token steps.
+	const CONFIG_ENFORCE_STATE = 'enforce_state'; // Set to true to enforce state to be passed in authorization (see http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-10.12)
+	
+
+	/**
+	 * Regex to filter out the client identifier (described in Section 2 of IETF draft).
+	 *
+	 * IETF draft does not prescribe a format for these, however I've arbitrarily
+	 * chosen alphanumeric strings with hyphens and underscores, 3-32 characters
+	 * long.
+	 *
+	 * Feel free to change.
+	 */
+	const CLIENT_ID_REGEXP = '/^[a-z0-9-_]{3,32}$/i';
+	
+	/**
+	 * @defgroup oauth2_section_5 Accessing a Protected Resource
+	 * @{
+	 *
+	 * Clients access protected resources by presenting an access token to
+	 * the resource server. Access tokens act as bearer tokens, where the
+	 * token string acts as a shared symmetric secret. This requires
+	 * treating the access token with the same care as other secrets (e.g.
+	 * end-user passwords). Access tokens SHOULD NOT be sent in the clear
+	 * over an insecure channel.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-7
+	 */
+	
+	/**
+	 * Used to define the name of the OAuth access token parameter
+	 * (POST & GET). This is for the "bearer" token type.
+	 * Other token types may use different methods and names.
+	 *
+	 * IETF Draft section 2 specifies that it should be called "access_token"
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-06#section-2.2
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-06#section-2.3
+	 */
+	const TOKEN_PARAM_NAME = 'access_token';
+	
+	/**
+	 * When using the bearer token type, there is a specifc Authorization header
+	 * required: "Bearer"
+	 * 
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-04#section-2.1
+	 */
+	const TOKEN_BEARER_HEADER_NAME = 'Bearer';
+	
+	/**
+	 * @}
+	 */
+	
+	/**
+	 * @defgroup oauth2_section_4 Obtaining Authorization
+	 * @{
+	 *
+	 * When the client interacts with an end-user, the end-user MUST first
+	 * grant the client authorization to access its protected resources.
+	 * Once obtained, the end-user authorization grant is expressed as an
+	 * authorization code which the client uses to obtain an access token.
+	 * To obtain an end-user authorization, the client sends the end-user to
+	 * the end-user authorization endpoint.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4
+	 */
+	
+	/**
+	 * List of possible authentication response types.
+	 * The "authorization_code" mechanism exclusively supports 'code'
+	 * and the "implicit" mechanism exclusively supports 'token'.
+	 * 
+	 * @var string
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.1
+	 */
+	const RESPONSE_TYPE_AUTH_CODE = 'code';
+	const RESPONSE_TYPE_ACCESS_TOKEN = 'token';
+	
+	/**
+	 * @}
+	 */
+	
+	/**
+	 * @defgroup oauth2_section_5 Obtaining an Access Token
+	 * @{
+	 *
+	 * The client obtains an access token by authenticating with the
+	 * authorization server and presenting its authorization grant (in the form of
+	 * an authorization code, resource owner credentials, an assertion, or a
+	 * refresh token).
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4
+	 */
+	
+	/**
+	 * Grant types support by draft 20
+	 */
+	const GRANT_TYPE_AUTH_CODE = 'authorization_code';
+	const GRANT_TYPE_IMPLICIT = 'token';
+	const GRANT_TYPE_USER_CREDENTIALS = 'password';
+	const GRANT_TYPE_CLIENT_CREDENTIALS = 'client_credentials';
+	const GRANT_TYPE_REFRESH_TOKEN = 'refresh_token';
+	const GRANT_TYPE_EXTENSIONS = 'extensions';
+	
+	/**
+	 * Regex to filter out the grant type.
+	 * NB: For extensibility, the grant type can be a URI
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.5
+	 */
+	const GRANT_TYPE_REGEXP = '#^(authorization_code|token|password|client_credentials|refresh_token|http://.*)$#';
+	
+	/**
+	 * @}
+	 */
+	
+	/**
+	 * Possible token types as defined by draft 20.
+	 * 
+	 * TODO: Add support for mac (and maybe other types?)
+	 * 
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-7.1 
+	 */
+	const TOKEN_TYPE_BEARER = 'bearer';
+	const TOKEN_TYPE_MAC = 'mac'; // Currently unsupported
+	
+
+	/**
+	 * @defgroup self::HTTP_status HTTP status code
+	 * @{
+	 */
+	
+	/**
+	 * HTTP status codes for successful and error states as specified by draft 20.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2
+	 */
+	const HTTP_FOUND = '302 Found';
+	const HTTP_BAD_REQUEST = '400 Bad Request';
+	const HTTP_UNAUTHORIZED = '401 Unauthorized';
+	const HTTP_FORBIDDEN = '403 Forbidden';
+	const HTTP_UNAVAILABLE = '503 Service Unavailable';
+	
+	/**
+	 * @}
+	 */
+	
+	/**
+	 * @defgroup oauth2_error Error handling
+	 * @{
+	 *
+	 * @todo Extend for i18n.
+	 * @todo Consider moving all error related functionality into a separate class.
+	 */
+	
+	/**
+	 * The request is missing a required parameter, includes an unsupported
+	 * parameter or parameter value, or is otherwise malformed.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2
+	 */
+	const ERROR_INVALID_REQUEST = 'invalid_request';
+	
+	/**
+	 * The client identifier provided is invalid.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2
+	 */
+	const ERROR_INVALID_CLIENT = 'invalid_client';
+	
+	/**
+	 * The client is not authorized to use the requested response type.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2
+	 */
+	const ERROR_UNAUTHORIZED_CLIENT = 'unauthorized_client';
+	
+	/**
+	 * The redirection URI provided does not match a pre-registered value.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-3.1.2.4
+	 */
+	const ERROR_REDIRECT_URI_MISMATCH = 'redirect_uri_mismatch';
+	
+	/**
+	 * The end-user or authorization server denied the request.
+	 * This could be returned, for example, if the resource owner decides to reject
+	 * access to the client at a later point.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1
+	 */
+	const ERROR_USER_DENIED = 'access_denied';
+	
+	/**
+	 * The requested response type is not supported by the authorization server.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1
+	 */
+	const ERROR_UNSUPPORTED_RESPONSE_TYPE = 'unsupported_response_type';
+	
+	/**
+	 * The requested scope is invalid, unknown, or malformed.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1
+	 */
+	const ERROR_INVALID_SCOPE = 'invalid_scope';
+	
+	/**
+	 * The provided authorization grant is invalid, expired,
+	 * revoked, does not match the redirection URI used in the
+	 * authorization request, or was issued to another client.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2
+	 */
+	const ERROR_INVALID_GRANT = 'invalid_grant';
+	
+	/**
+	 * The authorization grant is not supported by the authorization server.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2
+	 */
+	const ERROR_UNSUPPORTED_GRANT_TYPE = 'unsupported_grant_type';
+	
+	/**
+	 * The request requires higher privileges than provided by the access token.
+	 * The resource server SHOULD respond with the HTTP 403 (Forbidden) status
+	 * code and MAY include the "scope" attribute with the scope necessary to
+	 * access the protected resource.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2
+	 */
+	const ERROR_INSUFFICIENT_SCOPE = 'invalid_scope';
+
+	/**
+	 * @}
+	 */
+	
+	/**
+	 * Creates an OAuth2.0 server-side instance.
+	 *
+	 * @param $config - An associative array as below of config options. See CONFIG_* constants.
+	 */
+	public function __construct(IOAuth2Storage $storage, $config = array()) {
+		$this->storage = $storage;
+		
+		// Configuration options
+		$this->setDefaultOptions();
+		foreach ( $config as $name => $value ) {
+			$this->setVariable($name, $value);
+		}
+	}
+
+	/**
+	 * Default configuration options are specified here.
+	 */
+	protected function setDefaultOptions() {
+		$this->conf = array(
+			self::CONFIG_ACCESS_LIFETIME => self::DEFAULT_ACCESS_TOKEN_LIFETIME,
+			self::CONFIG_REFRESH_LIFETIME => self::DEFAULT_REFRESH_TOKEN_LIFETIME,
+			self::CONFIG_AUTH_LIFETIME => self::DEFAULT_AUTH_CODE_LIFETIME,
+			self::CONFIG_WWW_REALM => self::DEFAULT_WWW_REALM,
+			self::CONFIG_TOKEN_TYPE => self::TOKEN_TYPE_BEARER,
+			self::CONFIG_ENFORCE_INPUT_REDIRECT => FALSE,
+			self::CONFIG_ENFORCE_STATE => FALSE,
+			self::CONFIG_SUPPORTED_SCOPES => array() // This is expected to be passed in on construction. Scopes can be an aribitrary string.
+		);  
+	}
+
+	/**
+	 * Returns a persistent variable.
+	 *
+	 * @param $name
+	 * The name of the variable to return.
+	 * @param $default
+	 * The default value to use if this variable has never been set.
+	 *
+	 * @return
+	 * The value of the variable.
+	 */
+	public function getVariable($name, $default = NULL) {
+		$name = strtolower($name);
+		
+		return isset($this->conf[$name]) ? $this->conf[$name] : $default;
+	}
+
+	/**
+	 * Sets a persistent variable.
+	 *
+	 * @param $name
+	 * The name of the variable to set.
+	 * @param $value
+	 * The value to set.
+	 */
+	public function setVariable($name, $value) {
+		$name = strtolower($name);
+		
+		$this->conf[$name] = $value;
+		return $this;
+	}
+
+	// Resource protecting (Section 5).
+	
+
+	/**
+	 * Check that a valid access token has been provided.
+	 * The token is returned (as an associative array) if valid.
+	 *
+	 * The scope parameter defines any required scope that the token must have.
+	 * If a scope param is provided and the token does not have the required
+	 * scope, we bounce the request.
+	 *
+	 * Some implementations may choose to return a subset of the protected
+	 * resource (i.e. "public" data) if the user has not provided an access
+	 * token or if the access token is invalid or expired.
+	 *
+	 * The IETF spec says that we should send a 401 Unauthorized header and
+	 * bail immediately so that's what the defaults are set to. You can catch
+	 * the exception thrown and behave differently if you like (log errors, allow
+	 * public access for missing tokens, etc)
+	 *
+	 * @param $scope
+	 * A space-separated string of required scope(s), if you want to check
+	 * for scope.
+	 * @return array
+	 * Token
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-7
+	 *
+	 * @ingroup oauth2_section_7
+	 */
+	public function verifyAccessToken($token_param, $scope = NULL) {
+		$tokenType = $this->getVariable(self::CONFIG_TOKEN_TYPE);
+		$realm = $this->getVariable(self::CONFIG_WWW_REALM);
+		
+		if (!$token_param) { // Access token was not provided
+			throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'The request is missing a required parameter, includes an unsupported parameter or parameter value, repeats the same parameter, uses more than one method for including an access token, or is otherwise malformed.', $scope);
+		}
+		
+		// Get the stored token data (from the implementing subclass)
+		$token = $this->storage->getAccessToken($token_param);
+		if ($token === NULL) {
+			throw new OAuth2AuthenticateException(self::HTTP_UNAUTHORIZED, $tokenType, $realm, self::ERROR_INVALID_GRANT, 'The access token provided is invalid.', $scope);
+		}
+		
+		// Check we have a well formed token
+		if (!isset($token["expires"]) || !isset($token["client_id"])) {
+			throw new OAuth2AuthenticateException(self::HTTP_UNAUTHORIZED, $tokenType, $realm, self::ERROR_INVALID_GRANT, 'Malformed token (missing "expires" or "client_id")', $scope);
+		}
+		
+		// Check token expiration (expires is a mandatory paramter)
+		if (isset($token["expires"]) && time() > $token["expires"]) {
+			throw new OAuth2AuthenticateException(self::HTTP_UNAUTHORIZED, $tokenType, $realm, self::ERROR_INVALID_GRANT, 'The access token provided has expired.', $scope);
+		}
+		
+		// Check scope, if provided
+		// If token doesn't have a scope, it's NULL/empty, or it's insufficient, then throw an error
+		if ($scope && (!isset($token["scope"]) || !$token["scope"] || !$this->checkScope($scope, $token["scope"]))) {
+			throw new OAuth2AuthenticateException(self::HTTP_FORBIDDEN, $tokenType, $realm, self::ERROR_INSUFFICIENT_SCOPE, 'The request requires higher privileges than provided by the access token.', $scope);
+		}
+		
+		
+		
+		session_write_close(); //Fecha session anterior
+		session_id($token['refresh_token']); //Define o id da session o mesmo do resfresh token
+		session_start();
+		
+		return $token;
+	}
+
+	/**
+	 * This is a convenience function that can be used to get the token, which can then
+	 * be passed to verifyAccessToken(). The constraints specified by the draft are
+	 * attempted to be adheared to in this method.
+	 * 
+	 * As per the Bearer spec (draft 8, section 2) - there are three ways for a client
+	 * to specify the bearer token, in order of preference: Authorization Header,
+	 * POST and GET.
+	 * 
+	 * NB: Resource servers MUST accept tokens via the Authorization scheme
+	 * (http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2).
+	 * 
+	 * @todo Should we enforce TLS/SSL in this function?
+	 * 
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2.2
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2.3
+	 * 
+	 * Old Android version bug (at least with version 2.2)
+	 * @see http://code.google.com/p/android/issues/detail?id=6684
+	 * 
+	 * We don't want to test this functionality as it relies on superglobals and headers:
+	 * @codeCoverageIgnoreStart
+	 */
+	public function getBearerToken() {
+	    
+		if (isset($_SERVER['HTTP_AUTHORIZATION'])) {
+			$headers = trim($_SERVER["HTTP_AUTHORIZATION"]);
+		} elseif (function_exists('apache_request_headers')) {
+			$requestHeaders = apache_request_headers();
+			
+			// Server-side fix for bug in old Android versions (a nice side-effect of this fix means we don't care about capitalization for Authorization)
+			$requestHeaders = array_combine(array_map('ucwords', array_keys($requestHeaders)), array_values($requestHeaders));
+			
+			if (isset($requestHeaders['Authorization'])) {
+				$headers = trim($requestHeaders['Authorization']);
+			}
+		}
+		
+		$tokenType = $this->getVariable(self::CONFIG_TOKEN_TYPE);
+		$realm = $this->getVariable(self::CONFIG_WWW_REALM);
+		// Check that exactly one method was used
+		$methodsUsed = !empty($headers) + isset($_GET[self::TOKEN_PARAM_NAME]) + isset($_POST[self::TOKEN_PARAM_NAME]);
+		if ($methodsUsed > 1) { 
+			throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'Only one method may be used to authenticate at a time (Auth header, GET or POST).');
+		} elseif ($methodsUsed == 0) {
+			throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'The access token was not found.');
+		}
+		
+		// HEADER: Get the access token from the header
+		if (!empty($headers)) {
+			if (!preg_match('/' . self::TOKEN_BEARER_HEADER_NAME . '\s(\S+)/', $headers, $matches)) {
+				throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'Malformed auth header');
+			}
+			
+			return $matches[1];
+		}		
+		// POST: Get the token from POST data
+		if (isset($_POST[self::TOKEN_PARAM_NAME])) {
+			if ($_SERVER['REQUEST_METHOD'] != 'POST') {
+				throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'When putting the token in the body, the method must be POST.');
+			}
+			
+			// IETF specifies content-type. NB: Not all webservers populate this _SERVER variable
+			if (isset($_SERVER['CONTENT_TYPE']) && $_SERVER['CONTENT_TYPE'] != 'application/x-www-form-urlencoded') {
+				throw new OAuth2AuthenticateException(self::HTTP_BAD_REQUEST, $tokenType, $realm, self::ERROR_INVALID_REQUEST, 'The content type for POST requests must be "application/x-www-form-urlencoded"');
+			}
+			
+			return $_POST[self::TOKEN_PARAM_NAME];
+		}
+		
+		// GET method
+		return $_GET[self::TOKEN_PARAM_NAME];
+	}
+
+	/** @codeCoverageIgnoreEnd */
+	
+	/**
+	 * Check if everything in required scope is contained in available scope.
+	 *
+	 * @param $required_scope
+	 * Required scope to be check with.
+	 *
+	 * @return
+	 * TRUE if everything in required scope is contained in available scope,
+	 * and False if it isn't.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-7
+	 *
+	 * @ingroup oauth2_section_7
+	 */
+	private function checkScope($required_scope, $available_scope) {
+		// The required scope should match or be a subset of the available scope
+		if (!is_array($required_scope)) {
+			$required_scope = explode(' ', trim($required_scope));
+		}
+		
+		if (!is_array($available_scope)) {
+			$available_scope = explode(' ', trim($available_scope));
+		}
+		
+		return (count(array_diff($required_scope, $available_scope)) == 0);
+	}
+
+	// Access token granting (Section 4).
+	
+
+	/**
+	 * Grant or deny a requested access token.
+	 * This would be called from the "/token" endpoint as defined in the spec.
+	 * Obviously, you can call your endpoint whatever you want.
+	 * 
+	 * @param $inputData - The draft specifies that the parameters should be
+	 * retrieved from POST, but you can override to whatever method you like.
+	 * @throws OAuth2ServerException
+	 * 
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-10.6
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-4.1.3
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+//ORIGINAL URI	
+//	public function grantAccessToken(array $inputData = NULL, array $authHeaders = NULL) {
+//		$filters = array(
+//			"grant_type" => array("filter" => FILTER_VALIDATE_REGEXP, "options" => array("regexp" => self::GRANT_TYPE_REGEXP), "flags" => FILTER_REQUIRE_SCALAR),
+//			"scope" => array("flags" => FILTER_REQUIRE_SCALAR),
+//			"code" => array("flags" => FILTER_REQUIRE_SCALAR),
+//			"redirect_uri" => array("filter" => FILTER_SANITIZE_URL),
+//			"username" => array("flags" => FILTER_REQUIRE_SCALAR),
+//			"password" => array("flags" => FILTER_REQUIRE_SCALAR),
+//			"refresh_token" => array("flags" => FILTER_REQUIRE_SCALAR),
+//		);
+//		
+//		// Input data by default can be either POST or GET
+//		if (!isset($inputData)) {
+//			$inputData = ($_SERVER['REQUEST_METHOD'] == 'POST') ? $_POST : $_GET;
+//		}
+//		
+//		// Basic authorization header
+//		$authHeaders = isset($authHeaders) ? $authHeaders : $this->getAuthorizationHeader();
+//		
+//                
+//                
+//		// Filter input data
+//		$input = filter_var_array($inputData, $filters);
+//		
+//              
+//                
+//		// Grant Type must be specified.
+//		if (!$input["grant_type"]) {
+//			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Invalid grant_type parameter or parameter missing');
+//		}
+//		
+//		// Authorize the client
+//		$client = $this->getClientCredentials($inputData, $authHeaders);
+//          
+//		if ($this->storage->checkClientCredentials($client[0], $client[1]) === FALSE) {
+//			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client credentials are invalid');
+//		}
+//		
+//		if (!$this->storage->checkRestrictedGrantType($client[0], $input["grant_type"])) {
+//			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNAUTHORIZED_CLIENT, 'The grant type is unauthorized for this client_id');
+//		}
+//		
+//		// Do the granting
+//		//
+//		switch ($input["grant_type"]) {
+//			case self::GRANT_TYPE_AUTH_CODE:
+//				if (!($this->storage instanceof IOAuth2GrantCode)) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);
+//				}
+//				
+//				if (!$input["code"]) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Missing parameter. "code" is required');
+//				}
+//				
+//				if ($this->getVariable(self::CONFIG_ENFORCE_INPUT_REDIRECT) && !$input["redirect_uri"]) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, "The redirect URI parameter is required.");
+//				}
+//				
+//				$stored = $this->storage->getAuthCode($input["code"]);
+//				
+//				// Check the code exists
+//				if ($stored === NULL || $client[0] != $stored["client_id"]) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, "Refresh token doesn't exist or is invalid for the client");
+//				}
+//				
+//				// Validate the redirect URI. If a redirect URI has been provided on input, it must be validated
+//				if ($input["redirect_uri"] && !$this->validateRedirectUri($input["redirect_uri"], $stored["redirect_uri"])) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, "The redirect URI is missing or do not match");
+//				}
+//				
+//				if ($stored["expires"] < time()) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, "The authorization code has expired");
+//				}
+//				break;
+//			
+//			case self::GRANT_TYPE_USER_CREDENTIALS:
+//				if (!($this->storage instanceof IOAuth2GrantUser)) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);
+//				}
+//				
+//				if (!$input["username"] || !$input["password"]) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Missing parameters. "username" and "password" required');
+//				}
+//				
+//				$stored = $this->storage->checkUserCredentials($client[0], $input["username"], $input["password"]);
+//
+//				if ($stored === FALSE) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT);
+//				}
+//				break;
+//			
+//			case self::GRANT_TYPE_CLIENT_CREDENTIALS:
+//				if (!($this->storage instanceof IOAuth2GrantClient)) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);
+//				}
+//				
+//				if (empty($client[1])) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client_secret is mandatory for the "client_credentials" grant type');
+//				}
+//				// NB: We don't need to check for $stored==false, because it was checked above already
+//				$stored = $this->storage->checkClientCredentialsGrant($client[0], $client[1]);
+//				break;
+//			
+//			case self::GRANT_TYPE_REFRESH_TOKEN:
+//				if (!($this->storage instanceof IOAuth2RefreshTokens)) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);
+//				}
+//				
+//				if (!$input["refresh_token"]) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'No "refresh_token" parameter found');
+//				}
+//				
+//				$stored = $this->storage->getRefreshToken($input["refresh_token"]);
+//				
+//				if ($stored === NULL || $client[0] != $stored["client_id"]) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, 'Invalid refresh token');
+//				}
+//				
+//				if ($stored["expires"] < time()) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, 'Refresh token has expired');
+//				}
+//				
+//				// store the refresh token locally so we can delete it when a new refresh token is generated
+//				$this->oldRefreshToken = $stored["refresh_token"];
+//				break;
+//			
+//			case self::GRANT_TYPE_IMPLICIT:
+//				/* TODO: NOT YET IMPLEMENTED */
+//				throw new OAuth2ServerException('501 Not Implemented', 'This OAuth2 library is not yet complete. This functionality is not implemented yet.');
+//				if (!($this->storage instanceof IOAuth2GrantImplicit)) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);
+//				}
+//				
+//				break;
+//			
+//			// Extended grant types:
+//			case filter_var($input["grant_type"], FILTER_VALIDATE_URL):
+//				if (!($this->storage instanceof IOAuth2GrantExtension)) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);
+//				}
+//				$uri = filter_var($input["grant_type"], FILTER_VALIDATE_URL);
+//				$stored = $this->storage->checkGrantExtension($uri, $inputData, $authHeaders);
+//				
+//				if ($stored === FALSE) {
+//					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT);
+//				}
+//				break;
+//			
+//			default :
+//				throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Invalid grant_type parameter or parameter missing');
+//		}
+//		
+//		if (!isset($stored["scope"])) {
+//			$stored["scope"] = NULL;
+//		}
+//		
+//		// Check scope, if provided
+//		if ($input["scope"] && (!is_array($stored) || !isset($stored["scope"]) || !$this->checkScope($input["scope"], $stored["scope"]))) {
+//			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_SCOPE, 'An unsupported scope was requested.');
+//		}
+//		
+//		$user_id = isset($stored['user_id']) ? $stored['user_id'] : null;
+//		$token = $this->createAccessToken($client[0], $user_id, $stored['scope']);
+//		
+//	
+//		// Send response
+//		$this->sendJsonHeaders();
+//		echo json_encode($token);
+//	}
+	
+	public function grantAccessToken(array $inputData = NULL, array $authHeaders = NULL) {
+		$filters = array(
+			"grant_type" => array("filter" => FILTER_VALIDATE_REGEXP, "options" => array("regexp" => self::GRANT_TYPE_REGEXP), "flags" => FILTER_REQUIRE_SCALAR),
+			"scope" => array("flags" => FILTER_REQUIRE_SCALAR),
+			"code" => array("flags" => FILTER_REQUIRE_SCALAR),
+			"redirect_uri" => array("filter" => FILTER_SANITIZE_URL),
+			"username" => array("flags" => FILTER_REQUIRE_SCALAR),
+			"password" => array("flags" => FILTER_REQUIRE_SCALAR),
+			"refresh_token" => array("flags" => FILTER_REQUIRE_SCALAR),
+		);
+		
+		// Input data by default can be either POST or GET
+		if (!isset($inputData)) {
+			$inputData = ($_SERVER['REQUEST_METHOD'] == 'POST') ? $_POST : $_GET;
+		}
+		
+		// Basic authorization header
+		$authHeaders = isset($authHeaders) ? $authHeaders : $this->getAuthorizationHeader();
+		
+                
+                
+		// Filter input data
+		$input = filter_var_array($inputData, $filters);
+		
+              
+                
+		// Grant Type must be specified.
+		if (!$input["grant_type"]) {
+			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Invalid grant_type parameter or parameter missing');
+		}
+		
+		// Authorize the client
+		$client = $this->getClientCredentials($inputData, $authHeaders);
+          
+		if ($this->storage->checkClientCredentials($client[0], $client[1]) === FALSE) {
+			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client credentials are invalid');
+		}
+		
+		if (!$this->storage->checkRestrictedGrantType($client[0], $input["grant_type"])) {
+			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNAUTHORIZED_CLIENT, 'The grant type is unauthorized for this client_id');
+		}
+		
+		// Do the granting
+		//
+		switch ($input["grant_type"]) {
+			case self::GRANT_TYPE_AUTH_CODE:
+				if (!($this->storage instanceof IOAuth2GrantCode)) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);
+				}
+				
+				if (!$input["code"]) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Missing parameter. "code" is required');
+				}
+				
+				if ($this->getVariable(self::CONFIG_ENFORCE_INPUT_REDIRECT) && !$input["redirect_uri"]) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, "The redirect URI parameter is required.");
+				}
+				
+				$stored = $this->storage->getAuthCode($input["code"]);
+				
+				// Check the code exists
+				if ($stored === NULL || $client[0] != $stored["client_id"]) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, "Refresh token doesn't exist or is invalid for the client");
+				}
+				
+				// Validate the redirect URI. If a redirect URI has been provided on input, it must be validated
+				if ($input["redirect_uri"] && !$this->validateRedirectUri($input["redirect_uri"], $stored["redirect_uri"])) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, "The redirect URI is missing or do not match");
+				}
+				
+				if ($stored["expires"] < time()) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, "The authorization code has expired");
+				}
+				break;
+			
+			case self::GRANT_TYPE_USER_CREDENTIALS:
+				if (!($this->storage instanceof IOAuth2GrantUser)) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);
+				}
+				
+				if (!$input["username"] || !$input["password"]) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Missing parameters. "username" and "password" required');
+				}
+				
+				$stored = $this->storage->checkUserCredentials($client[0], $input["username"], $input["password"]);
+
+				if ($stored === FALSE) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT);
+				}
+				break;
+			
+			case self::GRANT_TYPE_CLIENT_CREDENTIALS:
+				if (!($this->storage instanceof IOAuth2GrantClient)) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);
+				}
+				
+				if (empty($client[1])) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'The client_secret is mandatory for the "client_credentials" grant type');
+				}
+				// NB: We don't need to check for $stored==false, because it was checked above already
+				$stored = $this->storage->checkClientCredentialsGrant($client[0], $client[1]);
+				break;
+			
+			case self::GRANT_TYPE_REFRESH_TOKEN:
+				if (!($this->storage instanceof IOAuth2RefreshTokens)) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);
+				}
+				
+				if (!$input["refresh_token"]) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'No "refresh_token" parameter found');
+				}
+				
+				$stored = $this->storage->getRefreshToken($input["refresh_token"]);
+				
+				if ($stored === NULL || $client[0] != $stored["client_id"]) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, 'Invalid refresh token');
+				}
+				
+				if ($stored["expires"] < time()) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT, 'Refresh token has expired');
+				}
+				
+				// store the refresh token locally so we can delete it when a new refresh token is generated
+				$this->oldRefreshToken = $stored["refresh_token"];
+				
+				session_write_close(); //Fecha session anterior
+				session_id($stored['refresh_token']); //Define o id da session o mesmo do resfresh token
+				session_start();
+				
+				break;
+			
+			case self::GRANT_TYPE_IMPLICIT:
+				/* TODO: NOT YET IMPLEMENTED */
+				throw new OAuth2ServerException('501 Not Implemented', 'This OAuth2 library is not yet complete. This functionality is not implemented yet.');
+				if (!($this->storage instanceof IOAuth2GrantImplicit)) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);
+				}
+				
+				break;
+			
+			// Extended grant types:
+			case filter_var($input["grant_type"], FILTER_VALIDATE_URL):
+				if (!($this->storage instanceof IOAuth2GrantExtension)) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_UNSUPPORTED_GRANT_TYPE);
+				}
+				$uri = filter_var($input["grant_type"], FILTER_VALIDATE_URL);
+				$stored = $this->storage->checkGrantExtension($uri, $inputData, $authHeaders);
+				
+				if ($stored === FALSE) {
+					throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_GRANT);
+				}
+				break;
+			
+			default :
+				throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_REQUEST, 'Invalid grant_type parameter or parameter missing');
+		}
+		
+		if (!isset($stored["scope"])) {
+			$stored["scope"] = NULL;
+		}
+		
+		// Check scope, if provided
+		if ($input["scope"] && (!is_array($stored) || !isset($stored["scope"]) || !$this->checkScope($input["scope"], $stored["scope"]))) {
+			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_SCOPE, 'An unsupported scope was requested.');
+		}
+		
+		$user_id = isset($stored['user_id']) ? $stored['user_id'] : null;
+		$token = $this->createAccessToken($client[0], $user_id, $stored['scope']);
+		
+		//Gerando Session Para o refresh_token
+		session_write_close(); //Fecha session anterior
+		session_start();
+		session_id($token['refresh_token']); //Define o id da session o mesmo do resfresh token
+		session_cache_expire(self::CONFIG_REFRESH_LIFETIME); //Define o tempo da session o mesmo do Refresh token	
+		
+		if(isset($input["username"]) && isset($input["password"]))
+		{
+		    $_SESSION['wallet']['user']['uid'] =     $input["username"];
+		    $_SESSION['wallet']['user']['password']       =  $input["password"];
+		    $_SESSION['wallet']['user']['uidNumber']       =  $user_id;
+		}
+		
+		
+		
+		//session_write_close(); //Fecha nova session
+		
+		// Send response
+		$this->sendJsonHeaders();
+		echo json_encode($token);
+	}
+
+	/**
+	 * Internal function used to get the client credentials from HTTP basic
+	 * auth or POST data.
+	 * 
+	 * According to the spec (draft 20), the client_id can be provided in
+	 * the Basic Authorization header (recommended) or via GET/POST.
+	 *
+	 * @return
+	 * A list containing the client identifier and password, for example
+	 * @code
+	 * return array(
+	 * CLIENT_ID,
+	 * CLIENT_SECRET
+	 * );
+	 * @endcode
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-2.4.1
+	 *
+	 * @ingroup oauth2_section_2
+	 */
+	protected function getClientCredentials(array $inputData, array $authHeaders) {
+		
+		// Basic Authentication is used
+		if (!empty($authHeaders['PHP_AUTH_USER'])) {
+			return array($authHeaders['PHP_AUTH_USER'], $authHeaders['PHP_AUTH_PW']);
+		} elseif (empty($inputData['client_id'])) { // No credentials were specified
+			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, 'Client id was not found in the headers or body');
+		} else {
+			// This method is not recommended, but is supported by specification
+			return array($inputData['client_id'], $inputData['client_secret']);
+		}
+	}
+
+	// End-user/client Authorization (Section 2 of IETF Draft).
+	
+
+	/**
+	 * Pull the authorization request data out of the HTTP request.
+	 * - The redirect_uri is OPTIONAL as per draft 20. But your implementation can enforce it
+	 * by setting CONFIG_ENFORCE_INPUT_REDIRECT to true.
+	 * - The state is OPTIONAL but recommended to enforce CSRF. Draft 21 states, however, that
+	 * CSRF protection is MANDATORY. You can enforce this by setting the CONFIG_ENFORCE_STATE to true.
+	 *
+	 * @param $inputData - The draft specifies that the parameters should be
+	 * retrieved from GET, but you can override to whatever method you like.
+	 * @return
+	 * The authorization parameters so the authorization server can prompt
+	 * the user for approval if valid.
+	 *
+	 * @throws OAuth2ServerException
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-21#section-10.12
+	 * 
+	 * @ingroup oauth2_section_3
+	 */
+	public function getAuthorizeParams(array $inputData = NULL) {
+		$filters = array(
+			"client_id" => array("filter" => FILTER_VALIDATE_REGEXP, "options" => array("regexp" => self::CLIENT_ID_REGEXP), "flags" => FILTER_REQUIRE_SCALAR),
+			"response_type" => array("flags" => FILTER_REQUIRE_SCALAR),
+			"redirect_uri" => array("filter" => FILTER_SANITIZE_URL),
+			"state" => array("flags" => FILTER_REQUIRE_SCALAR),
+			"scope" => array("flags" => FILTER_REQUIRE_SCALAR)
+		);
+		
+		if (!isset($inputData)) {
+			$inputData = $_GET;
+		}
+		$input = filter_var_array($inputData, $filters);
+		
+		// Make sure a valid client id was supplied (we can not redirect because we were unable to verify the URI)
+		if (!$input["client_id"]) {
+			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, "No client id supplied"); // We don't have a good URI to use
+		}
+		
+		// Get client details
+		$stored = $this->storage->getClientDetails($input["client_id"]);
+		if ($stored === FALSE) {
+			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_CLIENT, "Client id does not exist");
+		}
+		
+		// Make sure a valid redirect_uri was supplied. If specified, it must match the stored URI.
+		// @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-3.1.2
+		// @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1
+		// @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2.2.1
+		if (!$input["redirect_uri"] && !$stored["redirect_uri"]) {
+			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, 'No redirect URL was supplied or stored.');
+		}
+		if ($this->getVariable(self::CONFIG_ENFORCE_INPUT_REDIRECT) && !$input["redirect_uri"]) {
+			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, 'The redirect URI is mandatory and was not supplied.');
+		}
+		// Only need to validate if redirect_uri provided on input and stored.
+		if ($stored["redirect_uri"] && $input["redirect_uri"] && !$this->validateRedirectUri($input["redirect_uri"], $stored["redirect_uri"])) {
+			throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_REDIRECT_URI_MISMATCH, 'The redirect URI provided is missing or does not match');
+		}
+		
+		// Select the redirect URI
+		$input["redirect_uri"] = isset($input["redirect_uri"]) ? $input["redirect_uri"] : $stored["redirect_uri"];
+		
+		// type and client_id are required
+		if (!$input["response_type"]) {
+			throw new OAuth2RedirectException($input["redirect_uri"], self::ERROR_INVALID_REQUEST, 'Invalid or missing response type.', $input["state"]);
+		}
+		
+		// Check requested auth response type against interfaces of storage engine
+		$reflect = new ReflectionClass($this->storage);
+		if (!$reflect->hasConstant('RESPONSE_TYPE_' . strtoupper($input['response_type']))) {
+			throw new OAuth2RedirectException($input["redirect_uri"], self::ERROR_UNSUPPORTED_RESPONSE_TYPE, NULL, $input["state"]);
+		}
+		
+		// Validate that the requested scope is supported
+		if ($input["scope"] && !$this->checkScope($input["scope"], $this->getVariable(self::CONFIG_SUPPORTED_SCOPES))) {
+			throw new OAuth2RedirectException($input["redirect_uri"], self::ERROR_INVALID_SCOPE, 'An unsupported scope was requested.', $input["state"]);
+		}
+		
+		// Validate state parameter exists (if configured to enforce this)
+		if ($this->getVariable(self::CONFIG_ENFORCE_STATE) && !$input["state"]) {
+			throw new OAuth2RedirectException($input["redirect_uri"], self::ERROR_INVALID_REQUEST, "The state parameter is required.");
+		}
+		
+		// Return retrieved client details together with input
+		return ($input + $stored);
+	}
+
+	/**
+	 * Redirect the user appropriately after approval.
+	 *
+	 * After the user has approved or denied the access request the
+	 * authorization server should call this function to redirect the user
+	 * appropriately.
+	 *
+	 * @param $is_authorized
+	 * TRUE or FALSE depending on whether the user authorized the access.
+	 * @param $user_id
+	 * Identifier of user who authorized the client
+	 * @param $params
+	 * An associative array as below:
+	 * - response_type: The requested response: an access token, an
+	 * authorization code, or both.
+	 * - client_id: The client identifier as described in Section 2.
+	 * - redirect_uri: An absolute URI to which the authorization server
+	 * will redirect the user-agent to when the end-user authorization
+	 * step is completed.
+	 * - scope: (optional) The scope of the access request expressed as a
+	 * list of space-delimited strings.
+	 * - state: (optional) An opaque value used by the client to maintain
+	 * state between the request and callback.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	public function finishClientAuthorization($is_authorized, $user_id = NULL, $params = array()) {
+		
+		// We repeat this, because we need to re-validate. In theory, this could be POSTed
+		// by a 3rd-party (because we are not internally enforcing NONCEs, etc)
+		$params = $this->getAuthorizeParams($params);
+		
+		$params += array('scope' => NULL, 'state' => NULL);
+		extract($params);
+		
+		if ($state !== NULL) {
+			$result["query"]["state"] = $state;
+		}
+		
+		if ($is_authorized === FALSE) {
+			throw new OAuth2RedirectException($redirect_uri, self::ERROR_USER_DENIED, "The user denied access to your application", $state);
+		} else {
+			if ($response_type == self::RESPONSE_TYPE_AUTH_CODE) {
+				$result["query"]["code"] = $this->createAuthCode($client_id, $user_id, $redirect_uri, $scope);
+			} elseif ($response_type == self::RESPONSE_TYPE_ACCESS_TOKEN) {
+				$result["fragment"] = $this->createAccessToken($client_id, $user_id, $scope);
+			}
+		}
+		
+		$this->doRedirectUriCallback($redirect_uri, $result);
+	}
+
+	// Other/utility functions.
+	
+
+	/**
+	 * Redirect the user agent.
+	 *
+	 * Handle both redirect for success or error response.
+	 *
+	 * @param $redirect_uri
+	 * An absolute URI to which the authorization server will redirect
+	 * the user-agent to when the end-user authorization step is completed.
+	 * @param $params
+	 * Parameters to be pass though buildUri().
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	private function doRedirectUriCallback($redirect_uri, $params) {
+		header("HTTP/1.1 " . self::HTTP_FOUND);
+		header("Location: " . $this->buildUri($redirect_uri, $params));
+		exit();
+	}
+
+	/**
+	 * Build the absolute URI based on supplied URI and parameters.
+	 *
+	 * @param $uri
+	 * An absolute URI.
+	 * @param $params
+	 * Parameters to be append as GET.
+	 *
+	 * @return
+	 * An absolute URI with supplied parameters.
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	private function buildUri($uri, $params) {
+		$parse_url = parse_url($uri);
+		
+		// Add our params to the parsed uri
+		foreach ( $params as $k => $v ) {
+			if (isset($parse_url[$k])) {
+				$parse_url[$k] .= "&" . http_build_query($v);
+			} else {
+				$parse_url[$k] = http_build_query($v);
+			}
+		}
+		
+		// Put humpty dumpty back together
+		return
+			((isset($parse_url["scheme"])) ? $parse_url["scheme"] . "://" : "")
+			. ((isset($parse_url["user"])) ? $parse_url["user"]
+			. ((isset($parse_url["pass"])) ? ":" . $parse_url["pass"] : "") . "@" : "")
+			. ((isset($parse_url["host"])) ? $parse_url["host"] : "")
+			. ((isset($parse_url["port"])) ? ":" . $parse_url["port"] : "")
+			. ((isset($parse_url["path"])) ? $parse_url["path"] : "")
+			. ((isset($parse_url["query"])) ? "?" . $parse_url["query"] : "")
+			. ((isset($parse_url["fragment"])) ? "#" . $parse_url["fragment"] : "")
+		;
+	}
+
+	/**
+	 * Handle the creation of access token, also issue refresh token if support.
+	 *
+	 * This belongs in a separate factory, but to keep it simple, I'm just
+	 * keeping it here.
+	 *
+	 * @param $client_id
+	 * Client identifier related to the access token.
+	 * @param $scope
+	 * (optional) Scopes to be stored in space-separated string.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5
+	 * @ingroup oauth2_section_5
+	 */
+// FunÃ§Ã£o ORIGINAL;	
+//	protected function createAccessToken($client_id, $user_id, $scope = NULL) {
+//		
+//		$token = array(
+//			"access_token" => $this->genAccessToken(),
+//			"expires_in" => $this->getVariable(self::CONFIG_ACCESS_LIFETIME),
+//			"token_type" => $this->getVariable(self::CONFIG_TOKEN_TYPE),
+//			"scope" => $scope
+//		);
+//		
+//		$this->storage->setAccessToken($token["access_token"], $client_id, $user_id, time() + $this->getVariable(self::CONFIG_ACCESS_LIFETIME), $scope);
+//		
+//		// Issue a refresh token also, if we support them
+//		if ($this->storage instanceof IOAuth2RefreshTokens) {
+//			$token["refresh_token"] = $this->genAccessToken();
+//			$this->storage->setRefreshToken($token["refresh_token"], $client_id, $user_id, time() + $this->getVariable(self::CONFIG_REFRESH_LIFETIME), $scope);
+//			
+//			// If we've granted a new refresh token, expire the old one
+//			if ($this->oldRefreshToken) {
+//				$this->storage->unsetRefreshToken($this->oldRefreshToken);
+//				unset($this->oldRefreshToken);
+//			}
+//		}
+//		
+//		return $token;
+//	}
+	protected function createAccessToken($client_id, $user_id, $scope = NULL) {
+		
+		$token = array(
+			"access_token" => $this->genAccessToken(),
+			"expires_in" => $this->getVariable(self::CONFIG_ACCESS_LIFETIME),
+			"token_type" => $this->getVariable(self::CONFIG_TOKEN_TYPE),
+			"scope" => $scope
+		);
+		$token["refresh_token"] = $this->genAccessToken();
+		
+		$this->storage->setAccessToken($token["access_token"], $client_id, $user_id, time() + $this->getVariable(self::CONFIG_ACCESS_LIFETIME), $scope , $token['refresh_token']);
+		
+		// Issue a refresh token also, if we support them
+		if ($this->storage instanceof IOAuth2RefreshTokens) {
+			$this->storage->setRefreshToken($token["refresh_token"], $client_id, $user_id, time() + $this->getVariable(self::CONFIG_REFRESH_LIFETIME), $scope);
+			
+			// If we've granted a new refresh token, expire the old one
+			if ($this->oldRefreshToken) {
+				$this->storage->unsetRefreshToken($this->oldRefreshToken);
+				unset($this->oldRefreshToken);
+			}
+		}
+		
+		return $token;
+	}
+
+	/**
+	 * Handle the creation of auth code.
+	 *
+	 * This belongs in a separate factory, but to keep it simple, I'm just
+	 * keeping it here.
+	 *
+	 * @param $client_id
+	 * Client identifier related to the access token.
+	 * @param $redirect_uri
+	 * An absolute URI to which the authorization server will redirect the
+	 * user-agent to when the end-user authorization step is completed.
+	 * @param $scope
+	 * (optional) Scopes to be stored in space-separated string.
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	private function createAuthCode($client_id, $user_id, $redirect_uri, $scope = NULL) {
+		$code = $this->genAuthCode();
+		$this->storage->setAuthCode($code, $client_id, $user_id, $redirect_uri, time() + $this->getVariable(self::CONFIG_AUTH_LIFETIME), $scope);
+		return $code;
+	}
+
+	/**
+	 * Generates an unique access token.
+	 *
+	 * Implementing classes may want to override this function to implement
+	 * other access token generation schemes.
+	 *
+	 * @return
+	 * An unique access token.
+	 *
+	 * @ingroup oauth2_section_4
+	 * @see OAuth2::genAuthCode()
+	 */
+	protected function genAccessToken() {
+		$tokenLen = 40;
+		if (file_exists('/dev/urandom')) { // Get 100 bytes of random data
+			$randomData = file_get_contents('/dev/urandom', false, null, 0, 100) . uniqid(mt_rand(), true);
+		} else {
+			$randomData = mt_rand() . mt_rand() . mt_rand() . mt_rand() . microtime(true) . uniqid(mt_rand(), true);
+		}
+		return substr(hash('sha512', $randomData), 0, $tokenLen);
+	}
+
+	/**
+	 * Generates an unique auth code.
+	 *
+	 * Implementing classes may want to override this function to implement
+	 * other auth code generation schemes.
+	 *
+	 * @return
+	 * An unique auth code.
+	 *
+	 * @ingroup oauth2_section_4
+	 * @see OAuth2::genAccessToken()
+	 */
+	protected function genAuthCode() {
+		return $this->genAccessToken(); // let's reuse the same scheme for token generation
+	}
+
+	/**
+	 * Pull out the Authorization HTTP header and return it.
+	 * According to draft 20, standard basic authorization is the only
+	 * header variable required (this does not apply to extended grant types).
+	 *
+	 * Implementing classes may need to override this function if need be.
+	 * 
+	 * @todo We may need to re-implement pulling out apache headers to support extended grant types
+	 *
+	 * @return
+	 * An array of the basic username and password provided.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-2.4.1
+	 * @ingroup oauth2_section_2
+	 */
+	protected function getAuthorizationHeader() {
+		return array(
+			'PHP_AUTH_USER' => isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : '',
+			'PHP_AUTH_PW' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''
+		);
+	}
+
+	/**
+	 * Send out HTTP headers for JSON.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2
+	 *
+	 * @ingroup oauth2_section_5
+	 */
+	private function sendJsonHeaders() {
+		if (php_sapi_name() === 'cli' || headers_sent()) {
+			return;
+		}
+		
+		header("Content-Type: application/json");
+		header("Cache-Control: no-store");
+	}
+
+	/**
+	 * Internal method for validating redirect URI supplied 
+	 * @param string $inputUri
+	 * @param string $storedUri
+	 */
+	protected function validateRedirectUri($inputUri, $storedUri) {
+		if (!$inputUri || !$storedUri) {
+			return false; // if either one is missing, assume INVALID
+		}
+		return strcasecmp(substr($inputUri, 0, strlen($storedUri)), $storedUri) === 0;
+	}
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2RedirectException.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2RedirectException.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2RedirectException.php	(revision 5888)
@@ -0,0 +1,80 @@
+<?php
+
+/**
+ * Redirect the end-user's user agent with error message.
+ *
+ * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1
+ *
+ * @ingroup oauth2_error
+ */
+class OAuth2RedirectException extends OAuth2ServerException {
+	
+	protected $redirectUri;
+
+	/**
+	 * @param $redirect_uri
+	 * An absolute URI to which the authorization server will redirect the
+	 * user-agent to when the end-user authorization step is completed.
+	 * @param $error
+	 * A single error code as described in Section 4.1.2.1
+	 * @param $error_description
+	 * (optional) A human-readable text providing additional information,
+	 * used to assist in the understanding and resolution of the error
+	 * occurred.
+	 * @param $state
+	 * (optional) REQUIRED if the "state" parameter was present in the client
+	 * authorization request. Set to the exact value received from the client.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.1.2.1
+	 *
+	 * @ingroup oauth2_error
+	 */
+	public function __construct($redirect_uri, $error, $error_description = NULL, $state = NULL) {
+		parent::__construct(OAuth2::HTTP_FOUND, $error, $error_description);
+		
+		$this->redirectUri = $redirect_uri;
+		if ($state) {
+			$this->errorData['state'] = $state;
+		}
+	
+	}
+
+	/**
+	 * Redirect the user agent.
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	protected function sendHeaders() {
+		$params = array('query' => $this->errorData);
+		header("Location: " . $this->buildUri($this->redirectUri, $params));
+		exit(); // No point in printing out data if we're redirecting
+	}
+
+	/**
+	 * Build the absolute URI based on supplied URI and parameters.
+	 *
+	 * @param $uri
+	 * An absolute URI.
+	 * @param $params
+	 * Parameters to be append as GET.
+	 *
+	 * @return
+	 * An absolute URI with supplied parameters.
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	protected function buildUri($uri, $params) {
+		$parse_url = parse_url($uri);
+		
+		// Add our params to the parsed uri
+		foreach ( $params as $k => $v ) {
+			if (isset($parse_url[$k]))
+				$parse_url[$k] .= "&" . http_build_query($v);
+			else
+				$parse_url[$k] = http_build_query($v);
+		}
+		
+		// Put humpty dumpty back together
+		return ((isset($parse_url["scheme"])) ? $parse_url["scheme"] . "://" : "") . ((isset($parse_url["user"])) ? $parse_url["user"] . ((isset($parse_url["pass"])) ? ":" . $parse_url["pass"] : "") . "@" : "") . ((isset($parse_url["host"])) ? $parse_url["host"] : "") . ((isset($parse_url["port"])) ? ":" . $parse_url["port"] : "") . ((isset($parse_url["path"])) ? $parse_url["path"] : "") . ((isset($parse_url["query"])) ? "?" . $parse_url["query"] : "") . ((isset($parse_url["fragment"])) ? "#" . $parse_url["fragment"] : "");
+	}
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantExtension.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantExtension.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantExtension.php	(revision 5888)
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * Storage engines that support the "Extensible"
+ * grant types should implement this interface
+ * 
+ * @author Dave Rochwerger <catch.dave@gmail.com>
+ * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.5
+ */
+interface IOAuth2GrantExtension extends IOAuth2Storage {
+
+	/**
+	 * Check any extended grant types.
+	 * 
+	 * @param string $uri
+	 * URI of the grant type definition
+	 * @param array $inputData
+	 * Unfiltered input data. The source is *not* guaranteed to be POST (but
+	 * is likely to be).
+	 * @param array $authHeaders
+	 * Authorization headers
+	 * @return
+	 * FALSE if the authorization is rejected or not support.
+	 * TRUE or an associative array if you wantto verify the scope:
+	 * @code
+	 * return array(
+	 * 'scope' => <stored scope values (space-separated string)>,
+	 * );
+	 * @endcode
+	 * 
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-1.4.5
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.2
+	 */
+	public function checkGrantExtension($uri, array $inputData, array $authHeaders);
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantClient.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantClient.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantClient.php	(revision 5888)
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * Storage engines that support the "Client Credentials"
+ * grant type should implement this interface
+ * 
+ * @author Dave Rochwerger <catch.dave@gmail.com>
+ * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.4
+ */
+interface IOAuth2GrantClient extends IOAuth2Storage {
+
+	/**
+	 * Required for OAuth2::GRANT_TYPE_CLIENT_CREDENTIALS.
+	 *
+	 * @param $client_id
+	 * Client identifier to be check with.
+	 * @param $client_secret
+	 * (optional) If a secret is required, check that they've given the right one.
+	 *
+	 * @return
+	 * TRUE if the client credentials are valid, and MUST return FALSE if it isn't.
+	 * When using "client credentials" grant mechanism and you want to
+	 * verify the scope of a user's access, return an associative array
+	 * with the scope values as below. We'll check the scope you provide
+	 * against the requested scope before providing an access token:
+	 * @code
+	 * return array(
+	 * 'scope' => <stored scope values (space-separated string)>,
+	 * );
+	 * @endcode
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.4.2
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	public function checkClientCredentialsGrant($client_id, $client_secret);
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantUser.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantUser.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/lib/IOAuth2GrantUser.php	(revision 5888)
@@ -0,0 +1,46 @@
+<?php
+
+/**
+ * Storage engines that support the "Resource Owner Password Credentials"
+ * grant type should implement this interface
+ * 
+ * @author Dave Rochwerger <catch.dave@gmail.com>
+ * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.3
+ */
+interface IOAuth2GrantUser extends IOAuth2Storage {
+
+	/**
+	 * Grant access tokens for basic user credentials.
+	 *
+	 * Check the supplied username and password for validity.
+	 *
+	 * You can also use the $client_id param to do any checks required based
+	 * on a client, if you need that.
+	 *
+	 * Required for OAuth2::GRANT_TYPE_USER_CREDENTIALS.
+	 *
+	 * @param $client_id
+	 * Client identifier to be check with.
+	 * @param $username
+	 * Username to be check with.
+	 * @param $password
+	 * Password to be check with.
+	 *
+	 * @return
+	 * TRUE if the username and password are valid, and FALSE if it isn't.
+	 * Moreover, if the username and password are valid, and you want to
+	 * verify the scope of a user's access, return an associative array
+	 * with the scope values as below. We'll check the scope you provide
+	 * against the requested scope before providing an access token:
+	 * @code
+	 * return array(
+	 * 'scope' => <stored scope values (space-separated string)>,
+	 * );
+	 * @endcode
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-4.3
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	public function checkUserCredentials($client_id, $username, $password);
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2ServerException.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2ServerException.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/lib/OAuth2ServerException.php	(revision 5888)
@@ -0,0 +1,82 @@
+<?php
+
+/**
+ * OAuth2 errors that require termination of OAuth2 due to
+ * an error.
+ *
+ */
+class OAuth2ServerException extends Exception {
+	
+	protected $httpCode;
+	protected $errorData = array();
+
+	/**
+	 * @param $http_status_code
+	 * HTTP status code message as predefined.
+	 * @param $error
+	 * A single error code.
+	 * @param $error_description
+	 * (optional) A human-readable text providing additional information,
+	 * used to assist in the understanding and resolution of the error
+	 * occurred.
+	 */
+	public function __construct($http_status_code, $error, $error_description = NULL) {
+		parent::__construct($error);
+		
+		$this->httpCode = $http_status_code;
+		
+		$this->errorData['error'] = $error;
+		if ($error_description) {
+			$this->errorData['error_description'] = $error_description;
+		}
+	}
+
+	/**
+	 * @return string 
+	 */
+	public function getDescription() {
+		return isset($this->errorData['error_description']) ? $this->errorData['error_description'] : null;
+	}
+
+	/**
+	 * @return string 
+	 */
+	public function getHttpCode() {
+		return $this->httpCode;
+	}
+
+	/**
+	 * Send out error message in JSON.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2
+	 *
+	 * @ingroup oauth2_error
+	 */
+	public function sendHttpResponse() {
+		header("HTTP/1.1 " . $this->httpCode);
+		$this->sendHeaders();
+		echo (string) $this;
+		exit();
+	}
+
+	/**
+	 * Send out HTTP headers for JSON.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.1
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5.2
+	 *
+	 * @ingroup oauth2_section_5
+	 */
+	protected function sendHeaders() {
+		header("Content-Type: application/json");
+		header("Cache-Control: no-store");
+	}
+
+	/**
+	 * @see Exception::__toString()
+	 */
+	public function __toString() {
+		return json_encode($this->errorData);
+	}
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/authorize.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/authorize.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/authorize.php	(revision 5888)
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @file
+ * Sample authorize endpoint.
+ *
+ * Obviously not production-ready code, just simple and to the point.
+ *
+ * In reality, you'd probably use a nifty framework to handle most of the crud for you.
+ */
+
+require "lib/MongoOAuth2.php";
+
+$oauth = new MongoOAuth2();
+
+if ($_POST) {
+	$oauth->finishClientAuthorization($_POST["accept"] == "Yep", $_POST);
+}
+
+try {
+	$auth_params = $oauth->getAuthorizeParams();
+} catch (OAuth2ServerException $oauthError) {
+	$oauthError->sendHttpResponse();
+}
+
+?>
+<html>
+<head>
+Authorize
+</head>
+<body>
+<form method="post" action="authorize.php">
+      <?php foreach ($auth_params as $k => $v) { ?>
+      <input type="hidden" name="<?php echo $k ?>"
+	value="<?php echo $v ?>" />
+      <?php } ?>
+      Do you authorize the app to do its thing?
+      <p><input type="submit" name="accept" value="Yep" /> <input
+	type="submit" name="accept" value="Nope" /></p>
+</form>
+</body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/lib/OAuth2StorageMongo.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/lib/OAuth2StorageMongo.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/lib/OAuth2StorageMongo.php	(revision 5888)
@@ -0,0 +1,175 @@
+<?php
+
+/**
+ * @file
+ * Sample OAuth2 Library Mongo DB Implementation.
+ * 
+ */
+
+require __DIR__ . '/../../../../lib/OAuth2.php';
+require __DIR__ . '/../../../../lib/IOAuth2Storage.php';
+require __DIR__ . '/../../../../lib/IOAuth2GrantCode.php';
+require __DIR__ . '/../../../../lib/IOAuth2RefreshTokens.php';
+
+/**
+ * WARNING: This example file has not been kept up to date like the PDO example has.
+ * FIXME: Update the Mongo examples
+ * 
+ * Mongo storage engine for the OAuth2 Library.
+ */
+class OAuth2StorageMongo implements IOAuth2GrantCode, IOAuth2RefreshTokens {
+	
+	/**
+	 * Change this to something unique for your system
+	 * @var string
+	 */
+	const SALT = 'CHANGE_ME!';
+	
+	const CONNECTION = 'mongodb://user:pass@mongoserver/mydb';
+	const DB = 'mydb';
+	
+	/**
+	 * @var Mongo
+	 */
+	private $db;
+
+	/**
+	 * Implements OAuth2::__construct().
+	 */
+	public function __construct(PDO $db) {
+		
+		$mongo = new Mongo(self::CONNECTION);
+		$this->db = $mongo->selectDB(self::DB);
+	}
+
+	/**
+	 * Release DB connection during destruct.
+	 */
+	function __destruct() {
+		$this->db = NULL; // Release db connection
+	}
+
+	/**
+	 * Handle PDO exceptional cases.
+	 */
+	private function handleException($e) {
+		echo 'Database error: ' . $e->getMessage();
+		exit();
+	}
+
+	/**
+	 * Little helper function to add a new client to the database.
+	 *
+	 * @param $client_id
+	 * Client identifier to be stored.
+	 * @param $client_secret
+	 * Client secret to be stored.
+	 * @param $redirect_uri
+	 * Redirect URI to be stored.
+	 */
+	public function addClient($client_id, $client_secret, $redirect_uri) {
+		$this->db->clients->insert(array("_id" => $client_id, "pw" => $this->hash($client_secret, $client_id), "redirect_uri" => $redirect_uri));
+	}
+
+	/**
+	 * Implements IOAuth2Storage::checkClientCredentials().
+	 *
+	 */
+	public function checkClientCredentials($client_id, $client_secret = NULL) {
+		$client = $this->db->clients->findOne(array("_id" => $client_id, "pw" => $client_secret));
+		return $this->checkPassword($client_secret, $result['client_secret'], $client_id);
+	}
+
+	/**
+	 * Implements IOAuth2Storage::getRedirectUri().
+	 */
+	public function getClientDetails($client_id) {
+		$result = $this->db->clients->findOne(array("_id" => $client_id), array("redirect_uri"));
+	}
+
+	/**
+	 * Implements IOAuth2Storage::getAccessToken().
+	 */
+	public function getAccessToken($oauth_token) {
+		return $this->db->tokens->findOne(array("_id" => $oauth_token));
+	}
+
+	/**
+	 * Implements IOAuth2Storage::setAccessToken().
+	 */
+	public function setAccessToken($oauth_token, $client_id, $user_id, $expires, $scope = NULL) {
+		$this->db->tokens->insert(array("_id" => $oauth_token, "client_id" => $client_id, "expires" => $expires, "scope" => $scope));
+	}
+
+	/**
+	 * @see IOAuth2Storage::getRefreshToken()
+	 */
+	public function getRefreshToken($refresh_token) {
+		return $this->getToken($refresh_token, TRUE);
+	}
+
+	/**
+	 * @see IOAuth2Storage::setRefreshToken()
+	 */
+	public function setRefreshToken($refresh_token, $client_id, $user_id, $expires, $scope = NULL) {
+		return $this->setToken($refresh_token, $client_id, $user_id, $expires, $scope, TRUE);
+	}
+
+	/**
+	 * @see IOAuth2Storage::unsetRefreshToken()
+	 */
+	public function unsetRefreshToken($refresh_token) {
+		try {
+			$sql = 'DELETE FROM ' . self::TABLE_TOKENS . ' WHERE refresh_token = :refresh_token';
+			$stmt = $this->db->prepare($sql);
+			$stmt->bindParam(':refresh_token', $refresh_token, PDO::PARAM_STR);
+			$stmt->execute();
+		} catch (PDOException $e) {
+			$this->handleException($e);
+		}
+	}
+
+	/**
+	 * Implements IOAuth2Storage::getAuthCode().
+	 */
+	public function getAuthCode($code) {
+		$stored_code = $this->db->auth_codes->findOne(array("_id" => $code));
+		return $stored_code !== NULL ? $stored_code : FALSE;
+	}
+
+	/**
+	 * Implements IOAuth2Storage::setAuthCode().
+	 */
+	public function setAuthCode($code, $client_id, $user_id, $redirect_uri, $expires, $scope = NULL) {
+		$this->db->auth_codes->insert(array("_id" => $code, "client_id" => $client_id, "redirect_uri" => $redirect_uri, "expires" => $expires, "scope" => $scope));
+	}
+
+	/**
+	 * @see IOAuth2Storage::checkRestrictedGrantType()
+	 */
+	public function checkRestrictedGrantType($client_id, $grant_type) {
+		return TRUE; // Not implemented
+	}
+
+	/**
+	 * Change/override this to whatever your own password hashing method is.
+	 * 
+	 * @param string $secret
+	 * @return string
+	 */
+	protected function hash($client_secret, $client_id) {
+		return hash('blowfish', $client_id . $client_secret . self::SALT);
+	}
+
+	/**
+	 * Checks the password.
+	 * Override this if you need to
+	 * 
+	 * @param string $client_id
+	 * @param string $client_secret
+	 * @param string $actualPassword
+	 */
+	protected function checkPassword($try, $client_secret, $client_id) {
+		return $try == $this->hash($client_secret, $client_id);
+	}
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/protected_resource.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/protected_resource.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/protected_resource.php	(revision 5888)
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * @file
+ * Sample protected resource.
+ *
+ * Obviously not production-ready code, just simple and to the point.
+ *
+ * In reality, you'd probably use a nifty framework to handle most of the crud for you.
+ */
+
+require "lib/OAuth2StorageMongo.php";
+
+$token = isset($_GET[OAuth2::TOKEN_PARAM_NAME]) ? $_GET[OAuth2::TOKEN_PARAM_NAME] : null;
+
+try {
+	$oauth = new OAuth2(new OAuth2StorageMongo());
+	$token = $oauth->getBearerToken();
+	$oauth->verifyAccessToken($token);
+} catch (OAuth2ServerException $oauthError) {
+	$oauthError->sendHttpResponse();
+}
+
+// With a particular scope, you'd do:
+// $oauth->verifyAccessToken("scope_name");
+
+
+?>
+
+<html>
+	<head>
+		<title>Hello!</title>
+	</head>
+	<body>
+		<p>This is a secret.</p>
+	</body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/token.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/token.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/token.php	(revision 5888)
@@ -0,0 +1,19 @@
+<?php
+
+/**
+ * @file
+ * Sample token endpoint.
+ *
+ * Obviously not production-ready code, just simple and to the point.
+ *
+ * In reality, you'd probably use a nifty framework to handle most of the crud for you.
+ */
+
+require "lib/MongoOAuth2.php";
+
+$oauth = new MongoOAuth2();
+try {
+	$oauth->grantAccessToken();
+} catch (OAuth2ServerException $oauthError) {
+	$oauthError->sendHttpResponse();
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/addclient.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/addclient.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/mongo/addclient.php	(revision 5888)
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * @file
+ * Sample client add script.
+ *
+ * Obviously not production-ready code, just simple and to the point.
+ */
+
+require "lib/MongoOAuth2.php";
+
+if ($_POST && isset($_POST["client_id"]) && isset($_POST["client_secret"]) && isset($_POST["redirect_uri"])) {
+	$oauth = new MongoOAuth2();
+	$oauth->addClient($_POST["client_id"], $_POST["client_secret"], $_POST["redirect_uri"]);
+}
+
+?>
+
+<html>
+<head>
+Add Client
+</head>
+<body>
+<form method="post" action="addclient.php">
+<p><label for="client_id">Client ID:</label> <input type="text"
+	name="client_id" id="client_id" /></p>
+<p><label for="client_secret">Client Secret (password/key):</label> <input
+	type="text" name="client_secret" id="client_secret" /></p>
+<p><label for="redirect_uri">Redirect URI:</label> <input type="text"
+	name="redirect_uri" id="redirect_uri" /></p>
+<input type="submit" value="Submit" /></form>
+</body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/authorize.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/authorize.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/authorize.php	(revision 5888)
@@ -0,0 +1,67 @@
+<?php
+/**
+ * @file
+ * Sample authorize endpoint.
+ *
+ * This sample provides two click-jacking prevention methods, neither which are perfect. 
+ * The javascript solution is similar to what facebook used to have (but can be defeated with a 
+ * specially crafted frame-wrapper).
+ */
+
+// Clickjacking prevention (supported by IE8+, FF3.6.9+, Opera10.5+, Safari4+, Chrome 4.1.249.1042+)
+header('X-Frame-Options: DENY');
+
+require "lib/OAuth2StoragePdo.php";
+
+/*
+ * You would need to authenticate the user before authorization.
+ * 
+ * Below is some psudeo-code to show what you might do:
+ * 
+session_start();
+if (!isLoggedIn()) {
+	redirectToLoginPage();
+	exit();
+}
+ */
+
+$oauth = new OAuth2(new OAuth2StoragePDO());
+
+if ($_POST) {
+	$userId = '12345'; // Use whatever method you have for identifying users.
+	$oauth->finishClientAuthorization($_POST["accept"] == "Yep", $userId, $_POST);
+}
+
+try {
+	$auth_params = $oauth->getAuthorizeParams();
+} catch (OAuth2ServerException $oauthError) {
+	$oauthError->sendHttpResponse();
+}
+
+?>
+<html>
+<head>
+<title>Authorize</title>
+<script>
+	if (top != self) {
+		window.document.write("<div style='background:black; opacity:0.5; filter: alpha (opacity = 50); position: absolute; top:0px; left: 0px;"
+		+ "width: 9999px; height: 9999px; zindex: 1000001' onClick='top.location.href=window.location.href'></div>");
+	}
+  </script>
+</head>
+<body>
+<form method="post" action="authorize.php">
+ 
+    
+      <?php 
+      foreach ($auth_params as $key => $value) : ?>
+      	<input type="hidden"
+	name="<?php echo htmlspecialchars($key, ENT_QUOTES); ?>"
+	value="<?php echo htmlspecialchars($value, ENT_QUOTES); ?>" />
+      <?php endforeach; ?>
+      Do you authorize the app to do its thing?
+      <p><input type="submit" name="accept" value="Yep" /> <input
+	type="submit" name="accept" value="Nope" /></p>
+</form>
+</body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/mysql_create_tables.sql
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/mysql_create_tables.sql	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/mysql_create_tables.sql	(revision 5888)
@@ -0,0 +1,36 @@
+SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
+
+CREATE TABLE `auth_codes` (
+  `code` varchar(40) NOT NULL,
+  `client_id` varchar(40) NOT NULL,
+  `user_id` int(11) UNSIGNED NOT NULL,
+  `redirect_uri` varchar(200) NOT NULL,
+  `expires` int(11) NOT NULL,
+  `scope` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`code`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE `clients` (
+  `client_id` varchar(40) NOT NULL,
+  `client_secret` varchar(20) NOT NULL,
+  `redirect_uri` varchar(255) NOT NULL,
+  PRIMARY KEY (`client_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE `access_tokens` (
+  `oauth_token` varchar(40) NOT NULL,
+  `client_id` varchar(40) NOT NULL,
+  `user_id` int(11) UNSIGNED NOT NULL,
+  `expires` int(11) NOT NULL,
+  `scope` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`oauth_token`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE `refresh_tokens` (
+  `refresh_token` varchar(40) NOT NULL,
+  `client_id` varchar(40) NOT NULL,
+  `user_id` int(11) UNSIGNED NOT NULL,
+  `expires` int(11) NOT NULL,
+  `scope` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`refresh_token`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/lib/OAuth2StoragePdo.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/lib/OAuth2StoragePdo.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/lib/OAuth2StoragePdo.php	(revision 5888)
@@ -0,0 +1,311 @@
+<?php
+
+/**
+ * @file
+ * Sample OAuth2 Library PDO DB Implementation.
+ * 
+ * Simply pass in a configured PDO class, eg:
+ * new OAuth2StoragePDO( new PDO('mysql:dbname=mydb;host=localhost', 'user', 'pass') );
+ */
+session_start();
+require __DIR__ . '/../../../../lib/OAuth2.php';
+require __DIR__ . '/../../../../lib/IOAuth2Storage.php';
+require __DIR__ . '/../../../../lib/IOAuth2GrantCode.php';
+require __DIR__ . '/../../../../lib/IOAuth2RefreshTokens.php';
+
+/**
+ * PDO storage engine for the OAuth2 Library.
+ * 
+ * IMPORTANT: This is provided as an example only. In production you may implement
+ * a client-specific salt in the OAuth2StoragePDO::hash() and possibly other goodies.
+ * 
+ *** The point is, use this as an EXAMPLE ONLY. ***
+ */
+class OAuth2StoragePDO implements IOAuth2GrantCode, IOAuth2RefreshTokens {
+	
+	/**
+	 * Change this to something unique for your system
+	 * @var string
+	 */
+	const SALT = 'CHANGE_ME!';
+	
+	/**@#+
+	 * Centralized table names
+	 * 
+	 * @var string
+	 */
+	const TABLE_CLIENTS = 'clients';
+	const TABLE_CODES = 'auth_codes';
+	const TABLE_TOKENS = 'access_tokens';
+	const TABLE_REFRESH = 'refresh_tokens';
+	/**@#-*/
+	
+	/**
+	 * @var PDO
+	 */
+	private $db;
+
+	/**
+	 * Implements OAuth2::__construct().
+	 */
+	public function __construct() {
+		
+		try {
+			$this->db = new PDO('pgsql:dbname=oauth;host=/tmp', 'expressodev', 'prognus');
+		} catch (PDOException $e) {
+			die('Connection failed: ' . $e->getMessage());
+		}
+	}
+
+	/**
+	 * Release DB connection during destruct.
+	 */
+	function __destruct() {
+		$this->db = NULL; // Release db connection
+	}
+
+	/**
+	 * Handle PDO exceptional cases.
+	 */
+	private function handleException($e) {
+		echo 'Database error: ' . $e->getMessage();
+		exit();
+	}
+
+	/**
+	 * Little helper function to add a new client to the database.
+	 *
+	 * Do NOT use this in production! This sample code stores the secret
+	 * in plaintext!
+	 *
+	 * @param $client_id
+	 * Client identifier to be stored.
+	 * @param $client_secret
+	 * Client secret to be stored.
+	 * @param $redirect_uri
+	 * Redirect URI to be stored.
+	 */
+	public function addClient($client_id, $client_secret, $redirect_uri) {
+		try {
+			$client_secret = $this->hash($client_secret, $client_id);
+			
+			$sql = 'INSERT INTO ' . self::TABLE_CLIENTS . ' (client_id, client_secret, redirect_uri) VALUES (:client_id, :client_secret, :redirect_uri)';
+			$stmt = $this->db->prepare($sql);
+			$stmt->bindParam(':client_id', $client_id, PDO::PARAM_STR);
+			$stmt->bindParam(':client_secret', $client_secret, PDO::PARAM_STR);
+			$stmt->bindParam(':redirect_uri', $redirect_uri, PDO::PARAM_STR);
+			$stmt->execute();
+		} catch (PDOException $e) {
+			$this->handleException($e);
+		}
+	}
+
+	/**
+	 * Implements IOAuth2Storage::checkClientCredentials().
+	 *
+	 */
+	public function checkClientCredentials($client_id, $client_secret = NULL) {
+		try {
+			$sql = 'SELECT client_secret FROM ' . self::TABLE_CLIENTS . ' WHERE client_id = :client_id';
+			$stmt = $this->db->prepare($sql);
+			$stmt->bindParam(':client_id', $client_id, PDO::PARAM_STR);
+			$stmt->execute();
+			
+			$result = $stmt->fetch(PDO::FETCH_ASSOC);
+			
+			if ($client_secret === NULL) {
+				return $result !== FALSE;
+			}
+			
+			return $this->checkPassword($client_secret, $result['client_secret'], $client_id);
+		} catch (PDOException $e) {
+			$this->handleException($e);
+		}
+	}
+
+	/**
+	 * Implements IOAuth2Storage::getRedirectUri().
+	 */
+	public function getClientDetails($client_id) {
+		try {
+			$sql = 'SELECT redirect_uri FROM ' . self::TABLE_CLIENTS . ' WHERE client_id = :client_id';
+			$stmt = $this->db->prepare($sql);
+			$stmt->bindParam(':client_id', $client_id, PDO::PARAM_STR);
+			$stmt->execute();
+			
+			$result = $stmt->fetch(PDO::FETCH_ASSOC);
+			
+			if ($result === FALSE) {
+				return FALSE;
+			}
+			
+			return isset($result['redirect_uri']) && $result['redirect_uri'] ? $result : NULL;
+		} catch (PDOException $e) {
+			$this->handleException($e);
+		}
+	}
+
+	/**
+	 * Implements IOAuth2Storage::getAccessToken().
+	 */
+	public function getAccessToken($oauth_token) {
+		return $this->getToken($oauth_token, FALSE);
+	}
+
+	/**
+	 * Implements IOAuth2Storage::setAccessToken().
+	 */
+	public function setAccessToken($oauth_token, $client_id, $user_id, $expires, $scope = NULL) {
+		$this->setToken($oauth_token, $client_id, $user_id, $expires, $scope, FALSE);
+	}
+
+	/**
+	 * @see IOAuth2Storage::getRefreshToken()
+	 */
+	public function getRefreshToken($refresh_token) {
+		return $this->getToken($refresh_token, TRUE);
+	}
+
+	/**
+	 * @see IOAuth2Storage::setRefreshToken()
+	 */
+	public function setRefreshToken($refresh_token, $client_id, $user_id, $expires, $scope = NULL) {
+		return $this->setToken($refresh_token, $client_id, $user_id, $expires, $scope, TRUE);
+	}
+
+	/**
+	 * @see IOAuth2Storage::unsetRefreshToken()
+	 */
+	public function unsetRefreshToken($refresh_token) {
+		try {
+			$sql = 'DELETE FROM ' . self::TABLE_TOKENS . ' WHERE refresh_token = :refresh_token';
+			$stmt = $this->db->prepare($sql);
+			$stmt->bindParam(':refresh_token', $refresh_token, PDO::PARAM_STR);
+			$stmt->execute();
+		} catch (PDOException $e) {
+			$this->handleException($e);
+		}
+	}
+
+	/**
+	 * Implements IOAuth2Storage::getAuthCode().
+	 */
+	public function getAuthCode($code) {
+		try {
+			$sql = 'SELECT code, client_id, user_id, redirect_uri, expires, scope FROM ' . self::TABLE_CODES . ' auth_codes WHERE code = :code';
+			$stmt = $this->db->prepare($sql);
+			$stmt->bindParam(':code', $code, PDO::PARAM_STR);
+			$stmt->execute();
+			
+			$result = $stmt->fetch(PDO::FETCH_ASSOC);
+			
+			return $result !== FALSE ? $result : NULL;
+		} catch (PDOException $e) {
+			$this->handleException($e);
+		}
+	}
+
+	/**
+	 * Implements IOAuth2Storage::setAuthCode().
+	 */
+	public function setAuthCode($code, $client_id, $user_id, $redirect_uri, $expires, $scope = NULL) {
+		try {
+			$sql = 'INSERT INTO ' . self::TABLE_CODES . ' (code, client_id, user_id, redirect_uri, expires, scope) VALUES (:code, :client_id, :user_id, :redirect_uri, :expires, :scope)';
+			$stmt = $this->db->prepare($sql);
+			$stmt->bindParam(':code', $code, PDO::PARAM_STR);
+			$stmt->bindParam(':client_id', $client_id, PDO::PARAM_STR);
+			$stmt->bindParam(':user_id', $user_id, PDO::PARAM_STR);
+			$stmt->bindParam(':redirect_uri', $redirect_uri, PDO::PARAM_STR);
+			$stmt->bindParam(':expires', $expires, PDO::PARAM_INT);
+			$stmt->bindParam(':scope', $scope, PDO::PARAM_STR);
+			
+			$stmt->execute();
+		} catch (PDOException $e) {
+			$this->handleException($e);
+		}
+	}
+
+	/**
+	 * @see IOAuth2Storage::checkRestrictedGrantType()
+	 */
+	public function checkRestrictedGrantType($client_id, $grant_type) {
+		return TRUE; // Not implemented
+	}
+
+	/**
+	 * Creates a refresh or access token
+	 * 
+	 * @param string $token - Access or refresh token id
+	 * @param string $client_id
+	 * @param mixed $user_id
+	 * @param int $expires
+	 * @param string $scope
+	 * @param bool $isRefresh
+	 */
+	protected function setToken($token, $client_id, $user_id, $expires, $scope, $isRefresh = TRUE) {
+		try {
+			$tableName = $isRefresh ? self::TABLE_REFRESH : self::TABLE_TOKENS;
+			$tokenName = $isRefresh ? 'refresh_token' : 'oauth_token';
+                        
+			$sql = "INSERT INTO $tableName ($tokenName, client_id, user_id, expires, scope) VALUES (:token, :client_id, :user_id, :expires, :scope)";
+			$stmt = $this->db->prepare($sql);
+			$stmt->bindParam(':token', $token, PDO::PARAM_STR);
+			$stmt->bindParam(':client_id', $client_id, PDO::PARAM_STR);
+			$stmt->bindParam(':user_id', $user_id, PDO::PARAM_STR);
+			$stmt->bindParam(':expires', $expires, PDO::PARAM_INT);
+			$stmt->bindParam(':scope', $scope, PDO::PARAM_STR);
+			
+			$stmt->execute();
+		} catch (PDOException $e) {
+			$this->handleException($e);
+		}
+	}
+
+	/**
+	 * Retrieves an access or refresh token.
+	 * 
+	 * @param string $token
+	 * @param bool $refresh
+	 */
+	protected function getToken($token, $isRefresh = true) {
+		try {
+			$tableName = $isRefresh ? self::TABLE_REFRESH : self::TABLE_TOKENS;
+			$tokenName = $isRefresh ? 'refresh_token' : 'oauth_token';
+			
+			$sql = "SELECT $tokenName, client_id, expires, scope, user_id FROM $tableName WHERE $tokenName = :token";
+			$stmt = $this->db->prepare($sql);
+			$stmt->bindParam(':token', $token, PDO::PARAM_STR);
+			$stmt->execute();
+			
+			$result = $stmt->fetch(PDO::FETCH_ASSOC);
+			
+			return $result !== FALSE ? $result : NULL;
+		} catch (PDOException $e) {
+			$this->handleException($e);
+		}
+	}
+
+	/**
+	 * Change/override this to whatever your own password hashing method is.
+	 * 
+	 * In production you might want to a client-specific salt to this function. 
+	 * 
+	 * @param string $secret
+	 * @return string
+	 */
+	protected function hash($client_secret, $client_id) {            
+            return hash('md5', $client_id . $client_secret);
+	}
+
+	/**
+	 * Checks the password.
+	 * Override this if you need to
+	 * 
+	 * @param string $client_id
+	 * @param string $client_secret
+	 * @param string $actualPassword
+	 */
+	protected function checkPassword($try, $client_secret, $client_id) {
+		return ($client_secret == $this->hash($try, $client_id) )? TRUE : FALSE;
+	}
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/lib/OAuth2StorageUserCredential.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/lib/OAuth2StorageUserCredential.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/lib/OAuth2StorageUserCredential.php	(revision 5888)
@@ -0,0 +1,77 @@
+<?php
+
+/**
+ * @file
+ * Sample OAuth2 Library PDO DB Implementation.
+ * 
+ * Simply pass in a configured PDO class, eg:
+ * new OAuth2StoragePDO( new PDO('mysql:dbname=mydb;host=localhost', 'user', 'pass') );
+ */
+//session_start();
+//require __DIR__ . '/../../../../lib/OAuth2.php';
+///require __DIR__ . '/../../../../lib/IOAuth2Storage.php';
+//require __DIR__ . '/../../../../lib/IOAuth2GrantCode.php';
+//require __DIR__ . '/../../../../lib/IOAuth2RefreshTokens.php';
+require __DIR__ . '/../../../../lib/IOAuth2GrantUser.php';
+
+/**
+ * PDO storage engine for the OAuth2 Library.
+ * 
+ * IMPORTANT: This is provided as an example only. In production you may implement
+ * a client-specific salt in the OAuth2StoragePDO::hash() and possibly other goodies.
+ * 
+ *** The point is, use this as an EXAMPLE ONLY. ***
+ */
+class OAuth2StorageUserCredential implements IOAuth2GrantUser, IOAuth2RefreshTokens {
+
+	private $valid_client_id = 666;
+
+	public function checkUserCredentials($client_id, $username, $password) {
+		if( $client_id == $this->valid_client_id && $username == 'adirkuhn' && $password == '666' ) {
+			//return true; 
+			return array('scope' => 'all'); 
+		}
+		else {
+			return false;
+		}
+	}
+
+	public function checkClientCredentials($client_id, $client_secret = NULL) {
+	}
+
+	public function getClientDetails($client_id) {
+	}
+
+	public function getAccessToken($oauth_token) {
+	}
+
+	
+	public function setAccessToken($oauth_token, $client_id, $user_id, $expires, $scope = NULL) {
+		var_dump(func_get_args());
+	}
+
+	
+	public function checkRestrictedGrantType($client_id, $grant_type) {
+		if($client_id == $this->valid_client_id	&& $grant_type == 'password') {
+			return true;
+		}
+		else {
+			return false;
+		}
+	}
+
+
+	public function getRefreshToken($refresh_token) {
+	}
+
+	
+	public function setRefreshToken($refresh_token, $client_id, $user_id, $expires, $scope = NULL) {
+	}
+
+
+	public function unsetRefreshToken($refresh_token) {
+	}
+
+}
+
+
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/protected_resource.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/protected_resource.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/protected_resource.php	(revision 5888)
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * @file
+ * Sample protected resource.
+ *
+ * Obviously not production-ready code, just simple and to the point.
+ *
+ * In reality, you'd probably use a nifty framework to handle most of the crud for you.
+ */
+
+require "lib/OAuth2StoragePdo.php";
+
+try {
+	$oauth = new OAuth2(new OAuth2StoragePDO());
+	$token = $oauth->getBearerToken();
+	$oauth->verifyAccessToken($token);
+} catch (OAuth2ServerException $oauthError) {
+	$oauthError->sendHttpResponse();
+}
+
+// With a particular scope, you'd do:
+// $oauth->verifyAccessToken("scope_name");
+
+
+?>
+
+<html>
+	<head>
+		<title>Hello!</title>
+	</head>
+	<body>
+		<p>This is a secret.</p>
+	</body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/token.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/token.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/token.php	(revision 5888)
@@ -0,0 +1,26 @@
+<?php
+ini_set('display_errors', 'on');
+/**
+ * @file
+ * Sample token endpoint.
+ *
+ * Obviously not production-ready code, just simple and to the point.
+ *
+ * In reality, you'd probably use a nifty framework to handle most of the crud for you.
+ */
+
+require "lib/OAuth2StoragePdo.php";
+require "lib/OAuth2StorageUserCredential.php";
+
+if(isset($_GET['grant_type']) && $_GET['grant_type'] === 'password') {
+	$oauth = new OAuth2(new Oauth2StorageUserCredential());
+}
+else {
+	$oauth = new OAuth2(new OAuth2StoragePDO());
+}
+
+try {
+	$oauth->grantAccessToken();
+} catch (OAuth2ServerException $oauthError) {
+	$oauthError->sendHttpResponse();
+}
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/hello.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/hello.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/hello.php	(revision 5888)
@@ -0,0 +1,4 @@
+<?php
+
+
+?>
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/addclient.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/addclient.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/server/examples/pdo/addclient.php	(revision 5888)
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * @file
+ * Sample client add script.
+ *
+ * Obviously not production-ready code, just simple and to the point.
+ */
+
+require "lib/OAuth2StoragePdo.php";
+
+if ($_POST && isset($_POST["client_id"]) && isset($_POST["client_secret"]) && isset($_POST["redirect_uri"])) {
+	$oauth = new OAuth2StoragePDO();
+	$oauth->addClient($_POST["client_id"], $_POST["client_secret"], $_POST["redirect_uri"]);
+}
+
+?>
+
+<html>
+  <head>
+  	<title>Add Client</title>
+  </head>
+  <body>
+    <form method="post" action="addclient.php">
+      <p>
+        <label for="client_id">Client ID:</label>
+        <input type="text" name="client_id" id="client_id" />
+      </p>
+      <p>
+        <label for="client_secret">Client Secret (password/key):</label>
+        <input type="text" name="client_secret" id="client_secret" />
+      </p>
+      <p>
+        <label for="redirect_uri">Redirect URI:</label>
+        <input type="text" name="redirect_uri" id="redirect_uri" />
+      </p>
+      <input type="submit" value="Submit" />
+    </form>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/config.doxy
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/config.doxy	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/config.doxy	(revision 5888)
@@ -0,0 +1,1631 @@
+# Doxyfile 1.7.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = oauth2-php
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER         = draft-ietf-oauth-v2-10
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = docs
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 2
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this
+# tag. The format is ext=language, where ext is a file extension, and language
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. The create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE            =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT                  = .
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          = *.php \ *.module \ *.inc \ *.install \ *.js \ *.theme \ *.test
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.  Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.  The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.  Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+# Doxygen will adjust the colors in the stylesheet and background images
+# according to this color. Hue is specified as an angle on a colorwheel,
+# see http://en.wikipedia.org/wiki/Hue for more information.
+# For instance the value 0 represents red, 60 is yellow, 120 is green,
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+# the colors in the HTML output. For a value of 0 the output will use
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+# the luminance component of the colors in the HTML output. Values below
+# 100 gradually make the output lighter, whereas values above 100 make
+# the output darker. The value divided by 100 is the actual gamma applied,
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE               =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING     =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+# will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+# the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = YES
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are
+# not supported properly for IE 6.0, but are supported on all modern browsers.
+# Note that when changing this option you need to delete any form_*.png files
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT    = YES
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a PHP enabled web server instead of at the web client
+# using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server
+# based approach is that it scales better to large projects and allows
+# full text search. The disadvances is that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA             =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD                =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.  This is useful
+# if you want to understand what is going on.  On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#   TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#   TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+# allowed to run in parallel. When set to 0 (the default) doxygen will
+# base this on the number of processors available in the system. You can set it
+# explicitly to a value larger than 0 to get control over the balance
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS        = 0
+
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME           = FreeSans.ttf
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS           =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP            = YES
Index: sandbox/2.4-expresso-api/prototype/library/oauth2/README.txt
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/oauth2/README.txt	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/oauth2/README.txt	(revision 5888)
@@ -0,0 +1,3 @@
+OAuth2 Server now implements draft 20 of OAuth 2.0
+
+The client is still only draft-10.
Index: sandbox/2.4-expresso-api/prototype/library/tonic/phpdoctor.ini
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/phpdoctor.ini	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/phpdoctor.ini	(revision 5888)
@@ -0,0 +1,14 @@
+; Tonic configuration file for PHPDoctor
+
+files = "*.php"
+ignore = ".git"
+doclet = standard
+default_package = "Tonic"
+overview = README.markdown
+
+d = "apidocs"
+windowtitle = "Tonic"
+doctitle = "Tonic: A RESTful Web App Development PHP Library"
+header = "Tonic"
+footer = "Tonic"
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/LICENSE
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/LICENSE	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/LICENSE	(revision 5888)
@@ -0,0 +1,18 @@
+Copyright (c) 2009 Paul James
+ 
+Permission is hereby granted, free of charge, to any person obtaining a copy of 
+this software and associated documentation files (the "Software"), to deal in 
+the Software without restriction, including without limitation the rights to 
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 
+the Software, and to permit persons to whom the Software is furnished to do so, 
+subject to the following conditions:
+ 
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+ 
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index: sandbox/2.4-expresso-api/prototype/library/tonic/tests/response.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/tests/response.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/tests/response.php	(revision 5888)
@@ -0,0 +1,56 @@
+<?php
+
+require_once('def/response.php');
+
+/**
+ * @namespace Tonic\Tests
+ */
+class ResponseTester extends UnitTestCase {
+    
+    function testDefaultCacheHeader() {
+        
+        $config = array(
+            'uri' => '/responsetest'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        $response->addCacheHeader();
+        
+        $this->assertEqual($response->headers['Cache-Control'], 'max-age=86400, must-revalidate');
+        
+    }
+    
+    function testNoCacheHeader() {
+        
+        $config = array(
+            'uri' => '/responsetest'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        $response->addCacheHeader(0);
+        
+        $this->assertEqual($response->headers['Cache-Control'], 'no-cache');
+        
+    }
+    
+    function testAddEtag() {
+        
+        $config = array(
+            'uri' => '/responsetest'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        $response->addEtag("123123");
+        
+        $this->assertEqual($response->headers['Etag'], '"123123"');
+        
+    }
+    
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/tests/test.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/tests/test.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/tests/test.php	(revision 5888)
@@ -0,0 +1,43 @@
+<?php
+
+error_reporting(error_reporting() & ~2048 & ~8192); // Make sure E_STRICT and E_DEPRECATED are disabled
+
+require_once('simpletest/unit_tester.php');
+require_once('simpletest/reporter.php');
+
+$core = new GroupTest('Core');
+
+require_once('../lib/tonic.php');
+
+$core->addTestFile('request.php');
+$core->addTestFile('resource.php');
+$core->addTestFile('response.php');
+$core->addTestFile('filesystem.php');
+$core->addTestFile('filesystemcollection.php');
+
+$test = new GroupTest('Tonic');
+$test->addTestCase($core);
+
+//*
+@include_once 'PHP/CodeCoverage.php';
+if (class_exists('PHP_CodeCoverage')) {
+    $coverage = new PHP_CodeCoverage;
+    $coverage->start('Tonic');
+}
+//*/
+
+if (TextReporter::inCli()) {
+	$test->run(new TextReporter());
+} else {
+    $test->run(new HtmlReporter());
+}
+
+if (isset($coverage)) {
+    $coverage->stop();
+    
+    require_once 'PHP/CodeCoverage/Report/HTML.php';
+    
+    $writer = new PHP_CodeCoverage_Report_HTML;
+    $writer->process($coverage, 'report');
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/tests/filesystemcollection.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/tests/filesystemcollection.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/tests/filesystemcollection.php	(revision 5888)
@@ -0,0 +1,137 @@
+<?php
+
+require_once('../lib/tonic.php');
+require_once('../examples/filesystem/filesystem.php');
+require_once('../examples/filesystem/filesystemcollection.php');
+
+/**
+ * @namespace Tonic\Tests
+ */
+class FilesystemCollectionTester extends UnitTestCase {
+    
+    var $testPath;
+    
+    function __construct() {
+        $this->testPath = sys_get_temp_dir();
+    }
+    
+    function setUp() {
+        @mkdir($this->testPath.DIRECTORY_SEPARATOR.'collection');
+        file_put_contents($this->testPath.DIRECTORY_SEPARATOR.'collectionIndex', '<ul>{{resources}}</ul>');
+        file_put_contents($this->testPath.DIRECTORY_SEPARATOR.'collection'.DIRECTORY_SEPARATOR.'1', 'one');
+        file_put_contents($this->testPath.DIRECTORY_SEPARATOR.'collection'.DIRECTORY_SEPARATOR.'2', 'two');
+    }
+    
+    function tearDown() {
+        unlink($this->testPath.DIRECTORY_SEPARATOR.'collectionIndex');
+        unlink($this->testPath.DIRECTORY_SEPARATOR.'collection'.DIRECTORY_SEPARATOR.'1');
+        unlink($this->testPath.DIRECTORY_SEPARATOR.'collection'.DIRECTORY_SEPARATOR.'2');
+        @unlink($this->testPath.DIRECTORY_SEPARATOR.'collection'.DIRECTORY_SEPARATOR.'3');
+        rmdir($this->testPath.DIRECTORY_SEPARATOR.'collection');
+    }
+    
+    function testCollection() {
+        
+        $config = array(
+            'uri' => '/filesystemcollection/collectionIndex'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+        $this->assertEqual($response->code, 200);
+        $this->assertEqual($response->body, '<ul><li><a href="/filesystemcollection/collection/1">1</a></li><li><a href="/filesystemcollection/collection/2">2</a></li></ul>');
+        
+    }
+    
+    function testReadCollectionItem() {
+        
+        $config = array(
+            'uri' => '/filesystemcollection/collection/1'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+        $this->assertEqual($response->code, 200);
+        $this->assertEqual($response->body, 'one');
+        
+    }
+    
+    function testCreateCollectionItem() {
+        
+        $config = array(
+            'uri' => '/filesystemcollection/collectionIndex',
+            'method' => 'POST'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+        $this->assertEqual($response->code, 411);
+        
+        $config = array(
+            'uri' => '/filesystemcollection/collectionIndex',
+            'method' => 'POST',
+            'data' => 'three'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+        $this->assertEqual($response->code, 201);
+        $this->assertEqual($response->headers['Location'], '/filesystemcollection/collection/3');
+        
+        $config = array(
+            'uri' => '/filesystemcollection/collectionIndex'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+        $this->assertEqual($response->code, 200);
+        $this->assertEqual($response->body, '<ul><li><a href="/filesystemcollection/collection/1">1</a></li><li><a href="/filesystemcollection/collection/2">2</a></li><li><a href="/filesystemcollection/collection/3">3</a></li></ul>');
+        
+    }
+    
+}
+
+
+/* Test resource definitions */
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /filesystemcollection/collection/.*
+ */
+class TestFileSystemCollectionItem extends FilesystemResource {
+    
+    function __construct() {
+        
+        $this->path = sys_get_temp_dir();
+        $this->uriStub = '/filesystemcollection';
+        
+    }
+    
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /filesystemcollection/collectionIndex
+ */
+class TestFileSystemCollection extends FilesystemCollection {
+    
+    function __construct() {
+        
+        $this->path = sys_get_temp_dir();
+        $this->uriStub = '/filesystemcollection';
+        $this->collection = sys_get_temp_dir().'/collection';
+        
+    }
+    
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/tests/filesystem.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/tests/filesystem.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/tests/filesystem.php	(revision 5888)
@@ -0,0 +1,149 @@
+<?php
+
+require_once('../lib/tonic.php');
+require_once('../examples/filesystem/filesystem.php');
+
+/**
+ * @namespace Tonic\Tests
+ */
+class FilesystemTester extends UnitTestCase {
+    
+    function testReadFile() {
+        
+        $testFilename = sys_get_temp_dir().DIRECTORY_SEPARATOR.'tonicFilesystemTest';
+        file_put_contents($testFilename, 'test');
+        
+        $config = array(
+            'uri' => '/filesystem/one/tonicFilesystemTest'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+        $this->assertEqual($response->code, 200);
+        $this->assertEqual($response->body, 'test');
+        
+        unlink($testFilename);
+    }
+    
+    function testReadDefaultDocument() {
+        
+        $testFilename = sys_get_temp_dir().DIRECTORY_SEPARATOR.'default.html';
+        file_put_contents($testFilename, 'test');
+        
+        $config = array(
+            'uri' => '/filesystem/one/'
+        );
+        
+        $request = new Request($config);
+        
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+        $this->assertEqual($response->code, 200);
+        $this->assertEqual($response->body, 'test');
+        
+        unlink($testFilename);
+        
+    }
+    
+    function testReadNoResource() {
+        
+        $config = array(
+            'uri' => '/filesystem/one/tonicFilesystemTestDoesntExist'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+        $this->assertEqual($response->code, 404);
+        
+    }
+    
+    function testCreateResource() {
+        
+        $testFilename = sys_get_temp_dir().DIRECTORY_SEPARATOR.'tonicFilesystemTest';
+        
+        $config = array(
+            'uri' => '/filesystem/one/tonicFilesystemTest',
+            'method' => 'PUT'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+        $this->assertEqual($response->code, 411);
+        
+        $config['data'] = 'test';
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+        $this->assertEqual($response->code, 204);
+        $this->assertTrue(file_exists($testFilename));
+        $this->assertEqual(file_get_contents($testFilename), 'test');
+        
+        unlink($testFilename);
+        
+    }
+    
+    function testDeleteResource() {
+        
+        $testFilename = sys_get_temp_dir().DIRECTORY_SEPARATOR.'tonicFilesystemTest';
+        file_put_contents($testFilename, 'test');
+        
+        $config = array(
+            'uri' => '/filesystem/one/tonicFilesystemTest',
+            'method' => 'DELETE'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+        $this->assertEqual($response->code, 204);
+        $this->assertFalse(file_exists($testFilename));
+        
+    }
+    
+    function testDeleteNoResource() {
+        
+        $config = array(
+            'uri' => '/filesystem/one/tonicFilesystemTestDoesntExist',
+            'method' => 'DELETE'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+        $this->assertEqual($response->code, 404);
+        
+    }
+    
+}
+
+
+/* Test resource definitions */
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /filesystem/one
+ * @uri /filesystem/one/.*
+ */
+class TestFileSystem extends FilesystemResource {
+    
+    function __construct($parameters) {
+        
+        parent::__construct($parameters);
+        $this->path = sys_get_temp_dir().DIRECTORY_SEPARATOR;
+        $this->uriStub = '/filesystem/one/';
+        
+    }
+    
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/tests/resource.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/tests/resource.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/tests/resource.php	(revision 5888)
@@ -0,0 +1,54 @@
+<?php
+
+require_once('def/resource.php');
+
+/**
+ * @namespace Tonic\Tests
+ */
+class ResourceTester extends UnitTestCase {
+    
+    function testFunctioningResourceExec() {
+        
+        $config = array(
+            'uri' => '/resourcetest/one'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+        $this->assertEqual($response->code, '200');
+        $this->assertEqual($response->body, 'test');
+        
+    }
+    
+    function testNoParametersArgumentToResourceConstructor() {
+        
+        $config = array(
+            'uri' => '/resourcetest/badconstructor'
+        );
+        
+        $this->expectError(new PatternExpectation('/Missing argument 1 for Resource::__construct/'));
+        $this->expectError(new PatternExpectation('/Undefined variable: parameters/'));
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+    }
+    
+    function testMethodDoesNotReturnResponseObject() {
+        
+        $config = array(
+            'uri' => '/resourcetest/badmethodresponse'
+        );
+        
+        $this->expectException(new PatternExpectation('/Method GET of (.+\\\\)?TestBadMethodResponse did not return a Response object/'));
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        $response = $resource->exec($request);
+        
+    }
+
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/tests/def/response.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/tests/def/response.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/tests/def/response.php	(revision 5888)
@@ -0,0 +1,20 @@
+<?php
+
+/* Test resource definitions */
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /responsetest
+ */
+class TestResponse extends Resource {
+    
+    function get($request) {
+        
+        $response = new Response($request);
+        $response->body = 'test';
+        return $response;
+        
+    }
+    
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/tests/def/resource.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/tests/def/resource.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/tests/def/resource.php	(revision 5888)
@@ -0,0 +1,47 @@
+<?php
+
+/* Test resource definitions */
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /resourcetest/one
+ */
+class TestResource extends Resource {
+    
+    function get($request) {
+        
+        $response = new Response($request);
+        $response->body = 'test';
+        return $response;
+        
+    }
+    
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /resourcetest/badconstructor
+ */
+class TestBadResourceConstructor extends Resource {
+    
+    function __construct() {
+        
+        parent::__construct();
+        
+    }
+    
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /resourcetest/badmethodresponse
+ */
+class TestBadMethodResponse extends Resource {
+    
+    function get($request) {
+        
+        return TRUE;
+        
+    }
+    
+}
Index: sandbox/2.4-expresso-api/prototype/library/tonic/tests/def/Autoload.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/tests/def/Autoload.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/tests/def/Autoload.php	(revision 5888)
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @namespace Tonic\Tests
+ */
+class Autoload extends Resource {
+
+}
Index: sandbox/2.4-expresso-api/prototype/library/tonic/tests/def/request.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/tests/def/request.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/tests/def/request.php	(revision 5888)
@@ -0,0 +1,135 @@
+<?php
+
+/* Test resource definitions */
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /requesttest/one
+ * @uri /requesttest/three/(.+)/four 12
+ */
+class NewResource extends Resource {
+
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /requesttest/one/two
+ */
+class ChildResource extends NewResource {
+
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /requesttest/railsstyle/:param/:param2
+ * @uri /requesttest/uritemplatestyle/{param}/{param2}
+ */
+class TwoUriParams extends Resource {
+
+    var $receivedParams;
+    
+    function get($request, $param, $param2) {
+        $this->receivedParams = array(
+            'param' => $param,
+            'param2' => $param2
+        );
+        return new Response($request);
+    }
+    
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /requesttest/railsmixedstyle/{param}/(.+)/{param2}/(.+)
+ * @uri /requesttest/uritemplatemixedstyle/{param}/(.+)/{param2}/(.+)
+ * @uri /requesttest/mixedstyle/:param/(.+)/{param2}/(.+)
+ */
+class FourUriParams extends Resource {
+    
+    var $receivedParams;
+    
+    function get($request, $something, $otherthing, $param, $param2) {
+        $this->receivedParams = array(
+            'param' => $param,
+            'param2' => $param2,
+            'something' => $something,
+            'otherthing' => $otherthing
+        );
+        return new Response($request);
+    }
+    
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /requesttest/trailingslashurl/
+ */
+class TrailingSlashUrl extends Resource {
+
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /requesttest/optional(?:/param1/([^/]*))?
+ * @uri /requesttest/optional(?:/([a-z]+))?
+ */
+class OptionalParams extends Resource {
+    
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /requesttest/squiggly/(\d+-[0-9a-f]{8}-[0-9a-f]{6})
+ * @uri /requesttest/noncapture/(?:something)?
+ */
+class SquigglyRegexResource extends Resource {
+
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /requesttest/httpmethods
+ */
+class MethodTestResource extends Resource {
+    
+    function options($request) {
+        return new Response($request);
+    }
+    
+    function woot($request) {
+        return new Response($request);
+    }
+    
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /requesttest/priority 1
+  */
+class PriorityTestLessImportantResource extends Resource {
+
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /requesttest/priority 2
+  */
+class PriorityTestMoreImportantResource extends Resource {
+
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /requesttest/differenturi(priority) 1
+  */
+class PriorityTestDifferntURILessImportantResource extends Resource {
+
+}
+
+/**
+ * @namespace Tonic\Tests
+ * @uri /requesttest/differenturipriority 2
+  */
+class PriorityTestDifferntURIMoreImportantResource extends Resource {
+
+}
Index: sandbox/2.4-expresso-api/prototype/library/tonic/tests/request.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/tests/request.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/tests/request.php	(revision 5888)
@@ -0,0 +1,826 @@
+<?php
+
+require_once('def/request.php');
+
+/**
+ * @namespace Tonic\Tests
+ */
+class RequestTester extends UnitTestCase {
+    
+    function testRequestURI() {
+        
+        $config = array(
+            'uri' => '/requesttest/one/two'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->uri, $config['uri']);
+        
+        $_SERVER['REQUEST_URI'] = '/requesttest/one/two';
+        $request = new Request();
+        $this->assertEqual($request->uri, $config['uri']);
+        
+    }
+    
+    function testRequestBaseUri() {
+        
+        $config = array(
+            'baseUri' => '/some/sub/dir'
+        );
+        
+        $request = new Request($config);
+        
+        $this->assertEqual($request->baseUri, $config['baseUri']);
+        
+    }
+    
+    function testAssignMimetypes() {
+        
+        $config = array(
+            'mimetypes' => array(
+                'some' => 'text/something'
+            )
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->mimetypes['some'], 'text/something');
+        
+    }
+    
+    function testGetRequestMethod() {
+        
+        $config = array();
+        
+        $request = new Request($config);
+        
+        $this->assertEqual($request->method, 'GET');
+        
+    }
+    
+    function testPostRequestMethodWithData() {
+        
+        $config = array(
+            'method' => 'post',
+            'data' => 'some data'
+        );
+        
+        $request = new Request($config);
+        
+        $this->assertEqual($request->method, 'POST');
+        $this->assertEqual($request->data, 'some data');
+        
+    }
+    
+    function testPutRequestMethodWithData() {
+        
+        $config = array(
+            'method' => 'put',
+            'data' => 'some data'
+        );
+        
+        $request = new Request($config);
+        
+        $this->assertEqual($request->method, 'PUT');
+        $this->assertEqual($request->data, 'some data');
+        
+    }
+    
+    function testConnegOnBareURI() {
+        
+        $config = array(
+            'uri' => '/requesttest/one/two',
+            'accept' => '',
+            'acceptLang' => ''
+        );
+        
+        $request = new Request($config);
+        $this->assertEqual($request->negotiatedUris, array(
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->formatNegotiatedUris, array(
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->languageNegotiatedUris, array(
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->uri, '/requesttest/one/two');
+    
+    }
+    
+    function testConnegOnExtensionURI() {
+        
+        $config = array(
+            'uri' => '/requesttest/one/two.html',
+            'accept' => '',
+            'acceptLang' => ''
+        );
+        
+        $request = new Request($config);
+        $this->assertEqual($request->negotiatedUris, array(
+            '/requesttest/one/two.html',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->formatNegotiatedUris, array(
+            '/requesttest/one/two.html',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->languageNegotiatedUris, array(
+            '/requesttest/one/two.html',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->uri, '/requesttest/one/two');
+        
+    }
+    
+    function testConnegOnBareURIWithAccept() {
+        
+        $config = array(
+            'uri' => '/requesttest/one/two',
+            'accept' => 'image/png;q=0.5,text/html',
+            'acceptLang' => ''
+        );
+        
+        $request = new Request($config);
+        $this->assertEqual($request->negotiatedUris, array(
+            '/requesttest/one/two.html',
+            '/requesttest/one/two.png',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->formatNegotiatedUris, array(
+            '/requesttest/one/two.html',
+            '/requesttest/one/two.png',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->languageNegotiatedUris, array(
+            '/requesttest/one/two'
+        ));
+        
+    }
+    
+    function testConnegOnExtensionURIWithAccept() {
+        
+        $config = array(
+            'uri' => '/requesttest/one/two.html',
+            'accept' => 'image/png;q=0.5,text/html',
+            'acceptLang' => ''
+        );
+        
+        $request = new Request($config);
+        $this->assertEqual($request->negotiatedUris, array(
+            '/requesttest/one/two.html',
+            '/requesttest/one/two.png.html',
+            '/requesttest/one/two.png',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->formatNegotiatedUris, array(
+            '/requesttest/one/two.html',
+            '/requesttest/one/two.png',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->languageNegotiatedUris, array(
+            '/requesttest/one/two.html',
+            '/requesttest/one/two'
+        ));
+        
+    }
+    
+    function testConnegOnBareURIWithAcceptLang() {
+        
+        $config = array(
+            'uri' => '/requesttest/one/two',
+            'accept' => '',
+            'acceptLang' => 'fr;q=0.5,en'
+        );
+        
+        $request = new Request($config);
+        $this->assertEqual($request->negotiatedUris, array(
+            '/requesttest/one/two.en',
+            '/requesttest/one/two.fr',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->formatNegotiatedUris, array(
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->languageNegotiatedUris, array(
+            '/requesttest/one/two.en',
+            '/requesttest/one/two.fr',
+            '/requesttest/one/two'
+        ));
+        
+    }
+    
+    function testConnegOnExtensionURIWithAcceptLang() {
+        
+        $config = array(
+            'uri' => '/requesttest/one/two.html',
+            'accept' => '',
+            'acceptLang' => 'fr;q=0.5,en'
+        );
+        
+        $request = new Request($config);
+        $this->assertEqual($request->negotiatedUris, array(
+            '/requesttest/one/two.html.en',
+            '/requesttest/one/two.html.fr',
+            '/requesttest/one/two.html',
+            '/requesttest/one/two.en',
+            '/requesttest/one/two.fr',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->formatNegotiatedUris, array(
+            '/requesttest/one/two.html',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->languageNegotiatedUris, array(
+            '/requesttest/one/two.html',
+            '/requesttest/one/two.en',
+            '/requesttest/one/two.fr',
+            '/requesttest/one/two'
+        ));
+        
+    }
+    
+    function testConnegOnBareURIWithAcceptAndAcceptLang() {
+        
+        $config = array(
+            'uri' => '/requesttest/one/two',
+            'accept' => 'image/png;q=0.5,text/html',
+            'acceptLang' => 'fr;q=0.5,en'
+        );
+        
+        $request = new Request($config);
+        $this->assertEqual($request->negotiatedUris, array(
+            '/requesttest/one/two.html.en',
+            '/requesttest/one/two.html.fr',
+            '/requesttest/one/two.html',
+            '/requesttest/one/two.png.en',
+            '/requesttest/one/two.png.fr',
+            '/requesttest/one/two.png',
+            '/requesttest/one/two.en',
+            '/requesttest/one/two.fr',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->formatNegotiatedUris, array(
+            '/requesttest/one/two.html',
+            '/requesttest/one/two.png',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->languageNegotiatedUris, array(
+            '/requesttest/one/two.en',
+            '/requesttest/one/two.fr',
+            '/requesttest/one/two'
+        ));
+        
+    }
+    
+    function testConnegOnExtensionURIWithAcceptAndAcceptLang() {
+        
+        $config = array(
+            'uri' => '/requesttest/one/two.html',
+            'accept' => 'image/png;q=0.5,text/html',
+            'acceptLang' => 'fr;q=0.5,en'
+        );
+        
+        $request = new Request($config);
+        $this->assertEqual($request->negotiatedUris, array(
+            '/requesttest/one/two.html.en',
+            '/requesttest/one/two.html.fr',
+            '/requesttest/one/two.html',
+            '/requesttest/one/two.png.html',
+            '/requesttest/one/two.png.en',
+            '/requesttest/one/two.png.fr',
+            '/requesttest/one/two.png',
+            '/requesttest/one/two.en',
+            '/requesttest/one/two.fr',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->formatNegotiatedUris, array(
+            '/requesttest/one/two.html',
+            '/requesttest/one/two.png',
+            '/requesttest/one/two'
+        ));
+        $this->assertEqual($request->languageNegotiatedUris, array(
+            '/requesttest/one/two.html',
+            '/requesttest/one/two.en',
+            '/requesttest/one/two.fr',
+            '/requesttest/one/two'
+        ));
+        
+    }
+    
+    function testResourceLoaderWithNoResources() {
+        
+        $config = array(
+            'uri' => '/three'
+        );
+        
+        $request = new Request($config);
+        
+        try {
+            $resource = $request->loadResource();
+            $this->fail('Expected ResponseException to be thrown');
+        } catch (ResponseException $e) {
+            $this->assertEqual($e->getCode(), 404);
+        }
+        
+    }
+    
+    function testResourceLoaderWithAResources() {
+        
+        $config = array(
+            'uri' => '/requesttest/one'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/NewResource/', get_class($resource));
+        
+    }
+    
+    function testResourceLoaderWithAChildResources() {
+        
+        $config = array(
+            'uri' => '/requesttest/one/two'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/ChildResource/', get_class($resource));
+        
+    }
+    
+    function testResourceLoaderWithRegexURIMatch() {
+        
+        $config = array(
+            'uri' => '/requesttest/three/something/four'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/NewResource/', get_class($resource));
+        $this->assertPattern('/0: something/', $resource);
+        
+    }
+    
+    function testIfMatch() {
+        
+        $config = array(
+            'uri' => '/requesttest/one',
+            'ifMatch' => '123123'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->ifMatch, array('123123'));
+        
+        $config = array(
+            'uri' => '/requesttest/one',
+            'ifMatch' => '"123123"'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->ifMatch, array('123123'));
+        
+        $config = array(
+            'uri' => '/requesttest/one',
+            'ifMatch' => '"123123","456456"'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->ifMatch, array('123123', '456456'));
+        
+        $config = array(
+            'uri' => '/requesttest/one',
+            'ifMatch' => '"123123", "456456"'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->ifMatch, array('123123', '456456'));
+        $this->assertTrue($request->ifMatch('123123'));
+        $this->assertFalse($request->ifMatch('123456'));
+        
+        $config = array(
+            'uri' => '/requesttest/one',
+            'ifMatch' => '*'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->ifMatch, array('*'));
+        $this->assertTrue($request->ifMatch('123123'));
+        $this->assertTrue($request->ifMatch('123456'));
+        
+    }
+    
+    function testIfNoneMatch() {
+        
+        $config = array(
+            'uri' => '/requesttest/one',
+            'ifNoneMatch' => '123123'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->ifNoneMatch, array('123123'));
+        
+        $config = array(
+            'uri' => '/requesttest/one',
+            'ifNoneMatch' => '"123123"'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->ifNoneMatch, array('123123'));
+        
+        $config = array(
+            'uri' => '/requesttest/one',
+            'ifNoneMatch' => '"123123","456456"'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->ifNoneMatch, array('123123', '456456'));
+        
+        $config = array(
+            'uri' => '/requesttest/one',
+            'ifNoneMatch' => '123123, 456456'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->ifNoneMatch, array('123123', '456456'));
+        $this->assertTrue($request->ifNoneMatch('123123'));
+        $this->assertFalse($request->ifNoneMatch('123456'));
+        
+        $config = array(
+            'uri' => '/requesttest/one',
+            'ifNoneMatch' => '*'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->ifNoneMatch, array('*'));
+        $this->assertFalse($request->ifNoneMatch('123123'));
+        $this->assertFalse($request->ifNoneMatch('123456'));
+        
+        $config = array(
+            'uri' => '/requesttest/one',
+            'ifNoneMatch' => '123123, 456456',
+            'ifMatch' => '*'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->ifMatch, array('*'));
+        $this->assertTrue($request->ifMatch('123123'));
+        $this->assertTrue($request->ifMatch('123456'));
+        $this->assertFalse($request->ifNoneMatch('123123'));
+        $this->assertFalse($request->ifNoneMatch('123456'));
+        
+    }
+    
+    function test404NotFound() {
+        
+        $config = array(
+            'uri' => '/requesttest/notfound'
+        );
+        $request = new Request($config);
+        
+        try {
+            $resource = $request->loadResource();
+            $this->fail('Expected ResponseException to be thrown');
+        } catch (ResponseException $e) {
+            $this->assertEqual($e->getCode(), 404);
+        }
+        
+    }
+    
+    function testResourceDataLoading() {
+        
+        $config = array(
+            'uri' => '/requesttest/one/two'
+        );
+        
+        $request = new Request($config);
+        
+        $this->assertEqual($request->resources['/requesttest/one/two']['namespace'], 'Tonic\Tests');
+        $this->assertPattern('/ChildResource/', $request->resources['/requesttest/one/two']['class']);
+        $this->assertPattern('|def/request\.php|', $request->resources['/requesttest/one/two']['filename']);
+        $this->assertEqual($request->resources['/requesttest/one/two']['priority'], 0);
+        
+    }
+    
+    function testNamespaceMounting() {
+        
+        $config = array(
+            'uri' => '/foo/bar/requesttest/one',
+            'mount' => array(
+                'Tonic\Tests' => '/foo/bar'
+            )
+        );
+        
+        $request = new Request($config);
+        
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/NewResource/', get_class($resource));
+        
+    }
+    
+    function testURITemplateStyleUriParameters() {
+        
+        $config = array(
+            'uri' => '/requesttest/uritemplatestyle/woo/yay'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/TwoUriParams/', get_class($resource));
+        $this->assertPattern('/param: woo/', $resource);
+        $this->assertPattern('/param2: yay/', $resource);
+        
+        $resource->exec($request);
+        $this->assertEqual($resource->receivedParams['param'], 'woo');
+        $this->assertEqual($resource->receivedParams['param2'], 'yay');
+        
+        
+        $config = array(
+            'uri' => '/requesttest/uritemplatemixedstyle/woo/yay/foo/bar'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/FourUriParams/', get_class($resource));
+        $this->assertPattern('/param: woo/', $resource);
+        $this->assertPattern('/1: yay/', $resource);
+        $this->assertPattern('/param2: foo/', $resource);
+        $this->assertPattern('/3: bar/', $resource);
+        
+        $resource->exec($request);
+        $this->assertEqual($resource->receivedParams['param'], 'woo');
+        $this->assertEqual($resource->receivedParams['something'], 'yay');
+        $this->assertEqual($resource->receivedParams['param2'], 'foo');
+        $this->assertEqual($resource->receivedParams['otherthing'], 'bar');
+    }
+    
+    function testRailsStyleUriParameters() {
+        
+        $config = array(
+            'uri' => '/requesttest/railsstyle/woo/yay'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/TwoUriParams/', get_class($resource));
+        $this->assertPattern('/param: woo/', $resource);
+        $this->assertPattern('/param2: yay/', $resource);
+        
+        $resource->exec($request);
+        $this->assertEqual($resource->receivedParams['param'], 'woo');
+        $this->assertEqual($resource->receivedParams['param2'], 'yay');
+        
+        
+        $config = array(
+            'uri' => '/requesttest/railsmixedstyle/woo/yay/foo/bar'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/FourUriParams/', get_class($resource));
+        $this->assertPattern('/param: woo/', $resource);
+        $this->assertPattern('/1: yay/', $resource);
+        $this->assertPattern('/param2: foo/', $resource);
+        $this->assertPattern('/3: bar/', $resource);
+        
+        $resource->exec($request);
+        $this->assertEqual($resource->receivedParams['param'], 'woo');
+        $this->assertEqual($resource->receivedParams['something'], 'yay');
+        $this->assertEqual($resource->receivedParams['param2'], 'foo');
+        $this->assertEqual($resource->receivedParams['otherthing'], 'bar');
+    }
+    
+    function testMixedStyleUriParameters() {
+        
+        $config = array(
+            'uri' => '/requesttest/mixedstyle/woo/yay/foo/bar'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/FourUriParams/', get_class($resource));
+        $this->assertPattern('/param: woo/', $resource);
+        $this->assertPattern('/1: yay/', $resource);
+        $this->assertPattern('/param2: foo/', $resource);
+        $this->assertPattern('/3: bar/', $resource);
+        
+        $resource->exec($request);
+        $this->assertEqual($resource->receivedParams['param'], 'woo');
+        $this->assertEqual($resource->receivedParams['something'], 'yay');
+        $this->assertEqual($resource->receivedParams['param2'], 'foo');
+        $this->assertEqual($resource->receivedParams['otherthing'], 'bar');
+    }
+    
+    function testAutoloadingOfResourcesWithoutAutoloadFunction() {
+        
+        $config = array(
+            'uri' => '/requesttest/autoload',
+            'autoload' => array(
+                '/requesttest/autoload' => 'Autoload'
+            )
+        );
+        
+        $request = new Request($config);
+        
+        $this->expectException(new PatternExpectation('/Unable to load resource/'));
+        $resource = $request->loadResource();
+        
+    }
+    
+    function testAutoloadingOfResources() {
+        
+        $config = array(
+            'uri' => '/requesttest/autoload',
+            'autoload' => array(
+                '/requesttest/autoload' => 'Autoload'
+            )
+        );
+        
+        function __autoload($className) {
+            if (file_exists('def/'.$className.'.php')) {
+                require_once 'def/'.$className.'.php';
+            }
+        }
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/Autoload/', get_class($resource));
+        $this->assertPattern('/Class: Autoload/', $request);
+        $this->assertPattern('|File: '.dirname(__FILE__).DIRECTORY_SEPARATOR.'def/Autoload.php|', $request);
+        
+    }
+    
+    function testTrailingSlashRemoval() {
+        
+        $config = array(
+            'uri' => '/requesttest/trailingslashurl/'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->uri, substr($config['uri'], 0, -1));
+        
+    }
+    
+    function testRequestRootURI() {
+        
+        $config = array(
+            'uri' => '/'
+        );
+        $request = new Request($config);
+        $this->assertEqual($request->uri, $config['uri']);
+        
+        $_SERVER['REQUEST_URI'] = '/';
+        $request = new Request();
+        $this->assertEqual($request->uri, $config['uri']);
+        
+    }
+    
+    function testMethodNotAllowed() {
+        
+        $config = array(
+            'uri' => '/requesttest/one',
+            'method' => 'PUT'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        try {
+            $response = $resource->exec($request);
+            $this->fail('Expected ResponseException to be thrown');
+        } catch (ResponseException $e) {
+            $this->assertEqual($e->getCode(), 405);
+        }
+        
+    }
+    
+    function testOptionalRegexURIParams() {
+        
+        $config = array(
+            'uri' => '/requesttest/optional'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/OptionalParams/', get_class($resource));
+        $this->assertNoPattern('/0: /', $resource);
+        
+        $config = array(
+            'uri' => '/requesttest/optional/param1/woo'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/OptionalParams/', get_class($resource));
+        $this->assertPattern('/0: woo/', $resource);
+        
+        $config = array(
+            'uri' => '/requesttest/optional/something'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/OptionalParams/', get_class($resource));
+        $this->assertPattern('/0: something/', $resource);
+        
+    }
+    
+    function testResourceLoaderWithSquigglyBraceRegexURIMatch() {
+        
+        $config = array(
+            'uri' => '/requesttest/squiggly/9999-aaaaaaaa-bbbbbb'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/SquigglyRegexResource/', get_class($resource));
+        
+        $config = array(
+            'uri' => '/requesttest/squiggly/9999-aaa-bbb'
+        );
+        
+        $request = new Request($config);
+        
+        try {
+            $resource = $request->loadResource();
+            $this->fail('Expected ResponseException to be thrown');
+        } catch (ResponseException $e) {
+            $this->assertTrue(TRUE);
+        }
+        
+    }
+    
+    function testResourceLoaderWithNonCapturingGroupRegexURIMatch() {
+        
+        $config = array(
+            'uri' => '/requesttest/noncapture/something'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertPattern('/SquigglyRegexResource/', get_class($resource));
+        
+    }
+    
+    function testAllowedHTTPMethods() {
+        
+        $config = array(
+            'uri' => '/requesttest/httpmethods',
+            'method' => 'OPTIONS'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        try {
+            $response = $resource->exec($request);
+            $this->assertTrue(TRUE);
+        } catch (ResponseException $e) {
+            $this->fail('Did not expect ResponseException to be thrown');
+        }
+        
+        $config = array(
+            'uri' => '/requesttest/httpmethods',
+            'method' => 'WOOT'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        try {
+            $response = $resource->exec($request);
+            $this->fail('Expected ResponseException to be thrown');
+        } catch (ResponseException $e) {
+            $this->assertTrue(TRUE);
+        }
+        
+    }
+    
+    function testURIPriority() {
+        
+        // with same @uri
+        
+        $config = array(
+            'uri' => '/requesttest/priority'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertEqual(get_class($resource), 'PriorityTestMoreImportantResource');
+        
+        // with different @uri
+        
+        $config = array(
+            'uri' => '/requesttest/differenturipriority'
+        );
+        
+        $request = new Request($config);
+        $resource = $request->loadResource();
+        
+        $this->assertEqual(get_class($resource), 'PriorityTestDifferntURIMoreImportantResource');
+        
+    }
+    
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/.travis.yml
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/.travis.yml	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/.travis.yml	(revision 5888)
@@ -0,0 +1,5 @@
+language: php
+php:
+  - 5.2
+  - 5.3
+  - 5.4
Index: sandbox/2.4-expresso-api/prototype/library/tonic/lib/tonic.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/lib/tonic.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/lib/tonic.php	(revision 5888)
@@ -0,0 +1,856 @@
+<?php
+/*
+ * This file is part of the Tonic.
+ * (c) Paul James <paul@peej.co.uk>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/* Turn on namespace in PHP5.3 if you have namespace collisions from the Tonic classnames
+namespace Tonic;
+use \ReflectionClass as ReflectionClass;
+use \ReflectionMethod as ReflectionMethod;
+use \Exception as Exception;
+//*/
+
+/**
+ * Model the data of the incoming HTTP request
+ * @namespace Tonic\Lib
+ */
+class Request {
+    
+    /**
+     * The requested URI
+     * @var str
+     */
+    public $uri;
+    
+    /**
+     * The URI where the front controller is positioned in the server URI-space
+     * @var str
+     */
+    public $baseUri = '';
+    
+    /**
+     * Array of possible URIs based upon accept and accept-language request headers in order of preference
+     * @var str[]
+     */
+    public $negotiatedUris = array();
+    
+    /**
+     * Array of possible URIs based upon accept request headers in order of preference
+     * @var str[]
+     */
+    public $formatNegotiatedUris = array();
+    
+    /**
+     * Array of possible URIs based upon accept-language request headers in order of preference
+     * @var str[]
+     */
+    public $languageNegotiatedUris = array();
+    
+    /**
+     * Array of accept headers in order of preference
+     * @var str[][]
+     */
+    public $accept = array();
+    
+    /**
+     * Array of accept-language headers in order of preference
+     * @var str[][]
+     */
+    public $acceptLang = array();
+    
+    /**
+     * Array of accept-encoding headers in order of preference
+     * @var str[]
+     */
+    public $acceptEncoding = array();
+    
+    /**
+     * Map of file/URI extensions to mimetypes
+     * @var str[]
+     */
+    public $mimetypes = array(
+        'html' => 'text/html',
+        'txt' => 'text/plain',
+        'php' => 'application/php',
+        'css' => 'text/css',
+        'js' => 'application/javascript',
+        'json' => 'application/json',
+        'xml' => 'application/xml',
+        'rss' => 'application/rss+xml',
+        'atom' => 'application/atom+xml',
+        'gz' => 'application/x-gzip',
+        'tar' => 'application/x-tar',
+        'zip' => 'application/zip',
+        'gif' => 'image/gif',
+        'png' => 'image/png',
+        'jpg' => 'image/jpeg',
+        'ico' => 'image/x-icon',
+        'swf' => 'application/x-shockwave-flash',
+        'flv' => 'video/x-flv',
+        'avi' => 'video/mpeg',
+        'mpeg' => 'video/mpeg',
+        'mpg' => 'video/mpeg',
+        'mov' => 'video/quicktime',
+        'mp3' => 'audio/mpeg'
+    );
+    
+    /**
+     * Supported HTTP methods
+     * @var str[]
+     */
+    public $HTTPMethods = array(
+        'GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS'
+    );
+    
+    /**
+     * Allowed resource methods
+     * @var str[]
+     */
+    public $allowedMethods = array();
+    
+    /**
+     * HTTP request method of incoming request
+     * @var str
+     */
+    public $method = 'GET';
+    
+    /**
+     * Body data of incoming request
+     * @var str
+     */
+    public $data;
+    
+    /**
+     * Array of if-match etags
+     * @var str[]
+     */
+    public $ifMatch = array();
+    
+    /**
+     * Array of if-none-match etags
+     * @var str[]
+     */
+    public $ifNoneMatch = array();
+    
+    /**
+     * The resource classes loaded and how they are wired to URIs
+     * @var str[]
+     */
+    public $resources = array();
+    
+    /**
+     * A list of URL to namespace/package mappings for routing requests to a
+     * group of resources that are wired into a different URL-space
+     * @var str[]
+     */
+    public $mounts = array();
+    
+    /**
+     * Set a default configuration option
+     */
+    protected function getConfig($config, $configVar, $serverVar = NULL, $default = NULL) {
+        if (isset($config[$configVar])) {
+            return $config[$configVar];
+        } elseif (isset($_SERVER[$serverVar]) && $_SERVER[$serverVar] != '') {
+            return $_SERVER[$serverVar];
+        } else {
+            return $default;
+        }
+    }
+    
+    /**
+     * Create a request object using the given configuration options.
+     *
+     * The configuration options array can contain the following:
+     *
+     * <dl>
+     * <dt>uri</dt> <dd>The URI of the request</dd>
+     * <dt>method</dt> <dd>The HTTP method of the request</dd>
+     * <dt>data</dt> <dd>The body data of the request</dd>
+     * <dt>accept</dt> <dd>An accept header</dd>
+     * <dt>acceptLang</dt> <dd>An accept-language header</dd>
+     * <dt>acceptEncoding</dt> <dd>An accept-encoding header</dd>
+     * <dt>ifMatch</dt> <dd>An if-match header</dd>
+     * <dt>ifNoneMatch</dt> <dd>An if-none-match header</dd>
+     * <dt>mimetypes</dt> <dd>A map of file/URI extenstions to mimetypes, these
+     * will be added to the default map of mimetypes</dd>
+     * <dt>baseUri</dt> <dd>The base relative URI to use when dispatcher isn't
+     * at the root of the domain. Do not put a trailing slash</dd>
+     * <dt>mounts</dt> <dd>an array of namespace to baseUri prefix mappings</dd>
+     * <dt>HTTPMethods</dt> <dd>an array of HTTP methods to support</dd>
+     * </dl>
+     *
+     * @param mixed[] config Configuration options
+     */
+    function __construct($config = array()) {
+        
+        // set defaults
+        $config['uri'] = parse_url($this->getConfig($config, 'uri', 'REQUEST_URI'), PHP_URL_PATH);
+        $config['baseUri'] = $this->getConfig($config, 'baseUri', '');
+        $config['accept'] = $this->getConfig($config, 'accept', 'HTTP_ACCEPT');
+        $config['acceptLang'] = $this->getConfig($config, 'acceptLang', 'HTTP_ACCEPT_LANGUAGE');
+        $config['acceptEncoding'] = $this->getConfig($config, 'acceptEncoding', 'HTTP_ACCEPT_ENCODING');
+        $config['ifMatch'] = $this->getConfig($config, 'ifMatch', 'HTTP_IF_MATCH');
+        $config['ifNoneMatch'] = $this->getConfig($config, 'ifNoneMatch', 'HTTP_IF_NONE_MATCH');
+        
+        if (isset($config['mimetypes']) && is_array($config['mimetypes'])) {
+            foreach ($config['mimetypes'] as $ext => $mimetype) {
+                $this->mimetypes[$ext] = $mimetype;
+            }
+        }
+        
+        // set baseUri
+        $this->baseUri = $config['baseUri'];
+        
+        // get request URI
+        $parts = explode('/', $config['uri']);
+        $lastPart = array_pop($parts);
+        $this->uri = join('/', $parts);
+        
+        $parts = explode('.', $lastPart);
+        $this->uri .= '/'.$parts[0];
+        
+        if ($this->uri != '/' && substr($this->uri, -1, 1) == '/') { // remove trailing slash problem
+            $this->uri = substr($this->uri, 0, -1);
+        }
+        
+        array_shift($parts);
+        foreach ($parts as $part) {
+            $this->accept[10][] = $part;
+            $this->acceptLang[10][] = $part;
+        }
+        
+        // sort accept headers
+        $accept = explode(',', strtolower($config['accept']));
+        foreach ($accept as $mimetype) {
+            $parts = explode(';q=', $mimetype);
+            if (isset($parts) && isset($parts[1]) && $parts[1]) {
+                $num = $parts[1] * 10;
+            } else {
+                $num = 10;
+            }
+            $key = array_search($parts[0], $this->mimetypes);
+            if ($key) {
+                $this->accept[$num][] = $key;
+            }
+        }
+        krsort($this->accept);
+        
+        // sort lang accept headers
+        $accept = explode(',', strtolower($config['acceptLang']));
+        foreach ($accept as $mimetype) {
+            $parts = explode(';q=', $mimetype);
+            if (isset($parts) && isset($parts[1]) && $parts[1]) {
+                $num = $parts[1] * 10;
+            } else {
+                $num = 10;
+            }
+            $this->acceptLang[$num][] = $parts[0];
+        }
+        krsort($this->acceptLang);
+        
+        // get encoding accept headers
+        if ($config['acceptEncoding']) {
+            foreach (explode(',', $config['acceptEncoding']) as $key => $accept) {
+                $this->acceptEncoding[$key] = trim($accept);
+            }
+        }
+        
+        // create negotiated URI lists from accept headers and request URI
+        foreach ($this->accept as $typeOrder) {
+            foreach ($typeOrder as $type) {
+                if ($type) {
+                    foreach ($this->acceptLang as $langOrder) {
+                        foreach ($langOrder as $lang) {
+                            if ($lang && $lang != $type) {
+                                $this->negotiatedUris[] = $this->uri.'.'.$type.'.'.$lang;
+                            }
+                        }
+                    }
+                    $this->negotiatedUris[] = $this->uri.'.'.$type;
+                    $this->formatNegotiatedUris[] = $this->uri.'.'.$type;
+                }
+            }
+        }
+        foreach ($this->acceptLang as $langOrder) {
+            foreach ($langOrder as $lang) {
+                if ($lang) {
+                    $this->negotiatedUris[] = $this->uri.'.'.$lang;
+                    $this->languageNegotiatedUris[] = $this->uri.'.'.$lang;
+                }
+            }
+        }
+        $this->negotiatedUris[] = $this->uri;
+        $this->formatNegotiatedUris[] = $this->uri;
+        $this->languageNegotiatedUris[] = $this->uri;
+        
+        $this->negotiatedUris = array_values(array_unique($this->negotiatedUris));
+        $this->formatNegotiatedUris = array_values(array_unique($this->formatNegotiatedUris));
+        $this->languageNegotiatedUris = array_values(array_unique($this->languageNegotiatedUris));
+        
+        $this->HTTPMethods = $this->getConfig($config, 'HTTPMethods', NULL, $this->HTTPMethods);
+        
+        // get HTTP method
+        $this->method = strtoupper($this->getConfig($config, 'method', 'REQUEST_METHOD', $this->method));
+        
+        // get HTTP request data
+        $this->data = $this->getConfig($config, 'data', NULL, file_get_contents("php://input"));
+        
+        // conditional requests
+        if ($config['ifMatch']) {
+            $ifMatch = explode(',', $config['ifMatch']);
+            foreach ($ifMatch as $etag) {
+                $this->ifMatch[] = trim($etag, '" ');
+            }
+        }
+        if ($config['ifNoneMatch']) {
+            $ifNoneMatch = explode(',', $config['ifNoneMatch']);
+            foreach ($ifNoneMatch as $etag) {
+                $this->ifNoneMatch[] = trim($etag, '" ');
+            }
+        }
+        
+        // mounts
+        if (isset($config['mount']) && is_array($config['mount'])) {
+            $this->mounts = $config['mount'];
+        }
+        
+        // prime named resources for autoloading
+        if (isset($config['autoload']) && is_array($config['autoload'])) {
+            foreach ($config['autoload'] as $uri => $className) {
+                $this->resources[$uri] = array(
+                    'class' => $className,
+                    'loaded' => FALSE
+                );
+            }
+        }
+        
+        // load definitions of already loaded resource classes
+        $resourceClassName = class_exists('Tonic\\Resource', false) ? 'Tonic\\Resource' : 'Resource';
+        foreach (get_declared_classes() as $className) {
+            if (is_subclass_of($className, $resourceClassName)) {
+                
+                $resourceDetails = $this->getResourceClassDetails($className);
+                
+                preg_match_all('/@uri\s+([^\s]+)(?:\s([0-9]+))?/', $resourceDetails['comment'], $annotations);
+                if (isset($annotations[1]) && $annotations[1]) {
+                    $uris = $annotations[1];
+                } else {
+                    $uris = array();
+                }
+                
+                foreach ($uris as $index => $uri) {
+                    if ($uri != '/' && substr($uri, -1, 1) == '/') { // remove trailing slash problem
+                        $uri = substr($uri, 0, -1);
+                    }
+                    if (isset($annotations[2][$index]) && is_numeric($annotations[2][$index])) {
+                        $priority = intval($annotations[2][$index]);
+                    } else {
+                        $priority = 0;
+                    }
+                    if (
+                        !isset($this->resources[$resourceDetails['mountPoint'].$uri]) ||
+                        $this->resources[$resourceDetails['mountPoint'].$uri]['priority'] < $priority
+                    ) {
+                        $this->resources[$resourceDetails['mountPoint'].$uri] = array(
+                            'namespace' => $resourceDetails['namespaceName'],
+                            'class' => $resourceDetails['className'],
+                            'filename' => $resourceDetails['filename'],
+                            'line' => $resourceDetails['line'],
+                            'priority' => $priority,
+                            'loaded' => TRUE
+                        );
+                    }
+                }
+            }
+        }
+        
+    }
+    
+    /**
+     * Get the details of a Resource class by reflection
+     * @param str className
+     * @return str[]
+     */
+    protected function getResourceClassDetails($className) {
+        
+        $resourceReflector = new ReflectionClass($className);
+        $comment = $resourceReflector->getDocComment();
+        
+        $className = $resourceReflector->getName();
+        if (method_exists($resourceReflector, 'getNamespaceName')) {
+            $namespaceName = $resourceReflector->getNamespaceName();
+        } else {
+            // @codeCoverageIgnoreStart
+            $namespaceName = FALSE;
+            // @codeCoverageIgnoreEnd
+        }
+        
+        if (!$namespaceName) {
+            preg_match('/@(?:package|namespace)\s+([^\s]+)/', $comment, $package);
+            if (isset($package[1])) {
+                $namespaceName = $package[1];
+            }
+        }
+        
+        // adjust URI for mountpoint
+        if (isset($this->mounts[$namespaceName])) {
+            $mountPoint = $this->mounts[$namespaceName];
+        } else {
+            $mountPoint = '';
+        }
+        
+        return array(
+            'comment' => $comment,
+            'className' => $className,
+            'namespaceName' => $namespaceName,
+            'filename' => $resourceReflector->getFileName(),
+            'line' => $resourceReflector->getStartLine(),
+            'mountPoint' => $mountPoint
+        );
+    
+    }
+    
+    /**
+     * Convert the object into a string suitable for printing
+     * @return str
+     * @codeCoverageIgnore
+     */
+    function __toString() {
+        $str = 'URI: '.$this->uri."\n";
+        $str .= 'Method: '.$this->method."\n";
+        if ($this->data) {
+            $str .= 'Data: '.$this->data."\n";
+        }
+        $str .= 'Acceptable Formats:';
+        foreach ($this->accept as $accept) {
+            foreach ($accept as $a) {
+                $str .= ' .'.$a;
+                if (isset($this->mimetypes[$a])) $str .= ' ('.$this->mimetypes[$a].')';
+            }
+        }
+        $str .= "\n";
+        $str .= 'Acceptable Languages:';
+        foreach ($this->acceptLang as $accept) {
+            foreach ($accept as $a) {
+                $str .= ' '.$a;
+            }
+        }
+        $str .= "\n";
+        $str .= 'Negotated URIs:'."\n";
+        foreach ($this->negotiatedUris as $uri) {
+            $str .= "\t".$uri."\n";
+        }
+        $str .= 'Format Negotated URIs:'."\n";
+        foreach ($this->formatNegotiatedUris as $uri) {
+            $str .= "\t".$uri."\n";
+        }
+        $str .= 'Language Negotated URIs:'."\n";
+        foreach ($this->languageNegotiatedUris as $uri) {
+            $str .= "\t".$uri."\n";
+        }
+        if ($this->ifMatch) {
+            $str .= 'If Match:';
+            foreach ($this->ifMatch as $etag) {
+                $str .= ' '.$etag;
+            }
+            $str .= "\n";
+        }
+        if ($this->ifNoneMatch) {
+            $str .= 'If None Match:';
+            foreach ($this->ifNoneMatch as $etag) {
+                $str .= ' '.$etag;
+            }
+            $str .= "\n";
+        }
+        $str .= 'Loaded Resources:'."\n";
+        foreach ($this->resources as $uri => $resource) {
+            $str .= "\t".$uri."\n";
+            if (isset($resource['namespace']) && $resource['namespace']) $str .= "\t\tNamespace: ".$resource['namespace']."\n";
+            $str .= "\t\tClass: ".$resource['class']."\n";
+            $str .= "\t\tFile: ".$resource['filename'];
+            if (isset($resource['line']) && $resource['line']) $str .= '#'.$resource['line'];
+            $str .= "\n";
+        }
+        return $str;
+    }
+    
+    /**
+     * Instantiate the resource class that matches the request URI the best
+     * @return Resource
+     * @throws ResponseException If the resource does not exist, a 404 exception is thrown
+     */
+    function loadResource() {
+        
+        $uriMatches = array();
+        foreach ($this->resources as $uri => $resource) {
+            
+            preg_match_all('#((?<!\?):[^/]+|{[^0-9][^}]*}|\(.+?\))#', $uri, $params, PREG_PATTERN_ORDER);
+            
+            $uri = $this->baseUri.$uri;
+            if ($uri != '/' && substr($uri, -1, 1) == '/') { // remove trailing slash problem
+                $uri = substr($uri, 0, -1);
+            }
+            $uriRegex = preg_replace('#((?<!\?):[^(/]+|{[^0-9][^}]*})#', '(.+)', $uri);
+            
+            if (preg_match('#^'.$uriRegex.'$#', $this->uri, $matches)) {
+                array_shift($matches);
+                
+                if (isset($params[1])) {
+                    foreach ($params[1] as $index => $param) {
+                        if (isset($matches[$index])) {
+                            if (substr($param, 0, 1) == ':') {
+                                $matches[substr($param, 1)] = $matches[$index];
+                                unset($matches[$index]);
+                            } elseif (substr($param, 0, 1) == '{' && substr($param, -1, 1) == '}') {
+                                $matches[substr($param, 1, -1)] = $matches[$index];
+                                unset($matches[$index]);
+                            }
+                        }
+                    }
+                }
+                
+                $uriMatches[isset($resource['priority']) ? $resource['priority'] : 0] = array(
+                    $uri,
+                    $resource,
+                    $matches
+                );
+                
+            }
+        }
+        krsort($uriMatches);
+        
+        if ($uriMatches) {
+            list($uri, $resource, $parameters) = array_shift($uriMatches);
+            if (!$resource['loaded']) { // autoload
+                if (!class_exists($resource['class'])) {
+                    throw new Exception('Unable to load resource' . $resource['class']);
+                }
+                $resourceDetails = $this->getResourceClassDetails($resource['class']);
+                $resource = $this->resources[$uri] = array(
+                    'namespace' => $resourceDetails['namespaceName'],
+                    'class' => $resourceDetails['className'],
+                    'filename' => $resourceDetails['filename'],
+                    'line' => $resourceDetails['line'],
+                    'priority' => 0,
+                    'loaded' => TRUE
+                );
+            }
+            
+            $this->allowedMethods = array_intersect(array_map('strtoupper', get_class_methods($resource['class'])), $this->HTTPMethods);
+            
+            return new $resource['class']($parameters);
+        }
+        
+        // no resource found, throw response exception
+        throw new ResponseException('A resource matching URI "'.$this->uri.'" was not found', Response::NOTFOUND);
+        
+    }
+    
+    /**
+     * Check if an etag matches the requests if-match header
+     * @param str etag Etag to match
+     * @return bool
+     */
+    function ifMatch($etag) {
+        if (isset($this->ifMatch[0]) && $this->ifMatch[0] == '*') {
+            return TRUE;
+        }
+        return in_array($etag, $this->ifMatch);
+    }
+    
+    /**
+     * Check if an etag matches the requests if-none-match header
+     * @param str etag Etag to match
+     * @return bool
+     */
+    function ifNoneMatch($etag) {
+        if (isset($this->ifMatch[0]) && $this->ifMatch[0] == '*') {
+            return FALSE;
+        }
+        return in_array($etag, $this->ifNoneMatch);
+    }
+    
+    /**
+     * Return the most acceptable of the given formats based on the accept array
+     * @param str[] formats
+     * @param str default The default format if the requested format does not match $formats
+     * @return str
+     */
+    function mostAcceptable($formats, $default = NULL) {
+        foreach (call_user_func_array('array_merge', $this->accept) as $format) {
+            if (in_array($format, $formats)) {
+                return $format;
+            }
+        }
+        return $default;
+    }
+    
+}
+
+/**
+ * Base resource class
+ * @namespace Tonic\Lib
+ */
+class Resource {
+    
+    private $parameters;
+    
+    /**
+     * Resource constructor
+     * @param str[] parameters Parameters passed in from the URL as matched from the URI regex
+     */
+    function  __construct($parameters) {
+        $this->parameters = $parameters;
+    }
+    
+    /**
+     * Convert the object into a string suitable for printing
+     * @return str
+     * @codeCoverageIgnore
+     */
+    function __toString() {
+        $str = get_class($this);
+        foreach ($this->parameters as $name => $value) {
+            $str .= "\n".$name.': '.$value;
+        }
+        return $str;
+    }
+    
+    function secured() 
+    {  
+	try 
+	{
+	    $oauth = new OAuth2(new OAuth2StorageUserCredential());
+	    $token = $oauth->getBearerToken();
+	    $oauth->verifyAccessToken($token);
+	} 
+	catch (OAuth2ServerException $oauthError) 
+	{
+		$oauthError->sendHttpResponse();
+	}
+    }
+    
+    /**
+     * Execute a request on this resource.
+     * @param Request request The request to execute the resource in the context of
+     * @return Response
+     * @throws ResponseException If the HTTP method is not allowed on the resource, a 405 exception is thrown
+     */
+    function exec($request) {
+        
+        if (
+            in_array(strtoupper($request->method), $request->HTTPMethods) &&
+            method_exists($this, $request->method)
+        ) {
+            
+            $method = new ReflectionMethod($this, $request->method);
+            $parameters = array();
+            foreach ($method->getParameters() as $param) {
+                if ($param->name == 'request') {
+                    $parameters[] = $request;
+                } elseif (isset($this->parameters[$param->name])) {
+                    $parameters[] = $this->parameters[$param->name];
+                    unset($this->parameters[$param->name]);
+                } else {
+                    $parameters[] = reset($this->parameters);
+                    array_shift($this->parameters);
+                }
+            }
+            
+            $response = call_user_func_array(
+                array($this, $request->method),
+                $parameters
+            );
+            
+            $responseClassName = class_exists('Tonic\\Response', false) ? 'Tonic\\Response' : 'Response';
+            if (!$response || !($response instanceof $responseClassName)) {
+                throw new Exception('Method '.$request->method.' of '.get_class($this).' did not return a Response object');
+            }
+            
+        } else {
+            
+            // send 405 method not allowed
+            throw new ResponseException(
+                'The HTTP method "'.$request->method.'" is not allowed for the resource "'.$request->uri.'".',
+                Response::METHODNOTALLOWED
+            );
+            
+        }
+        
+        # good for debugging, remove this at some point
+        $response->addHeader('X-Resource', get_class($this));
+        
+        return $response;
+        
+    }
+    
+}
+
+/**
+ * Model the data of the outgoing HTTP response
+ * @namespace Tonic\Lib
+ */
+class Response {
+    
+    /**
+     * HTTP response code constant
+     */
+    const OK = 200,
+          CREATED = 201,
+          NOCONTENT = 204,
+          MOVEDPERMANENTLY = 301,
+          FOUND = 302,
+          SEEOTHER = 303,
+          NOTMODIFIED = 304,
+          TEMPORARYREDIRECT = 307,
+          BADREQUEST = 400,
+          UNAUTHORIZED = 401,
+          FORBIDDEN = 403,
+          NOTFOUND = 404,
+          METHODNOTALLOWED = 405,
+          NOTACCEPTABLE = 406,
+          GONE = 410,
+          LENGTHREQUIRED = 411,
+          PRECONDITIONFAILED = 412,
+          UNSUPPORTEDMEDIATYPE = 415,
+          INTERNALSERVERERROR = 500;
+    
+    /**
+     * The request object generating this response
+     * @var Request
+     */
+    public $request;
+    
+    /**
+     * The HTTP response code to send
+     * @var int
+     */
+    public $code = Response::OK;
+    
+    /**
+     * The HTTP headers to send
+     * @var str[]
+     */
+    public $headers = array();
+    
+    /**
+     * The HTTP response body to send
+     * @var str
+     */
+    public $body;
+    
+    /**
+     * Create a response object.
+     * @param Request request The request object generating this response
+     * @param str uri The URL of the actual resource being used to build the response
+     */
+    function __construct($request, $uri = NULL) {
+        
+        $this->request = $request;
+        
+        if ($uri && $uri != $request->uri) { // add content location header
+            $this->addHeader('Content-Location', $uri);
+            $this->addVary('Accept');
+            $this->addVary('Accept-Language');
+        }
+        $this->addHeader('Allow', implode(', ', $request->allowedMethods));
+        
+    }
+    
+    /**
+     * Convert the object into a string suitable for printing
+     * @return str
+     * @codeCoverageIgnore
+     */
+    function __toString() {
+        $str = 'HTTP/1.1 '.$this->code;
+        foreach ($this->headers as $name => $value) {
+            $str .= "\n".$name.': '.$value;
+        }
+        return $str;
+    }
+    
+    /**
+     * Add a header to the response
+     * @param str header
+     * @param str value
+     */
+    function addHeader($header, $value) {
+        $this->headers[$header] = $value;
+    }
+    
+    /**
+     * Send a cache control header with the response
+     * @param int time Cache length in seconds
+     */
+    function addCacheHeader($time = 86400) {
+        if ($time) {
+            $this->addHeader('Cache-Control', 'max-age='.$time.', must-revalidate');
+        } else {
+            $this->addHeader('Cache-Control', 'no-cache');
+        }
+    }
+    
+    /**
+     * Send an etag with the response
+     * @param str etag Etag value
+     */
+    function addEtag($etag) {
+        $this->addHeader('Etag', '"'.$etag.'"');
+    }
+    
+    function addVary($header) {
+        if (isset($this->headers['Vary'])) {
+            $this->headers['Vary'] .= ', '.$header;
+        } else {
+            $this->addHeader('Vary', $header);
+        }
+    }
+    
+    /**
+     * Output the response
+     * @codeCoverageIgnore
+     */
+    function output() {
+        
+        if (php_sapi_name() != 'cli' && !headers_sent()) {
+            
+            header('HTTP/1.1 '.$this->code);
+            foreach ($this->headers as $header => $value) {
+                header($header.': '.$value);
+            }
+        }
+        
+        if (strtoupper($this->request->method) !== 'HEAD') {
+            echo $this->body;
+        }
+        
+    }
+    
+}
+
+/**
+ * Exception class for HTTP response errors
+ * @namespace Tonic\Lib
+ */
+class ResponseException extends Exception {
+    
+    /**
+     * Generate a default response for this exception
+     * @param Request request
+     * @return Response
+     */
+    function response($request) {
+        $response = new Response($request);
+        $response->code = $this->code;
+        $response->body = $this->message;
+        return $response;
+    }
+    
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/docroot/dispatch.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/docroot/dispatch.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/docroot/dispatch.php	(revision 5888)
@@ -0,0 +1,26 @@
+<?php
+
+// load Tonic library
+require_once '../lib/tonic.php';
+
+// load examples
+require_once '../examples/examples.php';
+
+// handle request
+$request = new Request();
+try {
+    $resource = $request->loadResource();
+    $response = $resource->exec($request);
+
+} catch (ResponseException $e) {
+    switch ($e->getCode()) {
+    case Response::UNAUTHORIZED:
+        $response = $e->response($request);
+        $response->addHeader('WWW-Authenticate', 'Basic realm="Tonic"');
+        break;
+    default:
+        $response = $e->response($request);
+    }
+}
+$response->output();
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/docroot/.htaccess
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/docroot/.htaccess	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/docroot/.htaccess	(revision 5888)
@@ -0,0 +1,6 @@
+<IfModule mod_rewrite.c>
+    RewriteEngine On
+    RewriteCond %{REQUEST_URI} !dispatch\.php$
+    RewriteCond %{REQUEST_FILENAME} !-f
+    RewriteRule .* dispatch.php [L,QSA]
+</IfModule>
Index: sandbox/2.4-expresso-api/prototype/library/tonic/README.markdown
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/README.markdown	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/README.markdown	(revision 5888)
@@ -0,0 +1,233 @@
+PHP library/framework for building Web apps while respecting the 5 principles
+of RESTful design.
+
+ * Give every "thing" an ID (aka URIs)
+ * Link things together (HATEOAS)
+ * Use standard methods (aka the standard interface)
+ * Resources with multiple representations (aka standard document formats)
+ * Communicate statelessly
+
+[See the Tonic site for more info](http://peej.github.com/tonic/).
+
+
+How it works
+============
+
+Everything is a resource, and a resource is defined as a PHP class. An annotation
+wires a URI (or a collection of URIs) to the resource, and methods that match
+the HTTP methods by name allow interaction with it.
+
+    /**
+     * This class defines an example resource that is wired into the URI /example
+     * @uri /example
+     */
+    class ExampleResource extends Resource { }
+
+The incoming HTTP request is turned into a list of negotiated URIs based on the
+accept request headers which can then be used to pick the best representation
+for the response.
+
+    /**
+     * This class defines an example resource that is wired into the URI /example
+     * @uri /example
+     */
+    class ExampleResource extends Resource {
+        
+        function get($request) {
+            
+            $response = new Response($request);
+            
+            $response->code = Response::OK;
+            $response->body = 'Example response';
+            
+            return $response;
+            
+        }
+      
+    }
+
+
+How to get started
+==================
+
+The best place to get started is to get the hello world example running on your
+system, to do this you will need a web server running PHP5.1+.
+
+Place all of the Tonic files into your PHP include path so that other scripts can
+find it. By default on Windows this will probably be in "c:\php\includes\tonic" or
+on Linux/Unix it will be "/usr/share/php/tonic"
+
+Copy "docroot/dispatch.php" into your servers document root and edit it so that the
+require_once statement paths point to the Tonic library and the examples.
+
+Finally you need to route all incoming requests to dispatch.php. How you do this
+depends on your web server. If you are using Apache, the simplest way is to copy
+the .htaccess file from "docroot/.htaccess" into your Apache document root.
+
+
+Features
+========
+
+
+Request URI
+-----------
+
+The URI that is processed for the request when you create the Tonic Request object
+is gather by default from the REQUEST_URI Apache variable. If you need to gather
+the URI from another $_SERVER variable or somewhere else then you can pass it into
+the Request objects constructor as a configuration option:
+
+    $request = new Request(array(
+        'uri' => $_SERVER['PATH_INFO']
+    ));
+
+
+Base URI
+--------
+
+If you want to put your Tonic dispatcher at a URL that isn't the root of a domain
+then you'll need to let the Request object know so that the @uri annotations ignore
+it:
+
+    $request = new Request(array(
+        'baseUri' => '/some/base/uri'
+    ));
+
+Don't put a trailing slash on the end.
+
+
+URI annotations
+---------------
+
+Resources are attached to their URL by their @uri annotation:
+
+    /**
+     * @uri /example
+     */
+    class ExampleResource extends Resource { }
+
+As well as a straight forward URI string, you can also use a regular expression
+so that a resource is tied to a range of URIs:
+
+    /**
+     * @uri /example/([a-z]+)
+     */
+    class ExampleResource extends Resource {
+        function get($request, $parameter) {
+            ...
+        }
+    }
+
+URL template and Rails route style @uri annotations are also supported:
+
+    /**
+     * @uri /users/{username}
+     */
+    class ExampleResource extends Resource {
+        function get($request, $username) {
+            ...
+        }
+    }
+    
+    /**
+     * @uri /users/:username
+     */
+    class ExampleResource extends Resource {
+        function get($request, $username) {
+            ...
+        }
+    }
+
+It is also possible for multiple resource to match the same URI, so you can
+prioritise which resource should be used by specifying a priority level as part
+of the annotation:
+
+    /**
+     * @uri /example/([a-z]+)
+     */
+    class ExampleResource extends Resource { }
+
+    /**
+     * @uri /example/apple 2
+     */
+    class ExampleResource extends Resource { }
+
+By postfixing the @uri annotation with a number, of all the matching resources,
+the one with the highest postfixed number will be used.
+
+
+Mimetypes
+---------
+
+To handle content negotiation via filename style extensions to URLs as well the
+HTTP Accept header, a mapping between extensions and mimetypes can be provided.
+By default this list contains a number of common mappings, if you need to add one
+or more of your own, pass them into the constructor as an array:
+
+    $request = new Request(array(
+        'mimetypes' => array(
+            'ogv' => 'video/ogg'
+        )
+    ));
+
+
+Mount points
+------------
+
+To make resources more portable, it is possible to "mount" them into your URL-space
+by providing a namespace name to URL-space mapping. Every resource within that
+namespace will in effect have the URL-space prefixed to their @uri annotation.
+
+    $request = new Request(array(
+        'mount' => array(
+            'namespaceName' => '/some/mounted/uri'
+        )
+    ));
+
+Again, don't put a trailing slash on the end, and if you aren't using PHP5.3 and
+namespaces, you can use the @namespace annotation.
+
+
+Response exceptions
+-------------------
+
+The Request object and Resource objects can throw ResponseExceptions when a problem
+occurs that the object does not want to handle and so relinquishes control back
+to the dispatcher.
+
+The ResponseException has its code value set to the HTTP response code of the problem
+and its message set to a human readable reason for throwing the exception. The
+ResponseException::response() method can be used to produce a default Response object
+expressing the exception if required.
+
+The Request object throws a 404 ResponseException when the resource to be loaded
+does not exist.
+
+The Resource object throws a 405 ResponseException when the HTTP method from the
+request is not able to be handled by the resource.
+
+If you don't want to handle a problem within your Resource class, you can throw your
+own ResponseException and handle it in the dispatcher. Look at the auth example for
+an example of how.
+
+
+Autoloading classes
+-------------------
+
+If you've got lots of resource classes and don't fancy including them all in your
+dispatcher, you can use the autoload function to load a resource class for a given
+URL-space.
+
+    $request = new Request(array(
+        'autoload' => array(
+            '/example/[a-z]+' => 'ClassName'
+        )
+    ));
+
+In this example, the class ClassName will be autoloaded via [the standard PHP
+__autoload method](http://php.net/manual/en/language.oop5.autoload.php).
+
+
+
+For more information, read the code. Start with the dispatcher "docroot/dispatch.php"
+and then the examples in the "examples" directory.
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/smarty/representations/default.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/smarty/representations/default.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/smarty/representations/default.html	(revision 5888)
@@ -0,0 +1,2 @@
+<p>This is the default content for the Smarty resource.</p>
+<p>Today is {""|@time|date_format}</p>
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/smarty/representations/shell.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/smarty/representations/shell.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/smarty/representations/shell.html	(revision 5888)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>{$title|escape}</title>
+    </head>
+    <body>
+        <h1>{$title|escape}</h1>
+        {$body}
+    </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/smarty/smarty.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/smarty/smarty.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/smarty/smarty.php	(revision 5888)
@@ -0,0 +1,60 @@
+<?php
+
+@include_once 'smarty/Smarty.class.php';
+
+/**
+ * Smarty template example
+ *
+ * Using Smarty for representation generation
+ *
+ * @namespace Tonic\Examples\Filesystem
+ * @uri /smarty
+ */
+class SmartyResource extends Resource {
+    
+    protected $smarty;
+    
+    function __construct() {
+        
+        $this->smarty = new Smarty();
+        $this->smarty->template_dir = '../examples/smarty/representations';
+        $this->smarty->compile_dir = sys_get_temp_dir();
+        
+    }
+    
+    function get($request) {
+        
+        $response = new Response($request);
+        
+        $this->smarty->assign('title', 'Smarty template');
+        $body = $this->render('default');
+        
+        $etag = md5($body);
+        if ($request->ifNoneMatch($etag)) {
+            
+            $response->code = Response::NOTMODIFIED;
+            
+        } else {
+        
+            $response->code = Response::OK;
+            $response->addHeader('Content-type', 'text/html');
+            $response->body = $body;
+            
+        }
+        
+        return $response;
+        
+    }
+    
+    protected function render($view, $format = 'html', $useShell = TRUE) {
+        
+        if ($format == 'html' && $useShell) {
+            $this->smarty->assign('body', $this->smarty->fetch($view.'.'.$format));
+            return $this->smarty->fetch('shell.'.$format);
+        } else {
+            return $this->smarty->fetch($view.'.'.$format);
+        }
+        
+    }
+    
+}
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/auth/auth.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/auth/auth.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/auth/auth.php	(revision 5888)
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * Authentication example
+ *
+ * An example authentication resource, the isSecured() method can be used to ensure
+ * that only authorised users can access the resource.
+ *
+ * username: user
+ * password: pass
+ *
+ * @namespace Tonic\Examples\Auth
+ * @uri /auth
+ */
+class AuthResource extends Resource {
+    
+    const USERNAME = 'user';
+    const PASSWORD = 'pass';
+    
+    function isSecured() {
+        
+        if (
+            isset($_SERVER['PHP_AUTH_USER']) && $_SERVER['PHP_AUTH_USER'] == AuthResource::USERNAME &&
+            isset($_SERVER['PHP_AUTH_PW']) && $_SERVER['PHP_AUTH_PW'] == AuthResource::PASSWORD
+        ) {
+            return;
+        }
+        
+        throw new ResponseException('Incorrect username and password', Response::UNAUTHORIZED);
+        
+    }
+    
+    /**
+     * Handle a GET request for this resource
+     * @param Request request
+     * @return Response
+     */
+    function get($request) {
+        
+        $this->isSecured();
+        
+        $response = new Response($request);
+        
+        $response->body = 'You have access to the secret';
+        
+        return $response;
+        
+    }
+    
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/multirep/multirep.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/multirep/multirep.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/multirep/multirep.php	(revision 5888)
@@ -0,0 +1,99 @@
+<?php
+
+/**
+ * Multiple representation example
+ *
+ * A representation is an output format for a resource. A single resource can have
+ * many output representations that can differ depending on the request data.
+ *
+ * Representations are built up as strings within the Response object and it is
+ * down to the programmer to implement the desired logic for choosing and building
+ * a required representation.
+ *
+ * This example produces three different representations of the resource data
+ * depending on the request accept header information.
+ *
+ * @namespace Tonic\Examples\Multirep
+ * @uri /multirep
+ */
+class MultiRepresentationResource extends Resource {
+    
+    var $data = array(
+        'secret' => 'monkey',
+        'hidden' => 'squirrel'
+    );
+    
+    /**
+     * Handle a GET request for this resource
+     * @param Request request
+     * @return Response
+     */
+    function get($request) {
+        
+        $response = new Response($request);
+        $response->code = Response::OK;
+        
+        // select the most acceptable format of the given types from the request
+        $format = $request->mostAcceptable(array(
+            'json', 'html', 'txt'
+        ));
+        
+        switch ($format) {
+        
+        // obviously it might make more sense to put the HTML in another file
+        // and use some kind of templating system
+        case 'html':
+            $response->addHeader('Content-type', 'text/html');
+            $response->body = '<!DOCTYPE html>';
+            $response->body .= '<html>';
+            $response->body .= '<head>';
+            $response->body .= '<title>HTML Representation</title>';
+            $response->body .= '</head>';
+            $response->body .= '<body>';
+            $response->body .= '<h1>HTML Representation</h1>';
+            $response->body .= '<table border="1">';
+            foreach ($this->data as $field => $value) {
+                $response->body .= '<tr>';
+                $response->body .= '<th>'.htmlspecialchars($field).'</th>';
+                $response->body .= '<td>'.htmlspecialchars($value).'</td>';
+                $response->body .= '</tr>';
+            }
+            $response->body .= '</table>';
+            $response->body .= '<h2>Explicit links to available formats</h2>';
+            $response->body .= '<a href="/multirep.txt">Plain text</a> ';
+            $response->body .= '<a href="/multirep.json">JSON</a> ';
+            $response->body .= '<a href="/multirep.html">HTML</a>';
+            $response->body .= '</body>';
+            $response->body .= '</html>';
+            break;
+        
+        case 'json':
+            $response->addHeader('Content-type', 'application/json');
+            $response->body = json_encode($this->data);
+            break;
+        
+        case 'txt':
+            $response->addHeader('Content-type', 'text/plain');
+            $response->body = "Plain Text Representation\n";
+            $response->body .= "\n";
+            ob_start();
+            var_dump($this->data);
+            $response->body .= ob_get_contents();
+            ob_end_clean();
+            break;
+            
+        // we don't have a suitable format, so do a 406 response instead
+        default:
+            $response->code = Response::NOTACCEPTABLE;
+            $response->addHeader('Content-type', 'text/plain');
+            $response->body = "406 Not Acceptable\n";
+            break;
+            
+        }
+        
+        return $response;
+        
+    }
+    
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/examples.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/examples.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/examples.php	(revision 5888)
@@ -0,0 +1,60 @@
+<?php
+
+require_once 'helloworld/helloworld.php';
+require_once 'filesystem/filesystem.php';
+require_once 'filesystem/filesystemcollection.php';
+require_once 'smarty/smarty.php';
+require_once 'htmlform/htmlform.php';
+require_once 'auth/auth.php';
+require_once 'multirep/multirep.php';
+
+/**
+ * Examples listing
+ * @namespace Tonic\Examples
+ * @uri /
+ */
+class ExamplesListResource extends Resource {
+    
+    function get($request) {
+        
+        $response = new Response($request);
+        
+        $examples = '';
+        $dirs = glob(dirname(__FILE__).DIRECTORY_SEPARATOR.'*', GLOB_ONLYDIR);
+        if ($dirs) {
+            foreach ($dirs as $path) {
+                $location = basename($path);
+                $readme = $path.DIRECTORY_SEPARATOR.$location.'.php';
+                if (file_exists($readme)) {
+                    preg_match('|/\*\*\s*\*\s*(.+?)\*/|s', file_get_contents($readme), $match);
+                    $comment = preg_replace('|\s*\*\s*(@.+)?|', "\n", $match[1]);
+                    $parts = explode("\n\n", $comment);
+                    $name = array_shift($parts);
+                    $description = join(' ', $parts);
+                } else {
+                    $name = $location;
+                    $description = '';
+                }
+                $examples .= 
+                    '<li>'.
+                    '<h3><a href="'.$location.'">'.$name.'</a></h3>'.
+                    '<p>'.$description.'</p>'.
+                    '</li>';
+            }
+        } else {
+            $examples .= '<li>No examples</li>';
+        }
+        
+        $response->body = <<<END
+<h1>Welcome to Tonic</h1>
+<p>Below is a list of example uses of the Tonic library. View each example to see it in action.</p>
+<h2>Examples</h2>
+END;
+        $response->body .= '<ul>'.$examples.'</ul>';
+        
+        return $response;
+        
+    }
+    
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/representations/default.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/representations/default.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/representations/default.html	(revision 5888)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>Default Document</title>
+    </head>
+    <body>
+        <p>Welcome to the filesystem example.</p>
+        <p>The resource "FilesystemResource" in filesystem.php is wired to any URI starting /filesystem and then maps the remaining part of the URI to the filenames on the filesystem within "examples/filesystem/representations".</p>
+        <p>This page is being read from "examples/filesystem/default.html" on the filesystem as it is the default document
+        for the current URL. <a href="filesystem/default.html">You'll also be able to see it at this URL</a>.</p>
+        <p>The FilesystemResource also allows updating of the files by sending PUT and DELETE requests to their mapped URI.</p>
+        <p>The resource "FilesystemCollection" in filesystemcollection.php 
+        <p><a href="filesystem/collection">View a collection resource for the directory "examples/filesystem/representations/collection"</a>.</p>
+        <p>The FilesystemCollection also allows adding of a file to the collection by sending a POST request to the collection URI.</p>
+    </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/representations/collection/one.txt
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/representations/collection/one.txt	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/representations/collection/one.txt	(revision 5888)
@@ -0,0 +1,1 @@
+One
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/representations/collection/one.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/representations/collection/one.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/representations/collection/one.html	(revision 5888)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>One</title>
+    </head>
+    <body>
+        One
+    </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/representations/collection/two.html
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/representations/collection/two.html	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/representations/collection/two.html	(revision 5888)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>Two</title>
+    </head>
+    <body>
+        Two
+    </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/filesystemcollection.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/filesystemcollection.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/filesystemcollection.php	(revision 5888)
@@ -0,0 +1,79 @@
+<?php
+
+/**
+ * Collection resource
+ * @namespace Tonic\Examples\Filesystem
+ * @uri /filesystem/collection
+ */
+class FilesystemCollection extends FilesystemResource {
+    
+    /**
+     * Path to the collections files
+     * @var str
+     */
+    var $collection;
+    
+    function __construct($parameters) {
+        parent::__construct($parameters);
+        $this->collection = dirname(__FILE__).'/representations/collection';
+    }
+    
+    /**
+     * Handle a GET request
+     * @param Request request
+     * @return Response
+     */
+    function get($request) {
+        
+        $response = new Response($request);
+        $collection = str_replace('/', DIRECTORY_SEPARATOR, $this->collection);
+        
+        $resourceUris = '';
+        $files = glob($collection.DIRECTORY_SEPARATOR.'*');
+        if ($files) {
+            foreach ($files as $filepath) {
+            	$filepath = str_replace(DIRECTORY_SEPARATOR, '/', $filepath);
+                $resourceUris .= '<li><a href="'.$this->turnFilePathIntoUri($filepath, $request).'">'.basename($filepath).'</a></li>';
+            }
+        } else {
+            $resourceUris .= '<li>Empty collection</li>';
+        }
+        
+        $response->body = '<ul>'.$resourceUris.'</ul>';
+        
+        return $response;
+        
+    }
+    
+    protected function getNextAvailableItemUri() {
+    	$collection = str_replace('/', DIRECTORY_SEPARATOR, $this->collection);
+        $filename = 1;
+        while (file_exists($collection.DIRECTORY_SEPARATOR.$filename)) {
+            $filename++;
+        }
+        return $this->uriStub.substr($this->collection, strlen($this->path)).'/'.$filename;
+    }
+    
+    function post($request) {
+        
+        $response = new Response($request);
+        
+        if ($request->data) {
+            $uri = $this->getNextAvailableItemUri();
+            $filePath = $this->turnUriIntoFilePath($uri, $request);
+            if (file_put_contents($filePath, $request->data)) {
+                $response->code = Response::CREATED;
+                $response->addHeader('Location', $uri);
+            } else {
+                $response->code = Response::INTERNALSERVERERROR;
+            }
+        } else {
+            $response->code = Response::LENGTHREQUIRED;
+        }
+        
+        return $response;
+        
+    }
+    
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/filesystem.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/filesystem.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/filesystem/filesystem.php	(revision 5888)
@@ -0,0 +1,160 @@
+<?php
+
+/**
+ * Use the filesystem as resource representations
+ *
+ * This example loads files from the filesystem to be used as resource representations
+ * and provides a resource collection to contain them within. It also demonstrates
+ * the ability to add resources to the collection, and update and delete resources
+ * from within the collection.
+ *
+ * @namespace Tonic\Examples\Filesystem
+ * @uri /filesystem(/.*)?
+ */
+class FilesystemResource extends Resource {
+    
+    /**
+     * Path to the files to use
+     * @var str
+     */
+    var $path;
+    
+    /**
+     * URI stub
+     * @var str
+     */
+    var $uriStub = '/filesystem/';
+    
+    /**
+     * The default document to use if the request is for a URI that maps to a directory
+     * @var str
+     */
+    var $defaultDocument = 'default.html';
+    
+    function __construct($parameters) {
+        parent::__construct($parameters);
+        $this->path = dirname(__FILE__).'/representations/';
+    }
+    
+    protected function turnUriIntoFilePath($uri, $request) {
+        return $this->path.DIRECTORY_SEPARATOR.substr($uri, strlen($request->baseUri.$this->uriStub));
+    }
+    
+    protected function turnFilePathIntoUri($path, $request) {
+        return $request->baseUri.$this->uriStub.substr($path, strlen($this->path));
+    }
+    
+    /**
+     * Handle a GET request for this resource by returning the contents of a file matching the request URI
+     * @param Request request
+     * @return Response
+     */
+    function get($request) {
+        
+        // look at all candidate URIs in turn and stop when we find a file that matches one
+        foreach ($request->negotiatedUris as $uri) {
+            
+            // convert URI into filesystem path
+            $filePath = $this->turnUriIntoFilePath($uri, $request);
+            
+            if (substr($filePath, -1, 1) == DIRECTORY_SEPARATOR) { // add a default filename to the path
+                $filePath .= $this->defaultDocument;
+                $uri .= $this->defaultDocument;
+            }
+            
+            if (file_exists($filePath)) { // use this file
+                
+                $response = new Response($request, $uri);
+                
+                // generate etag for the resource based on the files modified date
+                $etag = md5(filemtime($filePath));
+                if ($request->ifNoneMatch($etag)) { // client has matching etag
+                    
+                    $response->code = Response::NOTMODIFIED;
+                    
+                } else {
+                    
+                    $explodedPath = explode('.', $filePath);
+                    $extension = array_pop($explodedPath);
+                    if (isset($request->mimetypes[$extension])) { // add content type header
+                        $response->addHeader('Content-Type', $request->mimetypes[$extension]);
+                    }
+                    
+                    $response->addEtag($etag); // add etag header
+                    
+                    $response->body = file_get_contents($filePath); // set contents
+                    
+                }
+                return $response;
+                
+            }
+            
+        }
+        
+        // nothing found, send 404 response
+        $response = new Response($request);
+        $response->code = Response::NOTFOUND;
+        $response->addHeader('Content-Type', $request->mimetypes['html']);
+        $response->body = '<p>404, nothing found</p>';
+        return $response;
+        
+    }
+    
+    /**
+     * Handle a PUT request for this resource by overwriting the resources contents
+     * @param Request request
+     * @return Response
+     */
+    function put($request) {
+        
+        $response = new Response($request);
+        
+        if ($request->data) {
+            
+            $filePath = $this->turnUriIntoFilePath($request->uri, $request);
+            
+            file_put_contents($filePath, $request->data);
+            
+            $response->code = Response::NOCONTENT;
+            
+        } else {
+            
+            $response->code = Response::LENGTHREQUIRED;
+            
+        }
+        
+        return $response;
+        
+    }
+    
+    /**
+     * Handle a DELETE request for this resource by removing the resources file
+     * @param Request request
+     * @return Response
+     */
+    function delete($request) {
+        
+        $response = new Response($request);
+        
+        $filePath = $this->turnUriIntoFilePath($request->uri, $request);
+        
+        if (file_exists($filePath)) {
+            
+            if (unlink($filePath)) {
+                $response->code = Response::NOCONTENT;
+            } else {
+                $response->code = Response::INTERNALSERVERERROR;
+            }
+            
+            return $response;
+            
+        } else { // nothing found, send 404 response
+            $response->code = Response::NOTFOUND;
+        }
+        
+        return $response;
+        
+    }
+    
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/htmlform/htmlform.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/htmlform/htmlform.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/htmlform/htmlform.php	(revision 5888)
@@ -0,0 +1,66 @@
+<?php
+
+/**
+ * Display and process a HTML form via a HTTP POST request
+ *
+ * This example outputs a simple HTML form and gathers the POSTed data
+ *
+ * @namespace Tonic\Examples\HTMLForm
+ * @uri /htmlform
+ */
+class HTMLForm extends Resource {
+    
+    /**
+     * Handle a GET request for this resource
+     * @param Request request
+     * @return Response
+     */
+    function get($request, $name) {
+        
+        $response = new Response($request);
+        
+        if ($name) {
+            $welcome = "<p>Hello $name.</p>".
+                "<p>Raw POST data:</p>".
+                "<blockquote>$request->data</blockquote>";
+        } else {
+            $welcome = "<p>Enter your name.</p>";
+        }
+        
+        $response->addHeader('Content-type', 'text/html');
+        $response->body = <<<EOF
+<!DOCTYPE html>
+<html>
+    <body>
+        <form action="htmlform" method="post">
+            <label>Name: <input type="text" name="name"></label>
+            <input type="submit">
+        </form>
+        $welcome
+    </body>
+</html>
+EOF;
+        
+        return $response;
+        
+    }
+    
+    /**
+     * Handle a POST request for this resource
+     * @param Request request
+     * @return Response
+     */
+    function post($request) {
+        
+        if (isset($_POST['name'])) {
+            $name = htmlspecialchars($_POST['name']);
+        } else {
+            $name = '';
+        }
+        
+        return $this->get($request, $name);
+        
+    }
+    
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/examples/helloworld/helloworld.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/examples/helloworld/helloworld.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/examples/helloworld/helloworld.php	(revision 5888)
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * The Hello World of Tonic
+ *
+ * This example outputs a simple hello world message and the details of the
+ * request and response as generated by Tonic. It also demonstrates etags and
+ * "if none match" functionality.
+ *
+ * @namespace Tonic\Examples\Helloworld
+ * @uri /helloworld
+ */
+class HelloWorldResource extends Resource {
+    
+    /**
+     * Handle a GET request for this resource
+     * @param Request request
+     * @return Response
+     */
+    function get($request) {
+        
+        $response = new Response($request);
+        
+        $etag = md5($request->uri);
+        if ($request->ifNoneMatch($etag)) {
+            
+            $response->code = Response::NOTMODIFIED;
+            
+        } else {
+            
+            $response->code = Response::OK;
+            $response->addHeader('Content-type', 'text/plain');
+            $response->addEtag($etag);
+            $response->body =
+                "Hello world!\n".
+                "\n".
+                "This request:\n".
+                "\n".
+                $request->__toString()."\n".
+                "\n".
+                "This response:\n".
+                "\n".
+                $response->__toString();
+            
+        }
+        
+        return $response;
+        
+    }
+    
+}
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/features/resource.feature
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/features/resource.feature	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/features/resource.feature	(revision 5888)
@@ -0,0 +1,21 @@
+Feature: Resource object
+  In order to execute code
+  As a PHP developer
+  I want a PHP object that represents a HTTP resource
+  
+  Scenario: Load a non existant resource
+    Given the request URI of "/resourcetest"
+    When I create a request object
+    And I load the resource
+    And execute the request
+    Then the response code should be "404"
+    And the response body should be 'Nothing was found for the resource "/resourcetest".'
+  
+  Scenario: Load a resource that exists
+    Given the request URI of "/resourcetest/one"
+    When I create a request object
+    And I load the resource
+    And execute the request
+    Then the response code should be "200"
+    And the response body should be 'test'
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/features/request.feature
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/features/request.feature	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/features/request.feature	(revision 5888)
@@ -0,0 +1,198 @@
+Feature: HTTP request object
+  In order to handle a request
+  As a PHP developer
+  I want a PHP object that represents the state of the incoming HTTP request
+  
+  Scenario: Have access to the request URI
+    Given the request URI of "/something/otherthing"
+    When I create a request object
+    Then I should see a request URI of "/something/otherthing"
+    
+  Scenario: Have access to the HTTP request method
+    Given the request method of "GET"
+    When I create a request object
+    Then I should see a request method of "GET"
+    
+  Scenario: Receive the request querystring
+    Given the request URI of "/something/otherthing"
+    And the request method of "GET"
+    And the querystring is "?foo=bar"
+    When I create a request object
+    Then I should see a querystring of "foo=bar"
+    
+  Scenario: Have access to the HTTP request method
+    Given the request method of "post"
+    And the request data of "some data"
+    When I create a request object
+    Then I should see a request method of "POST"
+    And I should see the request data "some data"
+    
+  Scenario: Have access to the HTTP request data
+    Given the request method of "PUT"
+    And the request data of "some data"
+    When I create a request object
+    Then I should see a request method of "PUT"
+    And I should see the request data "some data"
+    
+  Scenario: Have bare request URI content negotiated correctly
+    Given the request URI of "/requesttest/one/two"
+    When I create a request object
+    Then I should see a request URI of "/requesttest/one/two"
+    And I should see a negotiated URI of "/requesttest/one/two"
+    And I should see a format negotiated URI of "/requesttest/one/two"
+    And I should see a language negotiated URI of "/requesttest/one/two"
+    
+  Scenario: Have extension request URI content negotiated correctly
+    Given the request URI of "/requesttest/one/two.html"
+    When I create a request object
+    Then I should see a request URI of "/requesttest/one/two"
+    And I should see a negotiated URI of "/requesttest/one/two.html,/requesttest/one/two"
+    And I should see a format negotiated URI of "/requesttest/one/two.html,/requesttest/one/two"
+    And I should see a language negotiated URI of "/requesttest/one/two.html,/requesttest/one/two"
+    
+  Scenario: Have bare request URI with accept header content negotiated correctly
+    Given the request URI of "/requesttest/one/two"
+    And the accept header of "image/png;q=0.5,text/html"
+    When I create a request object
+    Then I should see a request URI of "/requesttest/one/two"
+    And I should see a negotiated URI of "/requesttest/one/two.html,/requesttest/one/two.png,/requesttest/one/two"
+    And I should see a format negotiated URI of "/requesttest/one/two.html,/requesttest/one/two.png,/requesttest/one/two"
+    And I should see a language negotiated URI of "/requesttest/one/two"
+    
+  Scenario: Have extension request URI with accept header content negotiated correctly
+    Given the request URI of "/requesttest/one/two.html"
+    And the accept header of "image/png;q=0.5,text/html"
+    When I create a request object
+    Then I should see a request URI of "/requesttest/one/two"
+    And I should see a negotiated URI of "/requesttest/one/two.html,/requesttest/one/two.png.html,/requesttest/one/two.png,/requesttest/one/two"
+    And I should see a format negotiated URI of "/requesttest/one/two.html,/requesttest/one/two.png,/requesttest/one/two"
+    And I should see a language negotiated URI of "/requesttest/one/two.html,/requesttest/one/two"
+    
+  Scenario: Have bare request URI with language accept header content negotiated correctly
+    Given the request URI of "/requesttest/one/two"
+    And the language accept header of "fr;q=0.5,en"
+    When I create a request object
+    Then I should see a request URI of "/requesttest/one/two"
+    And I should see a negotiated URI of "/requesttest/one/two.en,/requesttest/one/two.fr,/requesttest/one/two"
+    And I should see a format negotiated URI of "/requesttest/one/two"
+    And I should see a language negotiated URI of "/requesttest/one/two.en,/requesttest/one/two.fr,/requesttest/one/two"
+    
+  Scenario: Have extension request URI with language accept header content negotiated correctly
+    Given the request URI of "/requesttest/one/two.html"
+    And the language accept header of "fr;q=0.5,en"
+    When I create a request object
+    Then I should see a request URI of "/requesttest/one/two"
+    And I should see a negotiated URI of "/requesttest/one/two.html.en,/requesttest/one/two.html.fr,/requesttest/one/two.html,/requesttest/one/two.en,/requesttest/one/two.fr,/requesttest/one/two"
+    And I should see a format negotiated URI of "/requesttest/one/two.html,/requesttest/one/two"
+    And I should see a language negotiated URI of "/requesttest/one/two.html,/requesttest/one/two.en,/requesttest/one/two.fr,/requesttest/one/two"
+    
+  Scenario: Have bare request URI with accept and language header content negotiated correctly
+    Given the request URI of "/requesttest/one/two"
+    And the accept header of "image/png;q=0.5,text/html"
+    And the language accept header of "fr;q=0.5,en"
+    When I create a request object
+    Then I should see a request URI of "/requesttest/one/two"
+    And I should see a negotiated URI of "/requesttest/one/two.html.en,/requesttest/one/two.html.fr,/requesttest/one/two.html,/requesttest/one/two.png.en,/requesttest/one/two.png.fr,/requesttest/one/two.png,/requesttest/one/two.en,/requesttest/one/two.fr,/requesttest/one/two"
+    And I should see a format negotiated URI of "/requesttest/one/two.html,/requesttest/one/two.png,/requesttest/one/two"
+    And I should see a language negotiated URI of "/requesttest/one/two.en,/requesttest/one/two.fr,/requesttest/one/two"
+    
+  Scenario: Have extension request URI with accept and language header content negotiated correctly
+    Given the request URI of "/requesttest/one/two.html"
+    And the accept header of "image/png;q=0.5,text/html"
+    And the language accept header of "fr;q=0.5,en"
+    When I create a request object
+    Then I should see a request URI of "/requesttest/one/two"
+    And I should see a negotiated URI of "/requesttest/one/two.html.en,/requesttest/one/two.html.fr,/requesttest/one/two.html,/requesttest/one/two.png.html,/requesttest/one/two.png.en,/requesttest/one/two.png.fr,/requesttest/one/two.png,/requesttest/one/two.en,/requesttest/one/two.fr,/requesttest/one/two"
+    And I should see a format negotiated URI of "/requesttest/one/two.html,/requesttest/one/two.png,/requesttest/one/two"
+    And I should see a language negotiated URI of "/requesttest/one/two.html,/requesttest/one/two.en,/requesttest/one/two.fr,/requesttest/one/two"
+    
+  Scenario: Have if match header
+    Given an if match header of '123123'
+    When I create a request object
+    Then I should see an if match header of "123123"
+    And if match should match "123123"
+    
+  Scenario: Have if match header in quotes
+    Given an if match header of '"123123"'
+    When I create a request object
+    Then I should see an if match header of "123123"
+    And if match should match "123123"
+    
+  Scenario: Have multiple if match headers in quotes
+    Given an if match header of '"123123","456456"'
+    When I create a request object
+    Then I should see an if match header of "123123,456456"
+    And if match should match "123123"
+    And if match should match "456456"
+    
+  Scenario: Have star if match header
+    Given an if match header of '*'
+    When I create a request object
+    Then I should see an if match header of "*"
+    And if match should match "123123"
+    And if match should match "123456"
+    
+  Scenario: Have if none match header
+    Given an if none match header of '123123'
+    When I create a request object
+    Then I should see an if none match header of "123123"
+    And if none match should match "123123"
+    
+  Scenario: Have multiple if none match headers in quotes
+    Given an if none match header of '"123123","456456"'
+    When I create a request object
+    Then I should see an if none match header of "123123,456456"
+    And if none match should match "123123"
+    And if none match should match "456456"
+  
+  Scenario: Have star if none match header
+    Given an if none match header of '*'
+    When I create a request object
+    Then I should see an if none match header of "*"
+    And if none match should not match "123123"
+    And if none match should not match "123456"
+    
+  Scenario: Load a non-existent resource
+    Given the request URI of "/three"
+    When I create a request object
+    And I load the resource
+    Then I should have a response of type "NoResource"
+    
+  Scenario: Load a resource
+    Given the request URI of "/requesttest/one"
+    When I create a request object
+    And I load the resource
+    Then I should have a response of type "NewResource"
+    
+  Scenario: Load a child resource
+    Given the request URI of "/requesttest/one/two"
+    When I create a request object
+    And I load the resource
+    Then I should have a response of type "ChildResource"
+    
+  Scenario: Load a resource with a regex match URI
+    Given the request URI of "/requesttest/three/something/four"
+    When I create a request object
+    And I load the resource
+    Then I should have a response of type "NewResource"
+  
+  Scenario: Load a non-existent resource with a new 404 resource class
+    Given the request URI of "/three"
+    And a 404 resource classname of "NewNoResource"
+    When I create a request object
+    And I load the resource
+    Then I should have a response of type "NewNoResource"
+  
+  Scenario: Resource data loading
+    Given the request URI of "/requesttest/one/two"
+    When I create a request object
+    Then I should see resource "namespace" metadata of "Tonic/Tests"
+    And I should see resource "class" metadata of "ChildResource"
+    And I should see resource "priority" metadata of "0"
+    
+  Scenario: Mounting in a namespace to a URI
+    Given the request URI of "/foo/bar/requesttest/one"
+    And a mounting of "Tonic/Tests" to "/foo/bar"
+    When I create a request object
+    And I load the resource
+    Then I should have a response of type "NewResource"
Index: sandbox/2.4-expresso-api/prototype/library/tonic/features/response.feature
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/features/response.feature	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/features/response.feature	(revision 5888)
@@ -0,0 +1,58 @@
+Feature: Response object
+  In order to output a response representation
+  As a PHP developer
+  I want a PHP object that represents a HTTP response
+  
+  Scenario: Output should be gzipped if the client supports it
+    Given the request URI of "/resourcetest/one"
+    And an accept encoding of "gzip"
+    When I create a request object
+    And I load the resource
+    And execute the request
+    And I process content encoding
+    Then the response header "Content-Encoding" should contain 'gzip'
+    And the response body should be gzipped and be "test"
+
+  Scenario: Output should be deflated if the client supports it
+    Given the request URI of "/resourcetest/one"
+    And an accept encoding of "deflate"
+    When I create a request object
+    And I load the resource
+    And execute the request
+    And I process content encoding
+    Then the response header "Content-Encoding" should contain 'deflate'
+    And the response body should be deflated and be "test"
+
+  Scenario: Output should be compress if the client supports it
+    Given the request URI of "/resourcetest/one"
+    And an accept encoding of "compress"
+    When I create a request object
+    And I load the resource
+    And execute the request
+    And I process content encoding
+    Then the response header "Content-Encoding" should contain 'compress'
+    And the response body should be compressed and be "test"
+
+  Scenario: Responses should have a default cache header
+    Given the request URI of "/resourcetest/one"
+    When I create a request object
+    And I load the resource
+    And execute the request
+    And I add a cache header of ""
+    Then the response header "Cache-Control" should contain 'max-age=86400, must-revalidate'
+
+  Scenario: Responses told not to cache should send a zero cache header
+    Given the request URI of "/resourcetest/one"
+    When I create a request object
+    And I load the resource
+    And execute the request
+    And I add a cache header of "0"
+    Then the response header "Cache-Control" should contain 'no-cache'
+
+  Scenario: Responses given an etag should send an etag response header
+    Given the request URI of "/resourcetest/one"
+    When I create a request object
+    And I load the resource
+    And execute the request
+    And I add an etag header of "123123"
+    Then the response header "Etag" should contain '"123123"'
Index: sandbox/2.4-expresso-api/prototype/library/tonic/features/support/env.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/features/support/env.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/features/support/env.php	(revision 5888)
@@ -0,0 +1,63 @@
+<?php
+
+require_once __DIR__.'/../../lib/tonic.php';
+
+$world->config = array();
+
+/* Test resource definitions */
+
+if (!class_exists('NewResource')) {
+    
+    /**
+     * @namespace Tonic\Tests
+     * @uri /requesttest/one
+     * @uri /requesttest/three/.+/four 12
+     */
+    class NewResource extends Resource {
+    
+    }
+
+}
+
+if (!class_exists('ChildResource')) {
+
+    /**
+     * @namespace Tonic\Tests
+     * @uri /requesttest/one/two
+     */
+    class ChildResource extends NewResource {
+    
+    }
+
+}
+
+if (!class_exists('NewNoResource')) {
+
+    /**
+     * @namespace Tonic\Tests
+     */
+    class NewNoResource extends NoResource {
+    
+    }
+
+}
+
+if (!class_exists('TestResource')) {
+    
+    /**
+     * @namespace Tonic\Tests
+     * @uri /resourcetest/one
+     */
+    class TestResource extends Resource {
+        
+        function get($request) {
+            
+            $response = new Response($request);
+            $response->body = 'test';
+            return $response;
+            
+        }
+        
+    }
+
+}
Index: sandbox/2.4-expresso-api/prototype/library/tonic/features/steps/response.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/features/steps/response.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/features/steps/response.php	(revision 5888)
@@ -0,0 +1,41 @@
+<?php
+
+$steps->Given('/^an accept encoding of "([^"]*)"$/', function($world, $arg1) {
+    $world->config['acceptEncoding'] = $arg1;
+});
+
+$steps->When('/^I process content encoding$/', function($world) {
+    $world->response->doContentEncoding();
+});
+
+$steps->Then('/^the response header "([^"]*)" should contain \'([^\']*)\'$/', function($world, $arg1, $arg2) {
+    if ($world->response->headers[$arg1] != $arg2) throw new Exception;
+});
+
+$steps->Then('/^the response body should be ([^ ]*) and be "([^"]*)"$/', function($world, $arg1, $arg2) {
+    switch ($arg1) {
+    case 'gzipped':
+        var_dump($world->response->body, $arg2, gzencode($arg2));
+        if ($world->response->body != gzencode($arg2)) throw new Exception;
+        break;
+    case 'deflated':
+        if ($world->response->body != gzdeflate($arg2)) throw new Exception;
+        break;
+    case 'compressed':
+        if ($world->response->body != gzcompress($arg2)) throw new Exception;
+        break;
+    }
+});
+
+$steps->Then('/^I add a cache header of "([^"]*)"$/', function($world, $arg1) {
+    if ($arg1 == '') {
+        $world->response->addCacheHeader();
+    } else {
+        $world->response->addCacheHeader($arg1);
+    }
+});
+
+$steps->Then('/^I add an etag header of "([^"]*)"$/', function($world, $arg1) {
+    $world->response->addEtag($arg1);
+});
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/features/steps/resource.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/features/steps/resource.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/features/steps/resource.php	(revision 5888)
@@ -0,0 +1,14 @@
+<?php
+
+$steps->When('/^execute the request$/', function($world) {
+    $world->response = $world->resource->exec($world->request);
+});
+
+$steps->Then('/^the response code should be "([^"]*)"$/', function($world, $arg1) {
+    if ($world->response->code != $arg1) throw new Exception;
+});
+
+$steps->Then('/^the response body should be \'([^\']*)\'$/', function($world, $arg1) {
+    if ($world->response->body != $arg1) throw new Exception;
+});
+
Index: sandbox/2.4-expresso-api/prototype/library/tonic/features/steps/request.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/library/tonic/features/steps/request.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/library/tonic/features/steps/request.php	(revision 5888)
@@ -0,0 +1,106 @@
+<?php
+
+$steps->Given('/^the request URI of "([^"]*)"$/', function($world, $arg1) {
+    $world->config['uri'] = $arg1;
+});
+
+$steps->Given('/^the request method of "([^"]*)"$/', function($world, $arg1) {
+    $world->config['method'] = $arg1;
+});
+
+$steps->Given('/^the request data of "([^"]*)"$/', function($world, $arg1) {
+    $world->config['data'] = $arg1;
+});
+
+$steps->Given('/^the accept header of "([^"]*)"$/', function($world, $arg1) {
+    $world->config['accept'] = $arg1;
+});
+
+$steps->Given('/^the language accept header of "([^"]*)"$/', function($world, $arg1) {
+    $world->config['acceptLang'] = $arg1;
+});
+
+$steps->Given('/^an if match header of \'([^\']*)\'$/', function($world, $arg1) {
+    $world->config['ifMatch'] = $arg1;
+});
+
+$steps->Given('/^an if none match header of \'([^\']*)\'$/', function($world, $arg1) {
+    $world->config['ifNoneMatch'] = $arg1;
+});
+
+$steps->Given('/^a 404 resource classname of "([^"]*)"$/', function($world, $arg1) {
+    $world->config['404'] = $arg1;
+});
+
+$steps->Given('/^a mounting of "([^"]*)" to "([^"]*)"$/', function($world, $arg1, $arg2) {
+    $world->config['mount'][$arg1] = $arg2;
+});
+
+$steps->Given('/^the querystring is "([^"]*)"$/', function($world, $arg1) {
+    $_SERVER['QUERY_STRING'] = $arg1;
+});
+
+$steps->When('/^I create a request object$/', function($world) {
+    $world->request = new Request($world->config);
+});
+
+$steps->When('/^I load the resource$/', function($world) {
+    $world->resource = $world->request->loadResource();
+});
+
+$steps->Then('/^I should see a request URI of "([^"]*)"$/', function($world, $arg1) {
+    if ($world->request->uri != $arg1) throw new Exception;
+});
+
+$steps->Then('/^I should see a request method of "([^"]*)"$/', function($world, $arg1) {
+    if ($world->request->method != $arg1) throw new Exception;
+});
+
+$steps->Then('/^I should see the request data "([^"]*)"$/', function($world, $arg1) {
+    if ($world->request->data != $arg1) throw new Exception;
+});
+
+$steps->Then('/^I should see a negotiated URI of "([^"]*)"$/', function($world, $arg1) {
+    if ($world->request->negotiatedUris != explode(',', $arg1)) throw new Exception;
+});
+
+$steps->Then('/^I should see a format negotiated URI of "([^"]*)"$/', function($world, $arg1) {
+    if ($world->request->formatNegotiatedUris != explode(',', $arg1)) throw new Exception;
+});
+
+$steps->Then('/^I should see a language negotiated URI of "([^"]*)"$/', function($world, $arg1) {
+    if ($world->request->languageNegotiatedUris != explode(',', $arg1)) throw new Exception;
+});
+
+$steps->Then('/^I should have a response of type "([^"]*)"$/', function($world, $arg1) {
+    if (get_class($world->resource) != $arg1) throw new Exception;
+});
+
+$steps->Then('/^I should see an if match header of "([^"]*)"$/', function($world, $arg1) {
+    if ($world->request->ifMatch != explode(',', $arg1)) throw new Exception;
+});
+
+$steps->Then('/^if match should match "([^"]*)"$/', function($world, $arg1) {
+    if (!$world->request->ifMatch($arg1)) throw new Exception;
+});
+
+$steps->Then('/^I should see an if none match header of "([^"]*)"$/', function($world, $arg1) {
+    if ($world->request->ifNoneMatch != explode(',', $arg1)) throw new Exception;
+});
+
+$steps->Then('/^if none match should match "([^"]*)"$/', function($world, $arg1) {
+    if (!$world->request->ifNoneMatch($arg1)) throw new Exception;
+});
+
+$steps->Then('/^if none match should not match "([^"]*)"$/', function($world, $arg1) {
+    if ($world->request->ifNoneMatch($arg1)) throw new Exception;
+});
+
+$steps->Then('/^I should see resource "([^"]*)" metadata of "([^"]*)"$/', function($world, $arg1, $arg2) {
+    if ($world->request->resources[$world->request->uri][$arg1] != $arg2) throw new Exception;
+});
+
+$steps->Then('/^I should see a querystring of "([^"]*)"$/', function($world, $arg1) {
+    if ($world->request->data != '?'.$arg1) throw new Exception("$arg1 does not equal {$world->request->data}");
+});
+
Index: sandbox/2.4-expresso-api/prototype/config/Tonic.srv
===================================================================
--- sandbox/2.4-expresso-api/prototype/config/Tonic.srv	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/config/Tonic.srv	(revision 5888)
@@ -0,0 +1,12 @@
+
+[/maillast]
+MailLastResource = /mail/MailLastResource.php
+
+[/calendarlast]
+CalendarLastResource = /calendar/CalendarLastResource.php
+
+[/newslast]
+NewsLastResource = /news/NewsLastResource.php
+
+[/token]
+TokenResource = /oauth/TokenResource.php
Index: sandbox/2.4-expresso-api/prototype/config/oauthCode.ini
===================================================================
--- sandbox/2.4-expresso-api/prototype/config/oauthCode.ini	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/config/oauthCode.ini	(revision 5888)
@@ -0,0 +1,10 @@
+service = PostgreSQL
+PostgreSQL.concept = auth_codes
+
+[PostgreSQL.mapping]
+redirect_uri = redirect_uri
+scope = scope
+expires = expires
+code = code
+client_id = client_id
+user_id = user_id
Index: sandbox/2.4-expresso-api/prototype/config/oauthToken.ini
===================================================================
--- sandbox/2.4-expresso-api/prototype/config/oauthToken.ini	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/config/oauthToken.ini	(revision 5888)
@@ -0,0 +1,10 @@
+service = PostgreSQL
+PostgreSQL.concept = access_tokens
+
+[PostgreSQL.mapping]
+oauth_token = oauth_token
+client_id = client_id
+user_id = user_id
+expires = expires
+scope = scope
+refresh_token = refresh_token
Index: sandbox/2.4-expresso-api/prototype/config/OpenLDAP.srv
===================================================================
--- sandbox/2.4-expresso-api/prototype/config/OpenLDAP.srv	(revision 5534)
+++ sandbox/2.4-expresso-api/prototype/config/OpenLDAP.srv	(revision 5888)
@@ -5,5 +5,5 @@
 host = 127.0.0.1
 
-;context = dc=exemplo.com
-;user = 
-;password = 
+context = "dc=prognus"
+user = "cn=admin,dc=prognus"
+password = "prognus"
Index: sandbox/2.4-expresso-api/prototype/config/PostgreSQL.srv
===================================================================
--- sandbox/2.4-expresso-api/prototype/config/PostgreSQL.srv	(revision 5534)
+++ sandbox/2.4-expresso-api/prototype/config/PostgreSQL.srv	(revision 5888)
@@ -3,8 +3,7 @@
 [config]
 port = 5432
-dbname= expresso
+dbname= expresso24cristianoAPI
 user=postgres
-host = /var/run/postgresql
-;conexão via tcp
+host = /tmp
 ;host = 127.0.0.1
 
Index: sandbox/2.4-expresso-api/prototype/config/Cyrus.srv
===================================================================
--- sandbox/2.4-expresso-api/prototype/config/Cyrus.srv	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/config/Cyrus.srv	(revision 5888)
@@ -0,0 +1,4 @@
+[config]
+host = 127.0.0.1
+port = 143
+tlsEncryption = true
Index: sandbox/2.4-expresso-api/prototype/config/oauthRefreshToken.ini
===================================================================
--- sandbox/2.4-expresso-api/prototype/config/oauthRefreshToken.ini	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/config/oauthRefreshToken.ini	(revision 5888)
@@ -0,0 +1,10 @@
+service = PostgreSQL
+PostgreSQL.concept = refresh_tokens
+
+[PostgreSQL.mapping]
+refresh_token = refresh_token
+client_id = client_id
+user_id = user_id
+expires = expires
+scope = scope
+refresh_token = refresh_token
Index: sandbox/2.4-expresso-api/prototype/config/user.ini
===================================================================
--- sandbox/2.4-expresso-api/prototype/config/user.ini	(revision 5514)
+++ sandbox/2.4-expresso-api/prototype/config/user.ini	(revision 5888)
@@ -23,5 +23,5 @@
 
 [OpenLDAP.after.find]
-findExternalPaticipants = modules/calendar/interceptors/DBMapping.php
+;findExternalPaticipants = modules/calendar/interceptors/DBMapping.php
 
 [before.update]
@@ -51,2 +51,3 @@
 phpgwAccountType = phpgwAccountType
 phpgwAccountVisible = phpgwAccountVisible
+password = userPassword
Index: sandbox/2.4-expresso-api/prototype/config/oauthCliente.ini
===================================================================
--- sandbox/2.4-expresso-api/prototype/config/oauthCliente.ini	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/config/oauthCliente.ini	(revision 5888)
@@ -0,0 +1,7 @@
+service = PostgreSQL
+PostgreSQL.concept = clients
+
+[PostgreSQL.mapping]
+client_id = client_id
+client_secret = client_secret
+redirect_uri = redirect_uri
Index: sandbox/2.4-expresso-api/prototype/modules/home/css/home.css
===================================================================
--- sandbox/2.4-expresso-api/prototype/modules/home/css/home.css	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/modules/home/css/home.css	(revision 5888)
@@ -0,0 +1,123 @@
+.portlets dl{ float:left; margin: 10px 5px; }
+
+.portlets .event-list dt,
+.portlets .mail-list dt,
+.portlets .news-list dt { display:none; }
+
+.portlets .event-list dd,
+.portlets .mail-list dd,
+.portlets .news-list dd { 
+	min-height: 55px; 
+	height: 55px; 
+	width: 400px; 
+	margin:0 0 5px 0; 
+	padding:8px; 
+	overflow:hidden;
+	background-color:#DDD; 
+	border-radius:8px; 
+	-moz-border-radius:8px; 
+	-webkit-border-radius:4px; 
+}
+
+.portlets .event-list .duration { color:#FF7777; font-size:9px;}
+.portlets .event-list .duration:before{ color:#FF7777; content:"[ "}
+.portlets .event-list .duration:after { color:#FF7777; content:" ]"}
+.portlets .event-list .duration .start:after { color:#FF7777; content:" - "}
+
+.portlets .event-list .title,
+.portlets .news-list .title,
+.portlets .mail-list .title
+{ color:#555; font-weight:bold; font-size:13px;}
+
+.portlets .event-list .description,
+.portlets .news-list .description,
+.portlets .mail-list .description
+{ color:#888;}
+
+.portlets .event-list .month {
+    color: #DDDDDD;
+    display: block;
+    font-size: 11px;
+    line-height: 11px;
+    margin-left: -3px;
+    padding-top: 5px;
+    text-align: center;
+    text-transform: uppercase;
+}
+.portlets .event-list .day {
+    color: #999999;
+    display: block;
+    font-size: 18px;
+    line-height: 18px;
+    margin-left: -3px;
+    padding-top: 8px;
+    text-align: center;
+    text-transform: uppercase;
+}
+.portlets .event-list .date {
+    background-attachment: scroll;
+    background-color: transparent;
+    background-image: url("../img/date-bg-red.png");
+    background-position: 0 0;
+    background-repeat: no-repeat;
+    float: left;
+    height: 49px;
+    width: 45px;
+	margin-right: 10px;
+}
+
+/* ----------- */
+
+.portlets .news-list dd { 
+	min-height: 55px; 
+	height: 130px; 
+	width: 400px; 
+}
+
+.portlets .news-list .date { 
+    background-attachment: scroll;
+    background-color: transparent;
+    background-image: url("../img/boletim.png");
+    background-position: 0 0;
+    background-repeat: no-repeat;
+    float: left;
+    height: 125px;
+    width: 110px;
+	margin-right: 10px;
+}
+.portlets .news-list .date .full{ 
+	font-size:8px;
+	color:#1E5AC6;
+	display:block;
+	margin:10px 0 0 15px;	
+}
+.portlets .news-list .duration {color:#FF7777; font-size:9px;}
+
+/* ----------- */
+
+.portlets .mail-list .date { 
+    background-attachment: scroll;
+    background-color: transparent;
+    background-image: url("../img/mail_unread.png");
+    background-position: 0 0;
+    background-repeat: no-repeat;
+    float: left;
+    height: 72px;
+    width: 72px;
+	margin-right: 10px;
+}
+.portlets .mail-list .date .hasCountdown {
+    color: #1E5AC6;
+    display: block;
+    font-size: 8px;
+    margin-bottom: 0;
+    margin-left: 0;
+    margin-right: 0;
+    margin-top: 44px;
+    overflow: hidden;
+    text-align: center;
+    width: 72px;
+}
+.portlets .mail-list .duration {color:#FF7777; font-size:9px;}
+.portlets .mail-list .from:before {content: "De: "; color:#555; font-size:10px; font-weight:normal;}
+.portlets .mail-list .from { color:#555; font-weight:bold; font-size:11px;}
Index: sandbox/2.4-expresso-api/prototype/modules/home/js/home.js
===================================================================
--- sandbox/2.4-expresso-api/prototype/modules/home/js/home.js	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/modules/home/js/home.js	(revision 5888)
@@ -0,0 +1,30 @@
+$(document).ready(function() {
+	$("#divAppboxHeader").css({fontStyle:'normal'});
+
+	var carlendarResource = DataLayer.read("/calendarlast");
+	var tmplCalendar = DataLayer.render("prototype/modules/home/templates/calendarlast.ejs", {resource: carlendarResource});
+
+
+	var mailResource = DataLayer.read("/maillast");
+	var tmplMail = DataLayer.render("prototype/modules/home/templates/maillast.ejs", {resource: mailResource});
+
+
+	var newsResource = DataLayer.read("/newslast");
+	var tmplNews = DataLayer.render("prototype/modules/home/templates/newslast.ejs", {resource: newsResource});
+
+
+	$(".portlets").append(tmplCalendar);
+	$(".portlets").append(tmplMail);
+	$(".portlets").append(tmplNews);
+
+	jQuery('.date .timable').each(function (i) {
+	    jQuery(this).countdown({
+		    since: new Date(parseInt($(this).text()) * 1000), 
+		    significant: 1,
+		    layout: 'h&aacute; {d<}{dn} {dl} {d>}{h<}{hn} {hl} {h>}{m<}{mn} {ml} {m>}{s<}{sn} {sl}{s>}', 
+		    description: ' atr&aacute;s'
+	    });					
+	});
+
+
+});
Index: sandbox/2.4-expresso-api/prototype/modules/home/templates/newslast.ejs
===================================================================
--- sandbox/2.4-expresso-api/prototype/modules/home/templates/newslast.ejs	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/modules/home/templates/newslast.ejs	(revision 5888)
@@ -0,0 +1,20 @@
+<dl class="news-list" title="Últimas notícias"> 
+    <%if(data.resource && data.resource.length){
+	for(var i = 0; i < data.resource.length; i++){
+	var date = new Date(parseInt(data.resource[i].startTime+'000'));%>
+	    <dt><%=data.resource[i].subject %></dt>
+	    <dd>
+		<div class="date">
+		    <span class="full"><%= date.toString("ddd, d &#100;e MMMM") %></span>
+		</div>
+		<div class="duration">
+			<span class="start"><%= date.toString("ddd, d &#100;e MMMM &#100;e yyyy") %></span>
+		</div>
+		<div class="title"><%=data.resource[i].subject %></div>
+		<div class="description"><%=data.resource[i].content%></div>
+	    </dd>
+	<%}%>
+	<%}else{%>
+	    <dt>Sem resultados</dt>
+	<%}%>   
+</dl>
Index: sandbox/2.4-expresso-api/prototype/modules/home/templates/maillast.ejs
===================================================================
--- sandbox/2.4-expresso-api/prototype/modules/home/templates/maillast.ejs	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/modules/home/templates/maillast.ejs	(revision 5888)
@@ -0,0 +1,16 @@
+<dl class="mail-list" title="Últimas e-mails">
+    <%if(data.resource && data.resource.length){
+	for(var i = 0; i < data.resource.length; i++){%>
+	    <dt><%=data.resource[i].subject %></dt>
+	    <dd>
+		<div class="date">
+		    <span class="timestamp timable"><%=data.resource[i].date%></span>
+		</div>
+		<div class="from" title="<%=data.resource[i].mail%>"><%=data.resource[i].from.name%></div>
+		<div class="description"><%=data.resource[i].subject%></div>
+	    </dd>
+	<%}%>
+	<%}else{%>
+	    <dt>Sem resultados</dt>
+	<%}%>    
+</dl> 
Index: sandbox/2.4-expresso-api/prototype/modules/home/templates/calendarlast.ejs
===================================================================
--- sandbox/2.4-expresso-api/prototype/modules/home/templates/calendarlast.ejs	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/modules/home/templates/calendarlast.ejs	(revision 5888)
@@ -0,0 +1,26 @@
+<dl class="event-list" title="Últimas eventos">
+    <%if(data.resource && data.resource.length){
+	for(var i = 0; i < data.resource.length; i++){
+	var date = new Date(parseInt(data.resource[i].startTime));%>
+	    <dt><%=data.resource[i].summary %></dt>
+	    <dd>
+		<div class="date">
+		    <span class="month"><%= date.toString("MMM") %></span>
+		    <span class="day"><%= date.toString("d") %></span>
+		</div>
+		<div class="duration">
+		    <%if(parseInt(data.resource[i].allDay)){%>
+			<span class="allDay">Durante o dia todo</span>
+		    <%}else{%>
+			<span class="start"><%= date.toString("HH:mm") %></span>
+			<span class="end"><%= new Date(parseInt(data.resource[i].endTime)).toString("HH:mm") %></span>
+		    <%}%>
+		</div>
+		<div class="title"><%=data.resource[i].summary %></div>
+		<div class="description"><%=data.resource[i].description%></div>
+	    </dd>
+	<%}%>
+	<%}else{%>
+	    <dt>Sem resultados</dt>
+	<%}%>    
+</dl>
Index: sandbox/2.4-expresso-api/prototype/modules/calendar/interceptors/DBMapping.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/modules/calendar/interceptors/DBMapping.php	(revision 5752)
+++ sandbox/2.4-expresso-api/prototype/modules/calendar/interceptors/DBMapping.php	(revision 5888)
@@ -175,5 +175,5 @@
         $lastExceptions = Controller::find( array( 'concept' => 'repeatOccurrence' ), array("occurrence") , array( 'filter' => array('AND', array( '=', 'repeat', $id ) , array( '=', 'exception', 1 ) ) ));
 
-        //Recurepa as execeções anteriores caso exista
+        //Recurepa as execeï¿œï¿œes anteriores caso exista
         if(isset($lastExceptions) && count($lastExceptions))
             foreach($lastExceptions as $key => $value)
@@ -236,5 +236,5 @@
 	if( $start || $end )
 	{
-	    Controller::begin( array( 'service' => 'PostgreSQL') );
+	    //Controller::begin( array( 'service' => 'PostgreSQL') );
 
 	    foreach( $result as $id => $res )
@@ -334,5 +334,5 @@
        $u = $result->format('U') * 1000;
 
-       if( $u  > $end ) //data da repetição atual maior que a data final da busca do usuario ?
+       if( $u  > $end ) //data da repetiï¿œï¿œo atual maior que a data final da busca do usuario ?
            break;
 
@@ -632,5 +632,5 @@
                     $result[$i]['calendar'] = Controller::read( array( 'concept' => 'calendar' , 'id' => $v['calendar']), false, false); 
 					$result[$i]['defaultAlarms'] = Controller::find( array( 'concept' => 'calendarSignatureAlarm' ) , false ,array( 'filter' => array('=', 'calendarSignature'  ,  $v['id']) ));    
-					//Caso não seja o dono da agenda retorna o objeto permission com as acls
+					//Caso nï¿œo seja o dono da agenda retorna o objeto permission com as acls
 					if($result[$i]['isOwner'] == 0){
 						$permission = Controller::find( array( 'concept' => 'calendarToPermission'), false ,array( 'filter' => array('AND', array('=', 'calendar' ,  $v['calendar']), array('=', 'user', Config::me('uidNumber') ) ) ) ); 
@@ -749,5 +749,5 @@
                      )));
             
-            return false; /* Mata o restante da execução */
+            return false; /* Mata o restante da execuï¿œï¿œo */
         } 
         
@@ -786,5 +786,5 @@
     public function createDefaultSignature( &$uri , &$result , &$criteria , $original ){
     		     
-    //Caso uma busca não retorne nenhum resultado e foi buscado pelas assinaturas do usuario logado apenas
+    //Caso uma busca nï¿œo retorne nenhum resultado e foi buscado pelas assinaturas do usuario logado apenas
     if(count($result) <= 0 && 
             ( $original['criteria']['filter'][0] == '=' &&
@@ -837,7 +837,7 @@
         else
         {
-         //Criaremos uma agenda padrão
+         //Criaremos uma agenda padrï¿œo
           $cal = array('name' => 'Calendario',
-                         'description' => 'Calendario Padrão',
+                         'description' => 'Calendario Padrï¿œo',
                          'timezone' =>  (date_default_timezone_get()) ? date_default_timezone_get() : 'America/Sao_Paulo',
                          'dtstamp' => time().'000'
Index: sandbox/2.4-expresso-api/prototype/api/datalayer.js
===================================================================
--- sandbox/2.4-expresso-api/prototype/api/datalayer.js	(revision 5724)
+++ sandbox/2.4-expresso-api/prototype/api/datalayer.js	(revision 5888)
@@ -221,4 +221,78 @@
       
 	  return( result );
+    },
+    
+    /**
+    * This method is used to read resources from the server.
+    * 
+    * @param uri Uri of the resource that gonna be readed.
+    * @param callback A function that is called when the resource is loaded successfully. When the parameter is ignored the request is made synchrounsly.
+    * @param accept The attribute accept that is used to ask the target format to the server
+    * @return The target resource when the callback is ommitted ( made it synchronous )
+    */
+
+    read: function( uri, callback, accept ){
+	//return this.send( this.dispatchPath + 'rest' + uri, [ 'get', accept || 'json' ], false, callback );
+	//http://expressodev.prognus.com.br/cristiano/expresso-api/rest/maillast
+	
+	return this.send( ('rest' + uri), [ 'get', accept || 'json' ], true, callback, !!!callback, 
+	{'beforeSend' : function (xhr){ 
+	    xhr.setRequestHeader('Authorization', "OAUTH Bearer " + DataLayer.me.token)} 
+	});
+      
+    },
+
+    /**
+    * This method is used to create resources from the server.
+    * 
+    * @param uri Uri of the resource that gonna be readed.
+    * @param callback A function that is called when the resource is created on the server successfully. When the parameter is ignored the request is made synchrounsly.
+    * @param accept The attribute accept that is used to ask the target format to the server.
+    * @return The result response of the create from the server when the callback is ommitted ( made it synchronous )
+    */
+    
+    create: function( uri, data, callback, accept ){
+      
+	return this.send( this.dispatchPath + 'rest' + uri, [ 'post', accept || 'json' ], data, callback, !!!callback, 
+	{'beforeSend' : function (xhr){ 
+	    xhr.setRequestHeader('Authorization', "OAUTH Bearer " + DataLayer.me.token)} 
+	});
+      
+    },
+
+    /**
+    * This method is used to update resources from the server.
+    * 
+    * @param uri Uri of the resource that gonna be readed.
+    * @param callback A function that is called when the resource is update on the server successfully. When the parameter is ignored the request is made synchrounsly.
+    * @param accept The attribute accept that is used to ask the target format to the server
+    * @return The result response of the update from the server when the callback is ommitted ( made it synchronous )
+    */
+
+    update: function( uri, data, callback, accept ){
+      
+	return this.send( this.dispatchPath + 'rest' + uri, [ 'put', accept || 'json' ], data, callback, !!!callback, 
+	{'beforeSend' : function (xhr){ 
+	    xhr.setRequestHeader('Authorization', "OAUTH Bearer " + DataLayer.me.token)} 
+	});
+      
+    },
+
+    /**
+    * This method is used to delete resources from the server.
+    * 
+    * @param uri Uri of the resource that gonna be readed.
+    * @param callback A function that is called when the resource is deleted successfully in the server. When the parameter is ignored the request is made synchrounsly.
+    * @param accept The attribute accept that is used to ask the target format to the server
+    * @return The result response of the delete from the server when the callback is ommitted ( made it synchronous )
+    */
+
+    "delete": function( uri, callback, accept ){
+      
+	return this.send( this.dispatchPath + 'rest' + uri, [ 'delete', accept || 'json' ], false, callback, !!!callback, 
+	{'beforeSend' : function (xhr){ 
+	    xhr.setRequestHeader('Authorization', "OAUTH Bearer " + DataLayer.me.token)} 
+	});
+      
     },
     
@@ -1991,5 +2065,5 @@
 
 	if( !this.dispatchPath )
-	    this.dispatchPath = "../../";
+	    this.dispatchPath = "prototype/";
 
 	if( !this.templatePath )
@@ -2006,4 +2080,5 @@
 
 	this.start();
+	this.me = this.dispatch( "me" );
     }
 }
Index: sandbox/2.4-expresso-api/prototype/api/config.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/api/config.php	(revision 5764)
+++ sandbox/2.4-expresso-api/prototype/api/config.php	(revision 5888)
@@ -20,6 +20,5 @@
     
     static function me($config)
-    {
-        
+    {	
         return isset($_SESSION['wallet']['user'][$config]) ? $_SESSION['wallet']['user'][$config] : false;
     }
Index: sandbox/2.4-expresso-api/prototype/rest/oauth/authorize.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/rest/oauth/authorize.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/rest/oauth/authorize.php	(revision 5888)
@@ -0,0 +1,67 @@
+<?php
+/**
+ * @file
+ * Sample authorize endpoint.
+ *
+ * This sample provides two click-jacking prevention methods, neither which are perfect. 
+ * The javascript solution is similar to what facebook used to have (but can be defeated with a 
+ * specially crafted frame-wrapper).
+ */
+
+// Clickjacking prevention (supported by IE8+, FF3.6.9+, Opera10.5+, Safari4+, Chrome 4.1.249.1042+)
+header('X-Frame-Options: DENY');
+
+require "lib/OAuth2StoragePdo.php";
+
+/*
+ * You would need to authenticate the user before authorization.
+ * 
+ * Below is some psudeo-code to show what you might do:
+ * 
+session_start();
+if (!isLoggedIn()) {
+	redirectToLoginPage();
+	exit();
+}
+ */
+
+$oauth = new OAuth2(new OAuth2StoragePDO());
+
+if ($_POST) {
+	$userId = '12345'; // Use whatever method you have for identifying users.
+	$oauth->finishClientAuthorization($_POST["accept"] == "Yep", $userId, $_POST);
+}
+
+try {
+	$auth_params = $oauth->getAuthorizeParams();
+} catch (OAuth2ServerException $oauthError) {
+	$oauthError->sendHttpResponse();
+}
+
+?>
+<html>
+<head>
+<title>Authorize</title>
+<script>
+	if (top != self) {
+		window.document.write("<div style='background:black; opacity:0.5; filter: alpha (opacity = 50); position: absolute; top:0px; left: 0px;"
+		+ "width: 9999px; height: 9999px; zindex: 1000001' onClick='top.location.href=window.location.href'></div>");
+	}
+  </script>
+</head>
+<body>
+<form method="post" action="authorize.php">
+ 
+    
+      <?php 
+      foreach ($auth_params as $key => $value) : ?>
+      	<input type="hidden"
+	name="<?php echo htmlspecialchars($key, ENT_QUOTES); ?>"
+	value="<?php echo htmlspecialchars($value, ENT_QUOTES); ?>" />
+      <?php endforeach; ?>
+      Do you authorize the app to do its thing?
+      <p><input type="submit" name="accept" value="Yep" /> <input
+	type="submit" name="accept" value="Nope" /></p>
+</form>
+</body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/rest/oauth/mysql_create_tables.sql
===================================================================
--- sandbox/2.4-expresso-api/prototype/rest/oauth/mysql_create_tables.sql	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/rest/oauth/mysql_create_tables.sql	(revision 5888)
@@ -0,0 +1,36 @@
+SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
+
+CREATE TABLE `auth_codes` (
+  `code` varchar(40) NOT NULL,
+  `client_id` varchar(40) NOT NULL,
+  `user_id` int(11) UNSIGNED NOT NULL,
+  `redirect_uri` varchar(200) NOT NULL,
+  `expires` int(11) NOT NULL,
+  `scope` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`code`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE `clients` (
+  `client_id` varchar(40) NOT NULL,
+  `client_secret` varchar(20) NOT NULL,
+  `redirect_uri` varchar(255) NOT NULL,
+  PRIMARY KEY (`client_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE `access_tokens` (
+  `oauth_token` varchar(40) NOT NULL,
+  `client_id` varchar(40) NOT NULL,
+  `user_id` int(11) UNSIGNED NOT NULL,
+  `expires` int(11) NOT NULL,
+  `scope` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`oauth_token`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE `refresh_tokens` (
+  `refresh_token` varchar(40) NOT NULL,
+  `client_id` varchar(40) NOT NULL,
+  `user_id` int(11) UNSIGNED NOT NULL,
+  `expires` int(11) NOT NULL,
+  `scope` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`refresh_token`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Index: sandbox/2.4-expresso-api/prototype/rest/oauth/protected_resource.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/rest/oauth/protected_resource.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/rest/oauth/protected_resource.php	(revision 5888)
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * @file
+ * Sample protected resource.
+ *
+ * Obviously not production-ready code, just simple and to the point.
+ *
+ * In reality, you'd probably use a nifty framework to handle most of the crud for you.
+ */
+
+require "lib/OAuth2StoragePdo.php";
+
+try {
+	$oauth = new OAuth2(new OAuth2StoragePDO());
+	$token = $oauth->getBearerToken();
+	$oauth->verifyAccessToken($token);
+} catch (OAuth2ServerException $oauthError) {
+	$oauthError->sendHttpResponse();
+}
+
+// With a particular scope, you'd do:
+// $oauth->verifyAccessToken("scope_name");
+
+
+?>
+
+<html>
+	<head>
+		<title>Hello!</title>
+	</head>
+	<body>
+		<p>This is a secret.</p>
+	</body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/rest/oauth/OAuth2StorageUserCredential.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/rest/oauth/OAuth2StorageUserCredential.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/rest/oauth/OAuth2StorageUserCredential.php	(revision 5888)
@@ -0,0 +1,279 @@
+<?php
+
+require ROOTPATH . '/library/oauth2/lib/OAuth2.php';
+require ROOTPATH . '/library/oauth2/lib/IOAuth2Storage.php';
+require ROOTPATH . '/library/oauth2/lib/IOAuth2GrantCode.php';
+require ROOTPATH . '/library/oauth2/lib/IOAuth2RefreshTokens.php';
+
+require ROOTPATH . '/library/oauth2/lib/IOAuth2GrantUser.php';
+
+
+class OAuth2StorageUserCredential implements IOAuth2GrantUser, IOAuth2RefreshTokens {
+
+	public function checkUserCredentials($client_id, $username, $password) {
+	    
+		//Authentica no LDAP
+		$usuario =  Controller::find(array('concept'=>'user' , 'service' => 'OpenLDAP'), false , array('filter' => array('AND', array('=' , 'uid' , $username ), array('=' , 'password', '{md5}' . base64_encode(pack("H*",md5($password))))  ) ));
+
+		if(isset($usuario[0]['id']))
+		{
+		    return array('scope' => 'all' , 'user_id' => $usuario[0]['id']);
+		}
+
+		return false;
+	}
+	
+	/**
+	 * Make sure that the client credentials is valid.
+	 * 
+	 * @param $client_id
+	 * Client identifier to be check with.
+	 * @param $client_secret
+	 * (optional) If a secret is required, check that they've given the right one.
+	 *
+	 * @return
+	 * TRUE if the client credentials are valid, and MUST return FALSE if it isn't.
+	 * @endcode
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-3.1
+	 *
+	 * @ingroup oauth2_section_3
+	 */
+	public function checkClientCredentials($client_id, $client_secret = NULL) {
+		if($client_secret == NULL) {
+			return false;
+		}
+
+		$res =  Controller::find(array('concept' => 'oauthCliente'), array('client_secret') , array('filter' => array('=' , 'client_id' , $client_id)) );
+
+		if(isset($res[0]['client_secret']) && $res[0]['client_secret'] == $client_secret) {
+			return true;
+		}
+		else {
+			return false;
+		}
+	}
+
+	/**
+	 * Get client details corresponding client_id.
+	 *
+	 * OAuth says we should store request URIs for each registered client.
+	 * Implement this function to grab the stored URI for a given client id.
+	 *
+	 * @param $client_id
+	 * Client identifier to be check with.
+	 *
+	 * @return array
+	 * Client details. Only mandatory item is the "registered redirect URI", and MUST
+	 * return FALSE if the given client does not exist or is invalid.
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	public function getClientDetails($client_id) {
+		$res =  Controller::find(array('concept' => 'oauthCliente'), array('redirect_uri') , array('filter' => array('=' , 'client_id' , $client_id)));
+		if(isset($res[0]['redirect_uri'])) {
+			return $res[0]['redirect_uri'];
+		}
+		else {
+			return false;
+		}
+	}
+
+	/**
+	 * Look up the supplied oauth_token from storage.
+	 *
+	 * We need to retrieve access token data as we create and verify tokens.
+	 *
+	 * @param $oauth_token
+	 * oauth_token to be check with.
+	 *
+	 * @return
+	 * An associative array as below, and return NULL if the supplied oauth_token
+	 * is invalid:
+	 * - client_id: Stored client identifier.
+	 * - expires: Stored expiration in unix timestamp.
+	 * - scope: (optional) Stored scope values in space-separated string.
+	 *
+	 * @ingroup oauth2_section_7
+	 */
+	public function getAccessToken($oauth_token) {
+		return $this->getToken($oauth_token, false);
+	}
+
+	/**
+	 * Take the provided refresh token values and store them somewhere.
+	 *
+	 * This function should be the storage counterpart to getRefreshToken().
+	 *
+	 * If storage fails for some reason, we're not currently checking for
+	 * any sort of success/failure, so you should bail out of the script
+	 * and provide a descriptive fail message.
+	 *
+	 * Required for OAuth2::GRANT_TYPE_REFRESH_TOKEN.
+	 *
+	 * @param $refresh_token
+	 * Refresh token to be stored.
+	 * @param $client_id
+	 * Client identifier to be stored.
+	 * @param $expires
+	 * expires to be stored.
+	 * @param $scope
+	 * (optional) Scopes to be stored in space-separated string.
+	 *
+	 * @ingroup oauth2_section_6
+	 */
+	public function setRefreshToken($refresh_token, $client_id, $user_id, $expires, $scope = NULL) {
+		
+		$data = array();
+		$data['refresh_token']  = $refresh_token;
+		$data['client_id'] = $client_id;
+		$data['user_id'] = $user_id;
+		$data['expires'] = $expires;
+		$data['scope'] = $scope;
+
+	        Controller::create(array('concept' => 'oauthRefreshToken'), $data);
+	}
+	
+	/**
+	 * Store the supplied access token values to storage.
+	 *
+	 * We need to store access token data as we create and verify tokens.
+	 *
+	 * @param $oauth_token
+	 * oauth_token to be stored.
+	 * @param $client_id
+	 * Client identifier to be stored.
+	 * @param $user_id
+	 * User identifier to be stored.
+	 * @param $expires
+	 * Expiration to be stored.
+	 * @param $scope
+	 * (optional) Scopes to be stored in space-separated string.
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	public function setAccessToken($oauth_token, $client_id, $user_id, $expires, $scope = NULL, $refresh_token) {
+	   
+		$data = array();
+		$data['oauth_token']  = $oauth_token;
+		$data['client_id'] = $client_id;
+		$data['user_id'] = $user_id;
+		$data['expires'] = $expires;
+		$data['scope'] = $scope;
+		$data['refresh_token'] = $refresh_token;
+		
+		Controller::create(array('concept' => 'oauthToken'), $data);
+
+	}
+
+	/**
+	 * Check restricted grant types of corresponding client identifier.
+	 *
+	 * If you want to restrict clients to certain grant types, override this
+	 * function.
+	 *
+	 * @param $client_id
+	 * Client identifier to be check with.
+	 * @param $grant_type
+	 * Grant type to be check with, would be one of the values contained in
+	 * OAuth2::GRANT_TYPE_REGEXP.
+	 *
+	 * @return
+	 * TRUE if the grant type is supported by this client identifier, and
+	 * FALSE if it isn't.
+	 *
+	 * @ingroup oauth2_section_4
+	 */
+	public function checkRestrictedGrantType($client_id, $grant_type) {
+		/*TODO: essa funÃ§Ã£o deve verificar se o cliente tem permissao para realizar o login via 'password'
+		 * deixe para implementar no prox. sprint, quando trataremos de seguranca. Deve-se criar um campo extra no banco para guardar quais tipos
+		 * de grant_type o cliente esta autorizado a fazer
+		*/
+
+		return true;		
+	}
+
+	/**
+	 * Grant refresh access tokens.
+	 *
+	 * Retrieve the stored data for the given refresh token.
+	 *
+	 * Required for OAuth2::GRANT_TYPE_REFRESH_TOKEN.
+	 *
+	 * @param $refresh_token
+	 * Refresh token to be check with.
+	 *
+	 * @return
+	 * An associative array as below, and NULL if the refresh_token is
+	 * invalid:
+	 * - client_id: Stored client identifier.
+	 * - expires: Stored expiration unix timestamp.
+	 * - scope: (optional) Stored scope values in space-separated string.
+	 *
+	 * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-6
+	 *
+	 * @ingroup oauth2_section_6
+	 */
+	public function getRefreshToken($refresh_token) {
+		return $this->getToken($refresh_token, true);
+	}
+
+	/**
+	 * Expire a used refresh token.
+	 *
+	 * This is not explicitly required in the spec, but is almost implied.
+	 * After granting a new refresh token, the old one is no longer useful and
+	 * so should be forcibly expired in the data store so it can't be used again.
+	 *
+	 * If storage fails for some reason, we're not currently checking for
+	 * any sort of success/failure, so you should bail out of the script
+	 * and provide a descriptive fail message.
+	 *
+	 * @param $refresh_token
+	 * Refresh token to be expirse.
+	 *
+	 * @ingroup oauth2_section_6
+	 */
+	public function unsetRefreshToken($refresh_token) {
+		Controller::delete(
+			array('concept' => 'oauthRefreshToken'),
+			false,
+			array('filter' => array('=', 'refresh_token', $refresh_token ))
+		);
+	}
+	public function unsetAccessToken($refresh_token) {
+		Controller::delete(
+			array('concept' => 'oauthToken'),
+			false,
+			array('filter' => array('=', 'oauth_token', $refresh_token ))
+		);
+	}
+
+	/**
+	 * Retrieves an access or refresh token.
+	 * 
+	 * @param string $token
+	 * @param bool $refresh
+	 */
+	protected function getToken($token, $isRefresh = true) {
+
+		$tokenConcept = $isRefresh ? 'oauthRefreshToken' : 'oauthToken';
+		$filter =  $isRefresh ? 'refresh_token' : 'oauth_token';
+		
+		$res = Controller::find(
+			array('concept' => $tokenConcept), 
+			false, 
+			array('filter' => array('=' , $filter , $token))
+		);
+
+		/*return (!empty($res[0]))? $res[0] : false;*/
+		if(!empty($res[0])) {
+			return $res[0];
+		}
+		else {
+			return false;
+		}
+	}
+}
+
+
Index: sandbox/2.4-expresso-api/prototype/rest/oauth/hello.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/rest/oauth/hello.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/rest/oauth/hello.php	(revision 5888)
@@ -0,0 +1,4 @@
+<?php
+
+
+?>
Index: sandbox/2.4-expresso-api/prototype/rest/oauth/addclient.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/rest/oauth/addclient.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/rest/oauth/addclient.php	(revision 5888)
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * @file
+ * Sample client add script.
+ *
+ * Obviously not production-ready code, just simple and to the point.
+ */
+
+require "lib/OAuth2StoragePdo.php";
+
+if ($_POST && isset($_POST["client_id"]) && isset($_POST["client_secret"]) && isset($_POST["redirect_uri"])) {
+	$oauth = new OAuth2StoragePDO();
+	$oauth->addClient($_POST["client_id"], $_POST["client_secret"], $_POST["redirect_uri"]);
+}
+
+?>
+
+<html>
+  <head>
+  	<title>Add Client</title>
+  </head>
+  <body>
+    <form method="post" action="addclient.php">
+      <p>
+        <label for="client_id">Client ID:</label>
+        <input type="text" name="client_id" id="client_id" />
+      </p>
+      <p>
+        <label for="client_secret">Client Secret (password/key):</label>
+        <input type="text" name="client_secret" id="client_secret" />
+      </p>
+      <p>
+        <label for="redirect_uri">Redirect URI:</label>
+        <input type="text" name="redirect_uri" id="redirect_uri" />
+      </p>
+      <input type="submit" value="Submit" />
+    </form>
+  </body>
+</html>
Index: sandbox/2.4-expresso-api/prototype/rest/oauth/TokenResource.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/rest/oauth/TokenResource.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/rest/oauth/TokenResource.php	(revision 5888)
@@ -0,0 +1,29 @@
+<?php
+
+/*
+ * @uri /token
+ */
+
+require_once dirname(__FILE__).'/../../api/controller.php';
+
+require_once 'OAuth2StorageUserCredential.php';
+
+class TokenResource extends Resource {
+
+	public function post($request) {
+		$res = new Response($request);
+
+		try {
+			$oauth = new OAuth2(new Oauth2StorageUserCredential());
+			$oauth->grantAccessToken($_POST);
+		} 
+		catch (OAuth2ServerException $oauthError) {
+			$oauthError->sendHttpResponse();
+		}
+		
+		return $res;
+	}
+
+}
+
+?>
Index: sandbox/2.4-expresso-api/prototype/rest/mail/MailLastResource.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/rest/mail/MailLastResource.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/rest/mail/MailLastResource.php	(revision 5888)
@@ -0,0 +1,97 @@
+<?php
+ 
+class MailLastResource extends Resource {
+ 
+    /**
+    * Busca as Ãºltimas 20 menssagens nÃ£o lidas do usuÃ¡rio
+    *
+    * @license    http://www.gnu.org/copyleft/gpl.html GPL
+    * @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+    * @sponsor    Caixa EconÃŽmica Federal
+    * @author     Cristiano CorrÃªa Schmidt
+    * @return     Lista das ultimas 10 menssagens do usuÃ¡rio nÃ£o lidas
+    * @access     public
+    **/
+    function get($request) 
+    {
+	$this->secured();
+	
+        $response = new Response($request);
+        $response->code = Response::OK;
+        $response->addHeader('Content-type', 'aplication/json');
+		
+	$cyrus = Config::service('Cyrus', 'config');
+	$options = ($cyrus['tlsEncryption']) ? '/tls/novalidate-cert' : '/notls/novalidate-cert'; 
+	$mbox = imap_open( '{'.$cyrus['host'].":".$cyrus['port'].$options.'}INBOX' , Config::me('uid') , Config::me('password') );
+	
+	$msgIds = imap_sort( $mbox , SORTDATE , 1 , null , "UNSEEN" , 'UTF-8');
+	$msgIds = array_splice($msgIds , 0 , 20);
+	
+	$return = array();
+	
+	foreach ($msgIds as $key => &$value) 
+	{    
+	      $header = imap_headerinfo( $mbox, $value );
+	      $return[$key]['subject'] = ( isset($header->subject) && trim($header->subject) !== '' ) ?  self::decodeMimeString($header->subject) : 'No Subject';
+	      $return[$key]['date'] =  $header->udate;
+	      $return[$key]['from'] =  (isset( $header->from[0] )) ? self::formatMailObject( $header->from[0] ) : array( 'name' => '' , 'mail' => '');
+	}
+
+	$response->body = json_encode($return);
+	
+	imap_close($mbox);
+	return $response;
+    }
+
+    
+    
+    /**
+    *  Decodifica os tokens encontrados na funÃ§Ã£o decodeMimeString
+    * 
+    * @license    http://www.gnu.org/copyleft/gpl.html GPL
+    * @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+    * @sponsor    Caixa EconÃ³mica Federal
+    * @author     Cristiano CorrÃªa Schmidt
+    * @return     bool
+    * @access     public
+    */
+    static private function decodeMimeStringCallback( $mathes )
+    {
+       $str = (strtolower($mathes[2]) == 'q') ?  quoted_printable_decode(str_replace('_','=20',$mathes[3])) : base64_decode( $mathes[3]) ;
+       return ( strtoupper($mathes[1]) == 'ISO-8859-1' ) ? mb_convert_encoding(  $str , 'UTF-8' , 'ISO-8859-1') : $str;
+    }
+
+    /**
+    *  Decodifica uma string no formato mime RFC2047
+    *
+    * @license    http://www.gnu.org/copyleft/gpl.html GPL
+    * @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+    * @sponsor    Caixa EconÃ³mica Federal
+    * @author     Cristiano CorrÃªa Schmidt
+    * @return     bool
+    * @access     public
+    */
+    static private function decodeMimeString( $string )
+    {
+      $string =  preg_replace('/\?\=(\s)*\=\?/', '?==?', $string);
+      return preg_replace_callback( '/\=\?([^\?]*)\?([qb])\?([^\?]*)\?=/i' ,array( 'self' , 'decodeMimeStringCallback'), $string);
+    }
+    
+     /**
+    *  Formata um mailObject para um array com name e email
+    *
+    * @license    http://www.gnu.org/copyleft/gpl.html GPL
+    * @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+    * @sponsor    Caixa EconÃ³mica Federal
+    * @author     Cristiano CorrÃªa Schmidt
+    * @return     bool
+    * @access     public
+    */
+    static private function formatMailObject( $obj )
+    {
+	$return = array();
+	$return['mail'] = self::decodeMimeString($obj->mailbox) . (( isset( $obj->host) && $obj->host != ('unspecified-domain') &&  $obj->host !=  '.SYNTAX-ERROR.')? '@'. $obj->host : '');
+	$return['name'] = ( isset( $obj->personal ) && trim($obj->personal) !== '' ) ? self::decodeMimeString($obj->personal) :  $return['mail'];
+	return $return;
+    }
+}
Index: sandbox/2.4-expresso-api/prototype/rest/dispatch.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/rest/dispatch.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/rest/dispatch.php	(revision 5888)
@@ -0,0 +1,58 @@
+<?php
+ini_set('display_errors', 'on');
+// load Tonic library
+require_once __DIR__ . '/../library/tonic/lib/tonic.php';
+require_once __DIR__ . '/../api/controller.php';
+require_once ROOTPATH . '/rest/oauth/OAuth2StorageUserCredential.php';
+
+
+//Retrieveing the mapping of the URIs and his respectives classNames and classPath
+$config = parse_ini_file( __DIR__ . '/../config/Tonic.srv', true );
+
+//looping through the mapping to create 2 separated maps:
+// First indexed by the uri that carry the classNames, 
+// that its used by Tonic to autoload them when routed by him accordingly;
+// Second indexed by the className that carry the classPaths,
+// used by the autoload register to find the correct path of the class that's going to
+// be loaded;
+
+$autoload = array();
+$classpath = array();
+
+foreach( $config as $uri => $classFile )
+    foreach( $classFile as $className => $filePath )
+    {
+	$autoload[ $uri ] = $className;
+	$classpath[ $className ] = $filePath;
+    }
+
+//The autoload function that's called by the PHP when Tonic routes a class not declared previously
+function __autoload($class) {
+
+	global $classpath;
+
+	require_once(__DIR__ . $classpath[ $class ] );
+}
+
+// handle request, passing the current env baseUri and autoload mapping;
+$request = new Request(array(
+	'baseUri'=> '/cristiano/expresso-api/rest',
+	'autoload' => $autoload,
+));
+
+try {
+    $resource = $request->loadResource();
+    $response = $resource->exec($request);
+
+} catch (ResponseException $e) {
+    switch ($e->getCode()) {
+    case Response::UNAUTHORIZED:
+        $response = $e->response($request);
+        $response->addHeader('WWW-Authenticate', 'Basic realm="Tonic"');
+        break;
+    default:
+        $response = $e->response($request);
+    }
+}
+$response->output();
+
Index: sandbox/2.4-expresso-api/prototype/rest/arquivos
===================================================================
--- sandbox/2.4-expresso-api/prototype/rest/arquivos	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/rest/arquivos	(revision 5888)
@@ -0,0 +1,3 @@
+Arquivos do expresso modificados
+
+header.inc.php
Index: sandbox/2.4-expresso-api/prototype/rest/calendar/CalendarLastResource.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/rest/calendar/CalendarLastResource.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/rest/calendar/CalendarLastResource.php	(revision 5888)
@@ -0,0 +1,51 @@
+<?php
+
+class CalendarLastResource extends Resource{
+
+    
+    /**
+    * Busca os eventos contidos nas agendas assinas do usuÃ¡rio
+    *
+    * @license    http://www.gnu.org/copyleft/gpl.html GPL
+    * @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+    * @sponsor    Caixa EconÃŽmica Federal
+    * @author     Adriano Coutinho da Silva
+    * @return     Lista dos ultimos 10 eventos do usuÃ¡rio
+    * @access     public
+    **/
+    function GET($request){
+	$this->secured();
+	
+	$calendar = Controller::find( array( 'concept' => 'calendarSignature' ), array('calendar'), array( 'filter' => array( '=', 'user',  Config::me("uidNumber") ) ) );
+
+	
+	
+	
+	if($calendar){
+	    $calendars = array();
+	    $timezones = array();
+
+	    foreach($calendar as $key => $value)
+		array_push($calendars, $value['calendar']);
+
+	    $calendarTimezone = Controller::find( array( 'concept' => 'calendar' ), array('id', 'timezone'), array( 'filter' => array( 'IN', 'id',  $calendars ) ) );
+
+	    foreach($calendarTimezone as $key => $value)
+		$timezones[ $value['id'] ] = $value['timezone'];
+
+
+	    $schedulables = Controller::find( array( 'concept' => 'schedulable' ), false, 
+		    array( 'filter' => array('AND', array('>=','rangeStart', (time() - 86400).'000'), array('<=','rangeEnd', (time() + 2592000).'000') ,array( 'IN', 'calendar', $calendars )), 'deepness' => 2, 'timezones' => $timezones) );
+
+	}
+	
+	$response = new Response($request);
+	$response->code = Response::OK;
+	$response->addHeader('Content-type', 'aplication/json');
+
+	$response->body = json_encode(( isset($schedulables) && $schedulables) ?  $schedulables : array());
+	return $response;
+    }
+}
+
+?>
Index: sandbox/2.4-expresso-api/prototype/rest/.htaccess
===================================================================
--- sandbox/2.4-expresso-api/prototype/rest/.htaccess	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/rest/.htaccess	(revision 5888)
@@ -0,0 +1,6 @@
+<IfModule mod_rewrite.c>
+    RewriteEngine On
+    RewriteCond %{REQUEST_URI} !dispatch\.php$
+    RewriteCond %{REQUEST_FILENAME} !-f
+    RewriteRule .* dispatch.php [L,QSA]
+</IfModule>
Index: sandbox/2.4-expresso-api/prototype/rest/news/NewsLastResource.php
===================================================================
--- sandbox/2.4-expresso-api/prototype/rest/news/NewsLastResource.php	(revision 5888)
+++ sandbox/2.4-expresso-api/prototype/rest/news/NewsLastResource.php	(revision 5888)
@@ -0,0 +1,39 @@
+<?php
+
+class NewsLastResource extends Resource{
+    
+    /**
+    * Busca os Ãºltimos 10 boletins em que o usuÃ¡rio tem acesso
+    *
+    * @license    http://www.gnu.org/copyleft/gpl.html GPL
+    * @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+    * @sponsor    Caixa EconÃŽmica Federal
+    * @author     Adriano Coutinho da Silva
+    * @return     Lista dos ultimos 10 boletins do usuÃ¡rio
+    * @access     public
+    **/
+    function GET($request){
+	$this->secured();
+
+	$news = Controller::service('PostgreSQL')->execResultSql( 'SELECT news_subject  as "subject" , 
+	    news_content as "content" ,
+	    news_date as "startTime", 
+	    news_end as "endTime", 
+	    news_id as "id" 
+	    FROM phpgw_news WHERE news_cat IN (1) AND news_begin <= '.time().' AND 
+	    news_end >= '.time().' ORDER BY news_date DESC limit 10');
+
+	if(isset($news) && count($news) > 0)
+	    foreach($news as $key => &$value)
+		$value['subject'] = utf8_encode($value['subject']);
+
+	$response = new Response($request);
+	$response->code = Response::OK;
+	$response->addHeader('Content-type', 'aplication/json');
+
+	$response->body = json_encode(( is_array($news) && $news) ? $news : array());
+	return $response;
+    }
+}
+
+?>
Index: sandbox/2.4-expresso-api/home.php
===================================================================
--- sandbox/2.4-expresso-api/home.php	(revision 5042)
+++ sandbox/2.4-expresso-api/home.php	(revision 5888)
@@ -98,88 +98,38 @@
 		echo parse_navbar();
 	}
-	// Default Applications (Home Page) 
-	$default_apps = Array(			
-			'workflow',			
-			'expressoMail1_2',
-			'calendar',
-			'news_admin'
-		);
-	$sorted_apps = array();
-	$user_apps = $GLOBALS['phpgw_info']['user']['apps']; 
-	@reset($user_apps);	
-	for($i = 0; $i < count($default_apps);$i++) {
-		if(array_key_exists($default_apps[$i], $user_apps)){
-			$sorted_apps[] = $default_apps[$i];
-		}		
-	}
-	
-	foreach($GLOBALS['phpgw_info']['user']['apps'] as $i => $p) {
-		$sorted_apps[] = $p['name'];
-	}
-	
-	$portal_oldvarnames = array('mainscreen_showevents', 'homeShowEvents','homeShowLatest','mainscreen_showmail','mainscreen_showbirthdays','mainscreen_show_new_updated');
-	$done = array();
-	// Display elements, within appropriate table cells	
-	@reset($sorted_apps);
-	$idx = 1;
-	echo "<table width='100%' cellpadding=5>";
-	foreach($sorted_apps as $appname)
-	{
-		if((int)$done[$appname] == 1 || empty($appname)){
-			continue;
-		}		
-		$varnames = $portal_oldvarnames;
-		$varnames[] = 'homepage_display';
-		$thisd = 0;
-		$tmp = '';
-		
-		foreach($varnames as $varcheck)
-		{
-									
-			/*if($appname == 'expressoMail1_2') {
-				$tmp = $appname;
-				$appname = 'expressoMail';
-			}*/				
 
-			if(array_search($appname, $default_apps) !== False){
-				$thisd = 1;
-				break;
-			}
-			if($GLOBALS['phpgw_info']['user']['preferences'][$appname][$varcheck]=='True') {
-				$thisd = 1;
-				break;
-			}
-			else  {
-				$_thisd = (int)$GLOBALS['phpgw_info']['user']['preferences'][$appname][$varcheck];
-				if($_thisd > 0) {
-					$thisd = $_thisd;
-					break;
-				}
-			}
-		}
+//Inicio	
+	echo '
+            <link rel="Stylesheet" type="text/css" href="prototype/plugins/jquery/jquery-ui.css" />					
+    
+            <script type="text/javascript" src="prototype/plugins/jquery/jquery.min.js"></script>
+        
+            <script type="text/javascript" src="prototype/plugins/jquery/jquery-ui.min.js"></script>
+            <script type="text/javascript" src="prototype/plugins/jquery/jquery-ui.custom.min.js"></script>
+            <script src="prototype/plugins/json2/json2.js" language="javascript"></script>
+            <script src="prototype/plugins/ejs/ejs.js" language="javascript"></script>
+            <script src="prototype/plugins/store/jquery.store.js" language="javascript"></script>
+            
+            <script src="prototype/api/datalayer.js" language="javascript"></script>	
+           
+            <script type="text/javascript" src="prototype/plugins/datejs/date-pt-BR.js"></script>
+            <script type="text/javascript" src="prototype/plugins/datejs/sugarpak.js"></script>
+            <script type="text/javascript" src="prototype/plugins/datejs/parser.js"></script>
 
-		if($thisd > 0)
-		{
-			if($tmp) {
-               	$appname = $tmp;
-				$tmp = '';
-			}
-			if($idx == 0) {				
-				print '<tr>';
-			}
-			print '<td style="vertical-align:top;" width="45%">';
-			$GLOBALS['phpgw']->hooks->single('home',$appname);			
-			print '</td>';
-			
-			if($idx == 2){
-				$idx = 0;
-				print '</tr>';
-			}			
-			$idx++;
-			$neworder[] = $appname;
-		}
-		$done[$appname] = 1;
-	}
-	print '</table>';
+	    <script type="text/javascript" src="prototype/plugins/countdown/jquery.countdown.min.js"></script>
+	    <script type="text/javascript" src="prototype/plugins/countdown/jquery.countdown-pt-BR.js"></script>
+	    
+	    <script type="text/javascript" src="prototype/modules/home/js/home.js"></script>
+	    <link rel="Stylesheet" type="text/css" href="prototype/modules/home/css/home.css" />	
+        ';
+
+	echo'
+	    <tr>
+		<td>
+		    <div class="portlets" style="width: 100%;"></div>
+		<td>
+	    </tr>';
+
+//Fim	
 	$GLOBALS['phpgw']->common->phpgw_footer();
 ?>
