SproutCMS

This is the code documentation for the SproutCMS project

class FileController

Provides access to file and image data

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2026-09-09
**/
class NewClassName extends FileController {
    
    /**
    * Redirect to the resize url
    * This allows JS code to use a common URL without needing to be aware of which FilesBackend is in use
    **/
    public function redirectResize (string $size, string $filename) {
        // Method code goes here
    }
    
    /**
    * Renders file contents for viewing or downloading
    **/
    public function download (int $id, string $size) {
        // Method code goes here
    }
    
    /**
    * Looks up filenames for a list of file IDs
    **/
    public function nameLookup () {
        // Method code goes here
    }
    
    /**
    * Outputs an audio player.
    **/
    public function playAudio ($filename) {
        // Method code goes here
    }
    
    /**
    * On the fly image resizing
    * 
    * The size parameter is the new size.
    * The first character is taken to be the resize type, accepts 'r' or 'c' or 'm':
    * Meaning 'r'esize, 'c'rop or 'm'ax resize (do not scale up).
    * The width and height is specified width . 'x' . height (e.g. 200x100)
    **/
    public function resize ($size, $filename) {
        // Method code goes here
    }
    
}
?>