Download the PHP package romaricdrigon/orchestra-bundle without Composer

On this page you can find all versions of the php package romaricdrigon/orchestra-bundle. 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 orchestra-bundle

Orchestra Bundle

Orchestra is a Naked Object implementation on top of Symfony2 Available as a Symfony2 Bundle

Latest Stable Version License SensioLabsInsight Build Status

Why Orchestra?

Naked Object is a powerful pattern first described by Richard Pawson.
It states that business objects, if correctly modelled, are sufficient to create an application, the technical code being generic enough to be automatically generated.

Orchestra aims to be such an admin generator: a library that helps you focusing on modelling the Domain right, and do all the "boring code" for you.

Maybe you will want to personalize it further, then it's ok, Orchestra is not about restraining you but helping you quickly create a starter application, that may be used as a prototype, a proof-of-concept, or for discussions with business experts... Note that Orchestra application are made to be production-ready, safe to use, and to offer decent performances. Everything is done by reflection (eventually cached), no direct code generation in here.

Roadmap / version

Roadmap:

Installation

Install bundle using composer: composer require romaricdrigon/orchestra-bundle

Register the bundle and the vendor we use in app/AppKernel.php:

Import our routes (both the XML and our custom type):

Getting started

With Orchestra admin generator you will have to focus only on 2 objects: Entities and Repositories. All those objects must be placed within a valid Symfony2 bundle.

TL;DR: you can find a working example at Orchestra-example

Entities

Entities are the basic Domain objects of your application. Even if we will see later that they are persisted, they may be differ than Doctrine entities.

Basic entity

By convention, place those in your bundle Entity folder.

They must implement RomaricDrigon\OrchestraBundle\Domain\Entity\EntityInterface: Orchestra must be able to get a unique ID for each entity instance.

Naked Object follow a DDD mindset. We strike not to have an Anemic Domain Model. A few guidelines and advices:

Displaying the entity in listing

If you want your entity to be displayed in the default listing page, it must implement ListableEntityInterface:

The data returned by viewListing will be displayed in the same order in each listing row. It can be an array or a QueryInterface object. You will learn more about queries in the next sections.

Command and queries

Entities apply the Command-Query Separation principle.

Query

Any entity method can return an array (simpler, preferred) or an object implementing QueryInterface. Orchestra will generate from it an action, a web page displaying the data from the returned object.

Note: QueryInterface extends \Traversable. It means that a Query will have to either extend \Iterator or IteratorAggregate Watch out, as of PHP 5.4.30, interface implementation order counts, you must implement one those 2 interfaces before implementing QueryInterface.

Command

Any entity method can accept an object implementing CommandInterface. Such method will be transformed into a web page with a Form.

A Command is typically a simple data container, with public properties. Those public properties will be mapped to Orchestra-generated Form.

Note: A Command will be called either by calling its constructor (in that case it should receive no argument), either you can designate a factory method on the entity. In that case, use the CommandFactory annotation on your Command class.

Persisting

Usually, they are persisted. Orchestra supports Doctrine ORM through its Symfony2 bridge. You will have to do their mapping, using Doctrine annotations, YAML (advised) or XML as you want. For this part, please refer to Symfony documentation.

Events

Events are objects implementing EventInterface. An Entity can emit Events.

A method emitting en Event must return either an Event or null (in that case nothing will happen). The Event will be passed to the corresponding Repository receive method (it must implement ReceiveEventInterface). You can then decide what to do.

Repositories

Those are NOT Doctrine repositories! We stick to the original Repository pattern (Fowler, 2002), "a collection-like interface for accessing domain objects".

Their name will be the name of the Entity suffixed by Repository but you're free to do otherwise.

Each Repository must have a corresponding Entity, with the same slug (lowercase name without suffix): for a FooBar entity, you must have a FoobarRepository, or FooBarRepository or FooBar (though this last is less readable).

Basic repository

We advise you to place those, by convention, in your bundle within a Repository folder.

They must implement RomaricDrigon\OrchestraBundle\Domain\Repository\RepositoryInterface:

They must be declared as services, tagged with orchestra.repository and indicating the corresponding entity class:

Fetching Doctrine repository

An Orchestra Repository is a Symfony2 service, so you can inject it dependencies.

Orchestra can automatically resolve and inject to your service the corresponding Doctrine repository. They will also receive a copy of Orchestra ObjectManager. To benefit from this, just implement RomaricDrigon\OrchestraBundle\Domain\Doctrine\DoctrineAwareInterface.

For simplicity, you can extends the provided BaseRepository class. You will then have access to the corresponding Doctrine repository, and we provide a generic listing method.

Customize displayed name

The name displayed for the Repository can be automatically generated, from the class name, or optionally personalized using the @Name annotation.

Hiding a method

You can add an Entity or Repository method from the menu by adding it a @Hidden annotation.

Note this does not work on interface, only child classes.

Security

Orchestra fully integrates with Symfony2 Security component, and does not try to interfere with it.

As a convenience, you can add @Security annotations to an Entity or Repository method to restrict access to the corresponding page. The content of this annotation is a valid Symfony2 Expression, identical to those used by the SensioFrameworkExtraBundle

Moreover you can access Orchestra objects, such as repository, entity which an EntityReflection or object the eventual current EntityInterface (but not the Request object directly).

Configuration

You can configure the Bundle by putting those settings in your config.yml:

Misc

IE8 is not supported by provided templates. Twitter Bootstrap is missing its JS polyfills, and we are using jQuery 2.0

Thanks

Twitter Bootstrap integration have been realized using templates from Braincrafted Bootstrap bundle

Security annotation are supported in a very similar way to SensioFrameworkExtraBundle


All versions of orchestra-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ~5.4
symfony/framework-bundle Version ~2.4
symfony/expression-language Version ~2.4
symfony/security-bundle Version ~2.4
symfony/form Version ~2.4
symfony/class-loader Version ~2.4
symfony/filesystem Version ~2.4
doctrine/orm Version ~2.2,>=2.2.3
doctrine/doctrine-bundle Version ~1.2
twig/extensions Version ~1.0.
symfony/assetic-bundle Version ~2.3
knplabs/knp-menu-bundle 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 romaricdrigon/orchestra-bundle contains the following files

Loading the files please wait ....