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 tryCall($method, array $params) | |
| { | |
| $type = substr($method, 0, 6); | |
| if ($type === 'action') { | |
| $this->evm->dispatchEvent(get_class($this) . '::onBeforeAction', new EventArgsList([$this, $this->action])); | |
| } elseif ($type === 'render') { | |
| $this->evm->dispatchEvent(get_class($this) . '::onBeforeRender', new EventArgsList([$this, $this->view])); | |
| } | |
| $result = parent::tryCall($method, $params); |
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
| - Praha: http://srazy.info/nettefwpivo | |
| - Brno: http://srazy.info/nettefwbrnopivo | |
| - České Budějovice: http://srazy.info/nettefwcbpivo | |
| - Smilovice: http://srazy.info/nettefwsmilovicepivo | |
| - Plzeň: http://srazy.info/nettefwplzenpivo | |
| - Hradec Králové: http://srazy.info/nettehkpivo | |
| - Chrudim: http://srazy.info/nettefwchrudimpivo | |
| - Pardubice: http://srazy.info/nettefwpardubicepivo |
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 SessionCleanerListener implements Kdyby\Events\Subscriber | |
| { | |
| private $session; | |
| public function __construct(Nette\Http\Session $session) | |
| { | |
| $this->session = $session; | |
| } |
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 CategorySpecification | |
| { | |
| private $category; | |
| public function __construct($category) | |
| { | |
| $this->category = $category; | |
| } | |
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 MyFormFactory | |
| { | |
| public function create(BusinessCard $card) | |
| { | |
| $form = new Form; | |
| $form->addText(...); | |
| $form->onSuccess[] = function ($form) use ($card) { | |
| $this->processForm($form, $card); |
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 RouterFactory | |
| { | |
| public /* static */ function createRouter() | |
| { | |
| $router = new Nette\Application\Routers\RouteList(); | |
| $router[] = $adminRouter = new Nette\Application\Routers\RouteList("Admin"); |
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 | |
| interface MessageFactory | |
| { | |
| /** | |
| * @return \Nette\Mail\Message | |
| */ | |
| public function create(); | |
| } |
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 | |
| /** @var string @persistent */ | |
| public $_backlink; | |
| public function link($destination, $args = []) | |
| { | |
| $modifiers = []; | |
| if (($pos = strrpos($destination, ')')) !== FALSE) { | |
| $modifiers = array_fill_keys(explode(')(', substr($destination, 1, $pos - 1)), TRUE); | |
| $destination = substr($destination, $pos + 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 | |
| class Foo | |
| { | |
| public function __construct($id, FooModel $fooModel) | |
| { | |
| ... | |
| } | |
| } |
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
| local key = KEYS[1] | |
| local val = redis.call("get", key) | |
| if val == nil then | |
| return nil | |
| end | |
| local tags = redis.call('sMembers', "Nette.Journal:" .. key .. ":tags") | |
| local expirations = redis.call("hMGet", "invalidations", unpack(tags)) | |
| local added = nil |