ThumbnailMiddleware
class ThumbnailMiddleware implements MiddlewareInterface, ApplicationAwareInterface (View source)
Class ThumbnailMiddleware Middleware used to populate thumbnails at the end of each request.
This middleware requires the following to be defined on the Application: "database" DatabaseManager "BasicThumbnailer::class" Basic thumbnailer
Traits
Trait ApplicationAwareTrait A trait used with ApplicationAwareInterface
Properties
| protected Application | $app | from ApplicationAwareTrait | |
| protected Filesystem | $baseFileSystem | ||
| private BasicThumbnailer | $thumbnailer | ||
| private EntityManagerInterface | $entityManager | ||
| private Connection | $connection | ||
| private Repository | $config | 
Methods
Generate thumbnails and and manage db update.
Get the dimensions out of a thumbnail array.
No description
No description
No description
No description
Details
        
                            
    setApplication(Application $app)
        
    
    Setter method for the application
        
                            
    __construct(Repository $config)
        
    
    No description
        
                            Response
    process(Request $request, DelegateInterface $frame)
        
    
    Process the request and return a response.
        
                        private    
    generateThumbnails(array[] $paths, Connection $database)
        
    
    Generate thumbnails and and manage db update.
        
                        private    bool
    attemptBuild(File $file, array $thumbnail)
        
    
    Try building an unbuilt thumbnail.
        
                        private    array
    getDimensions(array $thumbnail)
        
    
    Get the dimensions out of a thumbnail array.
        
                        private    bool
    isBuilt(File $file, array $thumbnail)
        
    
    No description
        
                        private    null|StorageLocationInterface
    storageLocation()
        
    
    No description
        
                    protected        BasicThumbnailer
    getThumbnailer()
        
    
    No description
        
                    protected        EntityManagerInterface
    getEntityManager()
        
    
    No description
        
                    protected        Connection
    getConnection()
        
    
    No description
        
                        private    
    completeBuild(File $file, $thumbnail)
        
    
    Mark the build complete.
        
                        private    
    failBuild(File $file, $thumbnail)
        
    
    Mark the build failed.