Download the PHP package plumphp/plum-file without Composer
On this page you can find all versions of the php package plumphp/plum-file. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download plumphp/plum-file
More information about plumphp/plum-file
Files in plumphp/plum-file
Package plum-file
Short Description Additional converters and file to work with files in Plum.
License MIT
Informations about the package plum-file
PlumFile includes converters and filters to work with files in Plum. Plum is a data processing pipeline for PHP.
PlumFile includes converters and filters to work with files in Plum. Plum is a data processing pipeline for PHP.
Developed by Florian Eckerstorfer in Vienna, Europe.
Installation
You can install Plum using Composer.
Usage
Please refer to the Plum documentation for more information about Plum in general.
FileExtensionFilter
Plum\PlumFile\FileExtensionFilter
checks if the file extension of a file name matches.
If the item is are more complex structure, for example, an array or an object FileExtensionFilter
uses Symfonys
PropertyAccess to retrieve the filename
from the item. You can pass the path to the property as the second argument to the constructor.
The extension passed to the constructor can also be an array. The filter returns true
if the given item matches any
of the extensions in the array.
Just like the FileExtensionFilter
the ModificationTimeFilter
uses the Property Access
component to retrieve the filename. You can pass the path to the property as second argument to the constructor. The
file can be either a string or an instance of SplFileInfo
.
ModificationTimeFilter
The Plum\PlumFile\ModificationTimeFilter
returns if a file was modified before and/or after a certain time.
FileGetContentsConverter
The Plum\PlumFile\FileGetContentsConverter
takes a SplFileInfo
object or a filename and returns the content of the
file.
If the item is a more complex structure it is possible to define the Vale accessor property for both the filename and the content.
Change Log
Version 0.2.1 (28 April 2015)
- Fix Plum version
Version 0.2 (22 April 2015)
- Set Plum version to 0.2
Version 0.1 (18 March 2015)
- Initial release
License
The MIT license applies to plumphp/plum-finder. For the full copyright and license information, please view the LICENSE file distributed with this source code.