PHPackages                             gcworld/common - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. gcworld/common

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gcworld/common
==============

GCWorld Industries Common

2.7.20(3w ago)031.7k2proprietaryPHPPHP &gt;=8.4

Since Aug 10Pushed 3w ago1 watchersCompare

[ Source](https://github.com/KongHack/Common)[ Packagist](https://packagist.org/packages/gcworld/common)[ RSS](/packages/gcworld-common/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (21)Versions (71)Used By (2)

GCWorld Common
==============

[](#gcworld-common)

`gcworld/common` is the shared base library used to build GCWorld applications around a single project-level service object. It provides a common singleton pattern, YAML-backed configuration loading, lazy database and Redis connections, path helpers, and version lookup helpers for both the library and the consuming project.

What It Provides
----------------

[](#what-it-provides)

- An abstract `Common` base class implementing the shared project service container pattern
- YAML configuration loading through `CommonConfig`
- Optional cached config compilation to a neighboring `.php` file
- Lazy MySQL connection management through `gcworld/database`
- Lazy Redis and Redis Cluster connection management
- File path and web path helpers from config
- Library and project version discovery

Requirements
------------

[](#requirements)

- PHP `>=8.4`
- `ext-pdo`
- `ext-redis`

Installation
------------

[](#installation)

```
composer require gcworld/common
```

Usage
-----

[](#usage)

Create a project-specific class that extends `GCWorld\Common\Common` and implements `getEnvironment()`.

```
