Permalink
Browse files

Namespace fixing.

  • Loading branch information...
1 parent 2f98362 commit 5432245447e4fe0ed8620e54f963905e00ea58d2 @Stardog Stardog committed Feb 16, 2017
Showing with 12 additions and 12 deletions.
  1. +1 −1 src-phpws2/src/Error.php
  2. +10 −10 src-phpws2/src/Resource.php
  3. +1 −1 src/Http.php
@@ -63,7 +63,7 @@ public static function errorHandler($errno, $errstr, $errfile, $errline)
public static function errorPage($code = 500)
{
http_response_code($code);
- $error_text = get_status_text($code);
+ $error_text = \Canopy\Http::get_status_text($code);
$default = PHPWS_SOURCE_DIR . 'src-phpws2/templates/Error/Pages/' . ERROR_PAGE_TEMPLATE;
$error_template = PHPWS_SOURCE_DIR . "src-phpws2/templates/Error/Pages/$code.html";
$source_http = PHPWS_SOURCE_HTTP;
@@ -177,32 +177,32 @@ public function loadPutByType(\Canopy\Request $request, array $ignore = null)
foreach ($variable_names as $name) {
$var = $this->$name;
switch (1) {
- case is_subclass_of($var, 'phpws2\Variable\StringVar') || is_a($var,
- 'phpws2\Variable\StringVar'):
+ case is_subclass_of($var, '\phpws2\Variable\StringVar') || is_a($var,
+ '\phpws2\Variable\StringVar'):
$result = $request->pullPutString($name);
$success = $result !== false;
break;
- case is_subclass_of($var, 'phpws2\Variable\Arr') || is_a($var,
- 'phpws2\Variable\Arr'):
+ case is_subclass_of($var, '\phpws2\Variable\ArrayVar') || is_a($var,
+ '\phpws2\Variable\ArrayVar'):
$result = $request->pullPutString($name);
$success = $result !== false;
break;
- case is_subclass_of($var, 'phpws2\Variable\Bool') || is_a($var,
- 'phpws2\Variable\Bool'):
+ case is_subclass_of($var, '\phpws2\Variable\BooleanVar') || is_a($var,
+ '\phpws2\Variable\BooleanVar'):
$result = $request->pullPutBoolean($name);
$success = $result !== null;
break;
- case is_subclass_of($var, 'phpws2\Variable\Integer') || is_a($var,
- 'phpws2\Variable\Integer'):
+ case is_subclass_of($var, '\phpws2\Variable\IntegerVar') || is_a($var,
+ '\phpws2\Variable\IntegerVar'):
$result = $request->pullPutInteger($name);
$success = $result !== false;
break;
- case is_subclass_of($var, 'phpws2\Variable\FloatVar') || is_a($var,
- 'phpws2\Variable\FloatVar'):
+ case is_subclass_of($var, '\phpws2\Variable\FloatVar') || is_a($var,
+ '\phpws2\Variable\FloatVar'):
$result = $request->pullPutFloat($name);
$success = $result !== false;
break;
View
@@ -32,7 +32,7 @@ class Http {
public static function http_response_code($code = NULL)
{
if ($code !== NULL) {
- $text = get_status_text($code);
+ $text = self::get_status_text($code);
$protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0');
header($protocol . ' ' . $code . ' ' . $text);

0 comments on commit 5432245

Please sign in to comment.