PageRenderTime 154ms CodeModel.GetById 48ms app.highlight 56ms RepoModel.GetById 1ms app.codeStats 4ms

/app/libs/nette.min.php

https://bitbucket.org/thoracek/rdprstice
PHP | 5617 lines | 5475 code | 134 blank | 8 comment | 61 complexity | 5b4618b87e2daa7fce18c578cb0d4f10 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1<?php //netteloader=Nette\Framework
  2
  3namespace {/**
  4 * Nette Framework (version 2.0.3 released on 2012-04-04, http://nette.org)
  5 *
  6 * Copyright (c) 2004, 2012 David Grudl (http://davidgrudl.com)
  7 *
  8 * For the full copyright and license information, please view
  9 * the file license.txt that was distributed with this source code.
 10 */
 11
 12error_reporting(E_ALL|E_STRICT);@set_magic_quotes_runtime(FALSE);iconv_set_encoding('internal_encoding','UTF-8');extension_loaded('mbstring')&&mb_internal_encoding('UTF-8');umask(0);@header('X-Powered-By: Nette Framework');@header('Content-Type: text/html; charset=utf-8');define('NETTE',TRUE);define('NETTE_DIR',__DIR__);define('NETTE_VERSION_ID',20003);define('NETTE_PACKAGE','5.3');}namespace Nette\Diagnostics{use
 13Nette;interface
 14IBarPanel{function
 15getTab();function
 16getPanel();}}namespace Nette\Application{use
 17Nette;interface
 18IPresenter{function
 19run(Request$request);}interface
 20IPresenterFactory{function
 21getPresenterClass(&$name);function
 22createPresenter($name);}interface
 23IResponse{function
 24send(Nette\Http\IRequest$httpRequest,Nette\Http\IResponse$httpResponse);}interface
 25IRouter{const
 26ONE_WAY=1;const
 27SECURED=2;function
 28match(Nette\Http\IRequest$httpRequest);function
 29constructUrl(Request$appRequest,Nette\Http\Url$refUrl);}}namespace Nette{use
 30Nette;interface
 31IFreezable{function
 32freeze();function
 33isFrozen();}}namespace Nette\ComponentModel{use
 34Nette;interface
 35IComponent{const
 36NAME_SEPARATOR='-';function
 37getName();function
 38getParent();function
 39setParent(IContainer$parent=NULL,$name=NULL);}interface
 40IContainer
 41extends
 42IComponent{function
 43addComponent(IComponent$component,$name);function
 44removeComponent(IComponent$component);function
 45getComponent($name);function
 46getComponents($deep=FALSE,$filterType=NULL);}}namespace Nette\Application\UI{use
 47Nette;interface
 48ISignalReceiver{function
 49signalReceived($signal);}interface
 50IStatePersistent{function
 51loadState(array$params);function
 52saveState(array&$params);}interface
 53IRenderable{function
 54invalidateControl();function
 55isControlInvalid();}}namespace Nette\Caching{use
 56Nette;interface
 57IStorage{function
 58read($key);function
 59lock($key);function
 60write($key,$data,array$dependencies);function
 61remove($key);function
 62clean(array$conds);}}namespace Nette\Caching\Storages{use
 63Nette;interface
 64IJournal{function
 65write($key,array$dependencies);function
 66clean(array$conditions);}}namespace Nette\Config{use
 67Nette;interface
 68IAdapter{function
 69load($file);function
 70dump(array$data);}}namespace Nette\Database{use
 71Nette;interface
 72ISupplementalDriver{const
 73META='meta';function
 74delimite($name);function
 75formatDateTime(\DateTime$value);function
 76formatLike($value,$pos);function
 77applyLimit(&$sql,$limit,$offset);function
 78normalizeRow($row,$statement);function
 79getTables();function
 80getColumns($table);function
 81getIndexes($table);function
 82getForeignKeys($table);}interface
 83IReflection{const
 84FIELD_TEXT='string',FIELD_BINARY='bin',FIELD_BOOL='bool',FIELD_INTEGER='int',FIELD_FLOAT='float',FIELD_DATE='date',FIELD_TIME='time',FIELD_DATETIME='datetime';function
 85getPrimary($table);function
 86getHasManyReference($table,$key);function
 87getBelongsToReference($table,$key);function
 88setConnection(Connection$connection);}}namespace Nette\DI{use
 89Nette;interface
 90IContainer{function
 91addService($name,$service);function
 92getService($name);function
 93removeService($name);function
 94hasService($name);}}namespace Nette\Forms{use
 95Nette;interface
 96IControl{function
 97loadHttpData();function
 98setValue($value);function
 99getValue();function
100getRules();function
101getErrors();function
102isDisabled();function
103translate($s,$count=NULL);}interface
104ISubmitterControl
105extends
106IControl{function
107isSubmittedBy();function
108getValidationScope();}interface
109IFormRenderer{function
110render(Form$form);}}namespace Nette\Http{use
111Nette;interface
112IRequest{const
113GET='GET',POST='POST',HEAD='HEAD',PUT='PUT',DELETE='DELETE';function
114getUrl();function
115getQuery($key=NULL,$default=NULL);function
116getPost($key=NULL,$default=NULL);function
117getFile($key);function
118getFiles();function
119getCookie($key,$default=NULL);function
120getCookies();function
121getMethod();function
122isMethod($method);function
123getHeader($header,$default=NULL);function
124getHeaders();function
125isSecured();function
126isAjax();function
127getRemoteAddress();function
128getRemoteHost();}interface
129IResponse{const
130PERMANENT=2116333333;const
131BROWSER=0;const
132S200_OK=200,S204_NO_CONTENT=204,S300_MULTIPLE_CHOICES=300,S301_MOVED_PERMANENTLY=301,S302_FOUND=302,S303_SEE_OTHER=303,S303_POST_GET=303,S304_NOT_MODIFIED=304,S307_TEMPORARY_REDIRECT=307,S400_BAD_REQUEST=400,S401_UNAUTHORIZED=401,S403_FORBIDDEN=403,S404_NOT_FOUND=404,S405_METHOD_NOT_ALLOWED=405,S410_GONE=410,S500_INTERNAL_SERVER_ERROR=500,S501_NOT_IMPLEMENTED=501,S503_SERVICE_UNAVAILABLE=503;function
133setCode($code);function
134getCode();function
135setHeader($name,$value);function
136addHeader($name,$value);function
137setContentType($type,$charset=NULL);function
138redirect($url,$code=self::S302_FOUND);function
139setExpiration($seconds);function
140isSent();function
141getHeaders();function
142setCookie($name,$value,$expire,$path=NULL,$domain=NULL,$secure=NULL,$httpOnly=NULL);function
143deleteCookie($name,$path=NULL,$domain=NULL,$secure=NULL);}interface
144ISessionStorage{function
145open($savePath,$sessionName);function
146close();function
147read($id);function
148write($id,$data);function
149remove($id);function
150clean($maxlifetime);}}namespace Nette\Security{use
151Nette;interface
152IUserStorage{const
153MANUAL=1,INACTIVITY=2,BROWSER_CLOSED=4;const
154CLEAR_IDENTITY=8;function
155setAuthenticated($state);function
156isAuthenticated();function
157setIdentity(IIdentity$identity=NULL);function
158getIdentity();function
159setExpiration($time,$flags=0);function
160getLogoutReason();}}namespace Nette\Latte{use
161Nette;interface
162IMacro{function
163initialize();function
164finalize();function
165nodeOpened(MacroNode$node);function
166nodeClosed(MacroNode$node);}}namespace Nette\Localization{use
167Nette;interface
168ITranslator{function
169translate($message,$count=NULL);}}namespace Nette\Mail{use
170Nette;interface
171IMailer{function
172send(Message$mail);}}namespace Nette\Reflection{use
173Nette;interface
174IAnnotation{function
175__construct(array$values);}}namespace Nette\Security{use
176Nette;interface
177IAuthenticator{const
178USERNAME=0,PASSWORD=1;const
179IDENTITY_NOT_FOUND=1,INVALID_CREDENTIAL=2,FAILURE=3,NOT_APPROVED=4;function
180authenticate(array$credentials);}interface
181IAuthorizator{const
182ALL=NULL;const
183ALLOW=TRUE;const
184DENY=FALSE;function
185isAllowed($role,$resource,$privilege);}interface
186IIdentity{function
187getId();function
188getRoles();}interface
189IResource{function
190getResourceId();}interface
191IRole{function
192getRoleId();}}namespace Nette\Templating{use
193Nette;interface
194ITemplate{function
195render();}interface
196IFileTemplate
197extends
198ITemplate{function
199setFile($file);function
200getFile();}}namespace Nette{use
201Nette;class
202ArgumentOutOfRangeException
203extends\InvalidArgumentException{}class
204InvalidStateException
205extends\RuntimeException{}class
206NotImplementedException
207extends\LogicException{}class
208NotSupportedException
209extends\LogicException{}class
210DeprecatedException
211extends
212NotSupportedException{}class
213MemberAccessException
214extends\LogicException{}class
215IOException
216extends\RuntimeException{}class
217FileNotFoundException
218extends
219IOException{}class
220DirectoryNotFoundException
221extends
222IOException{}class
223InvalidArgumentException
224extends\InvalidArgumentException{}class
225OutOfRangeException
226extends\OutOfRangeException{}class
227UnexpectedValueException
228extends\UnexpectedValueException{}class
229StaticClassException
230extends\LogicException{}class
231FatalErrorException
232extends\ErrorException{function
233__construct($message,$code,$severity,$file,$line,$context){parent::__construct($message,$code,$severity,$file,$line);$this->context=$context;}}abstract
234class
235Object{static
236function
237getReflection(){return
238new
239Reflection\ClassType(get_called_class());}function
240__call($name,$args){return
241ObjectMixin::call($this,$name,$args);}static
242function
243__callStatic($name,$args){return
244ObjectMixin::callStatic(get_called_class(),$name,$args);}static
245function
246extensionMethod($name,$callback=NULL){if(strpos($name,'::')===FALSE){$class=get_called_class();}else{list($class,$name)=explode('::',$name);}$class=new
247Reflection\ClassType($class);if($callback===NULL){return$class->getExtensionMethod($name);}else{$class->setExtensionMethod($name,$callback);}}function&__get($name){return
248ObjectMixin::get($this,$name);}function
249__set($name,$value){return
250ObjectMixin::set($this,$name,$value);}function
251__isset($name){return
252ObjectMixin::has($this,$name);}function
253__unset($name){ObjectMixin::remove($this,$name);}}}namespace Nette\Utils{use
254Nette;final
255class
256LimitedScope{private
257static$vars;final
258function
259__construct(){throw
260new
261Nette\StaticClassException;}static
262function
263evaluate(){if(func_num_args()>1){self::$vars=func_get_arg(1);extract(self::$vars);}$res=eval('?>'.func_get_arg(0));if($res===FALSE&&($error=error_get_last())&&$error['type']===E_PARSE){throw
264new
265Nette\FatalErrorException($error['message'],0,$error['type'],$error['file'],$error['line'],NULL);}return$res;}static
266function
267load(){if(func_num_args()>1){self::$vars=func_get_arg(1);if(self::$vars===TRUE){return include_once func_get_arg(0);}extract(self::$vars);}return include func_get_arg(0);}}}namespace Nette\Loaders{use
268Nette;abstract
269class
270AutoLoader
271extends
272Nette\Object{static
273private$loaders=array();public
274static$count=0;final
275static
276function
277load($type){foreach(func_get_args()as$type){if(!class_exists($type)){throw
278new
279Nette\InvalidStateException("Unable to load class or interface '$type'.");}}}final
280static
281function
282getLoaders(){return
283array_values(self::$loaders);}function
284register(){if(!function_exists('spl_autoload_register')){throw
285new
286Nette\NotSupportedException('spl_autoload does not exist in this PHP installation.');}spl_autoload_register(array($this,'tryLoad'));self::$loaders[spl_object_hash($this)]=$this;}function
287unregister(){unset(self::$loaders[spl_object_hash($this)]);return
288spl_autoload_unregister(array($this,'tryLoad'));}abstract
289function
290tryLoad($type);}}namespace Nette\Diagnostics{use
291Nette;final
292class
293Helpers{static
294function
295editorLink($file,$line){if(Debugger::$editor&&is_file($file)){$dir=dirname(strtr($file,'/',DIRECTORY_SEPARATOR));$base=isset($_SERVER['SCRIPT_FILENAME'])?dirname(dirname(strtr($_SERVER['SCRIPT_FILENAME'],'/',DIRECTORY_SEPARATOR))):dirname($dir);if(substr($dir,0,strlen($base))===$base){$dir='...'.substr($dir,strlen($base));}return
296Nette\Utils\Html::el('a')->href(strtr(Debugger::$editor,array('%file'=>rawurlencode($file),'%line'=>$line)))->title("$file:$line")->setHtml(htmlSpecialChars(rtrim($dir,DIRECTORY_SEPARATOR)).DIRECTORY_SEPARATOR.'<b>'.htmlSpecialChars(basename($file)).'</b>');}else{return
297Nette\Utils\Html::el('span')->setText($file);}}static
298function
299htmlDump(&$var,$level=0){static$tableUtf,$tableBin,$reBinary='#[^\x09\x0A\x0D\x20-\x7E\xA0-\x{10FFFF}]#u';if($tableUtf===NULL){foreach(range("\x00","\xFF")as$ch){if(ord($ch)<32&&strpos("\r\n\t",$ch)===FALSE){$tableUtf[$ch]=$tableBin[$ch]='\\x'.str_pad(dechex(ord($ch)),2,'0',STR_PAD_LEFT);}elseif(ord($ch)<127){$tableUtf[$ch]=$tableBin[$ch]=$ch;}else{$tableUtf[$ch]=$ch;$tableBin[$ch]='\\x'.dechex(ord($ch));}}$tableBin["\\"]='\\\\';$tableBin["\r"]='\\r';$tableBin["\n"]='\\n';$tableBin["\t"]='\\t';$tableUtf['\\x']=$tableBin['\\x']='\\\\x';}if(is_bool($var)){return'<span class="php-bool">'.($var?'TRUE':'FALSE')."</span>\n";}elseif($var===NULL){return"<span class=\"php-null\">NULL</span>\n";}elseif(is_int($var)){return"<span class=\"php-int\">$var</span>\n";}elseif(is_float($var)){$var=var_export($var,TRUE);if(strpos($var,'.')===FALSE){$var.='.0';}return"<span class=\"php-float\">$var</span>\n";}elseif(is_string($var)){if(Debugger::$maxLen&&strlen($var)>Debugger::$maxLen){$s=htmlSpecialChars(substr($var,0,Debugger::$maxLen),ENT_NOQUOTES,'ISO-8859-1').' ... ';}else{$s=htmlSpecialChars($var,ENT_NOQUOTES,'ISO-8859-1');}$s=strtr($s,preg_match($reBinary,$s)||preg_last_error()?$tableBin:$tableUtf);$len=strlen($var);return"<span class=\"php-string\">\"$s\"</span>".($len>1?" ($len)":"")."\n";}elseif(is_array($var)){$s='<span class="php-array">array</span>('.count($var).") ";$space=str_repeat($space1='   ',$level);$brackets=range(0,count($var)-1)===array_keys($var)?"[]":"{}";static$marker;if($marker===NULL){$marker=uniqid("\x00",TRUE);}if(empty($var)){}elseif(isset($var[$marker])){$brackets=$var[$marker];$s.="$brackets[0] *RECURSION* $brackets[1]";}elseif($level<Debugger::$maxDepth||!Debugger::$maxDepth){$s.="<code>$brackets[0]\n";$var[$marker]=$brackets;foreach($var
300as$k=>&$v){if($k===$marker){continue;}$k=strtr($k,preg_match($reBinary,$k)||preg_last_error()?$tableBin:$tableUtf);$k=htmlSpecialChars(preg_match('#^\w+$#',$k)?$k:"\"$k\"");$s.="$space$space1<span class=\"php-key\">$k</span> => ".self::htmlDump($v,$level+1);}unset($var[$marker]);$s.="$space$brackets[1]</code>";}else{$s.="$brackets[0] ... $brackets[1]";}return$s."\n";}elseif(is_object($var)){if($var
301instanceof\Closure){$rc=new\ReflectionFunction($var);$arr=array();foreach($rc->getParameters()as$param){$arr[]='$'.$param->getName();}$arr=array('file'=>$rc->getFileName(),'line'=>$rc->getStartLine(),'parameters'=>implode(', ',$arr));}else{$arr=(array)$var;}$s='<span class="php-object">'.get_class($var)."</span>(".count($arr).") ";$space=str_repeat($space1='   ',$level);static$list=array();if(empty($arr)){}elseif(in_array($var,$list,TRUE)){$s.="{ *RECURSION* }";}elseif($level<Debugger::$maxDepth||!Debugger::$maxDepth||$var
302instanceof\Closure){$s.="<code>{\n";$list[]=$var;foreach($arr
303as$k=>&$v){$m='';if($k[0]==="\x00"){$m=' <span class="php-visibility">'.($k[1]==='*'?'protected':'private').'</span>';$k=substr($k,strrpos($k,"\x00")+1);}$k=strtr($k,preg_match($reBinary,$k)||preg_last_error()?$tableBin:$tableUtf);$k=htmlSpecialChars(preg_match('#^\w+$#',$k)?$k:"\"$k\"");$s.="$space$space1<span class=\"php-key\">$k</span>$m => ".self::htmlDump($v,$level+1);}array_pop($list);$s.="$space}</code>";}else{$s.="{ ... }";}return$s."\n";}elseif(is_resource($var)){return'<span class="php-resource">'.htmlSpecialChars(get_resource_type($var))." resource</span>\n";}else{return"<span>unknown type</span>\n";}}static
304function
305clickableDump($dump,$collapsed=FALSE){return'<pre class="nette-dump">'.preg_replace_callback('#^( *)((?>[^(\r\n]{1,200}))\((\d+)\) <code>#m',function($m)use($collapsed){return"$m[1]<a href='#' rel='next'>$m[2]($m[3]) ".(($m[1]||!$collapsed)&&($m[3]<7)?'<abbr>&#x25bc;</abbr> </a><code>':'<abbr>&#x25ba;</abbr> </a><code class="nette-collapsed">');},self::htmlDump($dump)).'</pre>';}static
306function
307findTrace(array$trace,$method,&$index=NULL){$m=explode('::',$method);foreach($trace
308as$i=>$item){if(isset($item['function'])&&$item['function']===end($m)&&isset($item['class'])===isset($m[1])&&(!isset($item['class'])||$item['class']===$m[0]||is_subclass_of($item['class'],$m[0]))){$index=$i;return$item;}}}}}namespace Nette\Utils{use
309Nette;class
310Html
311extends
312Nette\Object
313implements\ArrayAccess,\Countable,\IteratorAggregate{private$name;private$isEmpty;public$attrs=array();protected$children=array();public
314static$xhtml=TRUE;public
315static$emptyElements=array('img'=>1,'hr'=>1,'br'=>1,'input'=>1,'meta'=>1,'area'=>1,'embed'=>1,'keygen'=>1,'source'=>1,'base'=>1,'col'=>1,'link'=>1,'param'=>1,'basefont'=>1,'frame'=>1,'isindex'=>1,'wbr'=>1,'command'=>1);static
316function
317el($name=NULL,$attrs=NULL){$el=new
318static;$parts=explode(' ',$name,2);$el->setName($parts[0]);if(is_array($attrs)){$el->attrs=$attrs;}elseif($attrs!==NULL){$el->setText($attrs);}if(isset($parts[1])){foreach(Strings::matchAll($parts[1].' ','#([a-z0-9:-]+)(?:=(["\'])?(.*?)(?(2)\\2|\s))?#i')as$m){$el->attrs[$m[1]]=isset($m[3])?$m[3]:TRUE;}}return$el;}final
319function
320setName($name,$isEmpty=NULL){if($name!==NULL&&!is_string($name)){throw
321new
322Nette\InvalidArgumentException("Name must be string or NULL, ".gettype($name)." given.");}$this->name=$name;$this->isEmpty=$isEmpty===NULL?isset(static::$emptyElements[$name]):(bool)$isEmpty;return$this;}final
323function
324getName(){return$this->name;}final
325function
326isEmpty(){return$this->isEmpty;}function
327addAttributes(array$attrs){$this->attrs=$attrs+$this->attrs;return$this;}final
328function
329__set($name,$value){$this->attrs[$name]=$value;}final
330function&__get($name){return$this->attrs[$name];}final
331function
332__isset($name){return
333isset($this->attrs[$name]);}final
334function
335__unset($name){unset($this->attrs[$name]);}final
336function
337__call($m,$args){$p=substr($m,0,3);if($p==='get'||$p==='set'||$p==='add'){$m=substr($m,3);$m[0]=$m[0]|"\x20";if($p==='get'){return
338isset($this->attrs[$m])?$this->attrs[$m]:NULL;}elseif($p==='add'){$args[]=TRUE;}}if(count($args)===0){}elseif(count($args)===1){$this->attrs[$m]=$args[0];}elseif((string)$args[0]===''){$tmp=&$this->attrs[$m];}elseif(!isset($this->attrs[$m])||is_array($this->attrs[$m])){$this->attrs[$m][$args[0]]=$args[1];}else{$this->attrs[$m]=array($this->attrs[$m],$args[0]=>$args[1]);}return$this;}final
339function
340href($path,$query=NULL){if($query){$query=http_build_query($query,NULL,'&');if($query!==''){$path.='?'.$query;}}$this->attrs['href']=$path;return$this;}final
341function
342setHtml($html){if($html===NULL){$html='';}elseif(is_array($html)){throw
343new
344Nette\InvalidArgumentException("Textual content must be a scalar, ".gettype($html)." given.");}else{$html=(string)$html;}$this->removeChildren();$this->children[]=$html;return$this;}final
345function
346getHtml(){$s='';foreach($this->children
347as$child){if(is_object($child)){$s.=$child->render();}else{$s.=$child;}}return$s;}final
348function
349setText($text){if(!is_array($text)){$text=htmlspecialchars((string)$text,ENT_NOQUOTES);}return$this->setHtml($text);}final
350function
351getText(){return
352html_entity_decode(strip_tags($this->getHtml()),ENT_QUOTES,'UTF-8');}final
353function
354add($child){return$this->insert(NULL,$child);}final
355function
356create($name,$attrs=NULL){$this->insert(NULL,$child=static::el($name,$attrs));return$child;}function
357insert($index,$child,$replace=FALSE){if($child
358instanceof
359Html||is_scalar($child)){if($index===NULL){$this->children[]=$child;}else{array_splice($this->children,(int)$index,$replace?1:0,array($child));}}else{throw
360new
361Nette\InvalidArgumentException("Child node must be scalar or Html object, ".(is_object($child)?get_class($child):gettype($child))." given.");}return$this;}final
362function
363offsetSet($index,$child){$this->insert($index,$child,TRUE);}final
364function
365offsetGet($index){return$this->children[$index];}final
366function
367offsetExists($index){return
368isset($this->children[$index]);}function
369offsetUnset($index){if(isset($this->children[$index])){array_splice($this->children,(int)$index,1);}}final
370function
371count(){return
372count($this->children);}function
373removeChildren(){$this->children=array();}final
374function
375getIterator($deep=FALSE){if($deep){$deep=$deep>0?\RecursiveIteratorIterator::SELF_FIRST:\RecursiveIteratorIterator::CHILD_FIRST;return
376new\RecursiveIteratorIterator(new
377Nette\Iterators\Recursor(new\ArrayIterator($this->children)),$deep);}else{return
378new
379Nette\Iterators\Recursor(new\ArrayIterator($this->children));}}final
380function
381getChildren(){return$this->children;}final
382function
383render($indent=NULL){$s=$this->startTag();if(!$this->isEmpty){if($indent!==NULL){$indent++;}foreach($this->children
384as$child){if(is_object($child)){$s.=$child->render($indent);}else{$s.=$child;}}$s.=$this->endTag();}if($indent!==NULL){return"\n".str_repeat("\t",$indent-1).$s."\n".str_repeat("\t",max(0,$indent-2));}return$s;}final
385function
386__toString(){return$this->render();}final
387function
388startTag(){if($this->name){return'<'.$this->name.$this->attributes().(static::$xhtml&&$this->isEmpty?' />':'>');}else{return'';}}final
389function
390endTag(){return$this->name&&!$this->isEmpty?'</'.$this->name.'>':'';}final
391function
392attributes(){if(!is_array($this->attrs)){return'';}$s='';foreach($this->attrs
393as$key=>$value){if($value===NULL||$value===FALSE){continue;}elseif($value===TRUE){if(static::$xhtml){$s.=' '.$key.'="'.$key.'"';}else{$s.=' '.$key;}continue;}elseif(is_array($value)){if($key==='data'){foreach($value
394as$k=>$v){if($v!==NULL&&$v!==FALSE){$s.=' data-'.$k.'="'.htmlspecialchars((string)$v).'"';}}continue;}$tmp=NULL;foreach($value
395as$k=>$v){if($v!=NULL){$tmp[]=$v===TRUE?$k:(is_string($k)?$k.':'.$v:$v);}}if($tmp===NULL){continue;}$value=implode($key==='style'||!strncmp($key,'on',2)?';':' ',$tmp);}else{$value=(string)$value;}$s.=' '.$key.'="'.htmlspecialchars($value).'"';}$s=str_replace('@','&#64;',$s);return$s;}function
396__clone(){foreach($this->children
397as$key=>$value){if(is_object($value)){$this->children[$key]=clone$value;}}}}}namespace Nette\Diagnostics{use
398Nette;final
399class
400Debugger{public
401static$productionMode;public
402static$consoleMode;public
403static$time;private
404static$ajaxDetected;public
405static$source;public
406static$editor='editor://open/?file=%file&line=%line';public
407static$browser;public
408static$maxDepth=3;public
409static$maxLen=150;public
410static$showLocation=FALSE;public
411static$consoleColors=array('bool'=>'1;33','null'=>'1;33','int'=>'1;36','float'=>'1;36','string'=>'1;32','array'=>'1;31','key'=>'1;37','object'=>'1;31','visibility'=>'1;30','resource'=>'1;37');const
412DEVELOPMENT=FALSE,PRODUCTION=TRUE,DETECT=NULL;public
413static$blueScreen;public
414static$strictMode=FALSE;public
415static$scream=FALSE;public
416static$onFatalError=array();private
417static$enabled=FALSE;private
418static$lastError=FALSE;public
419static$logger;public
420static$fireLogger;public
421static$logDirectory;public
422static$email;public
423static$mailer;public
424static$emailSnooze;public
425static$bar;private
426static$errorPanel;private
427static$dumpPanel;const
428DEBUG='debug',INFO='info',WARNING='warning',ERROR='error',CRITICAL='critical';final
429function
430__construct(){throw
431new
432Nette\StaticClassException;}static
433function
434_init(){self::$time=microtime(TRUE);self::$consoleMode=PHP_SAPI==='cli';self::$productionMode=self::DETECT;if(self::$consoleMode){self::$source=empty($_SERVER['argv'])?'cli':'cli: '.implode(' ',$_SERVER['argv']);}else{self::$ajaxDetected=isset($_SERVER['HTTP_X_REQUESTED_WITH'])&&$_SERVER['HTTP_X_REQUESTED_WITH']==='XMLHttpRequest';if(isset($_SERVER['REQUEST_URI'])){self::$source=(isset($_SERVER['HTTPS'])&&strcasecmp($_SERVER['HTTPS'],'off')?'https://':'http://').(isset($_SERVER['HTTP_HOST'])?$_SERVER['HTTP_HOST']:(isset($_SERVER['SERVER_NAME'])?$_SERVER['SERVER_NAME']:'')).$_SERVER['REQUEST_URI'];}}self::$logger=new
435Logger;self::$logDirectory=&self::$logger->directory;self::$email=&self::$logger->email;self::$mailer=&self::$logger->mailer;self::$emailSnooze=&Logger::$emailSnooze;self::$fireLogger=new
436FireLogger;self::$blueScreen=new
437BlueScreen;self::$blueScreen->addPanel(function($e){if($e
438instanceof
439Nette\Templating\FilterException){return
440array('tab'=>'Template','panel'=>'<p><b>File:</b> '.Helpers::editorLink($e->sourceFile,$e->sourceLine).'&nbsp; <b>Line:</b> '.($e->sourceLine?$e->sourceLine:'n/a').'</p>'.($e->sourceLine?BlueScreen::highlightFile($e->sourceFile,$e->sourceLine):''));}elseif($e
441instanceof
442Nette\Utils\NeonException&&preg_match('#line (\d+)#',$e->getMessage(),$m)){if($item=Helpers::findTrace($e->getTrace(),'Nette\Config\Adapters\NeonAdapter::load')){return
443array('tab'=>'NEON','panel'=>'<p><b>File:</b> '.Helpers::editorLink($item['args'][0],$m[1]).'&nbsp; <b>Line:</b> '.$m[1].'</p>'.BlueScreen::highlightFile($item['args'][0],$m[1]));}elseif($item=Helpers::findTrace($e->getTrace(),'Nette\Utils\Neon::decode')){return
444array('tab'=>'NEON','panel'=>BlueScreen::highlightPhp($item['args'][0],$m[1]));}}});self::$bar=new
445Bar;self::$bar->addPanel(new
446DefaultBarPanel('time'));self::$bar->addPanel(new
447DefaultBarPanel('memory'));self::$bar->addPanel(self::$errorPanel=new
448DefaultBarPanel('errors'));self::$bar->addPanel(self::$dumpPanel=new
449DefaultBarPanel('dumps'));}static
450function
451enable($mode=NULL,$logDirectory=NULL,$email=NULL){error_reporting(E_ALL|E_STRICT);if(is_bool($mode)){self::$productionMode=$mode;}elseif($mode!==self::DETECT||self::$productionMode===NULL){$mode=is_string($mode)?preg_split('#[,\s]+#',$mode):(array)$mode;$mode[]='127.0.0.1';$mode[]='::1';self::$productionMode=!in_array(isset($_SERVER['REMOTE_ADDR'])?$_SERVER['REMOTE_ADDR']:php_uname('n'),$mode,TRUE);}if(is_string($logDirectory)){self::$logDirectory=realpath($logDirectory);if(self::$logDirectory===FALSE){throw
452new
453Nette\DirectoryNotFoundException("Directory '$logDirectory' is not found.");}}elseif($logDirectory===FALSE){self::$logDirectory=FALSE;}elseif(self::$logDirectory===NULL){self::$logDirectory=defined('APP_DIR')?APP_DIR.'/../log':getcwd().'/log';}if(self::$logDirectory){ini_set('error_log',self::$logDirectory.'/php_error.log');}if(function_exists('ini_set')){ini_set('display_errors',!self::$productionMode);ini_set('html_errors',FALSE);ini_set('log_errors',FALSE);}elseif(ini_get('display_errors')!=!self::$productionMode&&ini_get('display_errors')!==(self::$productionMode?'stderr':'stdout')){throw
454new
455Nette\NotSupportedException('Function ini_set() must be enabled.');}if($email){if(!is_string($email)){throw
456new
457Nette\InvalidArgumentException('Email address must be a string.');}self::$email=$email;}if(!defined('E_DEPRECATED')){define('E_DEPRECATED',8192);}if(!defined('E_USER_DEPRECATED')){define('E_USER_DEPRECATED',16384);}if(!self::$enabled){register_shutdown_function(array(__CLASS__,'_shutdownHandler'));set_exception_handler(array(__CLASS__,'_exceptionHandler'));set_error_handler(array(__CLASS__,'_errorHandler'));self::$enabled=TRUE;}}static
458function
459isEnabled(){return
460self::$enabled;}static
461function
462log($message,$priority=self::INFO){if(self::$logDirectory===FALSE){return;}elseif(!self::$logDirectory){throw
463new
464Nette\InvalidStateException('Logging directory is not specified in Nette\Diagnostics\Debugger::$logDirectory.');}if($message
465instanceof\Exception){$exception=$message;$message=($message
466instanceof
467Nette\FatalErrorException?'Fatal error: '.$exception->getMessage():get_class($exception).": ".$exception->getMessage())." in ".$exception->getFile().":".$exception->getLine();$hash=md5($exception);$exceptionFilename="exception-".@date('Y-m-d-H-i-s')."-$hash.html";foreach(new\DirectoryIterator(self::$logDirectory)as$entry){if(strpos($entry,$hash)){$exceptionFilename=$entry;$saved=TRUE;break;}}}self::$logger->log(array(@date('[Y-m-d H-i-s]'),trim($message),self::$source?' @  '.self::$source:NULL,!empty($exceptionFilename)?' @@  '.$exceptionFilename:NULL),$priority);if(!empty($exceptionFilename)){$exceptionFilename=self::$logDirectory.'/'.$exceptionFilename;if(empty($saved)&&$logHandle=@fopen($exceptionFilename,'w')){ob_start();ob_start(function($buffer)use($logHandle){fwrite($logHandle,$buffer);},4096);self::$blueScreen->render($exception);ob_end_flush();ob_end_clean();fclose($logHandle);}return
468strtr($exceptionFilename,'\\/',DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR);}}static
469function
470_shutdownHandler(){if(!self::$enabled){return;}static$types=array(E_ERROR=>1,E_CORE_ERROR=>1,E_COMPILE_ERROR=>1,E_PARSE=>1);$error=error_get_last();if(isset($types[$error['type']])){self::_exceptionHandler(new
471Nette\FatalErrorException($error['message'],0,$error['type'],$error['file'],$error['line'],NULL));}if(self::$bar&&!self::$productionMode&&self::isHtmlMode()){self::$bar->render();}}static
472function
473_exceptionHandler(\Exception$exception){if(!headers_sent()){$protocol=isset($_SERVER['SERVER_PROTOCOL'])?$_SERVER['SERVER_PROTOCOL']:'HTTP/1.1';header($protocol.' 500',TRUE,500);}try{if(self::$productionMode){try{self::log($exception,self::ERROR);}catch(\Exception$e){echo'FATAL ERROR: unable to log error';}if(self::$consoleMode){echo"ERROR: the server encountered an internal error and was unable to complete your request.\n";}elseif(self::isHtmlMode()){?>
474<!DOCTYPE html>
475<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
476<meta name=robots content=noindex><meta name=generator content="Nette Framework">
477<style>body{color:#333;background:white;width:500px;margin:100px auto}h1{font:bold 47px/1.5 sans-serif;margin:.6em 0}p{font:21px/1.5 Georgia,serif;margin:1.5em 0}small{font-size:70%;color:gray}</style>
478
479<title>Server Error</title>
480
481<h1>Server Error</h1>
482
483<p>We're sorry! The server encountered an internal error and was unable to complete your request. Please try again later.</p>
484
485<p><small>error 500</small></p>
486<?php }}else{if(self::$consoleMode){echo"$exception\n";if($file=self::log($exception)){echo"(stored in $file)\n";if(self::$browser){exec(self::$browser.' '.escapeshellarg($file));}}}elseif(self::isHtmlMode()){self::$blueScreen->render($exception);if(self::$bar){self::$bar->render();}}elseif(!self::fireLog($exception,self::ERROR)){$file=self::log($exception);if(!headers_sent()){header("X-Nette-Error-Log: $file");}}}foreach(self::$onFatalError
487as$handler){call_user_func($handler,$exception);}}catch(\Exception$e){if(self::$productionMode){echo
488self::isHtmlMode()?'<meta name=robots content=noindex>FATAL ERROR':'FATAL ERROR';}else{echo"FATAL ERROR: thrown ",get_class($e),': ',$e->getMessage(),"\nwhile processing ",get_class($exception),': ',$exception->getMessage(),"\n";}}self::$enabled=FALSE;exit(255);}static
489function
490_errorHandler($severity,$message,$file,$line,$context){if(self::$scream){error_reporting(E_ALL|E_STRICT);}if(self::$lastError!==FALSE&&($severity&error_reporting())===$severity){self::$lastError=new\ErrorException($message,0,$severity,$file,$line);return
491NULL;}if($severity===E_RECOVERABLE_ERROR||$severity===E_USER_ERROR){throw
492new
493Nette\FatalErrorException($message,0,$severity,$file,$line,$context);}elseif(($severity&error_reporting())!==$severity){return
494FALSE;}elseif(!self::$productionMode&&(is_bool(self::$strictMode)?self::$strictMode:((self::$strictMode&$severity)===$severity))){self::_exceptionHandler(new
495Nette\FatalErrorException($message,0,$severity,$file,$line,$context));}static$types=array(E_WARNING=>'Warning',E_COMPILE_WARNING=>'Warning',E_USER_WARNING=>'Warning',E_NOTICE=>'Notice',E_USER_NOTICE=>'Notice',E_STRICT=>'Strict standards',E_DEPRECATED=>'Deprecated',E_USER_DEPRECATED=>'Deprecated');$message='PHP '.(isset($types[$severity])?$types[$severity]:'Unknown error').": $message";$count=&self::$errorPanel->data["$message|$file|$line"];if($count++){return
496NULL;}elseif(self::$productionMode){self::log("$message in $file:$line",self::ERROR);return
497NULL;}else{$ok=self::fireLog(new\ErrorException($message,0,$severity,$file,$line),self::WARNING);return!self::isHtmlMode()||(!self::$bar&&!$ok)?FALSE:NULL;}return
498FALSE;}static
499function
500toStringException(\Exception$exception){if(self::$enabled){self::_exceptionHandler($exception);}else{trigger_error($exception->getMessage(),E_USER_ERROR);}}static
501function
502tryError(){if(!self::$enabled&&self::$lastError===FALSE){set_error_handler(array(__CLASS__,'_errorHandler'));}self::$lastError=NULL;}static
503function
504catchError(&$error){if(!self::$enabled&&self::$lastError!==FALSE){restore_error_handler();}$error=self::$lastError;self::$lastError=FALSE;return(bool)$error;}static
505function
506dump($var,$return=FALSE){if(!$return&&self::$productionMode){return$var;}$output="<pre class=\"nette-dump\">".Helpers::htmlDump($var)."</pre>\n";if(!$return){$trace=debug_backtrace(FALSE);$i=Helpers::findTrace($trace,'dump')?1:0;if(isset($trace[$i]['file'],$trace[$i]['line'])&&is_file($trace[$i]['file'])){$lines=file($trace[$i]['file']);preg_match('#dump\((.*)\)#',$lines[$trace[$i]['line']-1],$m);$output=substr_replace($output,' title="'.htmlspecialchars((isset($m[0])?"$m[0] \n":'')."in file {$trace[$i]['file']} on line {$trace[$i]['line']}").'"',4,0);if(self::$showLocation){$output=substr_replace($output,' <small>in '.Helpers::editorLink($trace[$i]['file'],$trace[$i]['line']).":{$trace[$i]['line']}</small>",-8,0);}}}if(self::$consoleMode){if(self::$consoleColors&&substr(PHP_OS,0,3)!=='WIN'){$output=preg_replace_callback('#<span class="php-(\w+)">|</span>#',function($m){return"\033[".(isset($m[1],Debugger::$consoleColors[$m[1]])?Debugger::$consoleColors[$m[1]]:'0')."m";},$output);}$output=htmlspecialchars_decode(strip_tags($output),ENT_QUOTES);}if($return){return$output;}else{echo$output;return$var;}}static
507function
508timer($name=NULL){static$time=array();$now=microtime(TRUE);$delta=isset($time[$name])?$now-$time[$name]:0;$time[$name]=$now;return$delta;}static
509function
510barDump($var,$title=NULL){if(!self::$productionMode){$dump=array();foreach((is_array($var)?$var:array(''=>$var))as$key=>$val){$dump[$key]=Helpers::clickableDump($val);}self::$dumpPanel->data[]=array('title'=>$title,'dump'=>$dump);}return$var;}static
511function
512fireLog($message){if(!self::$productionMode){return
513self::$fireLogger->log($message);}}private
514static
515function
516isHtmlMode(){return!self::$ajaxDetected&&!self::$consoleMode&&!preg_match('#^Content-Type: (?!text/html)#im',implode("\n",headers_list()));}static
517function
518addPanel(IBarPanel$panel,$id=NULL){return
519self::$bar->addPanel($panel,$id);}}class
520Logger
521extends
522Nette\Object{const
523DEBUG='debug',INFO='info',WARNING='warning',ERROR='error',CRITICAL='critical';public
524static$emailSnooze=172800;public$mailer=array(__CLASS__,'defaultMailer');public$directory;public$email;function
525log($message,$priority=self::INFO){if(!is_dir($this->directory)){throw
526new
527Nette\DirectoryNotFoundException("Directory '$this->directory' is not found or is not directory.");}if(is_array($message)){$message=implode(' ',$message);}$res=error_log(trim($message).PHP_EOL,3,$this->directory.'/'.strtolower($priority).'.log');if(($priority===self::ERROR||$priority===self::CRITICAL)&&$this->email&&$this->mailer&&@filemtime($this->directory.'/email-sent')+self::$emailSnooze<time()&&@file_put_contents($this->directory.'/email-sent','sent')){callback($this->mailer)->invoke($message,$this->email);}return$res;}static
528function
529defaultMailer($message,$email){$host='';foreach(array('HTTP_HOST','SERVER_NAME','HOSTNAME')as$item){if(isset($_SERVER[$item])){$host=$_SERVER[$item];break;}}$parts=str_replace(array("\r\n","\n"),array("\n",PHP_EOL),array('headers'=>"From: noreply@$host\nX-Mailer: Nette Framework\n",'subject'=>"PHP: An error occurred on the server $host",'body'=>"[".@date('Y-m-d H:i:s')."] $message"));mail($email,$parts['subject'],$parts['body'],$parts['headers']);}}class
530FireLogger
531extends
532Nette\Object{const
533DEBUG='debug',INFO='info',WARNING='warning',ERROR='error',CRITICAL='critical';private
534static$payload=array('logs'=>array());static
535function
536log($message,$priority=self::DEBUG){if(!isset($_SERVER['HTTP_X_FIRELOGGER'])||headers_sent()){return
537FALSE;}$item=array('name'=>'PHP','level'=>$priority,'order'=>count(self::$payload['logs']),'time'=>str_pad(number_format((microtime(TRUE)-Debugger::$time)*1000,1,'.',' '),8,'0',STR_PAD_LEFT).' ms','template'=>'','message'=>'','style'=>'background:#767ab6');$args=func_get_args();if(isset($args[0])&&is_string($args[0])){$item['template']=array_shift($args);}if(isset($args[0])&&$args[0]instanceof\Exception){$e=array_shift($args);$trace=$e->getTrace();if(isset($trace[0]['class'])&&$trace[0]['class']==='Nette\Diagnostics\Debugger'&&($trace[0]['function']==='_shutdownHandler'||$trace[0]['function']==='_errorHandler')){unset($trace[0]);}$file=str_replace(dirname(dirname(dirname($e->getFile()))),"\xE2\x80\xA6",$e->getFile());$item['template']=($e
538instanceof\ErrorException?'':get_class($e).': ').$e->getMessage().($e->getCode()?' #'.$e->getCode():'').' in '.$file.':'.$e->getLine();$item['pathname']=$e->getFile();$item['lineno']=$e->getLine();}else{$trace=debug_backtrace();if(isset($trace[1]['class'])&&$trace[1]['class']==='Nette\Diagnostics\Debugger'&&($trace[1]['function']==='fireLog')){unset($trace[0]);}foreach($trace
539as$frame){if(isset($frame['file'])&&is_file($frame['file'])){$item['pathname']=$frame['file'];$item['lineno']=$frame['line'];break;}}}$item['exc_info']=array('','',array());$item['exc_frames']=array();foreach($trace
540as$frame){$frame+=array('file'=>NULL,'line'=>NULL,'class'=>NULL,'type'=>NULL,'function'=>NULL,'object'=>NULL,'args'=>NULL);$item['exc_info'][2][]=array($frame['file'],$frame['line'],"$frame[class]$frame[type]$frame[function]",$frame['object']);$item['exc_frames'][]=$frame['args'];}if(isset($args[0])&&in_array($args[0],array(self::DEBUG,self::INFO,self::WARNING,self::ERROR,self::CRITICAL),TRUE)){$item['level']=array_shift($args);}$item['args']=$args;self::$payload['logs'][]=self::jsonDump($item,-1);foreach(str_split(base64_encode(@json_encode(self::$payload)),4990)as$k=>$v){header("FireLogger-de11e-$k:$v");}return
541TRUE;}private
542static
543function
544jsonDump(&$var,$level=0){if(is_bool($var)||is_null($var)||is_int($var)||is_float($var)){return$var;}elseif(is_string($var)){if(Debugger::$maxLen&&strlen($var)>Debugger::$maxLen){$var=substr($var,0,Debugger::$maxLen)." \xE2\x80\xA6 ";}return
545Nette\Utils\Strings::fixEncoding($var);}elseif(is_array($var)){static$marker;if($marker===NULL){$marker=uniqid("\x00",TRUE);}if(isset($var[$marker])){return"\xE2\x80\xA6RECURSION\xE2\x80\xA6";}elseif($level<Debugger::$maxDepth||!Debugger::$maxDepth){$var[$marker]=TRUE;$res=array();foreach($var
546as$k=>&$v){if($k!==$marker){$res[self::jsonDump($k)]=self::jsonDump($v,$level+1);}}unset($var[$marker]);return$res;}else{return" \xE2\x80\xA6 ";}}elseif(is_object($var)){$arr=(array)$var;static$list=array();if(in_array($var,$list,TRUE)){return"\xE2\x80\xA6RECURSION\xE2\x80\xA6";}elseif($level<Debugger::$maxDepth||!Debugger::$maxDepth){$list[]=$var;$res=array("\x00"=>'(object) '.get_class($var));foreach($arr
547as$k=>&$v){if($k[0]==="\x00"){$k=substr($k,strrpos($k,"\x00")+1);}$res[self::jsonDump($k)]=self::jsonDump($v,$level+1);}array_pop($list);return$res;}else{return" \xE2\x80\xA6 ";}}elseif(is_resource($var)){return"resource ".get_resource_type($var);}else{return"unknown type";}}}class
548BlueScreen
549extends
550Nette\Object{private$panels=array();function
551addPanel($panel){if(!in_array($panel,$this->panels,TRUE)){$this->panels[]=$panel;}return$this;}function
552render(\Exception$exception){$panels=$this->panels;static$errorTypes=array(E_ERROR=>'Fatal Error',E_USER_ERROR=>'User Error',E_RECOVERABLE_ERROR=>'Recoverable Error',E_CORE_ERROR=>'Core Error',E_COMPILE_ERROR=>'Compile Error',E_PARSE=>'Parse Error',E_WARNING=>'Warning',E_CORE_WARNING=>'Core Warning',E_COMPILE_WARNING=>'Compile Warning',E_USER_WARNING=>'User Warning',E_NOTICE=>'Notice',E_USER_NOTICE=>'User Notice',E_STRICT=>'Strict',E_DEPRECATED=>'Deprecated',E_USER_DEPRECATED=>'User Deprecated');$title=($exception
553instanceof
554Nette\FatalErrorException&&isset($errorTypes[$exception->getSeverity()]))?$errorTypes[$exception->getSeverity()]:get_class($exception);$expandPath=NETTE_DIR.DIRECTORY_SEPARATOR;$counter=0;?><!DOCTYPE html><!-- "' --></script></style></pre></xmp></table>
555<html>
556<head>
557	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
558	<meta name="robots" content="noindex,noarchive">
559	<meta name="generator" content="Nette Framework">
560
561	<title><?php echo
562htmlspecialchars($title)?></title><!-- <?php
563$ex=$exception;echo
564htmlspecialchars($ex->getMessage().($ex->getCode()?' #'.$ex->getCode():''));while((method_exists($ex,'getPrevious')&&$ex=$ex->getPrevious())||(isset($ex->previous)&&$ex=$ex->previous))echo
565htmlspecialchars('; caused by '.get_class($ex).' '.$ex->getMessage().($ex->getCode()?' #'.$ex->getCode():''));?> -->
566
567	<style type="text/css" class="nette">html{overflow-y:scroll}body{margin:0 0 2em;padding:0}#netteBluescreen{font:9pt/1.5 Verdana,sans-serif;background:white;color:#333;position:absolute;left:0;top:0;width:100%;z-index:23178;text-align:left}#netteBluescreen *{font:inherit;color:inherit;background:transparent;border:none;margin:0;padding:0;text-align:inherit;text-indent:0}#netteBluescreen b{font-weight:bold}#netteBluescreen i{font-style:italic}#netteBluescreen a{text-decoration:none;color:#328ADC;padding:2px 4px;margin:-2px -4px}#netteBluescreen a:hover,#netteBluescreen a:active,#netteBluescreen a:focus{color:#085AA3}#netteBluescreen a abbr{font-family:sans-serif;color:#BBB}#netteBluescreenIcon{position:absolute;right:.5em;top:.5em;z-index:23179;text-decoration:none;background:#CD1818;padding:3px}#netteBluescreenError{background:#CD1818;color:white;font:13pt/1.5 Verdana,sans-serif!important;display:block}#netteBluescreenError #netteBsSearch{color:#CD1818;font-size:.7em}#netteBluescreenError:hover #netteBsSearch{color:#ED8383}#netteBluescreen h1{font-size:18pt;font-weight:normal;text-shadow:1px 1px 0 rgba(0,0,0,.4);margin:.7em 0}#netteBluescreen h2{font:14pt/1.5 sans-serif!important;color:#888;margin:.6em 0}#netteBluescreen h3{font:bold 10pt/1.5 Verdana,sans-serif!important;margin:1em 0;padding:0}#netteBluescreen p,#netteBluescreen pre{margin:.8em 0}#netteBluescreen pre,#netteBluescreen code,#netteBluescreen table{font:9pt/1.5 Consolas,monospace!important}#netteBluescreen pre,#netteBluescreen table{background:#FDF5CE;padding:.4em .7em;border:1px dotted silver;overflow:auto}#netteBluescreen pre div{min-width:100%;float:left;_float:none;white-space:pre}#netteBluescreen table pre{padding:0;margin:0;border:none}#netteBluescreen pre .php-array,#netteBluescreen pre .php-object{color:#C22}#netteBluescreen pre .php-string{color:#080}#netteBluescreen pre .php-int,#netteBluescreen pre .php-float,#netteBluescreen pre .php-null,#netteBluescreen pre .php-bool{color:#328ADC}#netteBluescreen pre .php-visibility{font-size:85%;color:#998}#netteBluescreen pre.nette-dump a{color:#333}#netteBluescreen div.panel{padding:1px 25px}#netteBluescreen div.inner{background:#F4F3F1;padding:.1em 1em 1em;border-radius:8px;-moz-border-radius:8px;-webkit-border-radius:8px}#netteBluescreen table{border-collapse:collapse;width:100%}#netteBluescreen .outer{overflow:auto}#netteBluescreen td,#netteBluescreen th{vertical-align:top;text-align:left;padding:2px 6px;border:1px solid #e6dfbf}#netteBluescreen th{font-weight:bold}#netteBluescreen tr>:first-child{width:20%}#netteBluescreen tr:nth-child(2n),#netteBluescreen tr:nth-child(2n) pre{background-color:#F7F0CB}#netteBluescreen ol{margin:1em 0;padding-left:2.5em}#netteBluescreen ul{font:7pt/1.5 Verdana,sans-serif!important;padding:2em 4em;margin:1em 0 0;color:#777;background:#F6F5F3 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFEAAAAjCAMAAADbuxbOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRF/fz24d7Y7Onj5uLd9vPu3drUzMvG09LN39zW8e7o2NbQ3NnT29jS0M7J1tXQAAAApvmsFgAAABB0Uk5T////////////////////AOAjXRkAAAKlSURBVHja7FbbsqQgDAwENEgc//9vN+SCWDtbtXPmZR/Wc6o02mlC58LA9ckFAOszvMV8xNgyUjyXhojfMVKvRL0ZHavxXYy5JrmchMdzou8YlTClxajtK8ZGGpWRoBr1+gFjKfHkJPbizabLgzE3pH7Iu4K980xgFvlrVzMZoVBWhtvouCDdcTDmTgMCJdVxJ9MKO6XxnliM7hxi5lbj2ZVM4l8DqYyKoNLYcfqBB1/LpHYxEcfVG6ZpMDgyFUVWY/Q1sSYPpIdSAKWqLWL0XqWiMWc4hpH0OQOMOAgdycY4N9Sb7wWANQs3rsDSdLAYiuxi5siVfOhBWIrtH0G3kNaF/8Q4kCPE1kMucG/ZMUBUCOgiKJkPuWWTLGVgLGpwns1DraUayCtoBqERyaYtVsm85NActRooezvSLO/sKZP/nq8n4+xcyjNsRu8zW6KWpdb7wjiQd4WrtFZYFiKHENSmWp6xshh96c2RQ+c7Lt+qbijyEjHWUJ/pZsy8MGIUuzNiPySK2Gqoh6ZTRF6ko6q3nVTkaA//itIrDpW6l3SLo8juOmqMXkYknu5FdQxWbhCfKHEGDhxxyTVaXJF3ZjSl3jMksjSOOKmne9pI+mcG5QvaUJhI9HpkmRo2NpCrDJvsktRhRE2MM6F2n7dt4OaMUq8bCctk0+PoMRzL+1l5PZ2eyM/Owr86gf8z/tOM53lom5+nVcFuB+eJVzlXwAYy9TZ9s537tfqcsJWbEU4nBngZo6FfO9T9CdhfBtmk2dLiAy8uS4zwOpMx2HqYbTC+amNeAYTpsP4SIgvWfUBWXxn3CMHW3ffd7k3+YIkx7w0t/CVGvcPejoeOlzOWzeGbawOHqXQGUTMZRcfj4XPCgW9y/fuvVn8zD9P1QHzv80uAAQA0i3Jer7Jr7gAAAABJRU5ErkJggg==') 99% 10px no-repeat;border-top:1px solid #DDD}#netteBluescreen .highlight{background:#CD1818;color:white;font-weight:bold;font-style:normal;display:block;padding:0 .4em;margin:0 -.4em}#netteBluescreen .line{color:#9F9C7F;font-weight:normal;font-style:normal}#netteBluescreen a[href^=editor\:]{color:inherit;border-bottom:1px dotted #C1D2E1}</style>
568</head>
569
570
571
572<body>
573<div id="netteBluescreen">
574	<a id="netteBluescreenIcon" href="#" rel="next"><abbr>&#x25bc;</abbr></a
575
576	><div>
577		<div id="netteBluescreenError" class="panel">
578			<h1><?php echo
579htmlspecialchars($title),($exception->getCode()?' #'.$exception->getCode():'')?></h1>
580
581			<p><?php echo
582htmlspecialchars($exception->getMessage())?> <a href="http://www.google.cz/search?sourceid=nette&amp;q=<?php echo
583urlencode($title.' '.preg_replace('#\'.*\'|".*"#Us','',$exception->getMessage()))?>" id="netteBsSearch">search&#x25ba;</a></p>
584		</div>
585
586
587
588		<?php $ex=$exception;$level=0;?>
589		<?php do{?>
590
591			<?php if($level++):?>
592			<div class="panel">
593			<h2><a href="#" rel="netteBsPnl<?php echo++$counter?>">Caused by <abbr><?php echo($collapsed=$level>2)?'&#x25ba;':'&#x25bc;'?></abbr></a></h2>
594
595			<div id="netteBsPnl<?php echo$counter?>" class="<?php echo$collapsed?'nette-collapsed ':''?>inner">
596				<div class="panel">
597					<h1><?php echo
598htmlspecialchars(get_class($ex).($ex->getCode()?' #'.$ex->getCode():''))?></h1>
599
600					<p><b><?php echo
601htmlspecialchars($ex->getMessage())?></b></p>
602				</div>
603			<?php endif?>
604
605
606
607			<?php foreach($panels
608as$panel):?>
609			<?php $panel=call_user_func($panel,$ex);if(empty($panel['tab'])||empty($panel['panel']))continue;?>
610			<?php if(!empty($panel['bottom'])){continue;}?>
611			<div class="panel">
612				<h2><a href="#" rel="netteBsPnl<?php echo++$counter?>"><?php echo
613htmlSpecialChars($panel['tab'])?> <abbr>&#x25bc;</abbr></a></h2>
614
615				<div id="netteBsPnl<?php echo$counter?>" class="inner">
616				<?php echo$panel['panel']?>
617			</div></div>
618			<?php endforeach?>
619
620
621
622			<?php $stack=$ex->getTrace();$expanded=NULL?>
623			<?php if(strpos($ex->getFile(),$expandPath)===0){foreach($stack
624as$key=>$row){if(isset($row['file'])&&strpos($row['file'],$expandPath)!==0){$expanded=$key;break;}}}?>
625
626			<div class="panel">
627			<h2><a href="#" rel="netteBsPnl<?php echo++$counter?>">Source file <abbr><?php echo($collapsed=$expanded!==NULL)?'&#x25ba;':'&#x25bc;'?></abbr></a></h2>
628
629			<div id="netteBsPnl<?php echo$counter?>" class="<?php echo$collapsed?'nette-collapsed ':''?>inner">
630				<p><b>File:</b> <?php echo
631Helpers::editorLink($ex->getFile(),$ex->getLine())?> &nbsp; <b>Line:</b> <?php echo$ex->getLine()?></p>
632				<?php if(is_file($ex->getFile())):?><?php echo
633self::highlightFile($ex->getFile(),$ex->getLine(),15,isset($ex->context)?$ex->context:NULL)?><?php endif?>
634			</div></div>
635
636
637
638			<?php if(isset($stack[0]['class'])&&$stack[0]['class']==='Nette\Diagnostics\Debugger'&&($stack[0]['function']==='_shutdownHandler'||$stack[0]['function']==='_errorHandler'))unset($stack[0])?>
639			<?php if($stack):?>
640			<div class="panel">
641				<h2><a href="#" rel="netteBsPnl<?php echo++$counter?>">Call stack <abbr>&#x25bc;</abbr></a></h2>
642
643				<div id="netteBsPnl<?php echo$counter?>" class="inner">
644				<ol>
645					<?php foreach($stack
646as$key=>$row):?>
647					<li><p>
648
649					<?php if(isset($row['file'])&&is_file($row['file'])):?>
650						<?php echo
651Helpers::editorLink($row['file'],$row['line']),':',$row['line']?>
652					<?php else:?>
653						<i>inner-code</i><?php if(isset($row['line']))echo':',$row['line']?>
654					<?php endif?>
655
656					<?php if(isset($row['file'])&&is_file($row['file'])):?><a href="#" rel="netteBsSrc<?php echo"$level-$key"?>">source <abbr>&#x25ba;</abbr></a>&nbsp; <?php endif?>
657
658					<?php if(isset($row['class']))echo
659htmlspecialchars($row['class'].$row['type'])?>
660					<?php echo
661htmlspecialchars($row['function'])?>
662
663					(<?php if(!empty($row['args'])):?><a href="#" rel="netteBsArgs<?php echo"$level-$key"?>">arguments <abbr>&#x25ba;</abbr></a><?php endif?>)
664					</p>
665
666					<?php if(!empty($row['args'])):?>
667						<div class="nette-collapsed outer" id="netteBsArgs<?php echo"$level-$key"?>">
668						<table>
669						<?php
670
671try{$r=isset($row['class'])?new\ReflectionMethod($row['class'],$row['function']):new\ReflectionFunction($row['function']);$params=$r->getParameters();}catch(\Exception$e){$params=array();}foreach($row['args']as$k=>$v){echo'<tr><th>',htmlspecialchars(isset($params[$k])?'$'.$params[$k]->name:"#$k"),'</th><td>';echo
672Helpers::clickableDump($v);echo"</td></tr>\n";}?>
673						</table>
674						</div>
675					<?php endif?>
676
677
678					<?php if(isset($row['file'])&&is_file($row['file'])):?>
679						<div <?php if($expanded!==$key)echo'class="nette-collapsed"';?> id="netteBsSrc<?php echo"$level-$key"?>"><?php echo
680self::highlightFile($row['file'],$row['line'])?></div>
681					<?php endif?>
682
683					</li>
684					<?php endforeach?>
685				</ol>
686			</div></div>
687			<?php endif?>
688
689
690
691			<?php if(isset($ex->context)&&is_array($ex->context)):?>
692			<div class="panel">
693			<h2><a href="#" rel="netteBsPnl<?php echo++$counter?>">Variables <abbr>&#x25ba;</abbr></a></h2>
694
695			<div id="netteBsPnl<?php echo$counter?>" class="nette-collapsed inner">
696			<div class="outer">
697			<table>
698			<?php
699
700foreach($ex->context
701as$k=>$v){echo'<tr><th>$',htmlspecialchars($k),'</th><td>',Helpers::clickableDump($v),"</td></tr>\n";}?>
702			</table>
703			</div>
704			</div></div>
705			<?php endif?>
706
707		<?php }while((method_exists($ex,'getPrevious')&&$ex=$ex->getPrevious())||(isset($ex->previous)&&$ex=$ex->previous));?>
708		<?php while(--$level)echo'</div></div>'?>
709
710
711
712		<?php $bottomPanels=array()?>
713		<?php foreach($panels
714as$panel):?>
715		<?php $panel=call_user_func($panel,NULL);if(empty($panel['tab'])||empty($panel['panel']))continue;?>
716		<?php if(!empty($panel['bottom'])){$bottomPanels[]=$panel;continue;}?>
717		<div class="panel">
718			<h2><a href="#" rel="netteBsPnl<?php echo++$counter?>"><?php echo
719htmlSpecialChars($panel['tab'])?> <abbr>&#x25ba;</abbr></a></h2>
720
721			<div id="netteBsPnl<?php echo$counter?>" class="nette-collapsed inner">
722			<?php echo$panel['panel']?>
723		</div></div>
724		<?php endforeach?>
725
726
727
728		<div class="panel">
729		<h2><a href="#" rel="netteBsPnl<?php echo++$counter?>">Environment <abbr>&#x25ba;</abbr></a></h2>
730
731		<div id="netteBsPnl<?php echo$counter?>" class="nette-collapsed inner">
732			<h3><a href="#" rel="netteBsPnl<?php echo++$counter?>">$_SERVER <abbr>&#x25bc;</abbr></a></h3>
733			<div id="netteBsPnl<?php echo$counter?>" class="outer">
734			<table>
735			<?php
736
737foreach($_SERVER
738as$k=>$v)echo'<tr><th>',htmlspecialchars($k),'</th><td>',Helpers::clickableDump($v),"</td></tr>\n";?>
739			</table>
740			</div>
741
742
743			<h3><a href="#" rel="netteBsPnl<?php echo++$counter?>">$_SESSION <abbr>&#x25bc;</abbr></a></h3>
744			<div id="netteBsPnl<?php echo$counter?>" class="outer">
745			<?php if(empty($_SESSION)):?>
746			<p><i>empty</i></p>
747			<?php else:?>
748			<table>
749			<?php
750
751foreach($_SESSION
752as$k=>$v)echo'<tr><

Large files files are truncated, but you can click here to view the full file