Download the PHP package phlib/flysystem-pdo without Composer

On this page you can find all versions of the php package phlib/flysystem-pdo. 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-pdo

phlib/flysystem-pdo

Code Checks Codecov Latest Stable Version Total Downloads Licence

This is a PDO Adapter for the League's Flysystem.

This implementation is optimised for use with large files when using the streams. It avoids loading the complete file into memory, preferring to store files during operation on the local file system.

Usage

Configuration on write and writeStream

Adapter Configuration

Name Type Default Description
table_prefix String flysystem Prepends all tablenames.
enable_compression Boolean true Compresses a file stored in DB.
chunk_size Integer 1,048,576 Changes the size of file chunks stored in bytes. Defaults to 1MB.
temp_dir String sys_get_temp_dir() Location to store temporary files when they're stored and retrieved.
disable_mysql_buffering Boolean true Stops large file results being pulled into memory

Example

File Configuration

The following optional file configurations supplement the standard behaviour. The sample schemas include the columns, but they are optional and may be omitted.

Name Type Description
expiry string Specify a expiry time for the file
meta mixed Any additional information. Uses JSON encoding to store the information

Expiry

By specifying 'expiry' as a configuration parameter when writing or updating a file the PdoAdatper will store the value in a column called 'expiry'. When the information about the file is selected out, if the expiry exists and can be parsed by strtotime, then the expiry time will be evaluated. False is returned if the file doesn't exist or has expired.

Example

The expiry is now part of the file description.

Additional Metadata

It's possible to store additional meta data about a file or directory. This could include owner, permissions or groups for example. The information is stored as a JSON encoded string in whatever form you provide. One the item is retrieved from the Filesystem the additional meta information is provided in the same format it was originally provided.

Example

Those details are now part of the file description.

Schema

Schemas can be found in the schema directory. Specific types can be changed based on requirements. All field names should remain the same. Notes about the DB specific definitions are below.

MySQL Notes

Memory Usage (and gotchas)

Any use of read, write or update with large files will cause problems with memory usage. The associated stream methods have been optimised to use as little memory as possible. The adapter first saves the file to the local filesystem before transferring it to the database.

Buffering

On MySQL, the default behaviour is to buffer all query results. When reading a file back from the database this could cause memory problems. There is a configuration option which disables the buffering. This has the side effect that the pdo connection specified in the constructor is altered to set this attribute.

Compression

Compression is especially useful when storing text based files. The compression option defaults to on. The side effect of this is that when reading files back some files may cause larger than expected memory usage. As an example, a very large file filled with a single letter 'a', can be compressed to a tiny size. When that file is read, the tiny chunk is expanded and will fill the memory.

When a file is stored, the setting for compression is stored with it. This can not be changed.

Chunking

Chunking has been implemented to aid where systems have been set up for replication. Packet sizes are a consideration here.

License

This package is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.


All versions of flysystem-pdo with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-json Version *
ext-pdo Version *
ext-zlib Version *
league/flysystem Version ^1.0
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 phlib/flysystem-pdo contains the following files

Loading the files please wait ....