Example #1
0
 public function read($file_name)
 {
     $system_path = File::getSystemPath($file_name);
     // Null is returned if the given file name is invalid.
     // TODO: `File::getSystemPath` should throw an exception and it should be handled here.
     if (!$system_path) {
         $this->app->notFound();
         return;
     }
     parent::read($system_path);
 }
Example #2
0
" alt="" <?php 
        __($size);
        ?>
 title="<?php 
        __(_e($value[File::NAME_KEY]));
        ?>
"></figure></li>
	<?php 
    }
    ?>
</ol>
<?php 
} else {
    $value = $property->getValue();
    $path = $value[File::PATH_KEY];
    $size = getimagesize(File::getSystemPath($path))[3];
    ?>
<figure>
	<img src="/uploads/<?php 
    __(_e($path));
    ?>
" alt="" <?php 
    __($size);
    ?>
 title="<?php 
    __(_e($value[File::NAME_KEY]));
    ?>
">
</figure>
<?php 
}