Download the PHP package radnan/rdn-doctrine without Composer

On this page you can find all versions of the php package radnan/rdn-doctrine. 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 rdn-doctrine

RdnDoctrine

The RdnDoctrine ZF2 module is a simple bridge to the Doctrine ORM library.

How to install

  1. Use composer to require the radnan/rdn-doctrine package:

    $ composer require radnan/rdn-doctrine:1.*
  2. Activate the module by including it in your application.config.php file:

In order to access an entity repository we call the same entity($name) plugin, only this time we provide an entity name:

namespace App\Controller;

use App\Entity;

class User
{
    public function editAction()
    {
        $id = $this->params('user-id');

        $user = $this->entity('User')->find($id);

        /**
         * Alternatively we can be more explicit and request the
         * User entity within the App module
         */
        $user = $this->entity('App:User')->find($id);
    }
}

The RdnDoctrine\EntityManager\AliasResolver service is used to resolve aliases when one is not provided. For example, if User is given instead of App:User.

Code completion

If you'd like to have code completion for this plugin, include the following in your AbstractController class:

namespace App\Controller;

use Zend\Mvc\Controller\AbstractActionController;

/**
 * @method \Doctrine\ORM\EntityRepository|\Doctrine\ORM\EntityManager entity(\string $name = null) Get the entity manager or a repository for given entity name.
 */
abstract class AbstractController extends AbstractActionController
{
}

Then, simply extend your controllers off of this abstract controller.

Console commands

The module also comes with a set of console commands to manage the database schema and generate proxies.

You can run vendor/bin/console to run and get help on the console commands in the doctrine: namespace.

Shared entities

Usually you will have one module that will contain all your common entities such as User entities etc. You will also register a single entity manager for your application with the same name as this module.

You will then create separate modules for each section of your site. Each module will depend on the entities provided by the common module in addition to providing its own. But all of the modules will use the single shared entity manager.

Let's say our common module is called App and we have another module called Foo. In this case the configuration for the Foo module would look like this:


All versions of rdn-doctrine with dependencies

PHP Build Version
Package Version
Requires doctrine/orm Version 2.*
radnan/rdn-console Version 1.*
radnan/rdn-database Version 1.*
radnan/rdn-factory Version 1.*
zendframework/zend-mvc Version 2.*
zendframework/zend-servicemanager Version 2.*
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 radnan/rdn-doctrine contains the following files

Loading the files please wait ....