src/main/php/response/mimetypes/Image.php
private function loadImage(string $resource)
    {
        try {
            return $this->resourceLoader->load(
                    $resource,
                    function($fileName) { return ImageSource::load($fileName); }
            );
        } catch (\Throwable $t) {
            // not allowed to throw exceptions, as we are outside any catching
            // mechanism
            trigger_error(
                    'Can not load image "' . $resource . '": ' . $t->getMessage(),
                    E_USER_ERROR
            );
            return null;
        }
    }
private function loadImage(string $resource)
    {
        try {
            return $this->resourceLoader->load(
                    $resource,
                    function($fileName) { return ImageSource::load($fileName); }
            );
        } catch (\Throwable $t) {
            // not allowed to throw exceptions, as we are outside any catching
            // mechanism
            trigger_error(
                    'Can not load image "' . $resource . '": ' . $t->getMessage(),
                    E_USER_ERROR
            );
            return null;
        }
    }
private function loadImage ( string $ resource ) { try { return $ this -> resourceLoader -> load ( $ resource , function ( $ fileName ) { return ImageSource :: load ( $ fileName ) ; } ) ; } catch ( \ Throwable $ t ) { // not allowed to throw exceptions, as we are outside any catching // mechanism trigger_error ( 'Can not load image "' . $ resource . '": ' . $ t -> getMessage ( ) , E_USER_ERROR ) ; return null ; } }
loads image from resource pathes

@param   string  $resource
@return  \stubbles\img\Image|null
loads image from resource pathes