๐
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
| #path/to/project/.htaccess | |
| # Rewrite all requests to subdirectory, except exists file requests | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule ^(.*)$ /web/$1 [QSA,L] | |
| </IfModule> |
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 | |
| /** | |
| * Convert current object to array | |
| */ | |
| public function toArray() | |
| { | |
| $data = array(); | |
| foreach (get_object_vars($this) as $property => $value) { |
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
| function getDefaultSelector() { | |
| return '.home'; | |
| } | |
| function hashToSelector(hash) { | |
| return hash.match(/^#.+/) | |
| ? hash.replace(/^#/, '.') | |
| : getDefaultSelector() | |
| ; | |
| } |
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 | |
| /** | |
| * @var string $name | |
| * | |
| * @ORM\Column(type="string") | |
| */ | |
| private $name = ''; | |
| public function setName($name) { |
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
| home_redirect: | |
| host: "%domain%" | |
| pattern: /%locale%/ | |
| defaults: | |
| _controller: FrameworkBundle:Redirect:urlRedirect | |
| path: / | |
| permanent: false | |
| home_locale: | |
| host: "%domain%" |
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
| server { | |
| listen 80; | |
| server_name symfony.localhost www.symfony.localhost; | |
| root /var/www/symfony/web; | |
| error_log /var/log/nginx/symfony.error.log; | |
| access_log /var/log/nginx/symfony.access.log; | |
| # strip app_dev.php/ prefix if exists |
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
| RewriteEngine On | |
| RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index\.php/?(.*)\s [NC] | |
| RewriteRule ^.*$ /%1%2 [R=301,L] | |
| # if the requested path and file doesn't directly match a physical file | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| # and the requested path and file doesn't directly match a physical folder | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| # internally rewrite the request to the index.php script |
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 usermod -a -G groupname username |
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 | |
| ini_set('error_reporting', E_ALL); | |
| ini_set('display_errors', true); |