Skip to content

Commit

Permalink
Namespace fixing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stardog committed Feb 16, 2017
1 parent 2f98362 commit 5432245
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src-phpws2/src/Error.php
Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions src-phpws2/src/Resource.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Http.php
Expand Up @@ -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);

Expand Down

0 comments on commit 5432245

Please sign in to comment.