>
> Then why not put the base class in the namespace of which it is a base class
> for?
>
Locations source PHP file is the same as in namespace.
App/RestException.php
App/RestException/NotFound.php
App/RestException/BadRequest.php
I did refactoring code, without group use:
<?php
use App\RestException;
try {
...
} catch (RestException\BadRequest $e) {
...
} catch (RestException\NotFound $e) {
...
} catch (RestException $e) {
...
}
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php