Download the PHP package enemis/media-bundle without Composer

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

Media bundle - the easiest way to manipulate your media.

Какую проблему решаем и что послужило побудило разработать данный проект для управления медия?

Главная проблема sonata media-bundle в том что он является частью экосистемы соната, а значит для управления медиа файлами вам нужно установить:   
    sonata core, sonata block bundle, sonata admin. Но данные бандлы не всегда нужны, например у вас свой админ интерфейс или ваш проект будет конфликтовать с зависимости сонаты. 

Цели проекта:

Установка

Добавить в bundles.php:
`    Enemis\MediaBundle\EnemisMediaBundle::class => ['all' => true],
     Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true],
     Sonata\Doctrine\Bridge\Symfony\SonataDoctrineSymfonyBundle::class => ['all' => true],`

Настройка

Создание Entities

Создайте сущности для каждого контекста можно использовать одни и теже сущности и таблицы для разных контекстов либо создать разные

### \App\Entity\Media.php
`<?php

 declare(strict_types=1);

 namespace App\Entity;

 use Enemis\MediaBundle\Entity\BaseMedia;
 use Doctrine\ORM\Mapping as ORM;
 use App\Repository\MediaRepository;

 /**
  * @ORM\Entity(repositoryClass=MediaRepository::class)
  */
 class Media extends BaseMedia
 {
     /**
      * @ORM\Id()
      * @ORM\GeneratedValue()
      * @ORM\Column(type="integer")
      */
     private $id;

     public function getId(): ?int
     {
        return $this->id;
     }
 }`

     ### \App\Entity\Gallery.php
     `<?php

      declare(strict_types=1);

      namespace App\Entity;

      use Enemis\MediaBundle\Entity\BaseMedia;
      use Doctrine\ORM\Mapping as ORM;
      use App\Repository\GalleryRepository;

      /**
       * @ORM\Entity(repositoryClass=GalleryRepository::class)
       */
      class Gallery extends BaseMedia
      {
          /**
           * @ORM\Id()
           * @ORM\GeneratedValue()
           * @ORM\Column(type="integer")
           */
          private $id;

          public function getId(): ?int
          {
             return $this->id;
          }
      }

`

\App\Entity\GalleryHasMedia.php

     `<?php

      declare(strict_types=1);

      namespace App\Entity;

      use Enemis\MediaBundle\Entity\BaseGalleryHasMedia;
      use Doctrine\ORM\Mapping as ORM;

      /**
       * @ORM\Entity()
       */
      class GalleryHasMedia extends BaseGalleryHasMedia
      {
          /**
           * @ORM\Id()
           * @ORM\GeneratedValue()
           * @ORM\Column(type="integer")
           */
          private $id;

          public function getId(): ?int
          {
              return $this->id;
          }
      }
     `

     #Репозитории?

     Затем нужно выполнить обновить схему базы данных. 
     Для получения звпросов которые должны выполнится выполните
     `$ bin/console doctrine:schema:update --dump-sql`

     Для внесение изменений рекомендуется использовать миграции либо если вы только начинаете проект:
     `$ bin/console doctrine:schema:update --force`

     Данная команда создаст необходимые таблицы.

Написать про возможность хранение оригиналов на амазон а кеш отдельно


All versions of media-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
guzzlehttp/psr7 Version ^1.0
imagine/imagine Version ^0.6 || ^0.7 || ^1.0
jms/serializer-bundle Version ^2.3.1 || ^3.0
knplabs/gaufrette Version ^0.8 || ^0.9
kriswallsmith/buzz Version ^0.15 || ^0.16
psr/log Version ^1.0
doctrine/orm Version ^2.8
doctrine/doctrine-bundle Version ^2.2
symfony/config Version ^4.3
symfony/console Version ^4.3
symfony/dependency-injection Version ^4.3
symfony/event-dispatcher Version ^4.3
symfony/form Version ^4.3
symfony/framework-bundle Version ^4.3
symfony/mime Version ^4.3 || ^5.0
symfony/options-resolver Version ^4.3
symfony/routing Version ^4.3
symfony/security-bundle Version ^4.3
symfony/security-core Version ^4.3
symfony/templating Version ^4.3
symfony/translation Version ^4.3
symfony/twig-bundle Version ^4.3
symfony/validator Version ^4.3
twig/twig Version ^2.10|^3.0
knplabs/knp-gaufrette-bundle Version v0.7.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 enemis/media-bundle contains the following files

Loading the files please wait ....