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
/** | |
* Constraint to validate any of the constraints added to it. | |
* At least one constraint must pass validation. | |
* | |
* @Annotation | |
* @Target({"PROPERTY", "METHOD", "ANNOTATION"}) | |
*/ | |
class LogicalOr extends Composite | |
{ | |
public $message = 'This value is not valid.'; |
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 | |
echo superDuperRandom($argv[1], $argv[2]); | |
function superDuperRandom($min, $max) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'http://ron-swanson-quotes.herokuapp.com/v2/quotes'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
$data = curl_exec($ch); | |
curl_close($ch); |
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 CLI DEBUGGING | |
# `php-debug mysite.dev app/console cache:clear` | |
alias php-debug=phpdebug | |
function phpdebug { | |
CMD=`export PHP_IDE_CONFIG='serverName="echo $1"'` | |
eval $CMD | |
export XDEBUG_CONFIG="idekey=PHPSTORM" | |
shift | |
"$@" | |
unset XDEBUG_CONFIG |
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 Acme\Bundle\Command; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\HttpFoundation\RedirectResponse; |