PHP
13
Вклад в тег
Table "public.social_account"
Column | Type | Modifiers
-------------+--------------------------------+-----------
user_id | integer | not null
network | character varying(255) | not null
external_id | character varying(255) | not null
created_at | timestamp(0) without time zone | not null
updated_at | timestamp(0) without time zone | not null
id | uuid | not null
Indexes:
"social_account_pkey" PRIMARY KEY, btree (id)
"unique_social_account" UNIQUE, btree (network, external_id)
"idx_f24d8339a76ed395" btree (user_id)
Foreign-key constraints:
"fk_f24d8339a76ed395" FOREIGN KEY (user_id) REFERENCES app_user(id) ON DELETE CASCADE
md5(123) = 202cb962ac59075b964b07152d234b70
берем первый символ хеша - 2, создаем папку "2" в /uploads/images
берем второй символ хеша - 0, создаем папку "0" в /uploads/images/2
создаем папку "202cb962ac59075b964b07152d234b70" в /uploads/images/2/0/
кладём в /uploads/images/2/0/202cb962ac59075b964b07152d234b70 нужные файлы
DependencyInjection/AcmeAppExtension.php
.<?php
namespace Acme\AppBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
/**
* This is the class that loads and manages your bundle configuration.
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
* @codeCoverageIgnore
*/
class AcmeAppExtension extends Extension
{
/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$this->processConfiguration($configuration, $configs);
$loader = new Loader\PhpFileLoader($container, new FileLocator(__DIR__ . '/../config/'));
$loader->load('services.php');
if ($container->getParameter('kernel.environment') == 'dev') {
$loader->load('services_dev.php');
}
if ($container->getParameter('kernel.environment') == 'test') {
$loader->load('services_test.php');
}
}
}