PHPackages                             phant/client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. phant/client

ActiveLibrary[File &amp; Storage](/categories/file-storage)

phant/client
============

Use client easily

2.4(7mo ago)14.7k↓65.6%1MITPHPPHP &gt;=8.1CI passing

Since Apr 21Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/PhantPHP/client)[ Packagist](https://packagist.org/packages/phant/client)[ RSS](/packages/phant-client/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (8)Dependencies (4)Versions (9)Used By (0)

Client
======

[](#client)

Requirments
-----------

[](#requirments)

PHP &gt;= 8.0

Install
-------

[](#install)

`composer require phant/client`

Usages
------

[](#usages)

### MySQL

[](#mysql)

```
use Phant\Client\Service\MySQL as ClientMySQL;

$clientMySQL = new ClientMySQL(
	'127.0.0.1',
	'my_db',
	'my-user',
	'my-pass',
	'3306',
	'utf8mb4'
);

$clientMySQL->execute(
	'
	INSERT INTO `my_table`
	SET	`col_1`	= :val_col_1
	,	`col_2`	= :val_col_2
	',
	[
		':val_col_1' => 'foo',
		':val_col_2' => 'bar',
	]
);

$list = $clientMySQL->getList(
	'
	SELECT *
	FROM `my_table`
	WHERE	`col_1`	= :val_col_1
	,		`col_2`	= :val_col_2
	',
	[
		':val_col_1' => 'foo',
		':val_col_2' => 'bar',
	]
);

$list = $clientMySQL->getListByColumnValue(
	'my_table',
	'col_1',
	'foo'
);

$item = $clientMySQL->get(
	'
	SELECT *
	FROM `my_table`
	WHERE	`col_1`	= :val_col_1
	,		`col_2`	= :val_col_2
	',
	[
		':val_col_1' => 'foo',
		':val_col_2' => 'bar',
	]
);

$item = $clientMySQL->getByColumnValue(
	'my_table',
	'col_1',
	'foo'
);

$exist = $clientMySQL->get(
	'
	SELECT *
	FROM `my_table`
	WHERE	`col_1`	= :val_col_1
	,		`col_2`	= :val_col_2
	',
	[
		':val_col_1' => 'foo',
		':val_col_2' => 'bar',
	]
);

$exist = $clientMySQL->existByColumnValue(
	'my_table',
	'col_1',
	'foo'
);
```

### S3

[](#s3)

```
use Phant\Client\Service\S3 as ClientS3;

$clientS3 = new ClientS3(
	$region,
	$endpoint,
	$accessKey,
	$secretKey,
);
$clientS3->setObject($bucket, 'foo', 'bar');
$bar = $clientS3->getObject($bucket, 'foo');
$clientS3->deleteObject($bucket, 'foo');
```

### S3 Bucket

[](#s3-bucket)

```
use Phant\Client\Service\S3 as ClientS3;
use Phant\Client\Service\S3\Bucket as ClientS3Bucket;

$clientS3Bucket = new ClientS3Bucket(
	new ClientS3(
		$region,
		$endpoint,
		$accessKey,
		$secretKey,
	),
	$bucket
);
$clientS3Bucket->set('foo', 'bar');
$bar = $clientS3Bucket->get('foo');
$clientS3Bucket->delete('foo');
```

### FTP Client

[](#ftp-client)

```
use Phant\Client\Service\Ftp as FtpClient;

$ftpClient = new FtpClient(
	host: 'example.com',
	username: 'user',
	password: 'pass',
	//port: 21 (default)
	//passiveMode: false (default)
);

$files = $ftpClient->listFiles('/path/to/directory');
$downloadedFile = $ftpClient->download('/path/to/remote/file.txt', '/local/directory');
```

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance62

Regular maintenance activity

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 93.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~185 days

Recently: every ~227 days

Total

8

Last Release

234d ago

Major Versions

1.2 → 2.02023-05-18

PHP version history (2 changes)1.0PHP ^8.0

2.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ce749176c74e4c4fd7bd457cdad471fd1e0e14092259e60e7330724ce622dce?d=identicon)[Phant](/maintainers/Phant)

---

Top Contributors

[![lennyrouanet](https://avatars.githubusercontent.com/u/5269913?v=4)](https://github.com/lennyrouanet "lennyrouanet (14 commits)")[![YevicT](https://avatars.githubusercontent.com/u/229097821?v=4)](https://github.com/YevicT "YevicT (1 commits)")

---

Tags

Amazon S3 client

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/phant-client/health.svg)

```
[![Health](https://phpackages.com/badges/phant-client/health.svg)](https://phpackages.com/packages/phant-client)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k285.7M1.0k](/packages/league-flysystem-aws-s3-v3)[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k38.2M84](/packages/aws-aws-sdk-php-laravel)[humanmade/s3-uploads

WordPress plugin to store uploads on S3

2.1k2.5M13](/packages/humanmade-s3-uploads)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[ellaisys/aws-cognito

Laravel Authentication using AWS Cognito (Web and API)

123256.9k1](/packages/ellaisys-aws-cognito)[andersundsehr/aus-driver-amazon-s3

Provides a FAL driver for the Amazon Web Service AWS S3.

25274.9k](/packages/andersundsehr-aus-driver-amazon-s3)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
