Download the PHP package tccltd/tcc-abstract-module without Composer

On this page you can find all versions of the php package tccltd/tcc-abstract-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tcc-abstract-module

TccAbstractModule

Provides an AbstractModule class that can be extended by individual Module classes to automatically implement functionality such as autoloading and configuration.

Installation

Simply add tccltd/tcc-abstract-module to your composer.json.

Usage

When creating a new module, extend TccAbstractModule\Module\AbstractModule in your Module.php.


PHP 5.3 NOTE: If you are not using PHP 5.4 then you will need to extend TccAbstractModuleNoTraits instead of TccAbstractModule. The functionality provided is identical.


For simpler modules, you may well find that this is all you need:

namespace MyModule;

use TccAbstractModule\Module\AbstractModule;

class Module extends AbstractModule
{
}

The abstract module configures the following behaviour automatically:

  1. Autoloading: The classmap defined in ./autoload_classmap.php is used in the first instance, falling back to a standard PSR-0 compatible autoloader serving files from ./src/MyModule/.

  2. Module Configuration: All files in ./config/ matching the format module.config{,.*}.php will be loaded. As a matter of good practice, you should separate your routes into module.config.routes.php.

  3. Service Configuration: Where previously you would have defined service manager invokables, services, factories, aliases, initializers and abstractfactories in the getServiceConfig() function of your Module.php, these should now be defined in ./config/service/service.config.php. The format is the same. Note that all files in ./config/service/_ matching the format service.config{,.*}.php will be loaded, should you wish to further subdivide your service configuration.

  4. Controller Configuration: Where previously you would have defined controller manager invokables, services, factories, aliases, initializers and abstractfactories in the getControllerConfig() function of your Module.php, these should now be defined in ./config/service/controller.config.php. The format is the same. Note that all files in ./config/service/_ matching the format controller.config{,.*}.php will be loaded, should you wish to further subdivide your controller configuration.

  5. View Helper Configuration: Where previously you would have defined view helper manager invokables, services, factories, aliases, initializers and abstractfactories in the getViewHelperConfig() function of your Module.php, these should now be defined in ./config/service/viewhelper.config.php. The format is the same. Note that all files in ./config/service/_ matching the format service.config{,.*}.php will be loaded, should you wish to further subdivide your view helper configuration.

A typical file structure (focusing on the aspects related to this module) might be as follows:

module/  
  MyModule/  
    config/  
      service/  
        controller.config.php  
        service.config.php  
        viewhelper.config.php  
      module.config.php  
      module.config.routes.php  
  autoload_classmap.php  
  Module.php  

Overriding

Should you wish to modify the behaviour of the AbstractModule, you can do so by either overriding in your individual Module.php files, or you can extend the entire module and create your own AbstractModule. If you have a suggestion that might benefit all users of this module, please do feel free to suggest it, of course!

Traits

TccAbstractModule is composed of traits. This means that you can, should you wish, cherry-pick the functionality that you would like to use. In this instance you would not override AbstractModule. Instead, you would use the relevant traits within your own Module class. Note that you will need to use ClassDirTrait in order to use any of the other traits, and ClassNamespaceTrait in order to use AutoloaderProviderDefaultTrait.

It is anticipated that most users will not need to cherry-pick.


All versions of tcc-abstract-module with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tccltd/tcc-abstract-module contains the following files

Loading the files please wait ....