PHPackages                             vivlong/phalapi-xoss - 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. vivlong/phalapi-xoss

ActiveLibrary

vivlong/phalapi-xoss
====================

PhalApi 2.x 扩展类库：支持Qiniu、Aliyun、QCloud、HuaweiCloud的OSS扩展。

189[2 issues](https://github.com/vivlong/phalapi-xoss/issues)PHP

Since Dec 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/vivlong/phalapi-xoss)[ Packagist](https://packagist.org/packages/vivlong/phalapi-xoss)[ RSS](/packages/vivlong-phalapi-xoss/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PhalApi 2.x 的第三方OSS扩展
=====================

[](#phalapi-2x-的第三方oss扩展)

PhalApi 2.x扩展类库，支持Qiniu、Aliyun的OSS扩展。

安装和配置
-----

[](#安装和配置)

修改项目下的composer.json文件，并添加：

```
    "vivlong/phalapi-xoss":"dev-master"

```

然后执行`composer update`。

安装成功后，添加以下配置到/path/to/phalapi/config/app.php文件：

```
    /**
     * XOSS相关配置
     */
    'Xoss' =>  array(
        'aliyun' => array(
            'accessKeyId'       => '',
            'accessKeySecret'   => '',
            'bucket'            => '',
            'endpoint'          => 'https://your-endpoint',
            'isCName'           => false,
            'securityToken'     => null,
            'requestProxy'      => null,
        ),
        'qiniu' =>  array(
            'accessKey'   => '',
            'secretKey'   => '',
        ),
        'qcloud' =>  array(
            'accessKey'   => '',
            'secretKey'   => '',
            'region'      => 'ap-beijing',
            'schema'      => 'https',
        ),
        'huaweicloud' =>  array(
            'accessKeyId'       => '',
            'accessKeySecret'   => '',
            'endpoint'          => 'https://your-endpoint',
        ),
    ),
```

并根据自己的情况修改填充。

注册
--

[](#注册)

在/path/to/phalapi/config/di.php文件中，注册：

```
$di->xOss = function() {
        return new \PhalApi\Xoss\Lite();
};
```

使用
--

[](#使用)

第一种使用方式：上传本地文件：

```
  \PhalApi\DI()->xOss->uploadFile($bucket, $object, $filePath);
```

###  Health Score

10

—

LowBetter than 0% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/63cebb214330833e8bea309160266105934daf5e70e20db7ae58a6484443f37c?d=identicon)[vivlong](/maintainers/vivlong)

---

Top Contributors

[![vivlong](https://avatars.githubusercontent.com/u/3961154?v=4)](https://github.com/vivlong "vivlong (18 commits)")

### Embed Badge

![Health badge](/badges/vivlong-phalapi-xoss/health.svg)

```
[![Health](https://phpackages.com/badges/vivlong-phalapi-xoss/health.svg)](https://phpackages.com/packages/vivlong-phalapi-xoss)
```

PHPackages © 2026

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