mirror of
https://github.com/getgrav/grav.git
synced 2026-07-28 21:10:39 +02:00
Added updated minify package with fix for @supports, vendor commits and cleanup
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
"tracy/tracy": "~2.2",
|
||||
"gregwar/image": "~2.0",
|
||||
"ircmaxell/password-compat": "1.0.*",
|
||||
"mrclay/minify": "~2.2",
|
||||
"mrclay/minify": "dev-master",
|
||||
"donatj/phpuseragentparser": "dev-master",
|
||||
"pimple/pimple": "~3.0"
|
||||
},
|
||||
@@ -28,5 +28,11 @@
|
||||
},
|
||||
"archive": {
|
||||
"exclude": ["VERSION"]
|
||||
}
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/rhukster/minify"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ twig:
|
||||
autoescape: false
|
||||
|
||||
assets:
|
||||
css_pipeline: false
|
||||
css_pipeline: true
|
||||
css_minify: true
|
||||
css_rewrite: true
|
||||
js_pipeline: false
|
||||
|
||||
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@@ -4,4 +4,4 @@
|
||||
|
||||
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit063cb81ce05ae9832bbd593f72977809::getLoader();
|
||||
return ComposerAutoloaderInit836e000af2692cba78dada56c083fe42::getLoader();
|
||||
|
||||
2
vendor/composer/autoload_classmap.php
vendored
2
vendor/composer/autoload_classmap.php
vendored
@@ -44,6 +44,7 @@ return array(
|
||||
'Grav\\Common\\Filesystem\\File\\Markdown' => $baseDir . '/system/src/Grav/Common/Filesystem/File/Markdown.php',
|
||||
'Grav\\Common\\Filesystem\\File\\Yaml' => $baseDir . '/system/src/Grav/Common/Filesystem/File/Yaml.php',
|
||||
'Grav\\Common\\Filesystem\\Folder' => $baseDir . '/system/src/Grav/Common/Filesystem/Folder.php',
|
||||
'Grav\\Common\\Filesystem\\GravRecursiveFilterIterator' => $baseDir . '/system/src/Grav/Common/Filesystem/Folder.php',
|
||||
'Grav\\Common\\Getters' => $baseDir . '/system/src/Grav/Common/Getters.php',
|
||||
'Grav\\Common\\Grav' => $baseDir . '/system/src/Grav/Common/Grav.php',
|
||||
'Grav\\Common\\GravTrait' => $baseDir . '/system/src/Grav/Common/GravTrait.php',
|
||||
@@ -131,6 +132,7 @@ return array(
|
||||
'Minify_Cache_XCache' => $vendorDir . '/mrclay/minify/min/lib/Minify/Cache/XCache.php',
|
||||
'Minify_Cache_ZendPlatform' => $vendorDir . '/mrclay/minify/min/lib/Minify/Cache/ZendPlatform.php',
|
||||
'Minify_ClosureCompiler' => $vendorDir . '/mrclay/minify/min/lib/Minify/ClosureCompiler.php',
|
||||
'Minify_ClosureCompiler_Exception' => $vendorDir . '/mrclay/minify/min/lib/Minify/ClosureCompiler.php',
|
||||
'Minify_CommentPreserver' => $vendorDir . '/mrclay/minify/min/lib/Minify/CommentPreserver.php',
|
||||
'Minify_Controller_Base' => $vendorDir . '/mrclay/minify/min/lib/Minify/Controller/Base.php',
|
||||
'Minify_Controller_Files' => $vendorDir . '/mrclay/minify/min/lib/Minify/Controller/Files.php',
|
||||
|
||||
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit063cb81ce05ae9832bbd593f72977809
|
||||
class ComposerAutoloaderInit836e000af2692cba78dada56c083fe42
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit063cb81ce05ae9832bbd593f72977809
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit063cb81ce05ae9832bbd593f72977809', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit836e000af2692cba78dada56c083fe42', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit063cb81ce05ae9832bbd593f72977809', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit836e000af2692cba78dada56c083fe42', 'loadClassLoader'));
|
||||
|
||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
@@ -42,14 +42,14 @@ class ComposerAutoloaderInit063cb81ce05ae9832bbd593f72977809
|
||||
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
foreach ($includeFiles as $file) {
|
||||
composerRequire063cb81ce05ae9832bbd593f72977809($file);
|
||||
composerRequire836e000af2692cba78dada56c083fe42($file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequire063cb81ce05ae9832bbd593f72977809($file)
|
||||
function composerRequire836e000af2692cba78dada56c083fe42($file)
|
||||
{
|
||||
require $file;
|
||||
}
|
||||
|
||||
88
vendor/composer/installed.json
vendored
88
vendor/composer/installed.json
vendored
@@ -116,48 +116,6 @@
|
||||
"caching"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "mrclay/minify",
|
||||
"version": "2.2.0",
|
||||
"version_normalized": "2.2.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mrclay/minify.git",
|
||||
"reference": "d245bca4987dec197d1e6d7dc117614b60ff7494"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/mrclay/minify/zipball/d245bca4987dec197d1e6d7dc117614b60ff7494",
|
||||
"reference": "d245bca4987dec197d1e6d7dc117614b60ff7494",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-pcre": "*",
|
||||
"php": ">=5.2.1"
|
||||
},
|
||||
"time": "2014-03-12 12:54:23",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"min/lib/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Steve Clay",
|
||||
"email": "steve@mrclay.org",
|
||||
"homepage": "http://www.mrclay.org/",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Minify is a PHP5 app that helps you follow several rules for client-side performance. It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers",
|
||||
"homepage": "http://code.google.com/p/minify/"
|
||||
},
|
||||
{
|
||||
"name": "pimple/pimple",
|
||||
"version": "v3.0.0",
|
||||
@@ -711,5 +669,51 @@
|
||||
"parsedown",
|
||||
"parser"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "mrclay/minify",
|
||||
"version": "dev-master",
|
||||
"version_normalized": "9999999-dev",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rhukster/minify.git",
|
||||
"reference": "fdf68abf30ccd86a65f66fa6eb98434eb29bef74"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/rhukster/minify/zipball/fdf68abf30ccd86a65f66fa6eb98434eb29bef74",
|
||||
"reference": "fdf68abf30ccd86a65f66fa6eb98434eb29bef74",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-pcre": "*",
|
||||
"php": ">=5.2.1"
|
||||
},
|
||||
"time": "2014-08-29 23:07:55",
|
||||
"type": "library",
|
||||
"installation-source": "source",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"min/lib/"
|
||||
]
|
||||
},
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Stephen Clay",
|
||||
"email": "steve@mrclay.org",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Minify is a PHP5 app that helps you follow several rules for client-side performance. It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers",
|
||||
"homepage": "http://code.google.com/p/minify/",
|
||||
"support": {
|
||||
"email": "minify@googlegroups.com",
|
||||
"issues": "http://code.google.com/p/minify/issues/list",
|
||||
"wiki": "http://code.google.com/p/minify/w/list",
|
||||
"source": "https://github.com/rhukster/minify/tree/master"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
21
vendor/erusev/parsedown-extra/composer.json
vendored
21
vendor/erusev/parsedown-extra/composer.json
vendored
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"name": "erusev/parsedown-extra",
|
||||
"description": "An extension of Parsedown that adds support for Markdown Extra.",
|
||||
"keywords": ["markdown", "markdown extra", "parser", "parsedown"],
|
||||
"homepage": "https://github.com/erusev/parsedown-extra",
|
||||
"type": "library",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Emanuil Rusev",
|
||||
"email": "hello@erusev.com",
|
||||
"homepage": "http://erusev.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"erusev/parsedown": "~1.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {"ParsedownExtra": ""}
|
||||
}
|
||||
}
|
||||
3
vendor/mrclay/minify/HISTORY.txt
vendored
3
vendor/mrclay/minify/HISTORY.txt
vendored
@@ -1,5 +1,8 @@
|
||||
Minify Release History
|
||||
|
||||
(master)
|
||||
* Builder styled with Bootstrap (thanks to help from acidvertigo)
|
||||
|
||||
Version 2.2.0
|
||||
* Fix handling of RegEx in certain situations in JSMin
|
||||
* Thanks to Vovan-VE for reporting this
|
||||
|
||||
6
vendor/mrclay/minify/min/lib/CSSmin.php
vendored
6
vendor/mrclay/minify/min/lib/CSSmin.php
vendored
@@ -325,6 +325,10 @@ class CSSmin
|
||||
// @media screen and (-webkit-min-device-pixel-ratio:0){
|
||||
$css = preg_replace('/\band\(/i', 'and (', $css);
|
||||
|
||||
// Put the space back in for @support tag
|
||||
// @supports (display: flex) and @supports not (display: flex)
|
||||
$css = preg_replace('/\b(supports|not)\(/i', '$1 (', $css);
|
||||
|
||||
// Remove the spaces after the things that should not have spaces after them.
|
||||
$css = preg_replace('/([\!\{\}\:;\>\+\(\[\~\=,])\s+/S', '$1', $css);
|
||||
|
||||
@@ -772,4 +776,4 @@ class CSSmin
|
||||
|
||||
return (int) $size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class Minify_CSS_UriRewriter {
|
||||
// rewrite
|
||||
$css = preg_replace_callback('/@import\\s+([\'"])(.*?)[\'"]/'
|
||||
,array(self::$className, '_processUriCB'), $css);
|
||||
$css = preg_replace_callback('/url\\(\\s*([^\\)\\s]+)\\s*\\)/'
|
||||
$css = preg_replace_callback('/url\\(\\s*([\'"](.*?)[\'"]|[^\\)\\s]+)\\s*\\)/'
|
||||
,array(self::$className, '_processUriCB'), $css);
|
||||
|
||||
return $css;
|
||||
@@ -94,7 +94,7 @@ class Minify_CSS_UriRewriter {
|
||||
// append
|
||||
$css = preg_replace_callback('/@import\\s+([\'"])(.*?)[\'"]/'
|
||||
,array(self::$className, '_processUriCB'), $css);
|
||||
$css = preg_replace_callback('/url\\(\\s*([^\\)\\s]+)\\s*\\)/'
|
||||
$css = preg_replace_callback('/url\\(\\s*([\'"](.*?)[\'"]|[^\\)\\s]+)\\s*\\)/'
|
||||
,array(self::$className, '_processUriCB'), $css);
|
||||
|
||||
self::$_prependPath = null;
|
||||
|
||||
@@ -98,6 +98,9 @@ class Minify_Cache_File {
|
||||
{
|
||||
if ($this->_locking) {
|
||||
$fp = fopen($this->_path . '/' . $id, 'rb');
|
||||
if (!$fp) {
|
||||
return false;
|
||||
}
|
||||
flock($fp, LOCK_SH);
|
||||
$ret = stream_get_contents($fp);
|
||||
flock($fp, LOCK_UN);
|
||||
|
||||
@@ -33,6 +33,11 @@
|
||||
*/
|
||||
class Minify_ClosureCompiler {
|
||||
|
||||
const OPTION_CHARSET = 'charset';
|
||||
const OPTION_COMPILATION_LEVEL = 'compilation_level';
|
||||
|
||||
public static $isDebug = false;
|
||||
|
||||
/**
|
||||
* Filepath of the Closure Compiler jar file. This must be set before
|
||||
* calling minifyJs().
|
||||
@@ -65,18 +70,28 @@ class Minify_ClosureCompiler {
|
||||
* @see https://code.google.com/p/closure-compiler/source/browse/trunk/README
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws Minify_ClosureCompiler_Exception
|
||||
*/
|
||||
public static function minify($js, $options = array())
|
||||
{
|
||||
self::_prepare();
|
||||
if (! ($tmpFile = tempnam(self::$tempDir, 'cc_'))) {
|
||||
throw new Exception('Minify_ClosureCompiler : could not create temp file in "'.self::$tempDir.'".');
|
||||
throw new Minify_ClosureCompiler_Exception('Minify_ClosureCompiler : could not create temp file in "'.self::$tempDir.'".');
|
||||
}
|
||||
file_put_contents($tmpFile, $js);
|
||||
exec(self::_getCmd($options, $tmpFile), $output, $result_code);
|
||||
$cmd = self::_getCmd($options, $tmpFile);
|
||||
exec($cmd, $output, $result_code);
|
||||
unlink($tmpFile);
|
||||
if ($result_code != 0) {
|
||||
throw new Exception('Minify_ClosureCompiler : Closure Compiler execution failed.');
|
||||
$message = 'Minify_ClosureCompiler : Closure Compiler execution failed.';
|
||||
if (self::$isDebug) {
|
||||
exec($cmd . ' 2>&1', $error);
|
||||
if ($error) {
|
||||
$message .= "\nReason:\n" . join("\n", $error);
|
||||
}
|
||||
}
|
||||
throw new Minify_ClosureCompiler_Exception($message);
|
||||
}
|
||||
return implode("\n", $output);
|
||||
}
|
||||
@@ -85,17 +100,18 @@ class Minify_ClosureCompiler {
|
||||
{
|
||||
$o = array_merge(
|
||||
array(
|
||||
'charset' => 'utf-8',
|
||||
'compilation_level' => 'SIMPLE_OPTIMIZATIONS',
|
||||
self::OPTION_CHARSET => 'utf-8',
|
||||
self::OPTION_COMPILATION_LEVEL => 'SIMPLE_OPTIMIZATIONS',
|
||||
),
|
||||
$userOptions
|
||||
);
|
||||
$charsetOption = $o[self::OPTION_CHARSET];
|
||||
$cmd = self::$javaExecutable . ' -jar ' . escapeshellarg(self::$jarFile)
|
||||
. (preg_match('/^[\\da-zA-Z0-9\\-]+$/', $o['charset'])
|
||||
? " --charset {$o['charset']}"
|
||||
. (preg_match('/^[\\da-zA-Z0-9\\-]+$/', $charsetOption)
|
||||
? " --charset {$charsetOption}"
|
||||
: '');
|
||||
|
||||
foreach (array('compilation_level') as $opt) {
|
||||
foreach (array(self::OPTION_COMPILATION_LEVEL) as $opt) {
|
||||
if ($o[$opt]) {
|
||||
$cmd .= " --{$opt} ". escapeshellarg($o[$opt]);
|
||||
}
|
||||
@@ -106,18 +122,18 @@ class Minify_ClosureCompiler {
|
||||
private static function _prepare()
|
||||
{
|
||||
if (! is_file(self::$jarFile)) {
|
||||
throw new Exception('Minify_ClosureCompiler : $jarFile('.self::$jarFile.') is not a valid file.');
|
||||
throw new Minify_ClosureCompiler_Exception('Minify_ClosureCompiler : $jarFile('.self::$jarFile.') is not a valid file.');
|
||||
}
|
||||
if (! is_readable(self::$jarFile)) {
|
||||
throw new Exception('Minify_ClosureCompiler : $jarFile('.self::$jarFile.') is not readable.');
|
||||
throw new Minify_ClosureCompiler_Exception('Minify_ClosureCompiler : $jarFile('.self::$jarFile.') is not readable.');
|
||||
}
|
||||
if (! is_dir(self::$tempDir)) {
|
||||
throw new Exception('Minify_ClosureCompiler : $tempDir('.self::$tempDir.') is not a valid direcotry.');
|
||||
throw new Minify_ClosureCompiler_Exception('Minify_ClosureCompiler : $tempDir('.self::$tempDir.') is not a valid direcotry.');
|
||||
}
|
||||
if (! is_writable(self::$tempDir)) {
|
||||
throw new Exception('Minify_ClosureCompiler : $tempDir('.self::$tempDir.') is not writable.');
|
||||
throw new Minify_ClosureCompiler_Exception('Minify_ClosureCompiler : $tempDir('.self::$tempDir.') is not writable.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* vim:ts=4:sw=4:et */
|
||||
class Minify_ClosureCompiler_Exception extends Exception {}
|
||||
|
||||
27
vendor/tracy/tracy/composer.json
vendored
27
vendor/tracy/tracy/composer.json
vendored
@@ -1,27 +0,0 @@
|
||||
{
|
||||
"name": "tracy/tracy",
|
||||
"description": "Tracy: useful PHP debugger",
|
||||
"keywords": ["debug", "debugger", "nette"],
|
||||
"homepage": "http://tracy.nette.org",
|
||||
"license": ["BSD-3-Clause", "GPL-2.0", "GPL-3.0"],
|
||||
"authors": [
|
||||
{
|
||||
"name": "David Grudl",
|
||||
"homepage": "http://davidgrudl.com"
|
||||
},
|
||||
{
|
||||
"name": "Nette Community",
|
||||
"homepage": "http://nette.org/contributors"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"nette/tester": "~1.0"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": ["src/Tracy"],
|
||||
"files": ["src/shortcuts.php"]
|
||||
}
|
||||
}
|
||||
45
vendor/tracy/tracy/examples/Firebug-dump.php
vendored
45
vendor/tracy/tracy/examples/Firebug-dump.php
vendored
@@ -1,45 +0,0 @@
|
||||
<?php ob_start(); // needed by FireLogger ?>
|
||||
|
||||
<!DOCTYPE html><link rel="stylesheet" href="assets/style.css">
|
||||
|
||||
<h1>FireLogger demo</h1>
|
||||
|
||||
<p>Requires Firefox, Firebug and <a href="http://firelogger.binaryage.com">FireLogger</a>.</p>
|
||||
|
||||
<?php
|
||||
|
||||
require __DIR__ . '/../src/tracy.php';
|
||||
|
||||
use Tracy\Debugger;
|
||||
|
||||
|
||||
$arr = array(10, 20, array('key1' => 'val1', 'key2' => TRUE));
|
||||
|
||||
// will show in FireLogger tab in Firebug
|
||||
Debugger::fireLog('Hello World');
|
||||
Debugger::fireLog($arr);
|
||||
|
||||
|
||||
function first($arg1, $arg2)
|
||||
{
|
||||
second(TRUE, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function second($arg1, $arg2)
|
||||
{
|
||||
third(array(1, 2, 3));
|
||||
}
|
||||
|
||||
|
||||
function third($arg1)
|
||||
{
|
||||
throw new Exception('The my exception', 123);
|
||||
}
|
||||
|
||||
try {
|
||||
first(10, 'any string');
|
||||
} catch (Exception $e) {
|
||||
Debugger::fireLog($e);
|
||||
}
|
||||
BIN
vendor/tracy/tracy/examples/assets/arrow.png
vendored
BIN
vendor/tracy/tracy/examples/assets/arrow.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 817 B |
23
vendor/tracy/tracy/examples/assets/style.css
vendored
23
vendor/tracy/tracy/examples/assets/style.css
vendored
@@ -1,23 +0,0 @@
|
||||
body {
|
||||
font: 15px/1.5 Tahoma, sans-serif;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
margin: 1.6em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 210%;
|
||||
font-weight: normal;
|
||||
color: #036;
|
||||
}
|
||||
|
||||
pre.tracy-dump {
|
||||
border: 1px solid silver;
|
||||
padding: 1em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #000080;
|
||||
}
|
||||
24
vendor/tracy/tracy/examples/barDump.php
vendored
24
vendor/tracy/tracy/examples/barDump.php
vendored
@@ -1,24 +0,0 @@
|
||||
<!DOCTYPE html><link rel="stylesheet" href="assets/style.css">
|
||||
|
||||
<style> html { background: url(assets/arrow.png) no-repeat bottom right; height: 100%; } </style>
|
||||
|
||||
<h1>Tracy Debug Bar demo</h1>
|
||||
|
||||
<p>You can dump variables to bar in rightmost bottom egde.</p>
|
||||
|
||||
<?php
|
||||
|
||||
require __DIR__ . '/../src/tracy.php';
|
||||
|
||||
use Tracy\Debugger;
|
||||
|
||||
Debugger::enable();
|
||||
|
||||
$arr = array(10, 20.2, TRUE, NULL, 'hello', (object) NULL, array());
|
||||
|
||||
|
||||
Debugger::barDump(get_defined_vars());
|
||||
|
||||
Debugger::barDump($arr, 'The Array');
|
||||
|
||||
Debugger::barDump('<a href="#">test</a>', 'String');
|
||||
39
vendor/tracy/tracy/examples/dump.php
vendored
39
vendor/tracy/tracy/examples/dump.php
vendored
@@ -1,39 +0,0 @@
|
||||
<!DOCTYPE html><link rel="stylesheet" href="assets/style.css">
|
||||
|
||||
<h1>Tracy Dumper demo</h1>
|
||||
|
||||
<?php
|
||||
|
||||
require __DIR__ . '/../src/tracy.php';
|
||||
|
||||
use Tracy\Debugger;
|
||||
|
||||
|
||||
Debugger::enable(Debugger::DEVELOPMENT);
|
||||
|
||||
class Test
|
||||
{
|
||||
public $x = array(10, NULL);
|
||||
|
||||
private $y = 'hello';
|
||||
|
||||
protected $z = 30;
|
||||
}
|
||||
|
||||
$arr = array(10, 20.2, TRUE, NULL, 'hello', (object) NULL, array(), fopen(__FILE__, 'r'));
|
||||
|
||||
$obj = new Test;
|
||||
|
||||
|
||||
dump('<a href="#">test</a>');
|
||||
|
||||
dump($arr);
|
||||
|
||||
dump($obj);
|
||||
|
||||
|
||||
echo "<h2>With location</h2>\n";
|
||||
|
||||
Debugger::$showLocation = TRUE;
|
||||
|
||||
dump($arr);
|
||||
33
vendor/tracy/tracy/examples/exception.php
vendored
33
vendor/tracy/tracy/examples/exception.php
vendored
@@ -1,33 +0,0 @@
|
||||
<!DOCTYPE html><link rel="stylesheet" href="assets/style.css">
|
||||
|
||||
<h1>Tracy Exception demo</h1>
|
||||
|
||||
<?php
|
||||
|
||||
require __DIR__ . '/../src/tracy.php';
|
||||
|
||||
use Tracy\Debugger;
|
||||
|
||||
Debugger::enable();
|
||||
|
||||
|
||||
function first($arg1, $arg2)
|
||||
{
|
||||
second(TRUE, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function second($arg1, $arg2)
|
||||
{
|
||||
third(array(1, 2, 3));
|
||||
}
|
||||
|
||||
|
||||
function third($arg1)
|
||||
{
|
||||
throw new Exception('The my exception', 123);
|
||||
}
|
||||
|
||||
|
||||
first(10, 'any string');
|
||||
35
vendor/tracy/tracy/examples/fatal-error.php
vendored
35
vendor/tracy/tracy/examples/fatal-error.php
vendored
@@ -1,35 +0,0 @@
|
||||
<!DOCTYPE html><link rel="stylesheet" href="assets/style.css">
|
||||
|
||||
<h1>Tracy Fatal Error demo</h1>
|
||||
|
||||
<?php
|
||||
|
||||
require __DIR__ . '/../src/tracy.php';
|
||||
|
||||
use Tracy\Debugger;
|
||||
|
||||
|
||||
Debugger::enable();
|
||||
|
||||
|
||||
|
||||
function first($arg1, $arg2)
|
||||
{
|
||||
second(TRUE, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function second($arg1, $arg2)
|
||||
{
|
||||
third(array(1, 2, 3));
|
||||
}
|
||||
|
||||
|
||||
function third($arg1)
|
||||
{
|
||||
missing_funcion();
|
||||
}
|
||||
|
||||
|
||||
first(10, 'any string');
|
||||
Reference in New Issue
Block a user