public function execute($name, $args) { if (isset(self::$methodPool[$name]) && StaticInstance::isBound()) { if (self::$methodPool[$name]->supportsAdapter(StaticInstance::getCurrentInstance()->getAdapter())) { self::$methodPool[$name]->execute(StaticInstance::getCurrentInstance()->getAdapter(), $args); } else { throw new UnsupportedFunctionException(); } } elseif (isset(self::$savedMethodPool[$name])) { //TODO call original } else { throw new UnknownMethodException(); } }
public static function resume() { StaticInstance::bindInstance(StaticInstance::getCurrentInstance()); }