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 | |
/** | |
* @param string $a | |
* @param string $b | |
* @return string | |
*/ | |
public static function blend($a, $b) | |
{ | |
$pos = strrpos($a, $b); |
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 HomepagePresenter extends BasePresenter | |
{ | |
public function actionDefault() | |
{ | |
$detector = $this->context->detector; | |
if ($detector->isMobile()) { | |
$this->redirect("mobile"); |
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 | |
abstract class BaseModel extends Nette\Object | |
{ | |
/** @var NotORM */ | |
protected $connection; | |
/** |
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 | |
/** | |
* @see https://github.com/HosipLan/Nette-addDynamic | |
*/ | |
class CreatePresenter extends BasePresenter | |
{ | |
protected function startup() | |
{ |
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 templatePrepareFilters($template) { | |
$template->registerFilter($latte = new Nette\Templates\LatteFilter()); | |
TwigMacro::register($latte->getHandler()); | |
} |
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 Doctrine\ORM\Query\Expr\Join; | |
class OfferFinder extends Blabla | |
{ | |
public function whereTags(array $tags) | |
{ |
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 | |
// new movie | |
$movie = new Entities\Movie; | |
$movie->name = 'Pulp Fiction'; | |
// new director | |
$movie->director = new Entities\Director; | |
$movie->director->name = 'Quentin Tarantino'; |
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 NetteExtras\Forms; | |
class ChangeTracker extends \Nette\Forms\HiddenField | |
{ | |
private $session; | |
private $modifiedValues; |
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 Nette\Templates; | |
use Nette\Forms\Form; | |
use Nette\String; | |
/** | |
* Form macros | |
* |
NewerOlder