src/Handlers/OkFileHandlerFactory.php
/**
     * Create's and return's a new handler instance.
     *
     * @param \TechDivision\Import\Configuration\SubjectConfigurationInterface|null $subject The subject configuration instance
     *
     * @return \TechDivision\Import\Handlers\HandlerInterface|null The new handler instance
     */
Create's and return's a new handler instance.
@param \TechDivision\Import\Configuration\SubjectConfigurationInterface|null $subject The subject configuration instance


Create ' s and return ' s a new handler instance . @param \ TechDivision \ Import \ Configuration \ SubjectConfigurationInterface|null $subject The subject configuration instance
public function createHandler(SubjectConfigurationInterface $subject = null) : HandlerInterface
    {
        $proposedOkFileLoader = $this->getLoaderFactory()->createLoader($subject);
        $filesystemAdapter = $this->getContainer()->get($subject->getFilesystemAdapter()->getId());
        if ($filesystemAdapter instanceof FilesystemAdapterFactoryInterface) {
            $filesystemAdapter = $filesystemAdapter->createFilesystemAdapter($subject);
        }
        $handler = new OkFileHandler();
        $handler->setLoader($proposedOkFileLoader);
        $handler->setFilesystemAdapter($filesystemAdapter);
        return $handler;
    }
public function createHandler ( SubjectConfigurationInterface $ subject = null ) : HandlerInterface { $ proposedOkFileLoader = $ this -> getLoaderFactory ( ) -> createLoader ( $ subject ) ; $ filesystemAdapter = $ this -> getContainer ( ) -> get ( $ subject -> getFilesystemAdapter ( ) -> getId ( ) ) ; if ( $ filesystemAdapter instanceof FilesystemAdapterFactoryInterface ) { $ filesystemAdapter = $ filesystemAdapter -> createFilesystemAdapter ( $ subject ) ; } $ handler = new OkFileHandler ( ) ; $ handler -> setLoader ( $ proposedOkFileLoader ) ; $ handler -> setFilesystemAdapter ( $ filesystemAdapter ) ; return $ handler ; }
Create's and return's a new handler instance.
Create ' s and return ' s a new handler instance .
// load the proposed .OK file loader // load the filesystem adapter instance // query whether or not we've a factory instance // create a new .OK file handler instance // return the new .OK file handler instance