Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Re-merge boydjd

  • Loading branch information...
commit bea64b4d388d34fc3644f496d9ecf767135e1018 1 parent e2c49d0
Adam Moore authored
1  README
@@ -55,3 +55,4 @@ examples
55 55
56 56 api_docs
57 57 Contains the standard YUI API style documentation
  58 +
16 phploader/combo.php
@@ -84,7 +84,7 @@
84 84 file_exists($localPathToBuild) === false ||
85 85 is_readable($localPathToBuild) === false
86 86 ) {
87   - die('<!-- Unable to locate the YUI build directory! -->');
  87 + throw new Exception('Unable to locate the YUI build directory!');
88 88 }
89 89
90 90 //Detect and load the required components now
@@ -95,7 +95,7 @@
95 95 //Add module to array for loading
96 96 $yuiComponents[] = $parts[2];
97 97 } else {
98   - die('<!-- Unable to determine module name! -->');
  98 + throw new Exception('Unable to determine module name!');
99 99 }
100 100 }
101 101
@@ -117,7 +117,7 @@
117 117 }
118 118 echo $rawScript;
119 119 } else {
120   - $rawCSS = '';
  120 + $rawCss = '';
121 121 $cssResourceList = $loader->css_data();
122 122 foreach ($cssResourceList["css"] as $cssResource=>$val) {
123 123 foreach (
@@ -147,20 +147,20 @@
147 147 ); // AlphaImageLoader relative paths (e.g.)
148 148 // AlphaImageLoader(src='../../foo.png')
149 149
150   - $rawCSS .= $crtResourceContent;
  150 + $rawCss .= $crtResourceContent;
151 151 }
152 152 }
153 153
154 154 //Cleanup build path dups caused by relative paths that already
155 155 //included the build directory
156   - $rawCSS = str_replace("/build/build/", "/build/", $rawCSS);
  156 + $rawCss = str_replace("/build/build/", "/build/", $rawCss);
157 157
158 158 if (APC_AVAIL === true) {
159   - apc_store(server(true), $rawCSS, APC_TTL);
  159 + apc_store(server(true), $rawCss, APC_TTL);
160 160 }
161   - echo $rawCSS;
  161 + echo $rawCss;
162 162 }
163 163 }
164 164 } else {
165   - die('<!-- No YUI modules defined! -->');
  165 + throw new Exception('No YUI modules defined!');
166 166 }
4 phploader/combo_functions.inc.php
@@ -9,7 +9,7 @@
9 9 //server(): Computes the base URL of the current page (protocol, server, path)
10 10 //credit: http://code.google.com/p/simple-php-framework/
11 11 //(modified version of full_url), license: MIT
12   -function server($includeRequestURI=false)
  12 +function server($includeRequestUri=false)
13 13 {
14 14 $s = getenv('HTTPS') ? '' : (getenv('HTTPS') == 'on') ? 's' : '';
15 15 $protocol = substr(
@@ -19,7 +19,7 @@ function server($includeRequestURI=false)
19 19 $port = (getenv('SERVER_PORT') == '80') ? '' : (":".getenv('SERVER_PORT'));
20 20 $server = $protocol . "://" . getenv('HTTP_HOST') . $port;
21 21
22   - if ($includeRequestURI === true) {
  22 + if ($includeRequestUri === true) {
23 23 $server .= getenv('REQUEST_URI');
24 24 }
25 25
13 phploader/loader.php
@@ -51,7 +51,6 @@
51 51 define('YUI_TYPE', 'type');
52 52 define('YUI_URL', 'url');
53 53
54   -
55 54 /**
56 55 * The YUI PHP loader base class which provides dynamic server-side loading for
57 56 * YUI
@@ -338,12 +337,14 @@ class YAHOO_util_Loader
338 337 * @param {boolean} noYUI Pass true if you do not want the YUI metadata
339 338 */
340 339 function YAHOO_util_Loader(
341   - $yuiVersion, $cacheKey=null, $modules=null, $noYUI=false
  340 + $yuiVersion, $cacheKey=null, $modules=null, $noYui=false
342 341 )
343 342 {
344 343 if (!isset($yuiVersion)) {
345   - die("Error: The first parameter of YAHOO_util_Loader must specify "
346   - . "which version of YUI to use!");
  344 + throw new Exception(
  345 + "Error: the first parameter of YAHOO_util_Loader must specify " .
  346 + "which version of YUI to use!"
  347 + );
347 348 }
348 349
349 350 /*
@@ -367,7 +368,7 @@ function YAHOO_util_Loader(
367 368 $inf = json_decode($jsonConfigString, true);
368 369 $GLOBALS['yui_current'] = $inf;
369 370 } else {
370   - die("Unable to find a suitable YUI metadata file!");
  371 + throw new Exception("Unable to find a suitable YUI metadata file!");
371 372 }
372 373
373 374 global $yuiCurrent;
@@ -398,7 +399,7 @@ function YAHOO_util_Loader(
398 399 $this->filters = $cache[YUI_FILTERS];
399 400 } else {
400 401 // set up the YUI info for the current version of the lib
401   - if ($noYUI) {
  402 + if ($noYui) {
402 403 $this->modules = array();
403 404 } else {
404 405 $this->modules = $yuiCurrent['moduleInfo'];

0 comments on commit bea64b4

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