Download the PHP package cubicmushroom/slim-middleware-doctrine-orm without Composer

On this page you can find all versions of the php package cubicmushroom/slim-middleware-doctrine-orm. 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 slim-middleware-doctrine-orm

Slim Doctrine ORM Middleware

Slim Middleware to make integrating Doctrine ORM easy

Setup

First of all, add the 'doctrine' config to the Slim application...

use CubicMushroom\Slim\Middleware\DoctrineORMMiddleware;

$config = [
    'doctrine' => [
        'driver' => 'pdo_mysql'
        'host' => 'localhost'
        'user' => 'dbUser'
        'password' => 'dbPassword'
        'port' => '3306'
        'dbname' => 'dbName'
    ],
];

$app = new \Slim\Slim($config);

// ...

The Middleware will use the config details from the app 'doctrine' config, unless you specify an alternative key in the options array, so all you then need to do is add the Middleware...

// ...

$options = [
   'annotationMetadataPaths' => ['path/to/entities']
];

$app->add(new DoctrineORMMiddleware($options));

// ...

The only required option is the annotationMetadataPaths key which should contain an array of paths to check for entity class annotations.

Options

Below are lists all the supported options you can pass to the constructor.

Each of the options is defined as a class constant on the DoctrineORMMiddleware, so you could use these when passing the options array in, to protect against any future changes.

settingsKey (optional)

Default: doctrine

The key within the app config settings that the d/b connection details can be found

serviceName (optional)

Default: @entity_manager

The service name used for the entity manager service

annotationMetadataPaths (required)

An array of paths to check for entity annotations

annotationsAutoloaders (optional)

Default: array()

An array of class autoloaders to use when loading annotation classes.

Will be passed to Doctrine's \Doctrine\Common\Annotations\AnnotationRegistry::registerLoader() method when setting up service, to support loading of annotation classes.

annotationsFiles (optional)

Default: array()

An array of files to load when attempting to load annotation classes.

Will be passed to Doctrine's \Doctrine\Common\Annotations\AnnotationRegistry::registerFile() method when setting up service, to support loading of annotation classes.

annotationNamespaces (optional)

Default: array()

An array of mappings of namespaces to directory paths to use when loading annotation classes.

Will be passed to Doctrine's \Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace() method when setting up service, to support loading of annotation classes.


All versions of slim-middleware-doctrine-orm with dependencies

PHP Build Version
Package Version
Requires cubicmushroom/exceptions Version ~1.1.0
cubicmushroom/options-trait Version ~1.0.2
slim/slim Version ~2.5
doctrine/orm Version ~2.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 cubicmushroom/slim-middleware-doctrine-orm contains the following files

Loading the files please wait ....