2017 © Pedro Peláez
 

library doctrine-uploadable

Doctrine2 behavior uploadable trait

image

ytko/doctrine-uploadable

Doctrine2 behavior uploadable trait

  • Monday, March 4, 2013
  • by ytko
  • Repository
  • 2 Watchers
  • 3 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Doctrine2 Uploadable Behavior

This php 5.4+ library provides file uploading trait for Doctrine2 entities., (*1)

This library needs Doctrine listener to be activated., (*2)

, (*3)

Listeners

Symfony2:, (*4)

``` yaml, (*5)

# app/config/config.yml
imports:
    - { resource: ../../vendor/ytko/doctrine-uploadable/config/orm-services.yml }

Or Doctrine2 api: ``` php <?php $em->getEventManager()->addEventSubscriber(new \Ytko\DoctrineBehaviors\ORM\UploadableListener);

Usage

Define a Doctrine2 entity and use traits:, (*6)

``` php, (*7)

<?php, (*8)

use Doctrine\ORM\Mapping as ORM; use Ytko\DoctrineBehaviors\Model\Uploadable;, (*9)

/** * @ORM\Entity */ class Category { use Uploadable;, (*10)

/**
 * @ORM\Id
 * @ORM\Column(type="integer")
 * @ORM\GeneratedValue(strategy="NONE")
 */
protected $id;

}, (*11)

```, (*12)

Inspired by KnpLabs/DoctrineBehaviors., (*13)

The Versions

04/03 2013

dev-master

9999999-dev http://ytko.ru

Doctrine2 behavior uploadable trait

  Sources   Download

MIT

The Requires

 

The Development Requires

doctrine2 behaviors uploadable