This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. All tags for services: http://symfony.com/doc/current/reference/dic_tags.html | |
2. Base documentation: http://symfony.com/doc/current/event_dispatcher.html , http://symfony.com/doc/current/components/event_dispatcher.html | |
3. Request/Responce before-after filters: http://symfony.com/doc/current/event_dispatcher/before_after_filters.html | |
4. Doctrine Listeners: http://symfony.com/doc/current/doctrine/event_listeners_subscribers.html | |
5. Doctrine Events: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\Controller; | |
use AppBundle\Entity\Author; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
class DefaultController extends Controller | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default-character-set = utf8mb4 | |
collation-server = utf8mb4_unicode_ci # Replaces utf8_general_ci | |
character-set-server = utf8mb4 # Replaces utf8 | |
bind-address = 0.0.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\AppBundle; | |
... | |
use Symfony\Bundle\FrameworkBundle\Console\Application; | |
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
use Symfony\Component\Console\Input\ArrayInput; | |
use Symfony\Component\Console\Output\BufferedOutput; | |
use Symfony\Component\Filesystem\Filesystem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\Command; | |
use Symfony\Bundle\FrameworkBundle\Console\Application; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\ArrayInput; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Output\BufferedOutput; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parameters: | |
test_db_path: "%kernel.cache_dir%/db.sqlite" //the real path of DB for the test | |
default_db_path: "%kernel.cache_dir%/Resources/private/tests/snapshot.sqlite" //is the real path of DB for snapshot | |
doctrine: | |
dbal: | |
default_connection: default | |
connections: | |
default: | |
driver: pdo_sqlite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\Tests\Form; | |
use AppBundle\Entity\EOrder; | |
use AppBundle\Entity\User; | |
use AppBundle\Form\ApiOrderType; | |
use AppBundle\Tests\AppTypeTestCase; | |
class ApiOrderTypeTest extends AppTypeTestCase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ImageHelper | |
{ | |
public function cropImage($content, $width, $height) | |
{ | |
$image = new \Imagick(); | |
$image->readImageBlob($content); | |
$image->setImageFormat('jpeg'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* Article | |
* | |
* @ORM\Table(name="article") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "ahonymous/hw4", | |
"description": "Geekhub AdvancedPHP 2015 HW#4", | |
"license": "MIT", | |
"authors": [ | |
{ | |
"name": "Alex Moshta", | |
"email": "[email protected]" | |
} | |
], |