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
The main design: | |
* Many ways to communicate between process such as Sockets, Streams, Fifo, 0MQ, RabbitMQ (I choose driver approach) | |
* A posix signal handler class to wich you can assign handler for signals and other stuff like send signal to process | |
* A packet handler which will handle packets sent between processes and trigger handlers to respond to signals. For e.q. ReloadConfig handle will trigger process to reload config | |
* A connection class wich will have a driver assigned to it and all pids and other stuff witch related to IPC |
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 Obj { | |
public $mod = false; | |
} | |
class Example { | |
protected $items = array(); | |
public function getItems() |
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 User { | |
public function getRoles() | |
{ | |
if ($this->roles) { | |
return $this->roles; | |
} | |
/** @var UserGroup[] $userGroups */ |
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
$(document).ready(function() { | |
var toggleVisible = function(div, label) { | |
if (div.is(':visible')) { | |
$.removeCookie('hiddenFilter'); | |
div.hide(); | |
} else { | |
$.cookie('hiddenFilter', 1); | |
div.show(); | |
} | |
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
const char* packetType = jsonObject["type"]; | |
if (packetType == "ping") { | |
// never reaches | |
} |
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 CachedContainer extends Container | |
{ | |
protected $container; | |
public function __construct() | |
{ | |
$this->container['foo'] = new Bar(); | |
$this->container['bar'] = new Foo(); |
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
module.provider('contentElement', ['$provide', '$injector', '$rootScope', function($provide, $injector, $rootScope) { | |
module.provider('contentElement', ['$provide', '$injector', function($provide, $injector, $rootScope) { |
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
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\Config\FileLocator; | |
use Symfony\Component\DependencyInjection\Definition; | |
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | |
use Symfony\Component\DependencyInjection\Loader; | |
/** | |
* This is the class that loads and manages your bundle configuration | |
* | |
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} |
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 | |
public function commentNewAction(Request $request, Post $post) | |
{ | |
$form = $this->createCommentForm(); | |
$form->handleRequest($request); | |
if ($form->isSubmitted() && $form->isValid()) { | |
/** @var Comment $comment */ | |
$comment = $form->getData(); |
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 EPWT\DataMapper\DataMap; | |
use Symfony\Component\Validator\Constraints as Assert; | |
class dataMapBooksFullBookInfo extend DataMap | |
{ | |
/** | |
* @var stirng | |
*/ |
OlderNewer