# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
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 Tools; | |
use Nette\Debug; | |
use Nette\Environment; | |
use Nette\Finder; | |
/** | |
* Shows exceptions thrown in CLI mode in browser. |
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 | |
$catFilterIn = function($slug, $params, $origParams) use($site) { | |
if(!isset($site->languages[$params['lang']])) | |
return NULL; | |
$lang = $site->languages[$params['lang']]; | |
$temp = explode('/', trim($slug, '/')); | |
$path = array(); | |
$slugs = 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
<?php | |
/** | |
* @author Filip Procházka <filip@prochazka.su> | |
*/ | |
abstract class BasePresenter extends Nette\Application\UI\Presenter | |
{ | |
/** | |
* @var \Img\ImagePipe |
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 | |
/** | |
* This file is part of the Kdyby (http://www.kdyby.org) | |
* | |
* Copyright (c) 2008, 2012 Filip Procházka (filip@prochazka.su) | |
* | |
* For the full copyright and license information, please view the file license.txt that was distributed with this source code. | |
*/ |
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 \Nette\Diagnostics\Debugger; | |
/** | |
* Nette\Diagnostics\Debugger::barDump shortcut. | |
* @author Jáchym Toušek | |
* @param mixed $value | |
*/ | |
function bd($value) |
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 | |
/** | |
* Base presenter for all application presenters. | |
*/ | |
abstract class BasePresenter extends Nette\Application\UI\Presenter | |
{ | |
/** | |
* @var \Doctrine\ORM\EntityManager |
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 App; | |
class UserStorage extends \Nette\Http\UserStorage | |
{ | |
/** Log-out reason */ | |
const IDENTITY_CHANGED = 16; |
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 AnyKeyArray implements ArrayAccess, Iterator, Countable { | |
private $values = array(); | |
// ArrayAccess | |
function offsetSet($key, $value) { | |
$this->values[serialize($key)] = $value; | |
} | |
OlderNewer