Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| # Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html | |
| MyEntity: | |
| type: entity | |
| repositoryClass: MyRepositoryClass | |
| table: my_entity | |
| namedQueries: | |
| all: "SELECT u FROM __CLASS__ u" | |
| # Class-Table-Inheritance |
| # Generate a private key | |
| openssl genrsa -des3 -out server.key.org 1024 | |
| # Generate a CSR: Certificate Signing Request | |
| openssl req -new -key server.key.org -out server.csr | |
| # Remove password from key | |
| openssl rsa -in server.key.org -out server.key | |
| # Generate a self-signed certificate |
| // Scroll to the bottom of the friend list and type the following line in your console | |
| // For checkboxes (e.g. invite to an event) | |
| var c = document.querySelectorAll("a[role='checkbox']"); for (var i = 0; i < c.length; i++) c[i].click(); | |
| // For invite buttons (e.g. invite to like a page) | |
| var c = document.querySelectorAll(".uiButton._1sm"); for (var i = 0; i < c.length; i++) c[i].click(); |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| <?php | |
| require_once dirname(__DIR__).'/../../../../app/AppKernel.php'; | |
| /** | |
| * Test case class helpful with Entity tests requiring the database interaction. | |
| * For regular entity tests it's better to extend standard \PHPUnit_Framework_TestCase instead. | |
| */ | |
| abstract class KernelAwareTest extends \PHPUnit_Framework_TestCase | |
| { |
| <?php | |
| namespace Standalone\Form; | |
| use \Symfony\Component\HttpFoundation as SHttp; | |
| use \Symfony\Component\Form as SForm; | |
| use \Symfony\Component\DependencyInjection as SDI; | |
| use \Symfony\Bridge as SBridge; | |
| //Register all your autoload function here | |
| //... |