2017 © Pedro Peláez
 

library core

Xervice core functionality

image

xervice/core

Xervice core functionality

  • Thursday, August 2, 2018
  • by mibexx
  • Repository
  • 1 Watchers
  • 0 Stars
  • 825 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 14 Versions
  • 958 % Grown

The README.md

Scrutinizer Code Quality Code Coverage Build Status, (*1)

Core classes for Xervice services, (*2)

Installation

composer require xervice/core

Configuration

You need no configuration to use this package. But you can define the namespaces., (*3)

Main Projectnamespace, (*4)

use Xervice\Core\CoreConfig;

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

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

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., (*5)

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), (*6)

If you don't need one of these classes, you can remove them., (*7)

To use your Module you can use the core locator in your application:, (*8)

<?php

$locator = \Xervice\Core\Locator\Locator::getInstance();

$locator->myModule()->facade()->publicMethod();

Dynamic Locator

There are two dynamic locator traits: * DynamicBusinessLocator * DynamicCommunicationLocator, (*9)

Layer

Communication -> Business -> Persistence, (*10)

  1. In the communication layer you can access the communication factory
  2. In the communication layer you can access the facade from your BusinessLayer.
  3. In the BusinessLayer facade you can access the business factory
  4. In the business factory you can access the reader and writer from the persistence layer

Business and communication have their own dependency container. You can access them from the factory., (*11)

Extending

To extend a module, you can create a directory with the same name in an upper level namespace. The order of the namespaces is: 1. Core-Namespaces in defined order (Default: Xervice) 2. Project namespace in defined order (Default: App), (*12)

If you have an module in the Xervice namespace, you can overwrite the classes in your Projectnamespaces. And that logic you can also extend in lower projectnamespaces., (*13)

Auto generating

To generate a module you can use the xervicecli package., (*14)

The Versions

02/08 2018

dev-master

9999999-dev

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

02/08 2018

3.5.0

3.5.0.0

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

31/07 2018

3.4.0

3.4.0.0

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

31/07 2018

3.3.0

3.3.0.0

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

31/07 2018

3.2.0

3.2.0.0

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

30/07 2018

3.1.0

3.1.0.0

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

25/07 2018

3.0.0

3.0.0.0

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

16/07 2018

2.0.2

2.0.2.0

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

13/07 2018

2.0.1

2.0.1.0

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

13/07 2018

2.0.0

2.0.0.0

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

13/07 2018

1.2.0

1.2.0.0

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

09/07 2018

1.1.1

1.1.1.0

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

05/07 2018

1.1.0

1.1.0.0

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

05/07 2018

1.0.0

1.0.0.0

Xervice core functionality

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram