- 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
| { | |
| "_index": "exercise_joybauer", | |
| "_type": "recipe", | |
| "_id": "119", | |
| "_score": 10.57531, | |
| "_source": { | |
| "title": "Italian Ranch Turkey Burger", | |
| "description": "This zesty, low-cal ranch burger was created by Joy Fit Club member Clint Lehman. The melty pockets of feta cheese really put it over the top!", | |
| "categories": [{ | |
| "title": "Type 2 Diabetes" |
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
| ;xDebug Configuration starts | |
| zend_extension=/usr/lib/php5/20121212/xdebug.so | |
| xdebug.max_nesting_level=250 | |
| xdebug.var_display_max_depth=10 | |
| xdebug.remote_enable=true | |
| xdebug.remote_handler=dbgp | |
| xdebug.remote_mode=req | |
| xdebug.remote_port=9000 | |
| xdebug.remote_host=127.0.0.1 | |
| xdebug.idekey=phpstorm-xdebug |
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
| sudo su | |
| apt-get install apache2 | |
| apt-get install php5 libapache2-mod-php5 | |
| apt-get install mysql-server mysql-client | |
| apt-get install phpmyadmin | |
| service apache2 restart | |
| apt-get install php5-mysql php5-curl php5-gd php5-intl php5-imagick php5-imap php5-mcrypt php5-memcache php5-xdebug php-apc php5-dev | |
| apt-get install git-core | |
| apt-get install curl |
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
| http://design-pattern.ru/patterns/data-mapper.html - Doctrine2 | |
| https://ru.wikipedia.org/wiki/ActiveRecord - Propel, Laravel, Yii, Yii2 | |
| Data Fixtures | |
| http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html | |
| https://github.com/hautelook/AliceBundle | |
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 ParentParentClass | |
| { | |
| public static function test() | |
| { | |
| echo 'ParentParent::test call'; | |
| } | |
| } |
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 Geekhub\UserBundle\Tests\UserProvider; | |
| use Geekhub\UserBundle\Entity\User; | |
| use Geekhub\UserBundle\UserProvider\FacebookProvider; | |
| use HWI\Bundle\OAuthBundle\OAuth\Response\PathUserResponse; | |
| class FacebookProviderTest extends \PHPUnit_Framework_TestCase | |
| { |
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> | |
| # The ServerName directive sets the request scheme, hostname and port that | |
| # the server uses to identify itself. This is used when creating | |
| # redirection URLs. In the context of virtual hosts, the ServerName | |
| # specifies what hostname must appear in the request's Host: header to | |
| # match this virtual host. For the default virtual host (this file) this | |
| # value is not decisive as it is used as a last resort host regardless. | |
| # However, you must set it for any further virtual host explicitly. | |
| #ServerName www.example.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 | |
| if (is_cli()) { | |
| echo "********************************\n"; | |
| echo "* *\n"; | |
| echo "* Symfony requirements check *\n"; | |
| echo "* *\n"; | |
| echo "********************************\n\n"; | |
| echo sprintf("php.ini used by PHP: %s\n\n", get_ini_path()); |
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
| #!/usr/bin/env php | |
| <?php | |
| require_once __DIR__.'/base_script.php'; | |
| $options = getopt("", array('db:', 'dir:')); | |
| $options['dir'] = !empty($options['dir']) ? $options['dir'] : "/"; | |
| $options['db'] = !empty($options['db']) ? $options['db']: "exercise"; | |
| $optionsLine = sprintf(" --dir=%s --db=%s", $options['dir'], $options['db']); |