Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Zend\Server cleanup
Browse files Browse the repository at this point in the history
- Renamed Reflection\Reflection to Reflection
- Updated all dependent code and tests
  • Loading branch information
weierophinney committed Jul 6, 2010
1 parent 929991c commit 573f8ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/Reflection/Reflection.php → src/Reflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* @namespace
*/
namespace Zend\Server\Reflection;
namespace Zend\Server;

/**
* Reflection for determining method signatures to use with server classes
Expand Down Expand Up @@ -65,14 +65,14 @@ public static function reflectClass($class, $argv = false, $namespace = '')
} elseif (class_exists($class)) {
$reflection = new \ReflectionClass($class);
} else {
throw new Exception('Invalid class or object passed to attachClass()');
throw new Reflection\Exception('Invalid class or object passed to attachClass()');
}

if ($argv && !is_array($argv)) {
throw new Exception('Invalid argv argument passed to reflectClass');
throw new Reflection\Exception('Invalid argv argument passed to reflectClass');
}

return new ReflectionClass($reflection, $namespace, $argv);
return new Reflection\ReflectionClass($reflection, $namespace, $argv);
}

/**
Expand All @@ -95,14 +95,14 @@ public static function reflectClass($class, $argv = false, $namespace = '')
public static function reflectFunction($function, $argv = false, $namespace = '')
{
if (!is_string($function) || !function_exists($function)) {
throw new Exception('Invalid function "' . $function . '" passed to reflectFunction');
throw new Reflection\Exception('Invalid function "' . $function . '" passed to reflectFunction');
}


if ($argv && !is_array($argv)) {
throw new Exception('Invalid argv argument passed to reflectClass');
throw new Reflection\Exception('Invalid argv argument passed to reflectClass');
}

return new ReflectionFunction(new \ReflectionFunction($function), $namespace, $argv);
return new Reflection\ReflectionFunction(new \ReflectionFunction($function), $namespace, $argv);
}
}
2 changes: 1 addition & 1 deletion src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function handle($request = false);
* Return a server definition array
*
* Returns a server definition array as created using
* {@link * \Zend\Server\Reflection\Reflection}. Can be used for server introspection,
* {@link * \Zend\Server\Reflection}. Can be used for server introspection,
* documentation, or persistence.
*
* @access public
Expand Down

0 comments on commit 573f8ae

Please # to comment.