/** * Create new file. * * @param string $file * @param Closure $callback * @param null $format * * @throws \Maatwebsite\Clerk\Exceptions\DriverNotFoundException * @return \Maatwebsite\Clerk\Excel\Reader */ public static function load($file, Closure $callback = null, $format = null) { // Passing in empty strings, will prevent a workbook from being initialized $instance = new static(); $format = $format ?: $instance->getFormat(); return ReaderFactory::create($instance->getDriver('reader'), $file, $callback, $format); }
/** * Get format or provide this request to inner component (decor it) * * @return null|string - format name */ public final function getFormat() { if ($this->_component !== null) { return $this->_component->getFormat(); } return $this->_format; }