- Install Symfony standart edition
- Symfony Bundles
- Symfony Components
- Create Bundle, route and controller
- Add twig view
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 <Organization>\AppBundle\Tests; | |
| use Symfony\Component\Form\Extension\Core\CoreExtension; | |
| use Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension; | |
| use Symfony\Component\Form\Forms; | |
| use Symfony\Component\Form\Test\TypeTestCase; | |
| use Symfony\Component\Validator\ConstraintViolationList; |
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 <dsaaffa>; | |
| use Symfony\Bundle\FrameworkBundle\Client; | |
| use Symfony\Bundle\FrameworkBundle\Console\Application; | |
| use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
| use Symfony\Component\Console\Input\ArrayInput; | |
| use Symfony\Component\Console\Output\ConsoleOutput; |
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
| public function addCommentAction(Request $request) | |
| { | |
| $comment = new Comment(); | |
| $form = $this->createForm(new CommentFormType(),$comment); | |
| if ($request->isMethod('POST')) { | |
| $form->handleRequest($request); | |
| if ($form->isValid()) { |
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
| <VirtualHost *:80> | |
| #ServerName www.example.com | |
| ServerAdmin ahonymous@gmail.com | |
| DocumentRoot /home/alex/extra/www/html | |
| ErrorLog ${APACHE_LOG_DIR}/error.log | |
| CustomLog ${APACHE_LOG_DIR}/access.log combined | |
| <Directory /home/alex/extra/www/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 | |
| require_once 'vendor/autoload.php'; | |
| use Filipac\Ip; | |
| PHP_Timer::start(); | |
| $ip = Ip::get(); | |
| echo "Hello, your ip is: {$ip} </br> "; |
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": "ahonymous@gmail.com" | |
| } | |
| ], |
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
| <?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\Tests\Form; | |
| use AppBundle\Entity\EOrder; | |
| use AppBundle\Entity\User; | |
| use AppBundle\Form\ApiOrderType; | |
| use AppBundle\Tests\AppTypeTestCase; | |
| class ApiOrderTypeTest extends AppTypeTestCase |
OlderNewer