- // Validate the instance
- if (is_null($ioInstance)) {
- // Throw exception
- throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
- } elseif (!is_object($ioInstance)) {
- // Throw another exception
- throw new NoObjectException($ioInstance, self::EXCEPTION_IS_NO_OBJECT);
- } elseif (!method_exists($ioInstance, 'loadFileContents')) {
- // Throw yet another exception
- throw new MissingMethodException(array($ioInstance, 'loadFileContents'), self::EXCEPTION_MISSING_METHOD);
- }
-