PHPackages                             wpshop/container - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. wpshop/container

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

wpshop/container
================

PHP Container

v2.3(7mo ago)060↓75%WTFPLPHPPHP &gt;=7.2.5

Since Nov 3Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/wpshop-team/container)[ Packagist](https://packagist.org/packages/wpshop/container)[ RSS](/packages/wpshop-container/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (11)Used By (0)

Example of directory structure and usage
----------------------------------------

[](#example-of-directory-structure-and-usage)

Assuming you have file structure like this (for a theme)

```
core
  |- init-container.php
  |- config.php
src
  |- AssetsProvider.php
  |- Maintanance.php
  |- Options.php
  |- functions.php
.phpstorm.meta.php
composer.json
functions.php
readme.txt
style.css

... (other theme files)

```

Example of `composer.json`

```
{
  "name": "your-vendor/your-theme-name",
  "type": "project",
  "autoload": {
    "psr-4": {
      "YourVendor\\YourProduct\\": "src/"
    }
  },
  "require": {
    "php": ">=7.2",
    "wpshop/container": "^1.3 || ^2.3"
  }
}
```

Create specific function at file `src/functions.php`

```
