Download the PHP package mgriego/flysystem-clamav without Composer

On this page you can find all versions of the php package mgriego/flysystem-clamav. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package flysystem-clamav

ClamAV Scanner for Flysystem

Build Status

This package provides a filesystem adapter for Flysystem that scans files being read from and written to an underlying filesystem using the popular ClamAV antivirus engine. This adapter acts as a passthrough adapter, sitting in between your application and whichever concrete Flysystem adapter you use to store your files. Since this scanner is itself a Flysystem adapter, it can be implemented in an existing application simply by dropping it in as a replacement to your existing Flysystem adapter so that all filesytem calls go through the ClamAV adapter. Simply pass your existing adapter as the "backing" adapter to the ClamAV adapter when you instantiate it, and the rest should be completely transparent to your application.

Requirements

Installation

Via composer:

Usage

In order to utilize this adapter, you must first set up your "backing" adapter and an instance of Quahog that points to your clamd server.

First, set up your backing adapter like you would normally. For instance, if you are storing files using the Local adapter:

Next, you must set up an instance of the Quahog ClamAV integration library. Quahog is automatically installed by Composer when using this package, so there is no need to require it explicitly. More info on how to set up your Quahog instance can be found in the Quahog README. If your clamd service is running via TCP port 3310 on the local machine's loopback adapter, you can instantiate Quahog like this:

Once you have your backing adapter and scanner set up, you can instantiate this adapter. This adapter's constructor takes two required and one optional arguments:

  1. The Quahog instance
  2. The backing adapter instance
  3. A boolean telling the adapter whether to scan files that are being copied using the copy operation. This parameter is optional and defaults to false. If this is set to true, the adapter will first scan the source file before telling the backing adapter to perform the copy.

Files are scanned during the read/readStream, write/writeStream, and update/updateStream operations. If the adapter is configured as such, files will also be scanned during the copy operation. If ClamAV detects malware in the file, a \mgriego\Flysystem\ClamAV\VirusFoundException exception will be thrown. The getReason method will return the name of the malware that was detected in the file, and the getPath method will return the path of the file that was being acted upon. Or you can simply call the standard getMessage method available on all Exceptions, and a message will be returned that contains both the path and the name of the malware.

Related packages

Coming soon!

Acknowledgements

This package wouldn't be possible without these great projects:


All versions of flysystem-clamav with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
league/flysystem Version ^1.0
xenolope/quahog Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mgriego/flysystem-clamav contains the following files

Loading the files please wait ....