Download the PHP package salamek/nette-files without Composer
On this page you can find all versions of the php package salamek/nette-files. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nette-files
Nette Files
This is a file storage for Nette Framework
Nette Files implements virtual directory structure (IStructure, IStructureRepositry) all files are stored in dataDir as their md5sum.ext, file info is implemented in IStructureFile, IStructureFileRepository and position of file in structure is implemented in IFile and IFileRepository
Instalation
The best way to install salamek/nette-files is using Composer:
Then you have to register extension in config.neon.
You will need to implement:
- IFile entity representing single file
- IFileRepository repository for IFile
- IStructure entity representing single structure item (Folder/Directory)
- IStructureRepository repository for IStructure
- IStructureFile entity representing connection of IFile to IStructure (in what folder is what file)
- IStructureFileRepository repository for IStructureFile
Package contains trait, which you will have to use in class, where you want to use file storage. This works only for PHP 5.4+, for older version you can simply copy trait content and paste it into class where you want to use it.
Usage
Saving files
Using ImagePipe in Latte
output:
Resizing ImagePipe flags
For resizing (third argument) you can use these keywords - fit, fill, exact, stretch, shrink_only, stretch, fit_exact, crop. For details see comments above these constants
All versions of nette-files with dependencies
ext-gd Version *
ext-zip Version *
ext-fileinfo Version *
ext-exif Version *
ext-dom Version *
latte/latte Version ^3.1.4 <3.2
nette/di Version ^3.2.6
nette/http Version ^3.3
nette/utils Version ^4.0
nette/application Version ^3.3