function __construct($storage) { mb_internal_encoding("UTF-8"); if ($storage instanceof Adapter) { $this->storage = $storage; } else { throw new \Exception('Storage must implement Documer\\Storage\\Adapter interface.'); } }