This file contains 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 method that is being tested | |
*/ | |
public function generateKeyNumber($key) { | |
// If there are no spaces, reject | |
if (0 === substr_count($key, ' ')) { | |
return ''; | |
} |
This file contains 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
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `table1`; | |
TRUNCATE TABLE `table2`; | |
SET FOREIGN_KEY_CHECKS = 1; |
This file contains 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 | |
require __DIR__.'/vendor/autoload.php'; | |
error_reporting(E_ALL | E_STRICT); | |
ini_set('display_errors', 1); | |
//$loop = new React\EventLoop\StreamSelectLoop(); | |
$loop = new React\EventLoop\LibEventLoop(); | |
$socket = new React\Socket\Server($loop); |
This file contains 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 | |
use Ratchet\MessageComponentInterface; | |
use Ratchet\ConnectionInterface; | |
class MyApp1 implements MessageComponentInterface { | |
public function onOpen(ConnectionInterface $conn) { | |
} | |
public function onMessage(ConnectionInterface $from, $msg) { | |
} |
This file contains 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 Ratchet\Server; | |
use Ratchet\ConnectionInterface; | |
class UvConnection implements ConnectionInterface { | |
private $client; | |
public function __construct($client) { | |
$this->client = $client; | |
} |
This file contains 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 | |
$collection = new RouteCollection; | |
$collection->add('chatRoom', new Route('/demo', array( | |
'_controller' => new ChatRoom | |
, 'allowedOrigins' => 'socketo.me' | |
))); | |
$collection->add('echo', new Route('/echo', array( |
This file contains 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
-----BEGIN CERTIFICATE----- | |
MIIEFzCCAv+gAwIBAgIBADANBgkqhkiG9w0BAQQFADBqMQswCQYDVQQGEwJkZTEP | |
MA0GA1UECBMGSGVzc2VuMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBM | |
dGQxEzARBgNVBAcTCkRpbGxlbmJ1cmcxEjAQBgNVBAMTCTEyNy4wLjAuMTAeFw0x | |
MjA2MTYyMDE2MDhaFw0yMjA2MTQyMDE2MDhaMGoxCzAJBgNVBAYTAmRlMQ8wDQYD | |
VQQIEwZIZXNzZW4xITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDET | |
MBEGA1UEBxMKRGlsbGVuYnVyZzESMBAGA1UEAxMJMTI3LjAuMC4xMIIBIjANBgkq | |
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAofA7J9eN5Q8pTrbHOBQC63gB4m6NPNjx | |
NZ302U5VK5SIkT8lYNk/uwY88C93jAgEBjgSk9IcLdzCRIay5UJmf92fSwZS+x+7 | |
V8nQyuMtQ+9uipX5nhFVAj1iGbO92McsuBb9ck1jQuNt5YZW1WsnGivh88vMiKBa |
This file contains 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 MyNamespace; | |
use Ratchet\MessageComponentInterface; | |
use Ratchet\ConnectionInterface; | |
class AccountedExceptions MessageComponentInterface { | |
protected $_app; | |
public function __construct($app) { | |
$this->_app = $app; |
This file contains 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
#!/bin/bash | |
SCRIPT=$(pwd)/$(dirname $0)/filter-repo.sh | |
$SCRIPT "event-loop" EventLoop | |
$SCRIPT stream Stream | |
$SCRIPT cache Cache | |
$SCRIPT dns Dns | |
$SCRIPT http Http | |
$SCRIPT "http-client" HttpClient |
This file contains 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 ExceptionFactory implements ExceptionFactoryInterface { | |
public function __invoke($msg = '') { | |
return new \Exception($msg); | |
} | |
} |
OlderNewer