function offsetSet($index, $route) { if (!$route instanceof IRouter) { throw new InvalidArgumentException("Argument must be IRouter descendant."); } parent::offsetSet($index, $route); }
function __construct() { parent::__construct(NULL, 'IRouter'); }