This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
private function getAllFormErrors($children, $template = true) { | |
foreach ($children as $child) { | |
if ($child->hasErrors()) { | |
$vars = $child->createView()->getVars(); | |
$errors = $child->getErrors(); | |
foreach ($errors as $error) { | |
$this->allErrors[$vars["name"]][] = $this->convertFormErrorObjToString($error); | |
} | |
} |
set :application, "appname" | |
set :deploy_to, "/var/www" | |
set :scm, :git | |
set :repository, "git@github.com:user/app.git" | |
default_run_options[:pty] = true | |
set :user, "www-data" | |
set :domain, "foo.tld" | |
set :normalize_asset_timestamps, false |
<?php | |
namespace Silex\Provider; | |
use Silex\Application; | |
use Silex\SilexEvents; | |
use Silex\ControllerProviderInterface; | |
use Silex\ControllerCollection; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
/*global module:false*/ | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
min: { | |
ariaAccessibility: { | |
src: ['src/javascripts/jquery.selectBoxIt.ariaAccessibility.js'], | |
dest: 'src/javascripts/jquery.selectBoxIt.ariaAccessibility.min.js' | |
}, |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:
oauth_user_provider
in the security.yml
with your custom created serviceHere are the steps:
routing.yml
I have added all the routes for both bundles.config.yml
mostly as it is presented in the HWIOAuthBundle.security.yml
mostly as it is presented in the HWIOAuthBundle (though my routes are using /login
pattern, not /connect
). Also, the oauth_user_provider
is set for my custom service.<?php | |
function get_combinations($arrays) { | |
$result = array(array()); | |
foreach ($arrays as $property => $property_values) { | |
$tmp = array(); | |
foreach ($result as $result_item) { | |
foreach ($property_values as $property_value) { | |
$tmp[] = array_merge($result_item, array($property => $property_value)); | |
} |