PHPackages                             xervice/core - 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. xervice/core

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

xervice/core
============

Xervice core functionality

4.0.0(7y ago)248.8k↓85.7%20MITPHPPHP &gt;=7.1.0

Since Jul 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/xervice/core)[ Packagist](https://packagist.org/packages/xervice/core)[ RSS](/packages/xervice-core/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (4)Versions (18)Used By (20)

Xervice: Core
=============

[](#xervice-core)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/283adef2db14209d50461b9a1ed8b679dff07b6c1dc6f82ec2e47994a226c76a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f786572766963652f636f72652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/xervice/core/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/5a32bd4f1cfbb2fc72b444065d870f551670c72d078700f737b157b12cae9200/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f786572766963652f636f72652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/xervice/core/?branch=master)[![Build Status](https://camo.githubusercontent.com/a738ca03877641590252ffe7e2e9954258408006fdef742b7e0f774d48cfc33f/68747470733a2f2f7472617669732d63692e6f72672f786572766963652f636f72652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/xervice/core)

Core classes for Xervice services

Installation
============

[](#installation)

```
composer require xervice/core

```

Configuration
-------------

[](#configuration)

You need no configuration to use this package. But you can define the namespaces.

***Main Projectnamespace***

```
use Xervice\Core\CoreConfig;

$config[CoreConfig::CORE_NAMESPACES] = [
    'Xervice'
];

$config[CoreConfig::PROJECT_NAMESPACES] = [
    'App'
];
```

Usage
-----

[](#usage)

You can create your own Xervice packages. For that you have to use a project namespace and create a module directory. In that directory you can use some predefined patterns like Facade, Factory, DependencyProvider, Config and Client.

***Structure***.

- src
    - MyNamespace
        - MyModule
            - Business
                - MyModuleFacade.php
                - MyModuleBusinessFactory.php
            - Communication
                - MyModuleCommunicationFactory.php
                - MyModuleDependencyProvider.php (For the communication layer)
            - Persistence
                - MyModuleReader.php
                - MyModuleWriter.php
            - MyModuleConfig.php
            - MyModuleDependencyProvider.php (For the business layer)

If you don't need one of these classes, you can remove them.

To use your Module you can use the core locator in your application:

```
