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 | |
private function getExtension($name) | |
{ | |
if( !isset($this->extensions[$name]) ){ | |
$classes = array_keys($this->getRobotLoader()->indexedClasses); | |
foreach( $classes AS $item ){ //echo "<hr>"; _dump($item); | |
if( $match = String::match($item, '~^kdyby\\\\(?P<type>modifications|addons)\\\\(?P<name>[^\\\\]+)\\\\loader$~i') ){ |
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 | |
* |
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 | |
if( !function_exists('mime_type_check') ){ | |
function mime_type_check($path) | |
{ | |
if( function_exists('mime_content_type') ) | |
return mime_content_type($path); | |
else | |
return 'undefined/unknown'; | |
} |
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 CallbackBody extends Callback | |
{ | |
public function __construct($paramList, $code, $param1 = null, $param2 = null, $param3 = null) | |
{ | |
$params = func_get_args(); | |
$params = array_slice($params, 2); | |
$this->callback = create_function($paramList, $code); | |
$this->params = $params; |
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
{foreach $blocks as $block}<div {attr id($block->id) class($block->classes)} n:tag-if="$block->hasContainer"> | |
{foreach $block->components as $component} | |
{control $component->name:$component->render, $component->params} | |
{/foreach} | |
</div>{/foreach} |
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 getPersistentDefaults() | |
{ | |
$defaults = array(); | |
foreach ($this->getReflection()->getPersistentParams() as $nm => $meta) | |
$defaults[$nm] = $meta['def']; | |
} | |
return $defaults; |
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 | |
class UglyComponentPointer implements \Nette\IComponent, \ArrayAccess | |
{ | |
/** @var \Nette\Component */ | |
private $pointer; | |
private $noesark = 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 | |
namespace Kdyby\Presenter; | |
abstract class Base extends \Nette\Application\Presenter | |
{ | |
// ... | |