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.
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.
/* | |
Copyright (C) 2021 Pascal de Vink (Tweakers.net) | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
This library is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
# 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 |
The original blog post can be found here: http://blog.brunoscopelliti.com/building-a-restful-service-with-angularjs-and-php-backend-setup. I've tried to keep the logic the same as the original post.
Write a composer.json
, and require Silex. If you don't know about composer, you can learn about it at getcomposer.org. It's a package manager for PHP like NPM for node, most major projects now use this for managing dependencies.
{
Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.
####Search, Go to, Navigation ####
Cmd + P - Search file
Cmd + Shift + O - Search everywhere
(I swapped the above two recently because I use Cmd + P to search for files most of the time).
Handy helpers for controlling visibility of elements until Vue has compiled.
Use like:
<div v-cloak>
<h1>
<span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
<span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
#!/bin/sh | |
# settings based off of https://github.com/jcs/ansiterm/blob/master/ansiterm.sh | |
# get "Px437 IBM VGA9" from http://int10h.org/oldschool-pc-fonts/ | |
env LANG= xterm \ | |
-g 80x24 \ | |
-tn ansi \ | |
-fa "Px437 IBM VGA9" \ | |
-fs 24 \ |
<?php | |
declare(strict_types=1); | |
namespace Common; | |
use Business\MultiDomain\DetectEnvironment; | |
use function exec; | |
use function in_array; |