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
No description
No description
No description
No description
No description
Generate a thumbnail.
Get the dimensions out of a thumbnail array.
No description
No description
Mark a thumbnail as built or not.
Check if a thumbnail array may be for the requested path.
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.
        
                    protected        BasicThumbnailer
    getThumbnailer()
        
    
    No description
        
                    protected        EntityManagerInterface
    getEntityManager()
        
    
    No description
        
                    protected        Connection
    getConnection()
        
    
    No description
        
                        private    Response
    buildRedirectToThumbnailResponse(Request $request)
        
    
    No description
        
                        private    array|null
    getThumbnailToGenerate(Connection $database, string|null $searchThumbnailPath = null)
        
    
    No description
        
                        private    bool
    generateThumbnail(array $thumbnail)
        
    
    Generate a thumbnail.
        
                        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
        
                        private    Connection|null
    tryGetConnection()
        
    
    No description
        
                        private    
    markThumbnailAsBuilt(Connection $connection, array $thumbnail, bool $built = true)
        
    
    Mark a thumbnail as built or not.
        
                        private    bool
    couldBeTheRequestedThumbnail(array $thumbnail, string|null $searchThumbnailPath)
        
    
    Check if a thumbnail array may be for the requested path.
        
                        private    
    failBuild(File $file, array $thumbnail)
        
    
    Mark the build failed.