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
| [ | |
| { | |
| "content_type": "users_box", | |
| "records": [ | |
| { | |
| "user": "name" | |
| }, | |
| { | |
| "user": "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
| { | |
| "comments": [ | |
| { | |
| "type": "speciality_contribution_comment", | |
| "id": 2, | |
| "comment": "Que patat tan sabrosa", | |
| "user": { | |
| "type": "user", | |
| "name": "joan", | |
| ... |
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
| [ | |
| { "type": "user", | |
| "name": "joan" | |
| }, | |
| { "type": "user" , | |
| "name": "PDO" | |
| }, | |
| { "type": "separator", |
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
| $resource = __DIR__. 'myfile.csv'; | |
| $file = new \SplFileObject($resource); | |
| $file->setFlags(\SplFileObject::READ_CSV | | |
| \SplFileObject::SKIP_EMPTY | | |
| \SplFileObject::DROP_NEW_LINE | |
| ); | |
| $file->setCsvControl(';', '"'); | |
| foreach ($file as $item) { |
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
| APACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd' | grep -v root | head -1 | cut -d\ -f1` | |
| sudo chmod +a "$APACHEUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs | |
| sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs | |
| or... | |
| umask(0002) or umask(0000) |
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://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.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
| mysql> CREATE USER 'usuario'@'localhost' IDENTIFIED BY 'contraseña'; | |
| mysql> GRANT ALL ON concerts.* TO 'usuario'@'localhost'; |
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
| { "doctrine/doctrine-fixtures-bundle": "dev-master", | |
| "doctrine/data-fixtures": "dev-master" | |
| } | |
| Add to appKernel.php in register bundles: | |
| new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle() | |
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 | |
| /** | |
| * User | |
| * | |
| * @ORM\Table(name="user") | |
| * @ORM\Entity(repositoryClass="nemmi\WebBundle\Entity\UserRepository") | |
| * | |
| */ | |
| class User |
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 nemmi\WebBundle\Entity; | |
| use Doctrine\ORM\EntityRepository; | |
| use Doctrine\ORM\NoResultException; | |
| use Doctrine\ORM\Tools\Pagination\Paginator; | |
| use Doctrine\ORM\AbstractQuery; |
OlderNewer