<?php
namespace Test;
// explicitly tell PHP that we want Test::Exception to be autoloaded (in
essence)
import Test::Exception;
class Tester {
public function fail() {
throw new Exception();
}
}
?>
This is even better than requiring, and makes the intent very clear. I don't think it decreases intuitiveness, on the contrary - from the look of the code it is immediately clear which exception would be used.
--
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com