Download the PHP package spyrit/glorpen-propel-bundle without Composer

On this page you can find all versions of the php package spyrit/glorpen-propel-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 glorpen-propel-bundle


GlorpenPropelBundle

Additional Propel integration for Symfony2.

Official repositories

For forking and other funnies

BitBucket: https://bitbucket.org/glorpen/glorpenpropelbundle - main repo

GitHub: https://github.com/glorpen/GlorpenPropelBundle

How to install

app/AppKernel.php

To enable all behaviors at once you can import to your configuration @GlorpenPropelBundle/Resources/config/config.yml and config_dev.yml accordingly.

Example for config.yml:

Propel Events

If you didn't import config.yml providen by this bundle, you have to add event behavior to your propel configuration and change PropelPDO class.

And in config_dev.yml:

Listening for propel hooks

With subscriber:

With listener:

The `priority` attribute is optional.

In both cases you can narrow receiving events to given class with `class` attribute:

Available events

Event class: `ConnectionEvent`

Event class: `ModelEvent`

Events named `model.*.after` are triggered after transaction is commited but before returning from `$model->save()` method.

Additionally it will trigger only if something was updated/inserted, it will NOT trigger on empty save, eg: `$model->save()->save()`.

Event class: `QueryEvent`

Event class: `PeerEvent`

Will be called on model/query/peer construct/delete/update/etc

ContainerAwareInterface for model

You can implement ContainerAwareInterface on your model to get access to Container through built-in service. Container is injected in model.construct event.

If you find yourself with error like `Serialization of 'Closure' is not allowed` it is probably about some not serializable services injected in model (since propel occasionally serializes and unserializes data).

Transaction events

Just like with Doctrine @ORM\HasLifecycleCallbacks you can handle non db logic in model in db transaction.

Commit hooks will be run just before PDO transaction commit and rollback just before rolback and only on saved models (if exception was thrown in preCommit hook). Methods provided by EventBehavior are:

Be aware that when using transaction on big amount of model objects with on-demand formatter they still will be cached inside service so you can exhaust available php memory.

And example how you can use available hooks (code mostly borrowed from Symfony2 cookbook):

Custom events

You can trigger events with generic or custom Event class, in following example ValidationEvent.

Model Extending

If you didn't import config.yml providen by this bundle, you have to add extend behavior to your propel configuration.

With behavior enabled you can define custom model classes for use with Propel.

You can extend only Model classes this way (extending Peers/Queries shouldn't be needed).

Calls to Query::find(), Peer::populateObject() etc. will now return your extended class objects.

In short it fixes:

Mapping usage

In config.yml:

Dynamic/Services usage

You can create dynamic extends by using services.

Your service should implement Glorpen\Propel\PropelBundle\Provider\OMClassProvider interface.

In services.xml:

FOSUserBundle and AdminGenerator

With above config, you can generate backend with AdminGenerator for FOSUser edit/creation/etc. For now you have to create empty UserQuery and UserPeer classes and then whole backend for user model should work :)

Other goodies

PlainModelJoin

Allows to inject data into `ON` clause for eg. comparing field to date or field from other joined table.

Remember that provided values are added as-is, without parsing for aliases and escaping.

Usage:


All versions of glorpen-propel-bundle with dependencies

PHP Build Version
Package Version
Requires symfony/symfony Version >=2.3,<4.0
propel/propel-bundle Version 1.*
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 spyrit/glorpen-propel-bundle contains the following files

Loading the files please wait ....