xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
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
// Определяем зависимости в переменных | |
var gulp = require('gulp'), | |
cache = require('gulp-cache'), | |
clean = require('gulp-clean'), | |
stream = require('event-stream'), | |
size = require('gulp-size'), | |
jshint = require('gulp-jshint'), | |
concat = require('gulp-concat'), | |
uglify = require('gulp-uglify'), | |
minifyCSS = require('gulp-minify-css'), |
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 | |
// http://www.cplusplus.com/reference/queue/queue/ | |
class Queue { | |
private $_queue = array(); | |
public function size() { | |
return count($this->_queue); | |
} |
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 | |
// http://www.cplusplus.com/reference/stack/stack/ | |
class Stack { | |
private $_stack = array(); | |
public function size() { | |
return count($this->_stack); | |
} |
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 | |
class Node { | |
public $level = 1; | |
public $data = NULL; | |
public $left = NULL; | |
public $right = NULL; | |
public function __construct($data = NULL) { | |
$this->data = $data; |
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 | |
class Node { | |
public $data = NULL; | |
public $next = NULL; | |
public function __construct($data = NULL) { | |
$this->data = $data; | |
} | |
} |
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:
- the registration as service of your custom FOSUBUserProvider (with the necessary parameters)
- set the service for
oauth_user_provider
in thesecurity.yml
with your custom created service
Here are the steps:
- Routing. In
routing.yml
I have added all the routes for both bundles. - Configuration. I have set the
config.yml
mostly as it is presented in the HWIOAuthBundle. - Security. I have set the
security.yml
mostly as it is presented in the HWIOAuthBundle (though my routes are using/login
pattern, not/connect
). Also, theoauth_user_provider
is set for my custom service.
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 | |
/** | |
* Created by PhpStorm. | |
* User: danvbe | |
* Date: 7/25/14 | |
* Time: 2:49 PM | |
*/ | |
namespace Application\Sonata\PaymentBundle\Component; |
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
UPDATE TABLE_NAME | |
SET url_string=REPLACE(url_string, 'http://www.base_url.com/', '') | |
WHERE 1 |
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 | |
/**The following class generates VALID RFC 4211 COMPLIANT Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
* Version 3 and 5 UUIDs are named based. They require a namespace (another valid UUID) and a value (the name). Given the same namespace and name, the output is always the same. | |
* Version 4 UUIDs are pseudo-random. | |
* UUIDs generated below validates using OSSP UUID Tool, and output for named-based UUIDs are exactly the same. This is a pure PHP implementation. | |
*/ | |
class UUID { | |
public static function v3($namespace, $name) { | |
if(!self::is_valid($namespace)) return false; |