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
kill -9 $(lsof -t -i :9000) |
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 | |
foreach(Yii::app()->user->getFlashes() as $key => $message) { | |
echo '<div class="flash-' . $key . '">' . $message . "</div>\n"; | |
} | |
?> |
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 | |
protected function checkMethodExists($method) | |
{ | |
if (!method_exists($this, $method)) | |
throw new CException("Method CController::{$method}() not found"); | |
} | |
?> |
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 defined('DS') or define('DS', DIRECTORY_SEPARATOR); ?> |
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 RedisSessionHandler implements \SessionHandlerInterface{ | |
public $ttl = 1800; // 30 minutes default | |
protected $db; | |
protected $prefix; | |
public function __construct(Predis\Client $db, $prefix = 'PHPSESSID:') { |
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 | |
trait GetterSetter | |
{ | |
public function __get($name) | |
{ | |
$getter = 'get' . ucfirst($name); | |
if ( ! method_exists($this, $getter) ) | |
{ | |
throw new \Exception('Not found getter for property - ' . $name); | |
} |
NewerOlder