diff --git a/kint/README.txt b/kint/README.txt index c735467..75b68b9 100644 --- a/kint/README.txt +++ b/kint/README.txt @@ -1,20 +1,29 @@ WHAT IS IT? ----------- -Kint for PHP is a tool designed to present your debugging data in the absolutely best way possible. +Kint for PHP is a tool designed to present your debugging data in the absolutely +best way possible. -In other words, it's var_dump() and debug_backtrace() on steroids. Easy to use, but powerful and customizable. -An essential addition to your development toolbox. +In other words, it's var_dump() and debug_backtrace() on steroids. Easy to use, +but powerful and customizable. An essential addition to your development +toolbox. USAGE ----- -This module allows to use functions +This module allows to use these aliases: kint($data1, $data2, $data3, ...); + ksm($data1, $data2, $data3, ...) kint_trace(); - ksm($data1, $data2, $data3, ...) -Also you can use all of Kint class power! +But to get the most out of Kint, you will want to use directly the Kint class: + kint_require(); + Kint::dump($data); + Learn more about Kint: http://raveren.github.io/kint/ + +The Kint class function dd() will not work as expected, because this alias +is already defined in devel.module for other purposes. + CONTACTS -------- Module author: @@ -23,6 +32,6 @@ Module author: https://drupal.org/user/1072104 Kint author: - Rokas Šleinius + Rokas Šleinius a.k.a. Raveren raveren@gmail.com https://github.com/raveren \ No newline at end of file diff --git a/kint/kint-0.9/.gitignore b/kint/kint-0.9/.gitignore deleted file mode 100644 index 21a6284..0000000 --- a/kint/kint-0.9/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ - -/config.php -/.idea \ No newline at end of file diff --git a/kint/kint-0.9/Kint.class.php b/kint/kint-0.9/Kint.class.php deleted file mode 100644 index 9541885..0000000 --- a/kint/kint-0.9/Kint.class.php +++ /dev/null @@ -1,742 +0,0 @@ - 0 ) { - self::$enabled = $value; - return; - } - - # ...and a getter - return self::$enabled; - } - - public static function _init() - { - # init settings - if ( isset( $GLOBALS['_kint_settings'] ) ) { - foreach ( $GLOBALS['_kint_settings'] as $key => $val ) { - self::$$key = $val; - } - } - - require KINT_DIR . 'decorators/rich.php'; - require KINT_DIR . 'decorators/concise.php'; - } - - /** - * Prints a debug backtrace - * - * @param array $trace [OPTIONAL] you can pass your own trace, otherwise, `debug_backtrace` will be called - * - * @return void - */ - public static function trace( $trace = null ) - { - if ( !Kint::enabled() ) return; - - echo Kint_Decorators_Rich::_css(); - - isset( $trace ) or $trace = debug_backtrace( true ); - - $output = array(); - foreach ( $trace as $step ) { - self::$traceCleanupCallback and $step = call_user_func( self::$traceCleanupCallback, $step ); - - # if the user defined trace cleanup function returns null, skip this line - if ( $step === null ) { - continue; - } - - if ( !isset( $step['function'] ) ) { - # invalid trace step - continue; - } - - if ( isset( $step['file'] ) AND isset( $step['line'] ) ) { - # include the source of this step - $source = self::_showSource( $step['file'], $step['line'] ); - } - - if ( isset( $step['file'] ) ) { - $file = $step['file']; - - if ( isset( $step['line'] ) ) { - $line = $step['line']; - } - } - - - $function = $step['function']; - - if ( in_array( $step['function'], self::$_statements ) ) { - if ( empty( $step['args'] ) ) { - # no arguments - $args = array(); - } else { - # sanitize the file path - $args = array( self::shortenPath( $step['args'][0] ) ); - } - } elseif ( isset( $step['args'] ) ) { - if ( empty( $step['class'] ) && !function_exists( $step['function'] ) ) { - # introspection on closures or language constructs in a stack trace is impossible before PHP 5.3 - $params = null; - } else { - try { - if ( isset( $step['class'] ) ) { - if ( method_exists( $step['class'], $step['function'] ) ) { - $reflection = new ReflectionMethod( $step['class'], $step['function'] ); - } else if ( isset( $step['type'] ) && $step['type'] == '::' ) { - $reflection = new ReflectionMethod( $step['class'], '__callStatic' ); - } else { - $reflection = new ReflectionMethod( $step['class'], '__call' ); - } - } else { - $reflection = new ReflectionFunction( $step['function'] ); - } - - # get the function parameters - $params = $reflection->getParameters(); - } catch ( Exception $e ) { - $params = null; # avoid various PHP version incompatibilities - } - } - - $args = array(); - foreach ( $step['args'] as $i => $arg ) { - if ( isset( $params[$i] ) ) { - # assign the argument by the parameter name - $args[$params[$i]->name] = $arg; - } else { - # assign the argument by number - $args[$i] = $arg; - } - } - } - - if ( isset( $step['class'] ) ) { - # Class->method() or Class::method() - $function = $step['class'] . $step['type'] . $step['function']; - } - - if ( isset( $step['object'] ) ) { - $function = $step['class'] . $step['type'] . $step['function']; - } - - $output[] = array( - 'function' => $function, - 'args' => isset( $args ) ? $args : null, - 'file' => isset( $file ) ? $file : null, - 'line' => isset( $line ) ? $line : null, - 'source' => isset( $source ) ? $source : null, - 'object' => isset( $step['object'] ) ? $step['object'] : null, - ); - - unset( $function, $args, $file, $line, $source ); - } - - require KINT_DIR . 'view/trace.phtml'; - } - - /** - * dump information about variables - * - * @param mixed $data - * - * @return void|string - */ - public static function dump( $data = null ) - { - if ( !Kint::enabled() ) return; - - # find caller information - $trace = debug_backtrace(); - list( $names, $modifier, $callee, $previousCaller ) = self::_getPassedNames( $trace ); - if ( $names === array( null ) && func_num_args() === 1 && $data === 1 ) { - $call = reset( $trace ); - if ( !isset( $call['file'] ) && isset( $call['class'] ) && $call['class'] === __CLASS__ ) { - array_shift( $trace ); - $call = reset( $trace ); - } - - while ( isset( $call['file'] ) && $call['file'] === __FILE__ ) { - array_shift( $trace ); - $call = reset( $trace ); - } - - self::trace( $trace ); - return; - } - - # process modifiers: @, + and - - switch ( $modifier ) { - case '-': - self::$_firstRun = true; - while ( ob_get_level() ) { - ob_end_clean(); - } - break; - - case '!': - self::$expandedByDefault = true; - break; - case '+': - $maxLevelsOldValue = self::$maxLevels; - self::$maxLevels = false; - break; - case '@': - $firstRunOldValue = self::$_firstRun; - self::$_firstRun = true; - break; - } - - - $data = func_num_args() === 0 - ? array( "[[no arguments passed]]" ) - : func_get_args(); - - - $output = Kint_Decorators_Rich::_css(); - $output .= Kint_Decorators_Rich::_wrapStart( $callee ); - - foreach ( $data as $k => $argument ) { - $output .= self::_dump( $argument, $names[$k] ); - } - $output .= Kint_Decorators_Rich::_wrapEnd( $callee, $previousCaller ); - - self::$_firstRun = false; - - switch ( $modifier ) { - case '+': - self::$maxLevels = $maxLevelsOldValue; - echo $output; - break; - case '@': - self::$_firstRun = $firstRunOldValue; - return $output; - break; - default: - echo $output; - break; - } - - return ''; - } - - protected static function _dump( $var, $name = '' ) - { - kintParser::reset(); - return Kint_Decorators_Rich::decorate( - kintParser::factory( $var, $name ) - ); - } - - - /** - * generic path display callback, can be configured in the settings - * - * @param string $file - * @param int $line [OPTIONAL] - * - * @return string - */ - public static function shortenPath( $file, $line = null ) - { - $file = str_replace( '\\', '/', $file ); - $shortenedName = $file; - foreach ( self::$appRootDirs as $path => $replaceString ) { - $path = str_replace( '\\', '/', $path ); - - if ( strpos( $file, $path ) === 0 ) { - $shortenedName = $replaceString . substr( $file, strlen( $path ) ); - break; - } - } - - - if ( !$line ) { # means this is called from resource type dump - return $shortenedName; - } - - if ( !self::$fileLinkFormat ) { - return "{$shortenedName} line {$line}"; - } - - $url = str_replace( array( '%f', '%l' ), array( $file, $line ), self::$fileLinkFormat ); - $class = ( strpos( $url, 'http://' ) === 0 ) ? 'class="kint-ide-link"' : ''; - - return "{$shortenedName} line {$line}"; - } - - - /** - * trace helper, shows the place in code inline - * - * @param string $file full path to file - * @param int $lineNumber the line to display - * @param int $padding surrounding lines to show besides the main one - * - * @return bool|string - */ - private static function _showSource( $file, $lineNumber, $padding = 7 ) - { - if ( !$file OR !is_readable( $file ) ) { - # continuing will cause errors - return false; - } - - # open the file and set the line position - $file = fopen( $file, 'r' ); - $line = 0; - - # Set the reading range - $range = array( - 'start' => $lineNumber - $padding, - 'end' => $lineNumber + $padding - ); - - # set the zero-padding amount for line numbers - $format = '% ' . strlen( $range['end'] ) . 'd'; - - $source = ''; - while ( ( $row = fgets( $file ) ) !== false ) { - # increment the line number - if ( ++$line > $range['end'] ) { - break; - } - - if ( $line >= $range['start'] ) { - # make the row safe for output - $row = htmlspecialchars( $row, ENT_NOQUOTES ); - - # trim whitespace and sanitize the row - $row = '' . sprintf( $format, $line ) . ' ' . $row; - - if ( $line === $lineNumber ) { - # apply highlighting to this row - $row = '
' . $row . '
'; - } else { - $row = '
' . $row . '
'; - } - - # add to the captured source - $source .= $row; - } - } - - # close the file - fclose( $file ); - - return $source; - } - - - /** - * returns parameter names that the function was passed, as well as any predefined symbols before function - * call (modifiers) - * - * @param array $trace - * - * @return array( $parameters, $modifier, $callee, $previousCaller ) - */ - private static function _getPassedNames( $trace ) - { - $previousCaller = array(); - while ( $callee = array_pop( $trace ) ) { - if ( strtolower( $callee['function'] ) === 'd' || - strtolower( $callee['function'] ) === 'dd' || - ( isset( $callee['class'] ) && strtolower( $callee['class'] ) === strtolower( __CLASS__ ) - && strtolower( $callee['function'] ) === 'dump' ) - ) { - break; - } else { - $previousCaller = $callee; - } - } - - if ( !isset( $callee['file'] ) || !is_readable( $callee['file'] ) ) { - return false; - } - - # open the file and read it up to the position where the function call expression ended - $file = fopen( $callee['file'], 'r' ); - $line = 0; - $source = ''; - while ( ( $row = fgets( $file ) ) !== false ) { - if ( ++$line > $callee['line'] ) break; - $source .= $row; - } - fclose( $file ); - $source = self::_removeAllButCode( $source ); - - - $codePattern = empty( $callee['class'] ) - ? $callee['function'] - : $callee['class'] . "\x07*" . $callee['type'] . "\x07*" . $callee['function']; - # get the position of the last call to the function - preg_match_all( "#[\x07{(](\\+|-|!|@)?{$codePattern}\x07*(\\()#i", $source, $matches, PREG_OFFSET_CAPTURE ); - $match = end( $matches[2] ); - $modifier = end( $matches[1] ); - $modifier = $modifier[0]; - - $passedParameters = str_replace( "\x07", '', substr( $source, $match[1] + 1 ) ); - # we now have a string like this: - # ); - - # remove everything in brackets and quotes, we don't need nested statements nor literal strings which would - # only complicate separating individual arguments - $c = strlen( $passedParameters ); - $inString = $escaped = false; - $i = 0; - $inBrackets = 0; - while ( $i < $c ) { - $letter = $passedParameters[$i]; - if ( $inString === false ) { - if ( $letter === '\'' || $letter === '"' ) { - $inString = $letter; - } elseif ( $letter === '(' ) { - $inBrackets++; - } elseif ( $letter === ')' ) { - $inBrackets--; - if ( $inBrackets === -1 ) { # this means we are out of the brackets that denote passed parameters - $passedParameters = substr( $passedParameters, 0, $i ); - break; - } - } - } elseif ( $letter === $inString && !$escaped ) { - $inString = false; - } - - # place an untype-able character instead of whatever was inside quotes or brackets, we don't - # need that info. We'll later replace it with '...' - if ( $inBrackets > 0 ) { - if ( $inBrackets > 1 || $letter !== '(' ) { - $passedParameters[$i] = "\x07"; - } - } - if ( $inString !== false ) { - if ( $letter !== $inString || $escaped ) { - $passedParameters[$i] = "\x07"; - } - } - - $escaped = !$escaped && ( $letter === '\\' ); - $i++; - } - - # by now we have an unnested arguments list, lets make it to an array for processing further - $arguments = explode( ',', preg_replace( "#\x07+#", '...', $passedParameters ) ); - - # test each argument whether it was passed literary or was it an expression or a variable name - $parameters = array(); - $blacklist = array( 'null', 'true', 'false', 'array(...)', 'array()', '"..."', 'b"..."', ); - foreach ( $arguments as $argument ) { - - if ( is_numeric( $argument ) - || in_array( str_replace( "'", '"', strtolower( $argument ) ), $blacklist, true ) - ) { - $parameters[] = null; - } else { - $parameters[] = trim( $argument ); - } - } - - return array( $parameters, $modifier, $callee, $previousCaller ); - } - - /** - * removes comments and zaps whitespace & true, T_INLINE_HTML => true, T_DOC_COMMENT => true ); - - defined( 'T_NS_SEPARATOR' ) or define( 'T_NS_SEPARATOR', 380 ); - - $whiteSpaceTokens = array( - T_WHITESPACE => true, T_CLOSE_TAG => true, - T_OPEN_TAG => true, T_OPEN_TAG_WITH_ECHO => true, - ); - - foreach ( $tokens as $token ) { - if ( is_array( $token ) ) { - if ( isset( $commentTokens[$token[0]] ) ) continue; - - if ( $token[0] === T_NEW ) { - $token = 'new '; - } elseif ( $token[0] === T_NS_SEPARATOR ) { - $token = "\\\x07"; - } elseif ( isset( $whiteSpaceTokens[$token[0]] ) ) { - $token = "\x07"; - } else { - $token = $token[1]; - } - } elseif ( $token === ';' ) { - $token = "\x07"; - } - - $newStr .= $token; - } - return $newStr; - } -} - - -if ( !function_exists( 'd' ) ) { - /** - * Alias of Kint::dump() - * - * @return string - */ - function d() - { - if ( !Kint::enabled() ) return null; - - $args = func_get_args(); - return call_user_func_array( array( 'Kint', 'dump' ), $args ); - } -} - -if ( !function_exists( 'dd' ) ) { - /** - * Alias of Kint::dump() - * [!!!] IMPORTANT: execution will halt after call to this function - * - * @return string - */ - function dd() - { - if ( !Kint::enabled() ) return; - - $args = func_get_args(); - call_user_func_array( array( 'Kint', 'dump' ), $args ); - die; - } -} - -if ( !function_exists( 's' ) ) { - - /** - * Alias of kintLite() - * - * @return string - */ - function s() - { - if ( !Kint::enabled() ) return; - - $argv = func_get_args(); - echo '
';
-		foreach ( $argv as $k => $v ) {
-			$k && print( "\n\n" );
-			echo kintLite( $v );
-		}
-		echo '
' . "\n"; - } - - /** - * Alias of kintLite() - * [!!!] IMPORTANT: execution will halt after call to this function - * - * @return string - */ - function sd() - { - if ( !Kint::enabled() ) return; - - echo '
';
-		foreach ( func_get_args() as $k => $v ) {
-			$k && print( "\n\n" );
-			echo kintLite( $v );
-		}
-		echo '
'; - die; - - } - -} - - -/** - * lightweight version of Kint::dump(). Uses whitespace for formatting instead of html - * sadly not DRY yet - * - * @param $var - * @param int $level - * - * @return string - */ -function kintLite( &$var, $level = 0 ) -{ - - // initialize function names into variables for prettier string output (html and implode are also DRY) - $html = "htmlspecialchars"; - $implode = "implode"; - $strlen = "strlen"; - $count = "count"; - $getClass = "get_class"; - - - if ( $var === null ) { - return 'NULL'; - } elseif ( is_bool( $var ) ) { - return 'bool ' . ( $var ? 'TRUE' : 'FALSE' ); - } elseif ( is_float( $var ) ) { - return 'float ' . $var; - } elseif ( is_int( $var ) ) { - return 'integer ' . $var; - } elseif ( is_resource( $var ) ) { - if ( ( $type = get_resource_type( $var ) ) === 'stream' AND $meta = stream_get_meta_data( $var ) ) { - - if ( isset( $meta['uri'] ) ) { - $file = $meta['uri']; - - return "resource ({$type}) {$html( $file, 0 )}"; - } else { - return "resource ({$type})"; - } - } else { - return "resource ({$type})"; - } - } elseif ( is_string( $var ) ) { - return "string ({$strlen( $var )}) \"{$html( $var )}\""; - } elseif ( is_array( $var ) ) { - $output = array(); - $space = str_repeat( $s = ' ', $level ); - - static $marker; - - if ( $marker === null ) { - // Make a unique marker - $marker = uniqid( "\x00" ); - } - - if ( empty( $var ) ) { - return "array()"; - } elseif ( isset( $var[$marker] ) ) { - $output[] = "[\n$space$s*RECURSION*\n$space]"; - } elseif ( $level < 7 ) { - $isSeq = array_keys( $var ) === range( 0, count( $var ) - 1 ); - - $output[] = "["; - - $var[$marker] = true; - - - foreach ( $var as $key => &$val ) { - if ( $key === $marker ) continue; - - $key = $space . $s . ( $isSeq ? "" : "'{$html( $key, 0 )}' => " ); - - $dump = kintLite( $val, $level + 1 ); - $output[] = "{$key}{$dump}"; - } - - unset( $var[$marker] ); - $output[] = "$space]"; - - } else { - $output[] = "[\n$space$s*depth too great*\n$space]"; - } - return "array({$count( $var )}) {$implode( "\n", $output )}"; - } elseif ( is_object( $var ) ) { - if ( $var instanceof SplFileInfo ) { - return "object SplFileInfo " . $var->getRealPath(); - } - - // Copy the object as an array - $array = (array)$var; - - $output = array(); - $space = str_repeat( $s = ' ', $level ); - - $hash = spl_object_hash( $var ); - - // Objects that are being dumped - static $objects = array(); - - if ( empty( $array ) ) { - return "object {$getClass( $var )} {}"; - } elseif ( isset( $objects[$hash] ) ) { - $output[] = "{\n$space$s*RECURSION*\n$space}"; - } elseif ( $level < 7 ) { - $output[] = "{"; - $objects[$hash] = true; - - foreach ( $array as $key => & $val ) { - if ( $key[0] === "\x00" ) { - - $access = $key[1] === "*" ? "protected" : "private"; - - // Remove the access level from the variable name - $key = substr( $key, strrpos( $key, "\x00" ) + 1 ); - } else { - $access = "public"; - } - - $output[] = "$space$s$access $key -> " . kintLite( $val, $level + 1 ); - } - unset( $objects[$hash] ); - $output[] = "$space}"; - - } else { - $output[] = "{\n$space$s*depth too great*\n$space}"; - } - - return "object {$getClass( $var )} ({$count( $array )}) {$implode( "\n", $output )}"; - } else { - return gettype( $var ) . htmlspecialchars( var_export( $var, true ), ENT_NOQUOTES ); - } -} - -Kint::_init(); diff --git a/kint/kint-0.9/LICENCE b/kint/kint-0.9/LICENCE deleted file mode 100644 index 936fe1f..0000000 --- a/kint/kint-0.9/LICENCE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Rokas Šleinius (raveren@gmail.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/kint/kint-0.9/README.md b/kint/kint-0.9/README.md deleted file mode 100644 index 9fa5b48..0000000 --- a/kint/kint-0.9/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# Kint - debugging helper for PHP developers - -[![Total Downloads](https://poser.pugx.org/raveren/kint/downloads.png)](https://packagist.org/packages/raveren/kint) - -http://raveren.github.com/kint/ - -![Screenshot](http://raveren.github.com/kint/img/preview.png) - -Kint for PHP is a powerful and modern, zero-setup replacement for **[var_dump()](http://php.net/manual/en/function.var-dump.php)**, **[print_r()](http://php.net/manual/en/function.print-r.php)** and **[debug_backtrace()](http://php.net/manual/en/function.debug-backtrace.php)**. You'll wonder how you developed without it. - - ----- - - -## Installation and usage -```php -=5.2.0" - }, - "autoload": { - "files": ["Kint.class.php"] - } -} \ No newline at end of file diff --git a/kint/kint-0.9/config.default.php b/kint/kint-0.9/config.default.php deleted file mode 100644 index 04d78a3..0000000 --- a/kint/kint-0.9/config.default.php +++ /dev/null @@ -1,130 +0,0 @@ - '<ROOT>' ) - * - * [!] EXAMPLE (for Kohana framework): - * - * $_kintSettings['appRootDirs'] = array( - * APPPATH => 'APPPATH', // make sure the constants are already defined at the time of including this config file - * SYSPATH => 'SYSPATH', - * MODPATH => 'MODPATH', - * DOCROOT => 'DOCROOT', - * ); - * - * [!] EXAMPLE #2 (for a semi-universal approach) - * - * $_kintSettings['appRootDirs'] = array( - * realpath( __DIR__ . '/../../..' ) => 'ROOT', // go up as many levels as needed in the realpath() param - * ); - * - * $_kintSettings['fileLinkFormat'] = 'http://localhost:8091/?message=%f:%l'; - * - */ -$_kintSettings['appRootDirs'] = array( - $_SERVER['DOCUMENT_ROOT'] => '<ROOT>' -); - - -/** - * @var callable|null - * - * @param array $step each step of the backtrace is passed to this callback to clean it up or skip it entirely - * - * @return array|null you can return null if you want to bypass outputting this step - * - * [!] EXAMPLE: - * - * $_kintSettings['traceCleanupCallback'] = function( $traceStep ) { - * if ( isset( $traceStep['class'] ) && strtolower( $traceStep['class'] ) === 'errorHandler' ) { - * return null; - * } - * - * if ( isset( $traceStep['function'] ) && strtolower( $traceStep['function'] ) === '__tostring' ) { - * $traceStep['function'] = "[object converted to string]"; - * } - * - * return $traceStep; - * }; - */ -$_kintSettings['traceCleanupCallback'] = null; - - -/** @var int max length of string before it is truncated and displayed separately in full. Zero or false to disable */ -$_kintSettings['maxStrLength'] = 60; - -/** @var array possible alternative char encodings in order of probability, eg. array('windows-1251') */ -$_kintSettings['charEncodings'] = array(); - - -/** @var int max array/object levels to go deep, if zero no limits are applied */ -$_kintSettings['maxLevels'] = 5; - - -/** @var bool whether dumped indexed arrays that are in ideal sequence are displayed */ -$_kintSettings['hideSequentialKeys'] = true; - - -/** @var string name of theme for rich view */ -$_kintSettings['theme'] = 'original'; - - -/** - * @var callback filters array/object keys before outputting; return false if you do not wish to see it in the output - * - * @param string $key the key being output - * @param mixed $val the contents of the dumped element in case you need it - * - * @return bool return false to skip displaying - * - * [!] EXAMPLE: - * - * $_kintSettings['keyFilterCallback'] = function( $key, $val ) { - * if ( preg_match( '#_mt$#', $key ) ) { - * return false; - * } - * - * if ( $val === '--testing--' ) { - * return false; - * } - * - * // no need to return true to continue output - * }; - * - */ -$_kintSettings['keyFilterCallback'] = null; - - -/** @var bool only set to true if you want to develop kint and know what you're doing */ -$_kintSettings['devel'] = false; - - -unset( $_kintSettings ); \ No newline at end of file diff --git a/kint/kint-0.9/decorators/concise.php b/kint/kint-0.9/decorators/concise.php deleted file mode 100644 index 4385845..0000000 --- a/kint/kint-0.9/decorators/concise.php +++ /dev/null @@ -1,58 +0,0 @@ -extendedValue - * - * @param kintVariableData $kintVar - * - * @return string - */ - public static function decorate( kintVariableData $kintVar ) - { - if ( $kintVar->extendedValue !== null || !empty( $kintVar->alternatives ) ) { - return Kint_Decorators_Rich::decorate( $kintVar ); - } - - if ( $kintVar->value !== null ) { - $output = 'name !== null ) { - $output .= $kintVar->name . " "; - } - - if ( $kintVar->type !== null ) { - $output .= $kintVar->type; - if ( $kintVar->subtype !== null ) { - $output .= " " . $kintVar->subtype; - } - $output .= " "; - } - - if ( $kintVar->operator !== null ) { - $output .= $kintVar->operator . ""; - } - - if ( $kintVar->size !== null ) { - $output .= "(" . $kintVar->size . ") "; - } - - $output = trim( $output ) . '">' . $kintVar->value . ''; - } else { - $output = 'NULL'; - } - - return $output; - } -} \ No newline at end of file diff --git a/kint/kint-0.9/decorators/plain.php b/kint/kint-0.9/decorators/plain.php deleted file mode 100644 index 203e60c..0000000 --- a/kint/kint-0.9/decorators/plain.php +++ /dev/null @@ -1,54 +0,0 @@ -'; - - $extendedPresent = $kintVar->extendedValue !== null || $kintVar->alternatives !== null; - - if ( $extendedPresent ) { - $class = 'kint-parent'; - if ( Kint::$expandedByDefault ) { - $class .= ' kint-show'; - } - $output .= '
'; - } else { - $output .= '
'; - } - - $output .= self::_drawHeader( $kintVar ) . $kintVar->value . '
'; - - - if ( $extendedPresent ) { - $output .= '
'; - } - - if ( isset( $kintVar->extendedValue ) ) { - - if ( is_array( $kintVar->extendedValue ) ) { - foreach ( $kintVar->extendedValue as $v ) { - $output .= self::decorate( $v ); - } - } elseif ( is_string( $kintVar->extendedValue ) ) { - $output .= '
' . $kintVar->extendedValue . '
'; - } else { - $output .= self::decorate( $kintVar->extendedValue ); //it's kint's container - } - - } elseif ( isset( $kintVar->alternatives ) ) { - $output .= "
    "; - - foreach ( $kintVar->alternatives as $k => $var ) { - $active = $k === 0 ? ' class="kint-active-tab"' : ''; - $output .= "" . self::_drawHeader( $var, false ) . ''; - } - - $output .= "
    "; - - foreach ( $kintVar->alternatives as $var ) { - $output .= "
  • "; - - $var = $var->value; - - if ( is_array( $var ) ) { - foreach ( $var as $v ) { - $output .= self::decorate( $v ); - } - } elseif ( is_string( $var ) ) { - $output .= '
    ' . $var . '
    '; - } elseif ( isset( $var ) ) { - throw new Exception( - 'Kint has encountered an error, ' - . 'please paste this report to https://github.com/raveren/kint/issues
    ' - . 'Error encountered at ' . basename( __FILE__ ) . ':' . __LINE__ . '
    ' - . ' variables: ' - . htmlspecialchars( var_export( $kintVar->alternatives, true ), ENT_QUOTES ) - ); - } - - $output .= "
  • "; - } - - $output .= "
"; - } - if ( $extendedPresent ) { - $output .= '
'; - } - - $output .= ''; - - return $output; - } - - private static function _drawHeader( kintVariableData $kintVar, $verbose = true ) - { - $output = ''; - if ( $verbose ) { - if ( $kintVar->access !== null ) { - $output .= "" . $kintVar->access . " "; - } - - if ( $kintVar->name !== null && $kintVar->name !== '' ) { - $output .= "" . $kintVar->name . " "; - } - - if ( $kintVar->operator !== null ) { - $output .= $kintVar->operator . " "; - } - } - - if ( $kintVar->type !== null ) { - $output .= "" . $kintVar->type; - if ( $kintVar->subtype !== null ) { - $output .= " " . $kintVar->subtype; - } - $output .= " "; - } - - - if ( $kintVar->size !== null ) { - $output .= "(" . $kintVar->size . ") "; - } - - return $output; - } - - - /** - * produces css and js required for display. May be called multiple times, will only produce output once per - * pageload or until `-` or `@` modifier is used - * - * @return string - */ - protected static function _css() - { - if ( !self::$_firstRun ) return ''; - self::$_firstRun = false; - - $baseDir = KINT_DIR . 'view/inc/'; - - if ( !is_readable( $cssFile = $baseDir . self::$theme . '.css' ) ) { - $cssFile = $baseDir . 'original.css'; - } - - return '' - . '\n"; - } - - - /** - * called for each dump, opens the html tag - * - * @param array $callee caller information taken from debug backtrace - * - * @return string - */ - protected static function _wrapStart( $callee ) - { - // colors looping outputs the same (i.e. if same line in code dumps variables multiple time, - // we assume it's in a loop) - - $uid = isset( $callee['file'] ) ? crc32( $callee['file'] . $callee['line'] ) : 'no-file'; - - if ( isset( self::$_usedColors[$uid] ) ) { - $class = self::$_usedColors[$uid]; - } else { - $class = sizeof( self::$_usedColors ); - self::$_usedColors[$uid] = $class; - } - - $class = "kint_{$class}"; - - - return "
"; - } - - - /** - * closes Kint::_wrapStart() started html tags and displays callee information - * - * @param array $callee caller information taken from debug backtrace - * @param array $prevCaller previous caller information taken from debug backtrace - * - * @return string - */ - protected static function _wrapEnd( $callee, $prevCaller ) - { - if ( !Kint::$displayCalledFrom ) { - return '
'; - } - - $callingFunction = ''; - if ( isset( $prevCaller['class'] ) ) { - $callingFunction = $prevCaller['class']; - } - if ( isset( $prevCaller['type'] ) ) { - $callingFunction .= $prevCaller['type']; - } - if ( isset( $prevCaller['function'] ) && !in_array( $prevCaller['function'], Kint::$_statements ) ) { - $callingFunction .= $prevCaller['function'] . '()'; - } - $callingFunction and $callingFunction = " in ({$callingFunction})"; - - - $calleeInfo = isset( $callee['file'] ) - ? 'Called from ' . self::shortenPath( $callee['file'], $callee['line'] ) - : ''; - - - return $calleeInfo || $callingFunction - ? "
{$calleeInfo}{$callingFunction}
" - : ""; - } - -} \ No newline at end of file diff --git a/kint/kint-0.9/parsers/custom/arrayobject.php b/kint/kint-0.9/parsers/custom/arrayobject.php deleted file mode 100644 index 4c15e29..0000000 --- a/kint/kint-0.9/parsers/custom/arrayobject.php +++ /dev/null @@ -1,26 +0,0 @@ -getParentClass(); - - if ( $parentClass !== false && $parentClass->name === 'ArrayObject' ) { - $arrayCopy = $variable->getArrayCopy(); - foreach ( $arrayCopy as $k => $var ) { - $t = kintParser::factory( $var ); - $t->name = "'{$k}'"; - $t->operator = '=>'; - $this->value[] = $t; - } - - $this->type = 'ArrayObject contents'; - $this->size = count( $arrayCopy ); - } else { - return false; - } - } -} diff --git a/kint/kint-0.9/parsers/custom/classmethods.php b/kint/kint-0.9/parsers/custom/classmethods.php deleted file mode 100644 index 58c7f4c..0000000 --- a/kint/kint-0.9/parsers/custom/classmethods.php +++ /dev/null @@ -1,151 +0,0 @@ -getMethods() as $method) { - $params = array(); - - // Access type - $access = implode(' ', \Reflection::getModifierNames($method->getModifiers())); - - // Method parameters - foreach($method->getParameters() as $param) { - $paramString = ''; - - if ( $param->isArray() ) { - $paramString .= 'array '; - } else { - try { - if (( $paramClassName = $param->getClass() )) { - $paramString .= $paramClassName->name . ' '; - } - } catch ( ReflectionException $e ) { - preg_match( '/\[\s\<\w+?>\s([\w]+)/s', $param->__toString(), $matches ); - $paramClassName = isset( $matches[1] ) ? $matches[1] : ''; - - $paramString .= ' UNDEFINED CLASS (' . $paramClassName . ') '; - } - } - - $paramString .= ($param->isPassedByReference() ? '&' : '') . '$' . $param->getName(); - - if($param->isDefaultValueAvailable()) { - if(is_array($param->getDefaultValue())) { - $arrayValues = array(); - foreach($param->getDefaultValue() as $key => $value) { - $arrayValues[] = $key . ' => ' . $value; - } - - $defaultValue = 'array(' . implode(', ', $arrayValues) . ')'; - } elseif($param->getDefaultValue() === null){ - $defaultValue = 'NULL'; - } elseif($param->getDefaultValue() === false){ - $defaultValue = 'false'; - } elseif($param->getDefaultValue() === true){ - $defaultValue = 'true'; - } elseif($param->getDefaultValue() === ''){ - $defaultValue = '""'; - } else { - $defaultValue = $param->getDefaultValue(); - } - - $paramString .= ' = ' . $defaultValue; - } - - $params[] = $paramString; - } - - $output = new \kintVariableData(); - - // Simple DocBlock parser, look for @return - if(($docBlock = $method->getDocComment())) { - $matches = array(); - if(preg_match_all('/@(\w+)\s+(.*)\r?\n/m', $docBlock, $matches)) { - $lines = array_combine($matches[1], $matches[2]); - if(isset($lines['return'])) { - $output->operator = '->'; - # since we're outputting code, assumption that the string is utf8 is most likely correct - # and saves resources - $output->type = self::_escape( $lines['return'], 'UTF-8' ); - } - } - } - - $output->name = ($method->returnsReference() ? '&' : '') . $method->getName() . '(' - . implode(', ', $params) . ')'; - $output->access = $access; - - if(is_string($docBlock)) { - $lines = array(); - foreach(explode("\n", $docBlock) as $line) { - $line = trim($line); - - if(in_array($line, array('/**', '/*', '*/'))) { - continue; - }elseif(strpos($line, '*') === 0) { - $line = substr($line, 1); - } - - $lines[] = self::_escape( trim( $line ), 'UTF-8' ); - } - - $output->extendedValue = implode("\n", $lines) . "\n\n"; - } - - $declaringClass = $method->getDeclaringClass(); - $declaringClassName = $declaringClass->getName(); - - if($declaringClassName !== $className) { - $output->extendedValue .= "Inherited from {$declaringClassName}\n"; - } - - $fileName = \Kint::shortenPath($method->getFileName(), $method->getStartLine()); - - if($fileName) { - $output->extendedValue .= "Defined in {$fileName}"; - } - - $sortName = $access . $method->getName(); - - if($method->isPrivate()) { - $private[$sortName] = $output; - } elseif($method->isProtected()) { - $protected[$sortName] = $output; - } else { - $public[$sortName] = $output; - } - } - - if(!$private && !$protected && !$public) { - self::$cache[$className] = false; - } - - ksort($public); - ksort($protected); - ksort($private); - - self::$cache[$className] = $public + $protected + $private; - } - - $this->value = self::$cache[$className]; - $this->type = 'Available methods'; - $this->size = count(self::$cache[$className]); - } -} \ No newline at end of file diff --git a/kint/kint-0.9/parsers/custom/classstatics.php b/kint/kint-0.9/parsers/custom/classstatics.php deleted file mode 100644 index 1c6d0e4..0000000 --- a/kint/kint-0.9/parsers/custom/classstatics.php +++ /dev/null @@ -1,54 +0,0 @@ -getProperties( ReflectionProperty::IS_STATIC ) as $property ) { - if ( $property->isPrivate() ) { - if ( !method_exists( $property, 'setAccessible' ) ) { - break; - } - $property->setAccessible( true ); - $access = "private"; - } elseif ( $property->isProtected() ) { - $property->setAccessible( true ); - $access = "protected"; - } else { - $access = 'public'; - } - - if ( Kint::$keyFilterCallback - && call_user_func( Kint::$keyFilterCallback, $property->getName(), $property->getValue() ) === false - ) { - continue; - } - - $_ = $property->getValue(); - $output = kintParser::factory( $_, '$' . $property->getName() ); - - $output->access = $access; - $output->operator = '::'; - $extendedValue[] = $output; - } - - foreach ( $reflection->getConstants() as $constant => $val ) { - $output = kintParser::factory( $val, $constant ); - - $output->access = 'constant'; - $output->operator = '::'; - $extendedValue[] = $output; - } - - if ( empty( $extendedValue ) ) return false; - - $this->value = $extendedValue; - $this->type = 'Static class properties'; - $this->size = count( $extendedValue ); - } -} \ No newline at end of file diff --git a/kint/kint-0.9/parsers/custom/color.php b/kint/kint-0.9/parsers/custom/color.php deleted file mode 100644 index 21d1f39..0000000 --- a/kint/kint-0.9/parsers/custom/color.php +++ /dev/null @@ -1,400 +0,0 @@ -'#f0f8ff','antiquewhite'=>'#faebd7','aqua'=>'#00ffff','aquamarine'=>'#7fffd4','azure'=>'#f0ffff', - 'beige'=>'#f5f5dc','bisque'=>'#ffe4c4','black'=>'#000000','blanchedalmond'=>'#ffebcd','blue'=>'#0000ff', - 'blueviolet'=>'#8a2be2','brown'=>'#a52a2a','burlywood'=>'#deb887','cadetblue'=>'#5f9ea0','chartreuse'=>'#7fff00', - 'chocolate'=>'#d2691e','coral'=>'#ff7f50','cornflowerblue'=>'#6495ed','cornsilk'=>'#fff8dc','crimson'=>'#dc143c', - 'cyan'=>'#00ffff','darkblue'=>'#00008b','darkcyan'=>'#008b8b','darkgoldenrod'=>'#b8860b','darkgray'=>'#a9a9a9', - 'darkgrey'=>'#a9a9a9','darkgreen'=>'#006400','darkkhaki'=>'#bdb76b','darkmagenta'=>'#8b008b', - 'darkolivegreen'=>'#556b2f','darkorange'=>'#ff8c00','darkorchid'=>'#9932cc','darkred'=>'#8b0000', - 'darksalmon'=>'#e9967a','darkseagreen'=>'#8fbc8f','darkslateblue'=>'#483d8b','darkslategray'=>'#2f4f4f', - 'darkslategrey'=>'#2f4f4f','darkturquoise'=>'#00ced1','darkviolet'=>'#9400d3','deeppink'=>'#ff1493', - 'deepskyblue'=>'#00bfff','dimgray'=>'#696969','dimgrey'=>'#696969','dodgerblue'=>'#1e90ff', - 'firebrick'=>'#b22222','floralwhite'=>'#fffaf0','forestgreen'=>'#228b22','fuchsia'=>'#ff00ff', - 'gainsboro'=>'#dcdcdc','ghostwhite'=>'#f8f8ff','gold'=>'#ffd700','goldenrod'=>'#daa520','gray'=>'#808080', - 'grey'=>'#808080','green'=>'#008000','greenyellow'=>'#adff2f','honeydew'=>'#f0fff0','hotpink'=>'#ff69b4', - 'indianred'=>'#cd5c5c','indigo'=>'#4b0082','ivory'=>'#fffff0','khaki'=>'#f0e68c','lavender'=>'#e6e6fa', - 'lavenderblush'=>'#fff0f5','lawngreen'=>'#7cfc00','lemonchiffon'=>'#fffacd','lightblue'=>'#add8e6', - 'lightcoral'=>'#f08080','lightcyan'=>'#e0ffff','lightgoldenrodyellow'=>'#fafad2','lightgray'=>'#d3d3d3', - 'lightgrey'=>'#d3d3d3','lightgreen'=>'#90ee90','lightpink'=>'#ffb6c1','lightsalmon'=>'#ffa07a', - 'lightseagreen'=>'#20b2aa','lightskyblue'=>'#87cefa','lightslategray'=>'#778899','lightslategrey'=>'#778899', - 'lightsteelblue'=>'#b0c4de','lightyellow'=>'#ffffe0','lime'=>'#00ff00','limegreen'=>'#32cd32','linen'=>'#faf0e6', - 'magenta'=>'#ff00ff','maroon'=>'#800000','mediumaquamarine'=>'#66cdaa','mediumblue'=>'#0000cd', - 'mediumorchid'=>'#ba55d3','mediumpurple'=>'#9370d8','mediumseagreen'=>'#3cb371','mediumslateblue'=>'#7b68ee', - 'mediumspringgreen'=>'#00fa9a','mediumturquoise'=>'#48d1cc','mediumvioletred'=>'#c71585', - 'midnightblue'=>'#191970','mintcream'=>'#f5fffa','mistyrose'=>'#ffe4e1','moccasin'=>'#ffe4b5', - 'navajowhite'=>'#ffdead','navy'=>'#000080','oldlace'=>'#fdf5e6','olive'=>'#808000','olivedrab'=>'#6b8e23', - 'orange'=>'#ffa500','orangered'=>'#ff4500','orchid'=>'#da70d6','palegoldenrod'=>'#eee8aa','palegreen'=>'#98fb98', - 'paleturquoise'=>'#afeeee','palevioletred'=>'#d87093','papayawhip'=>'#ffefd5','peachpuff'=>'#ffdab9', - 'peru'=>'#cd853f','pink'=>'#ffc0cb','plum'=>'#dda0dd','powderblue'=>'#b0e0e6','purple'=>'#800080', - 'red'=>'#ff0000','rosybrown'=>'#bc8f8f','royalblue'=>'#4169e1','saddlebrown'=>'#8b4513','salmon'=>'#fa8072', - 'sandybrown'=>'#f4a460','seagreen'=>'#2e8b57','seashell'=>'#fff5ee','sienna'=>'#a0522d','silver'=>'#c0c0c0', - 'skyblue'=>'#87ceeb','slateblue'=>'#6a5acd','slategray'=>'#708090','slategrey'=>'#708090','snow'=>'#fffafa', - 'springgreen'=>'#00ff7f','steelblue'=>'#4682b4','tan'=>'#d2b48c','teal'=>'#008080','thistle'=>'#d8bfd8', - 'tomato'=>'#ff6347','turquoise'=>'#40e0d0','violet'=>'#ee82ee','wheat'=>'#f5deb3','white'=>'#ffffff', - 'whitesmoke'=>'#f5f5f5','yellow'=>'#ffff00','yellowgreen'=>'#9acd32' - ); - - - protected function _parse( & $variable ) - { - if ( !self::_fits( $variable ) ) return false; - - $this->type = 'CSS color'; - $variants = self::_convert( $variable ); - $this->value = - "
{$variable}
" . - "hex : {$variants['hex']}\n" . - "rgb : {$variants['rgb']}\n" . - ( isset( $variants['name'] ) ? "name: {$variants['name']}\n" : '' ) . - "hsl : {$variants['hsl']}"; - } - - - private static function _fits( $variable ) - { - if ( !is_string( $variable ) ) return false; - - $var = strtolower( trim( $variable ) ); - - return isset( self::$_css3Named[$var] ) - || preg_match( - '/^(?:#[0-9A-Fa-f]{3}|#[0-9A-Fa-f]{6}|(?:rgb|hsl)a?\s*\((?:\s*[0-9.%]+\s*,?){3,4}\))$/', - $var - ); - } - - private static function _convert( $color ) - { - $color = strtolower( $color ); - $decimalColors = array(); - $variants = array( - 'hex' => null, - 'rgb' => null, - 'name' => null, - 'hsl' => null, - ); - - if ( isset( self::$_css3Named[$color] ) ) { - $variants['name'] = $color; - $color = self::$_css3Named[$color]; - } - - if ( $color{0} === '#' ) { - $variants['hex'] = $color; - $color = substr( $color, 1 ); - if ( strlen( $color ) === 6 ) { - $colors = str_split( $color, 2 ); - } else { - $colors = array( - $color{0} . $color{0}, - $color{1} . $color{1}, - $color{2} . $color{2}, - ); - } - - $decimalColors = array_map( 'hexdec', $colors ); - } elseif ( substr( $color, 0, 3 ) === 'rgb' ) { - $variants['rgb'] = $color; - preg_match_all( '#([0-9.%]+)#', $color, $matches ); - $decimalColors = $matches[1]; - foreach ( $decimalColors as &$color ) { - if ( strpos( $color, '%' ) !== false ) { - $color = str_replace( '%', '', $color ) * 2.55; - } - } - - - } elseif ( substr( $color, 0, 3 ) === 'hsl' ) { - $variants['hsl'] = $color; - preg_match_all( '#([0-9.%]+)#', $color, $matches ); - - $colors = $matches[1]; - $colors[0] /= 360; - $colors[1] = str_replace( '%', '', $colors[1] ) / 100; - $colors[2] = str_replace( '%', '', $colors[2] ) / 100; - - $decimalColors = self::_HSLtoRGB( $colors ); - if ( isset( $colors[3] ) ) { - $decimalColors[] = $colors[3]; - } - } - - if ( isset( $decimalColors[3] ) ) { - $alpha = $decimalColors[3]; - unset( $decimalColors[3] ); - } else { - $alpha = null; - } - foreach ( $variants as $type => &$variant ) { - if ( isset( $variant ) ) continue; - - switch ( $type ) { - case 'hex': - $variant = '#'; - foreach ( $decimalColors as &$color ) { - $variant .= str_pad( dechex( $color ), 2, "0", STR_PAD_LEFT ); - } - $variant .= isset( $alpha ) ? ' (alpha omitted)' : ''; - break; - case 'rgb': - $rgb = $decimalColors; - if ( isset( $alpha ) ) { - $rgb[] = $alpha; - $a = 'a'; - } else { - $a = ''; - } - $variant = "rgb{$a}( " . implode( ', ', $rgb ) . " )"; - break; - case 'hsl': - $rgb = self::_RGBtoHSL( $decimalColors ); - if ( $rgb === null ) { - unset( $variants[$type] ); - break; - } - if ( isset( $alpha ) ) { - $rgb[] = $alpha; - $a = 'a'; - } else { - $a = ''; - } - - $variant = "hsl{$a}( " . implode( ', ', $rgb ) . " )"; - break; - case 'name': - // [!] name in initial variants array must go after hex - if ( ( $key = array_search( $variants['hex'], self::$_css3Named, true ) ) !== false ) { - $variant = $key; - } else { - unset( $variants[$type] ); - } - break; - } - - } - - return $variants; - } - - - private static function _HSLtoRGB( array $hsl ) - { - list( $h, $s, $l ) = $hsl; - $m2 = ( $l <= 0.5 ) ? $l * ( $s + 1 ) : $l + $s - $l * $s; - $m1 = $l * 2 - $m2; - return array( - round( self::_hue2rgb( $m1, $m2, $h + 0.33333 ) * 255 ), - round( self::_hue2rgb( $m1, $m2, $h ) * 255 ), - round( self::_hue2rgb( $m1, $m2, $h - 0.33333 ) * 255 ), - ); - } - - - /** - * Helper function for _color_hsl2rgb(). - */ - private static function _hue2rgb( $m1, $m2, $h ) - { - $h = ( $h < 0 ) ? $h + 1 : ( ( $h > 1 ) ? $h - 1 : $h ); - if ( $h * 6 < 1 ) return $m1 + ( $m2 - $m1 ) * $h * 6; - if ( $h * 2 < 1 ) return $m2; - if ( $h * 3 < 2 ) return $m1 + ( $m2 - $m1 ) * ( 0.66666 - $h ) * 6; - return $m1; - } - - - private static function _RGBtoHSL( array $rgb ) - { - list( $clrR, $clrG, $clrB ) = $rgb; - - $clrMin = min( $clrR, $clrG, $clrB ); - $clrMax = max( $clrR, $clrG, $clrB ); - $deltaMax = $clrMax - $clrMin; - - $L = ( $clrMax + $clrMin ) / 510; - - if ( 0 == $deltaMax ) { - $H = 0; - $S = 0; - } else { - if ( 0.5 > $L ) { - $S = $deltaMax / ( $clrMax + $clrMin ); - } else { - $S = $deltaMax / ( 510 - $clrMax - $clrMin ); - } - - if ( $clrMax == $clrR ) { - $H = ( $clrG - $clrB ) / ( 6.0 * $deltaMax ); - } else if ( $clrMax == $clrG ) { - $H = 1 / 3 + ( $clrB - $clrR ) / ( 6.0 * $deltaMax ); - } else { - $H = 2 / 3 + ( $clrR - $clrG ) / ( 6.0 * $deltaMax ); - } - - if ( 0 > $H ) $H += 1; - if ( 1 < $H ) $H -= 1; - } - return array( - round( $H * 360 ), - round( $S * 100 ) . '%', - round( $L * 100 ) . '%' - ); - - } -} - -/* ************* - * TEST DATA - * -dd(array( -'hsl(0, 100%,50%)', -'hsl(30, 100%,50%)', -'hsl(60, 100%,50%)', -'hsl(90, 100%,50%)', -'hsl(120,100%,50%)', -'hsl(150,100%,50%)', -'hsl(180,100%,50%)', -'hsl(210,100%,50%)', -'hsl(240,100%,50%)', -'hsl(270,100%,50%)', -'hsl(300,100%,50%)', -'hsl(330,100%,50%)', -'hsl(360,100%,50%)', -'hsl(120,100%,25%)', -'hsl(120,100%,50%)', -'hsl(120,100%,75%)', -'hsl(120,100%,50%)', -'hsl(120, 67%,50%)', -'hsl(120, 33%,50%)', -'hsl(120, 0%,50%)', -'hsl(120, 60%,70%)', -'#f03', -'#F03', -'#ff0033', -'#FF0033', -'rgb(255,0,51)', -'rgb(255, 0, 51)', -'rgb(100%,0%,20%)', -'rgb(100%, 0%, 20%)', -'hsla(240,100%,50%,0.05)', -'hsla(240,100%,50%, 0.4)', -'hsla(240,100%,50%, 0.7)', -'hsla(240,100%,50%, 1)', -'rgba(255,0,0,0.1)', -'rgba(255,0,0,0.4)', -'rgba(255,0,0,0.7)', -'rgba(255,0,0, 1)', -'black', -'silver', -'gray', -'white', -'maroon', -'red', -'purple', -'fuchsia', -'green', -'lime', -'olive', -'yellow', -'navy', -'blue', -'teal', -'aqua', -'orange', -'aliceblue', -'antiquewhite', -'aquamarine', -'azure', -'beige', -'bisque', -'blanchedalmond', -'blueviolet', -'brown', -'burlywood', -'cadetblue', -'chartreuse', -'chocolate', -'coral', -'cornflowerblue', -'cornsilk', -'crimson', -'darkblue', -'darkcyan', -'darkgoldenrod', -'darkgray', -'darkgreen', -'darkgrey', -'darkkhaki', -'darkmagenta', -'darkolivegreen', -'darkorange', -'darkorchid', -'darkred', -'darksalmon', -'darkseagreen', -'darkslateblue', -'darkslategray', -'darkslategrey', -'darkturquoise', -'darkviolet', -'deeppink', -'deepskyblue', -'dimgray', -'dimgrey', -'dodgerblue', -'firebrick', -'floralwhite', -'forestgreen', -'gainsboro', -'ghostwhite', -'gold', -'goldenrod', -'greenyellow', -'grey', -'honeydew', -'hotpink', -'indianred', -'indigo', -'ivory', -'khaki', -'lavender', -'lavenderblush', -'lawngreen', -'lemonchiffon', -'lightblue', -'lightcoral', -'lightcyan', -'lightgoldenrodyellow', -'lightgray', -'lightgreen', -'lightgrey', -'lightpink', -'lightsalmon', -'lightseagreen', -'lightskyblue', -'lightslategray', -'lightslategrey', -'lightsteelblue', -'lightyellow', -'limegreen', -'linen', -'mediumaquamarine', -'mediumblue', -'mediumorchid', -'mediumpurple', -'mediumseagreen', -'mediumslateblue', -'mediumspringgreen', -'mediumturquoise', -'mediumvioletred', -'midnightblue', -'mintcream', -'mistyrose', -'moccasin', -'navajowhite', -'oldlace', -'olivedrab', -));*/ \ No newline at end of file diff --git a/kint/kint-0.9/parsers/custom/json.php b/kint/kint-0.9/parsers/custom/json.php deleted file mode 100644 index 0327468..0000000 --- a/kint/kint-0.9/parsers/custom/json.php +++ /dev/null @@ -1,17 +0,0 @@ -value = kintParser::factory( $val )->extendedValue; - $this->type = 'JSON'; - } -} \ No newline at end of file diff --git a/kint/kint-0.9/parsers/custom/microtime.php b/kint/kint-0.9/parsers/custom/microtime.php deleted file mode 100644 index a51a051..0000000 --- a/kint/kint-0.9/parsers/custom/microtime.php +++ /dev/null @@ -1,54 +0,0 @@ -value = @date( 'Y-m-d H:i:s', $sec ) . '.' . substr( $usec, 2, 4 ); - - $numberOfCalls = count( self::$_times ); - if ( $numberOfCalls > 0 ) { # meh, faster than count($times) > 1 - $lap = $time - end( self::$_times ); - self::$_laps[] = $lap; - - $this->value .= "\nSINCE LAST CALL: " . round( $lap, 4 ) . 's.'; - if ( $numberOfCalls > 1 ) { - $this->value .= "\nSINCE START: " . round( $time - self::$_times[0], 4 ) . 's.'; - $this->value .= "\nAVERAGE DURATION: " - . round( array_sum( self::$_laps ) / $numberOfCalls, 4 ) . 's.'; - } - } - - $unit = array( 'B', 'KB', 'MB', 'GB', 'TB' ); - $this->value .= "\nMEMORY USAGE: " . $size . " bytes (" - . round( $size / pow( 1024, ( $i = floor( log( $size, 1024 ) ) ) ), 3 ) . ' ' . $unit[$i] . ")"; - - self::$_times[] = $time; - $this->type = 'Stats'; - } - - /* - function test() { - $x = ''; - d( microtime() ); - for ( $i = 0; $i < 10; $i++ ) { - $x .= str_repeat( 'x', mt_rand( 128 * 1024, 5 * 1024 * 1024 ) ); - usleep( mt_rand( 0, 1000 * 1000 ) ); - d( microtime() ); - } - unset( $x ); - dd( microtime() ); - } - */ -} \ No newline at end of file diff --git a/kint/kint-0.9/parsers/custom/splfileinfo.php b/kint/kint-0.9/parsers/custom/splfileinfo.php deleted file mode 100644 index 6b14f67..0000000 --- a/kint/kint-0.9/parsers/custom/splfileinfo.php +++ /dev/null @@ -1,12 +0,0 @@ -type = 'object'; - $this->subtype = 'SplFileInfo'; - $this->value = Kint::shortenPath( $variable->getRealPath() ); - } -} \ No newline at end of file diff --git a/kint/kint-0.9/parsers/custom/splobjectstorage.php b/kint/kint-0.9/parsers/custom/splobjectstorage.php deleted file mode 100644 index c355771..0000000 --- a/kint/kint-0.9/parsers/custom/splobjectstorage.php +++ /dev/null @@ -1,20 +0,0 @@ -rewind(); - while ( $variable->valid() ) { - $current = $variable->current(); - $this->value[] = kintParser::factory( $current ); - $variable->next(); - } - - $this->type = 'Storage contents'; - $this->size = $variable->count(); - } -} \ No newline at end of file diff --git a/kint/kint-0.9/parsers/custom/timestamp.php b/kint/kint-0.9/parsers/custom/timestamp.php deleted file mode 100644 index 4c5f487..0000000 --- a/kint/kint-0.9/parsers/custom/timestamp.php +++ /dev/null @@ -1,22 +0,0 @@ -type = 'timestamp'; - # avoid dreaded "Timezone must be set" error - $this->value = @date( 'Y-m-d H:i:s', $variable ); - } -} \ No newline at end of file diff --git a/kint/kint-0.9/parsers/custom/xml.php b/kint/kint-0.9/parsers/custom/xml.php deleted file mode 100644 index 50d0def..0000000 --- a/kint/kint-0.9/parsers/custom/xml.php +++ /dev/null @@ -1,18 +0,0 @@ -value = kintParser::factory( $xml )->extendedValue; - $this->type = 'XML'; - } -} \ No newline at end of file diff --git a/kint/kint-0.9/parsers/parser.class.php b/kint/kint-0.9/parsers/parser.class.php deleted file mode 100644 index 6dd4ef6..0000000 --- a/kint/kint-0.9/parsers/parser.class.php +++ /dev/null @@ -1,571 +0,0 @@ - self::$_level, - 'objects' => self::$_objects, - ); - - self::$_level++; - - $name = self::_escape( $name ); - $varData = new kintVariableData; - $varData->name = $name; - - # first parse the variable based on its type - $varType = gettype( $variable ); - $varType === 'unknown type' and $varType = 'unknown'; # PHP 5.4 inconsistency - $methodName = '_parse_' . $varType; - - # base type parser returning false means "stop processing further": e.g. recursion - if ( self::$methodName( $variable, $varData ) === false ) { - self::$_level--; - return $varData; - } - - if ( !self::$_skipAlternatives) { - # if an alternative returns something that can be represented in an alternative way, don't :) - self::$_skipAlternatives = true; - - # now check whether the variable can be represented in a different way - foreach ( self::$_customDataTypes as $parserClass ) { - $className = 'Kint_Parsers_' . $parserClass; - - /** @var $object kintParser */ - $object = new $className; - $object->name = $name; # the parser may overwrite the name value, so set it first - - if ( $object->_parse( $variable ) !== false ) { - $varData->alternatives[] = $object; - } - } - - - # combine extended values with alternative representations if applicable - if ( !empty( $varData->alternatives ) && isset( $varData->extendedValue ) ) { - $a = new kintVariableData; - - $a->value = $varData->extendedValue; - $a->type = $varData->type; - $a->size = $varData->size; - - array_unshift( $varData->alternatives, $a ); - $varData->extendedValue = null; - } - - self::$_skipAlternatives = false; - } - - self::$_level = $revert['level']; - self::$_objects = $revert['objects']; - return $varData; - } - - private static function _checkDepth() - { - return Kint::$maxLevels != 0 && self::$_level > Kint::$maxLevels; - } - - private static function _isArrayTabular( $variable ) - { - foreach ( $variable as $row ) { - if ( is_array( $row ) && !empty( $row ) ) { - if ( isset( $keys ) ) { - if ( $keys === array_keys( $row ) ) { // two rows have same keys in a row? Close enough. - return true; - } - } else { - - foreach ( $row as $col ) { - if ( !is_scalar( $col ) && $col !== null ) { - break 2; - } - } - - $keys = array_keys( $row ); - } - } else { - break; - } - } - - return false; - } - - private static $_dealingWithGlobals = false; - - private static function _parse_array( &$variable, kintVariableData $variableData ) - { - isset( self::$_marker ) or self::$_marker = "\x00" . uniqid(); - - # naturally, $GLOBALS variable is an intertwined recursion nightmare, use black magic - $globalsDetector = false; - if ( array_key_exists( 'GLOBALS', $variable ) && is_array( $variable['GLOBALS'] ) ) { - $globalsDetector = "\x01" . uniqid(); - - $variable['GLOBALS'][$globalsDetector] = true; - if ( isset( $variable[$globalsDetector] ) ) { - unset( $variable[$globalsDetector] ); - self::$_dealingWithGlobals = true; - } else { - unset( $variable['GLOBALS'][$globalsDetector] ); - $globalsDetector = false; - } - } - - $variableData->type = 'array'; - $variableData->size = count( $variable ); - - if ( $variableData->size === 0 ) { - return; - } - if ( isset( $variable[self::$_marker] ) ) { # recursion; todo mayhaps show from where - if ( self::$_dealingWithGlobals ) { - $variableData->value = '*RECURSION*'; - } else { - unset( $variable[self::$_marker] ); - $variableData->value = self::$_marker; - } - return false; - } - if ( self::_checkDepth() ) { - $variableData->extendedValue = "*DEPTH TOO GREAT*"; - return false; - } - - $isSequential = self::_isSequential( $variable ); - - $tabular = self::_isArrayTabular( $variable ); - if ( $tabular ) { - - $firstRow = true; - $extendedValue = ''; - $arrayKeys = array(); - - - // assure no values are unreported if an extra key appears in one of the lines - foreach ( $variable as $row ) { - // todo process all keys in _isArrayTabular() - if ( !is_array( $row ) ) { - $tabular = false; - break; - } - $arrayKeys = array_unique( array_merge( $arrayKeys, array_keys( $row ) ) ); - - if ( Kint::$keyFilterCallback ) { - foreach ( $arrayKeys as $k => $key ) { - if ( call_user_func( Kint::$keyFilterCallback, $key ) === false ) { - unset( $arrayKeys[$k] ); - } - } - } - } - } - - - if ( $tabular ) { - $variable[self::$_marker] = true; - foreach ( $variable as $rowIndex => &$row ) { - if ( $rowIndex === self::$_marker ) continue; - - if ( isset( $row[self::$_marker] ) ) { - $variableData->value = "*RECURSION*"; - return false; - } - - - $extendedValue .= ''; - $output = ''; - if ( $firstRow ) { - $extendedValue .= ''; - } - - foreach ( $arrayKeys as $key ) { - if ( $firstRow ) { - $extendedValue .= ''; - } - - if ( !array_key_exists( $key, $row ) ) { - $output .= ''; - continue; - } - - # display strings in their full length so as not to trigger rich decoration - $maxStrLength = kint::$maxStrLength; - kint::$maxStrLength = false; - $var = kintParser::factory( $row[$key] ); - kint::$maxStrLength = $maxStrLength; - - if ( $var->value === self::$_marker ) { - $variableData->value = '*RECURSION*'; - return false; - } elseif ( $var->value === '*RECURSION*' ) { - $output .= ''; - } else { - $output .= ''; - } - unset( $var ); - } - - if ( $firstRow ) { - $extendedValue .= ''; - $firstRow = false; - } - - $extendedValue .= $output . ''; - } - - $variableData->extendedValue = $extendedValue . '
' . ( $isSequential ? '#' . ( $rowIndex + 1 ) : $rowIndex ) . '' . htmlspecialchars( $key ) . '' . Kint_Decorators_Concise::decorate( $var ) . '' . Kint_Decorators_Concise::decorate( $var ) . '
'; - - } else { - $variable[self::$_marker] = true; - $extendedValue = array(); - - foreach ( $variable as $key => & $val ) { - if ( $key === self::$_marker - || ( Kint::$keyFilterCallback && call_user_func( Kint::$keyFilterCallback, $key, $val ) === false ) - ) { - continue; - } - - - $output = kintParser::factory( $val, $isSequential ? null : "'{$key}'" ); - if ( $output->value === self::$_marker ) { - $variableData->value = "*RECURSION*"; // recursion occurred on a higher level, thus $this is recursion - return false; - } - if ( !$isSequential ) { - $output->operator = '=>'; - } - $extendedValue[] = $output; - } - $variableData->extendedValue = $extendedValue; - } - - if ( $globalsDetector ) { - self::$_dealingWithGlobals = false; - } - - unset( $variable[self::$_marker] ); - } - - - private static function _parse_object( &$variable, kintVariableData $variableData ) - { - - // copy the object as an array - $array = (array)$variable; - $hash = spl_object_hash( $variable ); - - - $variableData->type = 'object'; - $variableData->subtype = get_class( $variable ); - $variableData->size = count( $array ); - - if ( isset( self::$_objects[$hash] ) ) { - $variableData->value = '*RECURSION*'; - return false; - } - if ( self::_checkDepth() ) { - $variableData->extendedValue = "*DEPTH TOO GREAT*"; - return false; - } - - self::$_objects[$hash] = true; - - - if ( empty( $array ) ) return; - - - $extendedValue = array(); - foreach ( $array as $key => & $value ) { - if ( Kint::$keyFilterCallback - && call_user_func_array( Kint::$keyFilterCallback, array( $key, $value ) ) === false - ) { - continue; - } - - /* casting object to array: - * integer properties are inaccessible; - * private variables have the class name prepended to the variable name; - * protected variables have a '*' prepended to the variable name. - * These prepended values have null bytes on either side. - * http://www.php.net/manual/en/language.types.array.php#language.types.array.casting - */ - if ( $key[0] === "\x00" ) { - - $access = $key[1] === "*" ? "protected" : "private"; - - // Remove the access level from the variable name - $key = substr( $key, strrpos( $key, "\x00" ) + 1 ); - } else { - $access = "public"; - } - - $key = self::_escape( $key ); - $output = kintParser::factory( $value, $key ); - $output->access = $access; - $output->operator = '->'; - $extendedValue[] = $output; - } - - $variableData->extendedValue = $extendedValue; - } - - - private static function _parse_boolean( &$variable, kintVariableData $variableData ) - { - $variableData->type = 'bool'; - $variableData->value = $variable ? 'TRUE' : 'FALSE'; - } - - private static function _parse_double( &$variable, kintVariableData $variableData ) - { - $variableData->type = 'float'; - $variableData->value = $variable; - } - - private static function _parse_integer( &$variable, kintVariableData $variableData ) - { - $variableData->type = 'integer'; - $variableData->value = $variable; - } - - private static function _parse_null( &$variable, kintVariableData $variableData ) - { - $variableData->type = 'NULL'; - } - - private static function _parse_resource( &$variable, kintVariableData $variableData ) - { - $variableData->type = 'resource'; - $variableData->subtype = get_resource_type( $variable ); - - if ( $variableData->subtype === 'stream' && $meta = stream_get_meta_data( $variable ) ) { - - if ( isset( $meta['uri'] ) ) { - $file = $meta['uri']; - - if ( function_exists( 'stream_is_local' ) ) { - // Only exists on PHP >= 5.2.4 - if ( stream_is_local( $file ) ) { - $file = Kint::shortenPath( $file ); - } - } - - $variableData->value = $file; - } - } - } - - private static function _parse_string( &$variable, kintVariableData $variableData ) - { - $variableData->type = 'string'; - - $encoding = self::_detectEncoding( $variable ); - if ( $encoding !== 'ASCII' ) { - $variableData->subtype = $encoding; - } - - $variableData->size = self::_strlen( $variable, $encoding ); - $strippedString = self::_stripWhitespace( $variable ); - if ( Kint::$maxStrLength && $variableData->size > Kint::$maxStrLength ) { - - // encode and truncate - $variableData->value = '"' - . self::_escape( self::_substr( $strippedString, Kint::$maxStrLength, $encoding ), $encoding ) - . ' …"'; - $variableData->extendedValue = self::_escape( $variable, $encoding ); - - } elseif ( $variable !== $strippedString ) { // omit no data from display - - $variableData->value = '"' . self::_escape( $variable, $encoding ) . '"'; - $variableData->extendedValue = self::_escape( $variable, $encoding ); - } else { - $variableData->value = '"' . self::_escape( $variable, $encoding ) . '"'; - } - } - - private static function _parse_unknown( &$variable, kintVariableData $variableData ) - { - $variableData->type = "UNKNOWN"; - $variableData->subtype = gettype( $variable ); - $variableData->value = var_export( $variable, true ); - } - -} - - -class kintVariableData -{ - /** @var string */ - public $type; - /** @var string */ - public $access; - /** @var string */ - public $name; - /** @var string */ - public $operator; - /** @var string */ - public $subtype; - /** @var int */ - public $size; - /** - * @var kintVariableData[] array of kintVariableData objects or strings; displayed collapsed, each element from - * the array is a separate possible representation of the dumped var - */ - public $extendedValue; - /** @var kintVariableData[] array of alternative representations for same variable */ - public $alternatives; - /** @var string inline value */ - public $value; - - - /* ******************************************* - * HELPERS - */ - - protected static function _escape( $value, $encoding = null ) - { - $encoding or $encoding = self::_detectEncoding( $value ); - - if ( $encoding === 'UTF-8' ) { - # when possible force invisible characters to have some sort of display - $value = preg_replace( '/[\x00-\x08\x0B\x0C\x0E-\x1F\x80-\x9F]/u', '�', $value ); - } - - $value = htmlspecialchars( $value, ENT_QUOTES ); - if ( function_exists( 'mb_encode_numericentity' ) ) { - return mb_encode_numericentity( - $value, - array( 0x80, 0xffff, 0, 0xffff, ), - $encoding - ); - } else { - return $value; - } - } - - protected static function _detectEncoding( $value ) - { - if ( function_exists( 'mb_detect_encoding' ) ) { - $mbDetected = mb_detect_encoding( $value ); - if ( $mbDetected === 'ASCII' ) { - return 'ASCII'; - } - } - - if ( empty( Kint::$charEncodings ) || !function_exists( 'iconv' ) ) { - return !empty( $mbDetected ) ? $mbDetected : 'UTF-8'; - } - - $md5 = md5( $value ); - foreach ( array_merge( array( 'UTF-8' ), Kint::$charEncodings ) as $encoding ) { - # fuck knows why, //IGNORE and //TRANSLIT still throw notice - if ( md5( @iconv( $encoding, $encoding, $value ) ) === $md5 ) { - return $encoding; - } - } - - return 'ASCII'; - } - - /** - * zaps all excess whitespace from string, compacts it but hurts readability - * - * @param string $string - * - * @return string - */ - protected static function _stripWhitespace( $string ) - { - return preg_replace( '[\s+]', ' ', $string ); - } - - - /** - * returns whether the array: - * 1) is numeric and - * 2) in sequence starting from zero - * - * @param array $array - * - * @return bool - */ - protected static function _isSequential( array $array ) - { - return Kint::$hideSequentialKeys - ? array_keys( $array ) === range( 0, count( $array ) - 1 ) - : false; - } - - protected static function _strlen( $string, $encoding = null ) - { - $encoding or $encoding = self::_detectEncoding( $string ); - - return function_exists( 'mb_strlen' ) - ? mb_strlen( $string, $encoding ) - : strlen( $string ); - } - - protected static function _substr( $string, $end, $encoding = null ) - { - $encoding or $encoding = self::_detectEncoding( $string ); - - return function_exists( 'mb_substr' ) - ? mb_substr( $string, 0, $end, $encoding ) - : substr( $string, 0, $end ); - } -} diff --git a/kint/kint-0.9/scripts/source.reg b/kint/kint-0.9/scripts/source.reg deleted file mode 100644 index 6b32890..0000000 --- a/kint/kint-0.9/scripts/source.reg +++ /dev/null @@ -1,12 +0,0 @@ -REGEDIT4 - -[HKEY_CLASSES_ROOT\source] -@="URL:source Protocol" -"URL Protocol"="" - -[HKEY_CLASSES_ROOT\source\shell] - -[HKEY_CLASSES_ROOT\source\shell\open] - -[HKEY_CLASSES_ROOT\source\shell\open\command] -@="wscript.exe \"C:\\Program Files\\bin\\source.vbs\" \"%1\"" \ No newline at end of file diff --git a/kint/kint-0.9/scripts/source.vbs b/kint/kint-0.9/scripts/source.vbs deleted file mode 100644 index 56733b5..0000000 --- a/kint/kint-0.9/scripts/source.vbs +++ /dev/null @@ -1,80 +0,0 @@ -'INSTALLATION: -'set editor link format to 'source::' -'move this file to C:\Program Files\bin\source.vbs and run source.reg -'customize directory mappings and editor command below - -'***************** -'start of settings -'***************** -Dim command, protocol, change_slashes, debug -Set dirmap = CreateObject("Scripting.Dictionary") - -'list of server paths (as regular expressions) -'and matching local paths (as regexp replace strings) -'use this to replace the beginning of the path -'if none of the regular expressions match, the script will show an error - -'local setup, when PHP and editor runs from the same machine -dirmap.Add "^([C-Z]:\\)", "$1" - -'a typical remote Linux setup -'dirmap.Add "^/var/www/", "C:\Projects\" -'dirmap.Add "^/usr/share/php5/", "C:\Projects\debug-source" - -'command to execute; %f is the file name, %l is the line number -'dont forget to quote file names (quotes can be escaped by writing twice) -command = """C:\Program Files\Notepad++\notepad++.exe"" -n%l ""%f""" - -'if true, forward slashes will be changed to backslashes in the filename -'(after the regex replacements) -change_slashes = True - -'protocol name used in the source edit links -protocol = "source" - -'if true, alerts the command before executing it -debug = False - -'*************** -'end of settings -'*************** - -Select Case WScript.Arguments.Count - Case 0 - WScript.Echo "Wrong source link" - WScript.Quit -End Select - -Dim link, split, file, line, found, strArgs - -link = Mid(WScript.Arguments.Item(0), Len(protocol) + 2) -split = InStrRev(link, ":") -file = Left(link, split - 1) -line = Mid(link, split + 1) - -found = False -For Each serverPath In dirmap - Set regexp = New RegExp - regexp.Pattern = serverPath - If regexp.Test(file) Then - found = True - Exit For - End If -Next -If Not found Then - WScript.Echo "don't know where to find " & file & " locally" - WScript.Quit -End If -file = regexp.Replace(file, dirmap.Item(serverPath)) -if change_slashes Then - file = Replace(file, "/", "\") -End If - -strArgs = command -strArgs = Replace(strArgs, "%l", line) -strArgs = Replace(strArgs, "%f", file) -If debug Then - WScript.Echo strArgs -End If -Set oShell = CreateObject ("Wscript.Shell") -oShell.Run strArgs, 0, false \ No newline at end of file diff --git a/kint/kint-0.9/view/inc/kint.js b/kint/kint-0.9/view/inc/kint.js deleted file mode 100644 index 753740f..0000000 --- a/kint/kint-0.9/view/inc/kint.js +++ /dev/null @@ -1,8 +0,0 @@ -(function(){var e=!1; -if("undefined"===typeof kintInitialized){kintInitialized=1;var f=[],g=-1,h=function(b,a){"undefined"===typeof a&&(a="kint-show");return RegExp("(\\s|^)"+a+"(\\s|$)").test(b.className)},k=function(b,a){"undefined"===typeof a&&(a="kint-show");j(b,a).className+=" "+a},j=function(b,a){"undefined"===typeof a&&(a="kint-show");b.className=b.className.replace(RegExp("(\\s|^)"+a+"(\\s|$)")," ");return b},l=function(b){do b=b.nextElementSibling;while("dd"!==b.nodeName.toLowerCase());return b},m=function(b,a){var c= -l(b);"undefined"===typeof a&&(a=h(b));a?j(b):k(b);1===c.childNodes.length&&(c=c.childNodes[0].childNodes[0],h(c,"kint-parent")&&m(c,a))},n=function(b,a){var c=l(b).getElementsByClassName("kint-parent"),d=c.length;for("undefined"===typeof a&&(a=h(b));d--;)m(c[d],a);m(b,a)},p=function(b){var a=b,c=0;b.parentNode.getElementsByClassName("kint-active-tab")[0].className="";for(b.className="kint-active-tab";a=a.previousSibling;)1===a.nodeType&&c++;b=b.parentNode.nextSibling.childNodes;for(var d=0;dli:not(.kint-active-tab)"),0).forEach(function(b){(0!==b.offsetWidth||0!==b.offsetHeight)&&f.push(b)})},s=function(b){var a=document.querySelector(".kint-focused");a&&j(a,"kint-focused");if(-1!== -b){a=f[b];k(a,"kint-focused");var c=function(a){return a.offsetTop+(a.offsetParent?c(a.offsetParent):0)};window.scrollTo(0,c(a)-window.innerHeight/2)}g=b},t=function(b,a){b?0>--a&&(a=f.length-1):++a>=f.length&&(a=0);s(a);return e};window.addEventListener("click",function(b){var a=b.target,c=a.nodeName.toLowerCase();if(q(a)){if("dfn"===c){var d=a,u=window.getSelection(),v=document.createRange();v.selectNodeContents(d);u.removeAllRanges();u.addRange(v);a=a.parentNode}else"var"===c&&(a=a.parentNode, -c=a.nodeName.toLowerCase());if("li"===c&&"kint-tabs"===a.parentNode.className)return"kint-active-tab"!==a.className&&(p(a),-1!==g&&r()),e;if("nav"===c)return setTimeout(function(){0dl dl{padding:0 0 0 15px;border-left:1px dashed #b6cedb}.kint nav{display:inline-block;height:15px;width:15px;margin-right:3px;vertical-align:middle;content:' ';cursor:pointer;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAA8CAMAAACO5hB7AAAACVBMVEX///82b4tctzBls0NMAAAAQklEQVR42rWRIQ4AAAgCwf8/2qgER2BeuwJsgAqIzekMfMryPL9XQSkobE6vwKcsz/N7FfPvh09lnPf/b+7673+f0uHuAZ/EdkNQAAAAAElFTkSuQmCC") no-repeat scroll 0 0 transparent}.kint dt.kint-parent:hover nav{background-position:0 -15px}.kint dt.kint-parent.kint-show:hover>nav{background-position:0 -45px}.kint dt.kint-show>nav{background-position:0 -30px}.kint dt.kint-parent+dd{display:none}.kint dt.kint-parent.kint-show+dd{display:block}.kint var{color:#0092db;font-style:normal}.kint dt:hover var{color:#5cb730}.kint dfn{font-style:normal;font-family:monospace;color:#1d1e1e}.kint pre{color:#1d1e1e;margin:0 0 0 15px;padding:5px;overflow-y:hidden;border-top:0;border:1px solid #b6cedb;background:#e0eaef;display:block}.kint footer{padding:0 3px 3px;font-size:.7em}.kint a{color:#1d1e1e;text-shadow:none}.kint a:hover{color:#1d1e1e;border-bottom:1px dotted #1d1e1e}.kint ul{list-style:none;padding-left:12px}.kint ul.kint-tabs{margin:0 0 0 12px;padding-left:0;background:#e0eaef;border:1px solid #b6cedb;border-top:0}.kint ul.kint-tabs li{background:#c1d4df;cursor:pointer;display:inline-block;height:23px;line-height:23px;margin:0 4px 4px;padding:0 10px 2px;border:1px solid #b6cedb}.kint ul.kint-tabs li:hover{border:1px solid #0092db}.kint ul.kint-tabs li:hover var{color:#5cb730}.kint ul.kint-tabs li.kint-active-tab{background:#e0eaef;border:1px solid #b6cedb;border-top:0;font-weight:bold;margin-top:-1px;padding-bottom:2px;padding-top:4px;border-right:1px solid #b6cedb}.kint ul.kint-tabs li+li{margin-left:0}.kint dt:hover+dd>ul>li.kint-active-tab{border-color:#0092db}.kint dt:hover+dd>ul>li.kint-active-tab var{color:#5cb730}.kint ul:not(.kint-tabs)>li:not(:first-child){display:none}.kint-report{border-collapse:collapse;empty-cells:show;border-spacing:0}.kint-report *{text-align:left;padding:0;margin:0;font-size:9pt;overflow:hidden;font-family:Consolas,"Courier New",monospace;color:#1d1e1e}.kint-report dt{padding:0;border:0;background:0}.kint-report dt.kint-parent{max-width:180px;min-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kint-report dt.kint-parent.kint-show{border-bottom:1px solid #b6cedb}.kint-report td,.kint-report th{border:1px solid #b6cedb;vertical-align:top}.kint-report td{background:#e0eaef;white-space:pre}.kint-report td>dl{border:0;padding:0}.kint-report dl,.kint-report pre,.kint-report label{padding:0}.kint-report pre{border-top:0;border-bottom:0;border-right:0}.kint-report label[for]:before{display:none}.kint-report th:first-child{background:0;border:0}.kint-report td:first-child,.kint-report th{font-weight:bold;background:#c1d4df;color:#1d1e1e}.kint-report td.kint-empty{background:#d33682!important}.kint-report tr:hover>td{box-shadow:0 0 1px 0 #0092db inset}.kint-report tr:hover var{color:#5cb730}.kint-trace .kint-source{line-height:1.08em}.kint-trace .kint-source span{padding-right:1px;border-right:3px inset #0092db}.kint-trace .kint-source .kint-highlight{background:#c1d4df}.kint-trace .kint-parent>b{min-width:18px;display:inline-block;text-align:right;color:#1d1e1e}.kint-trace var{margin-right:5px}.kint-focused{box-shadow:0 0 3px 2px #5cb730}.kint-color-preview{box-shadow:0 0 2px 0 #b6cedb;height:16px;text-align:center;text-shadow:-1px 0 #839496,0 1px #839496,1px 0 #839496,0 -1px #839496;width:230px;color:#fdf6e3}.kint>dl>dt{background:-webkit-linear-gradient(top,#e3ecf0 0,#c0d4df 100%);background:linear-gradient(to bottom,#e3ecf0 0,#c0d4df 100%)}.kint ul.kint-tabs{background:-webkit-linear-gradient(top,#9dbed0 0,#b2ccda 100%);background:linear-gradient(to bottom,#9dbed0 0,#b2ccda 100%)}.kint:not(.kint-trace)>dl>dd>ul.kint-tabs li{background:#e0eaef}.kint:not(.kint-trace)>dl>dd>ul.kint-tabs li.kint-active-tab{background:#c1d4df}.kint.kint-trace>dl>dt{background:-webkit-linear-gradient(top,#c0d4df 0,#e3ecf0 100%);background:linear-gradient(to bottom,#c0d4df 0,#e3ecf0 100%)}.kint .kint-source .kint-highlight{background:#f0eb96} \ No newline at end of file diff --git a/kint/kint-0.9/view/inc/solarized-dark.css b/kint/kint-0.9/view/inc/solarized-dark.css deleted file mode 100644 index 58c2958..0000000 --- a/kint/kint-0.9/view/inc/solarized-dark.css +++ /dev/null @@ -1 +0,0 @@ -.kint::selection{background:#268bd2;color:#839496}.kint::-moz-selection{background:#268bd2;color:#839496}.kint::-webkit-selection{background:#268bd2;color:#839496}.kint{font-family:Consolas,"Courier New",monospace;color:#839496;padding:0;margin:10px 0;font-size:10pt;line-height:15px;white-space:nowrap;overflow-x:auto;text-align:left}.kint *{float:none!important;padding:0;margin:0}.kint dt{background:#002b36;border:1px solid #586e75;color:#839496;display:block;font-weight:bold;list-style:none outside none;padding:5px}.kint dt:hover{border-color:#268bd2}.kint>dl dl{padding:0 0 0 15px;border-left:1px dashed #586e75}.kint nav{display:inline-block;height:15px;width:15px;margin-right:3px;vertical-align:middle;content:' ';cursor:pointer;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAA8CAMAAACO5hB7AAAA7VBMVEVYbnWToaH///9YbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnWToaGToaGToaGToaGToaGToaGToaGToaGToaFYbnWToaFYbnVYbnWToaGToaFYbnWToaFYbnWToaFYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnWToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaFYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnWToaGToaGToaGToaGToaGToaGToaGToaGToaFYbnWToaEeRtj1AAAATXRSTlMAAACLab0B7iP2R7CL9iPuaUewAb36F0/QnPoX0JxPYQaurepi6QV8FhV7MzFhM6586RYFMa3qYnsVBpNQ+ZGOGJ3PkM9QkZAY+Y6TnV7gnYsAAAEcSURBVHhebdHVbgMxEEBRu8sUZmqapBBoSuGUmWb+/3NayxtrLOe+Hck745XZgd6/eb3CVcKt7HmR+gKxlCGOETG5vFbOoahR6NxI5zHt6nuq+2dqnqfzzH3mfcz70vb8H6MJt5u6a96hS30E4PjEFgAEp2fKNojKUfVEOoS044ex7u3YPE/nmfvM+5j3pe17T9oe/77O41w+n4vnrbrwZxbTshVhvtx5Kb8vliRLRWmeSQSTjJq/El5x5fUXYmNN9hcQC5y4g/hGvVksNtT8451rns2IScb7mn567ll2GNpWr9YWfvQgzWsKs8HOA/m960g6rjTzA8HAV/NHwiOmPLwDKA/J/gggYsRVgFvqbr/fpWYv90zzZKKs9Qfx00Jx65oxLAAAAABJRU5ErkJggg==") no-repeat scroll 0 0 transparent}.kint dt.kint-parent:hover nav{background-position:0 -15px}.kint dt.kint-parent.kint-show:hover>nav{background-position:0 -45px}.kint dt.kint-show>nav{background-position:0 -30px}.kint dt.kint-parent+dd{display:none}.kint dt.kint-parent.kint-show+dd{display:block}.kint var{color:#268bd2;font-style:normal}.kint dt:hover var{color:#2aa198}.kint dfn{font-style:normal;font-family:monospace;color:#93a1a1}.kint pre{color:#839496;margin:0 0 0 15px;padding:5px;overflow-y:hidden;border-top:0;border:1px solid #586e75;background:#002b36;display:block}.kint footer{padding:0 3px 3px;font-size:.7em}.kint a{color:#839496;text-shadow:none}.kint a:hover{color:#93a1a1;border-bottom:1px dotted #93a1a1}.kint ul{list-style:none;padding-left:15px}.kint ul.kint-tabs{margin:0 0 0 15px;padding-left:0;background:#002b36;border:1px solid #586e75;border-top:0}.kint ul.kint-tabs li{background:#073642;cursor:pointer;display:inline-block;height:24px;line-height:24px;margin:0 5px 5px;padding:0 12px 3px;border:1px solid #586e75}.kint ul.kint-tabs li:hover{border:1px solid #268bd2}.kint ul.kint-tabs li:hover var{color:#2aa198}.kint ul.kint-tabs li.kint-active-tab{background:#002b36;border:1px solid #586e75;border-top:0;font-weight:bold;margin-top:-1px;padding-bottom:3px;padding-top:4px;border-right:1px solid #586e75}.kint ul.kint-tabs li+li{margin-left:0}.kint dt:hover+dd>ul>li.kint-active-tab{border-color:#268bd2}.kint dt:hover+dd>ul>li.kint-active-tab var{color:#2aa198}.kint ul:not(.kint-tabs)>li:not(:first-child){display:none}.kint-report{border-collapse:collapse;empty-cells:show;border-spacing:0}.kint-report *{text-align:left;padding:0;margin:0;font-size:9pt;overflow:hidden;font-family:Consolas,"Courier New",monospace;color:#839496}.kint-report dt{padding:0;border:0;background:0}.kint-report dt.kint-parent{max-width:180px;min-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kint-report dt.kint-parent.kint-show{border-bottom:1px solid #586e75}.kint-report td,.kint-report th{border:1px solid #586e75;vertical-align:top}.kint-report td{background:#002b36;white-space:pre}.kint-report td>dl{border:0;padding:0}.kint-report dl,.kint-report pre,.kint-report label{padding:0}.kint-report pre{border-top:0;border-bottom:0;border-right:0}.kint-report label[for]:before{display:none}.kint-report th:first-child{background:0;border:0}.kint-report td:first-child,.kint-report th{font-weight:bold;background:#073642;color:#93a1a1}.kint-report td.kint-empty{background:#d33682!important}.kint-report tr:hover>td{box-shadow:0 0 1px 0 #268bd2 inset}.kint-report tr:hover var{color:#2aa198}.kint-trace .kint-source{line-height:1.1em}.kint-trace .kint-source span{padding-right:1px;border-right:3px inset #268bd2}.kint-trace .kint-source .kint-highlight{background:#073642}.kint-trace .kint-parent>b{min-width:18px;display:inline-block;text-align:right;color:#93a1a1}.kint-trace var{margin-right:5px}.kint-focused{box-shadow:0 0 3px 2px #859900 inset;border-radius:7px}.kint-color-preview{box-shadow:0 0 2px 0 #b6cedb;height:16px;text-align:center;text-shadow:-1px 0 #839496,0 1px #839496,1px 0 #839496,0 -1px #839496;width:230px;color:#fdf6e3}body{background:#073642;color:#fff}.kint{background:#073642;box-shadow:0 0 5px 3px #073642}.kint>dl>dt,.kint ul.kint-tabs{box-shadow:4px 0 2px -3px #268bd2 inset} \ No newline at end of file diff --git a/kint/kint-0.9/view/inc/solarized.css b/kint/kint-0.9/view/inc/solarized.css deleted file mode 100644 index 1519cba..0000000 --- a/kint/kint-0.9/view/inc/solarized.css +++ /dev/null @@ -1 +0,0 @@ -.kint::selection{background:#268bd2;color:#657b83}.kint::-moz-selection{background:#268bd2;color:#657b83}.kint::-webkit-selection{background:#268bd2;color:#657b83}.kint{font-family:Consolas,"Courier New",monospace;color:#657b83;padding:0;margin:10px 0;font-size:10pt;line-height:15px;white-space:nowrap;overflow-x:auto;text-align:left}.kint *{float:none!important;padding:0;margin:0}.kint dt{background:#fdf6e3;border:1px solid #93a1a1;color:#657b83;display:block;font-weight:bold;list-style:none outside none;padding:5px}.kint dt:hover{border-color:#268bd2}.kint>dl dl{padding:0 0 0 15px;border-left:1px dashed #93a1a1}.kint nav{display:inline-block;height:15px;width:15px;margin-right:3px;vertical-align:middle;content:' ';cursor:pointer;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAA8CAMAAACO5hB7AAAA7VBMVEVYbnWToaH///9YbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnWToaGToaGToaGToaGToaGToaGToaGToaGToaFYbnWToaFYbnVYbnWToaGToaFYbnWToaFYbnWToaFYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnWToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaFYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnWToaGToaGToaGToaGToaGToaGToaGToaGToaFYbnWToaEeRtj1AAAATXRSTlMAAACLab0B7iP2R7CL9iPuaUewAb36F0/QnPoX0JxPYQaurepi6QV8FhV7MzFhM6586RYFMa3qYnsVBpNQ+ZGOGJ3PkM9QkZAY+Y6TnV7gnYsAAAEcSURBVHhebdHVbgMxEEBRu8sUZmqapBBoSuGUmWb+/3NayxtrLOe+Hck745XZgd6/eb3CVcKt7HmR+gKxlCGOETG5vFbOoahR6NxI5zHt6nuq+2dqnqfzzH3mfcz70vb8H6MJt5u6a96hS30E4PjEFgAEp2fKNojKUfVEOoS044ex7u3YPE/nmfvM+5j3pe17T9oe/77O41w+n4vnrbrwZxbTshVhvtx5Kb8vliRLRWmeSQSTjJq/El5x5fUXYmNN9hcQC5y4g/hGvVksNtT8451rns2IScb7mn567ll2GNpWr9YWfvQgzWsKs8HOA/m960g6rjTzA8HAV/NHwiOmPLwDKA/J/gggYsRVgFvqbr/fpWYv90zzZKKs9Qfx00Jx65oxLAAAAABJRU5ErkJggg==") no-repeat scroll 0 0 transparent}.kint dt.kint-parent:hover nav{background-position:0 -15px}.kint dt.kint-parent.kint-show:hover>nav{background-position:0 -45px}.kint dt.kint-show>nav{background-position:0 -30px}.kint dt.kint-parent+dd{display:none}.kint dt.kint-parent.kint-show+dd{display:block}.kint var{color:#268bd2;font-style:normal}.kint dt:hover var{color:#2aa198}.kint dfn{font-style:normal;font-family:monospace;color:#586e75}.kint pre{color:#657b83;margin:0 0 0 15px;padding:5px;overflow-y:hidden;border-top:0;border:1px solid #93a1a1;background:#fdf6e3;display:block}.kint footer{padding:0 3px 3px;font-size:.7em}.kint a{color:#657b83;text-shadow:none}.kint a:hover{color:#586e75;border-bottom:1px dotted #586e75}.kint ul{list-style:none;padding-left:15px}.kint ul.kint-tabs{margin:0 0 0 15px;padding-left:0;background:#fdf6e3;border:1px solid #93a1a1;border-top:0}.kint ul.kint-tabs li{background:#eee8d5;cursor:pointer;display:inline-block;height:24px;line-height:24px;margin:0 5px 5px;padding:0 12px 3px;border:1px solid #93a1a1}.kint ul.kint-tabs li:hover{border:1px solid #268bd2}.kint ul.kint-tabs li:hover var{color:#2aa198}.kint ul.kint-tabs li.kint-active-tab{background:#fdf6e3;border:1px solid #93a1a1;border-top:0;font-weight:bold;margin-top:-1px;padding-bottom:3px;padding-top:4px;border-right:1px solid #93a1a1}.kint ul.kint-tabs li+li{margin-left:0}.kint dt:hover+dd>ul>li.kint-active-tab{border-color:#268bd2}.kint dt:hover+dd>ul>li.kint-active-tab var{color:#2aa198}.kint ul:not(.kint-tabs)>li:not(:first-child){display:none}.kint-report{border-collapse:collapse;empty-cells:show;border-spacing:0}.kint-report *{text-align:left;padding:0;margin:0;font-size:9pt;overflow:hidden;font-family:Consolas,"Courier New",monospace;color:#657b83}.kint-report dt{padding:0;border:0;background:0}.kint-report dt.kint-parent{max-width:180px;min-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kint-report dt.kint-parent.kint-show{border-bottom:1px solid #93a1a1}.kint-report td,.kint-report th{border:1px solid #93a1a1;vertical-align:top}.kint-report td{background:#fdf6e3;white-space:pre}.kint-report td>dl{border:0;padding:0}.kint-report dl,.kint-report pre,.kint-report label{padding:0}.kint-report pre{border-top:0;border-bottom:0;border-right:0}.kint-report label[for]:before{display:none}.kint-report th:first-child{background:0;border:0}.kint-report td:first-child,.kint-report th{font-weight:bold;background:#eee8d5;color:#586e75}.kint-report td.kint-empty{background:#d33682!important}.kint-report tr:hover>td{box-shadow:0 0 1px 0 #268bd2 inset}.kint-report tr:hover var{color:#2aa198}.kint-trace .kint-source{line-height:1.1em}.kint-trace .kint-source span{padding-right:1px;border-right:3px inset #268bd2}.kint-trace .kint-source .kint-highlight{background:#eee8d5}.kint-trace .kint-parent>b{min-width:18px;display:inline-block;text-align:right;color:#586e75}.kint-trace var{margin-right:5px}.kint-focused{box-shadow:0 0 3px 2px #859900 inset;border-radius:7px}.kint-color-preview{box-shadow:0 0 2px 0 #b6cedb;height:16px;text-align:center;text-shadow:-1px 0 #839496,0 1px #839496,1px 0 #839496,0 -1px #839496;width:230px;color:#fdf6e3}.kint>dl>dt,.kint ul.kint-tabs{box-shadow:4px 0 2px -3px #268bd2 inset} \ No newline at end of file diff --git a/kint/kint-0.9/view/js/_kint.js b/kint/kint-0.9/view/js/_kint.js deleted file mode 100644 index b272062..0000000 --- a/kint/kint-0.9/view/js/_kint.js +++ /dev/null @@ -1,344 +0,0 @@ -/** -java -jar compiler.jar --js $FileName$ --js_output_file ../inc/kint.js --compilation_level ADVANCED_OPTIMIZATIONS --output_wrapper "(function(){%output%})()" -*/ - -if ( typeof kintInitialized === 'undefined' ) { - kintInitialized = 1; - var kint = { - visiblePluses : [], // all visible toggle carets - currentPlus : -1, // currently selected caret - - selectText : function( element ) { - var selection = window.getSelection(), - range = document.createRange(); - - range.selectNodeContents(element); - selection.removeAllRanges(); - selection.addRange(range); - }, - - hasClass : function( target, className ) { - if ( typeof className === 'undefined' ) { - className = 'kint-show'; - } - - return new RegExp('(\\s|^)' + className + '(\\s|$)').test(target.className); - }, - - addClass : function( ele, className ) { - if ( typeof className === 'undefined' ) { - className = 'kint-show'; - } - - kint.removeClass(ele, className).className += (" " + className); - }, - - removeClass : function( ele, className ) { - if ( typeof className === 'undefined' ) { - className = 'kint-show'; - } - - ele.className = ele.className.replace( - new RegExp('(\\s|^)' + className + '(\\s|$)'), ' ' - ); - return ele; - }, - - next : function( element ) { - do { - element = element.nextElementSibling; - } while ( element.nodeName.toLowerCase() !== 'dd' ); - - return element; - }, - - toggle : function( element, hide ) { - var parent = kint.next(element); - - if ( typeof hide === 'undefined' ) { - hide = kint.hasClass(element); - } - - if ( hide ) { - kint.removeClass(element); - } else { - kint.addClass(element); - } - - if ( parent.childNodes.length === 1 ) { - parent = parent.childNodes[0].childNodes[0]; // reuse variable cause I can - - if ( kint.hasClass(parent, 'kint-parent') ) { - kint.toggle(parent, hide) - } - } - }, - - toggleChildren : function( element, hide ) { - var parent = kint.next(element) - , nodes = parent.getElementsByClassName('kint-parent') - , i = nodes.length; - - if ( typeof hide === 'undefined' ) { - hide = kint.hasClass(element); - } - - while ( i-- ) { - kint.toggle(nodes[i], hide); - } - kint.toggle(element, hide); - }, - - toggleAll : function( caret ) { - var elements = document.getElementsByClassName('kint-parent'), - i = elements.length, - visible = kint.hasClass(caret.parentNode); - - while ( i-- ) { - kint.toggle(elements[i], visible); - } - }, - - switchTab : function( target ) { - var lis, el = target, index = 0; - - target.parentNode.getElementsByClassName('kint-active-tab')[0].className = ''; - target.className = 'kint-active-tab'; - - // take the index of clicked title tab and make the same n-th content tab visible - while ( el = el.previousSibling ) el.nodeType === 1 && index++; - lis = target.parentNode.nextSibling.childNodes; - for ( var i = 0; i < lis.length; i++ ) { - if ( i === index ) { - lis[i].style.display = 'block'; - - if ( lis[i].childNodes.length === 1 ) { - el = lis[i].childNodes[0].childNodes[0]; - - if ( kint.hasClass(el, 'kint-parent') ) { - kint.toggle(el, false) - } - } - } else { - lis[i].style.display = 'none'; - } - } - }, - - isSibling : function( el ) { - for ( ; ; ) { - el = el.parentNode; - if ( !el || kint.hasClass(el, 'kint') ) { - break; - } - } - - return !!el; - }, - - fetchVisiblePluses : function() { - kint.visiblePluses = []; - Array.prototype.slice.call(document.querySelectorAll('.kint nav, .kint-tabs>li:not(.kint-active-tab)'), 0) - .forEach( - function( el ) { - if ( el.offsetWidth !== 0 || el.offsetHeight !== 0 ) { - kint.visiblePluses.push(el) - } - } - ); - }, - - keyCallBacks : { - cleanup : function( i ) { - var focusedClass = 'kint-focused'; - var prevElement = document.querySelector('.' + focusedClass); - prevElement && kint.removeClass(prevElement, focusedClass); - - if ( i !== -1 ) { - var el = kint.visiblePluses[i]; - kint.addClass(el, focusedClass); - - - var offsetTop = function( el ) { - return el.offsetTop + ( el.offsetParent ? offsetTop(el.offsetParent) : 0 ); - }; - - var top = offsetTop(el) - (window.innerHeight / 2 ); - window.scrollTo(0, top); - } - - kint.currentPlus = i; - }, - - moveCursor : function( up, i ) { - // todo make the first VISIBLE plus active - if ( up ) { - if ( --i < 0 ) { - i = kint.visiblePluses.length - 1; - } - } else { - if ( ++i >= kint.visiblePluses.length ) { - i = 0; - } - } - - kint.keyCallBacks.cleanup(i); - return false; - } - } - }; - - window.addEventListener("click", function( e ) { - var target = e.target - , nodeName = target.nodeName.toLowerCase(); - - if ( !kint.isSibling(target) ) return; - - // auto-select name of variable - if ( nodeName === 'dfn' ) { - kint.selectText(target); - target = target.parentNode; - } else if ( nodeName === 'var' ) { // stupid workaround for misc elements - target = target.parentNode; // to not stop event from further propagating - nodeName = target.nodeName.toLowerCase() - } - - // switch tabs - if ( nodeName === 'li' && target.parentNode.className === 'kint-tabs' ) { - if ( target.className !== 'kint-active-tab' ) { - kint.switchTab(target); - if ( kint.currentPlus !== -1 ) kint.fetchVisiblePluses(); - } - return false; - } - - // handle clicks on the navigation caret - if ( nodeName === 'nav' ) { - // ensure doubleclick has different behaviour, see below - setTimeout(function() { - var timer = parseInt(target.kintTimer, 10); - if ( timer > 0 ) { - target.kintTimer--; - } else { - kint.toggleChildren(target.parentNode); //
- if ( kint.currentPlus !== -1 ) kint.fetchVisiblePluses(); - } - }, 300); - e.stopPropagation(); - return false; - } else if ( kint.hasClass(target, 'kint-parent') ) { - kint.toggle(target); - if ( kint.currentPlus !== -1 ) kint.fetchVisiblePluses(); - return false; - } else if ( kint.hasClass(target, 'kint-ide-link') ) { - e.preventDefault(); - var ajax = new XMLHttpRequest(); // add ajax call to contact editor but prevent link default action - ajax.open('GET', target.href); - ajax.send(null); - return false; - } - }, false); - - window.addEventListener("dblclick", function( e ) { - var target = e.target; - if ( !kint.isSibling(target) ) return; - - - if ( target.nodeName.toLowerCase() === 'nav' ) { - target.kintTimer = 2; - kint.toggleAll(target); - if ( kint.currentPlus !== -1 ) kint.fetchVisiblePluses(); - e.stopPropagation(); - } - }, false); - - // keyboard navigation - window.onkeydown = function( e ) { - - // do nothing if alt key is pressed or if we're actually typing somewhere - if ( e.target !== document.body || e.altKey ) return; - - var keyCode = e.keyCode - , shiftKey = e.shiftKey - , i = kint.currentPlus; - - - if ( keyCode === 68 ) { // 'd' : toggles navigation on/off - if ( i === -1 ) { - kint.fetchVisiblePluses(); - return kint.keyCallBacks.moveCursor(false, i); - } else { - kint.keyCallBacks.cleanup(-1); - return false; - } - } else { - if ( i === -1 ) return; - - if ( keyCode === 9 ) { // TAB : moves up/down depending on shift key - return kint.keyCallBacks.moveCursor(shiftKey, i); - } else if ( keyCode === 38 ) { // ARROW UP : moves up - return kint.keyCallBacks.moveCursor(true, i); - } else if ( keyCode === 40 ) { // ARROW DOWN : down - return kint.keyCallBacks.moveCursor(false, i); - } else { - if ( i === -1 ) { - return; - } - } - } - - - var kintNode = kint.visiblePluses[i]; - if ( kintNode.nodeName.toLowerCase() === 'li' ) { // we're on a trace tab - if ( keyCode === 32 || keyCode === 13 ) { // SPACE/ENTER - kint.switchTab(kintNode); - kint.fetchVisiblePluses(); - return kint.keyCallBacks.moveCursor(true, i); - } else if ( keyCode === 39 ) { // arrows - return kint.keyCallBacks.moveCursor(false, i); - } else if ( keyCode === 37 ) { - return kint.keyCallBacks.moveCursor(true, i); - } - } - - kintNode = kintNode.parentNode; // simple dump - if ( keyCode === 32 || keyCode === 13 ) { // SPACE/ENTER : toggles - kint.toggle(kintNode); - kint.fetchVisiblePluses(); - return false; - } else if ( keyCode === 39 || keyCode === 37 ) { // ARROW LEFT/RIGHT : respectively hides/shows and traverses - var visible = kint.hasClass(kintNode); - var hide = keyCode === 37; - - if ( visible ) { - kint.toggleChildren(kintNode, hide); // expand/collapse all children if immediate ones are showing - } else { - if ( hide ) { // LEFT - // traverse to parent and THEN hide - do {kintNode = kintNode.parentNode} while ( kintNode && kintNode.nodeName.toLowerCase() !== 'dd' ); - - if ( kintNode ) { - kintNode = kintNode.previousElementSibling; - - i = -1; - var parentPlus = kintNode.querySelector('nav'); - while ( parentPlus !== kint.visiblePluses[++i] ) {} - kint.keyCallBacks.cleanup(i) - } else { // we are at root - kintNode = kint.visiblePluses[i].parentNode; - } - } - kint.toggle(kintNode, hide); - } - kint.fetchVisiblePluses(); - return false; - } - }; -} - -// debug purposes only, removed in minified source -function clg( i ) { - if ( !window.console )return; - var l = arguments.length, o = 0; - while ( o < l )console.log(arguments[o++]) -} diff --git a/kint/kint-0.9/view/less/_kint.less b/kint/kint-0.9/view/less/_kint.less deleted file mode 100644 index 7fed5d0..0000000 --- a/kint/kint-0.9/view/less/_kint.less +++ /dev/null @@ -1,340 +0,0 @@ -@border: 1px solid @border-color; - -.selection() { - background : @border-color-hover; - color : @text-color; -} - -// -// BASE STYLES -// -------------------------------------------------- - -.kint::selection { .selection() } - -.kint::-moz-selection { .selection() } - -.kint::-webkit-selection { .selection() } - -.kint { - font-family : @default-font; - color : @text-color; - padding : 0; - margin : 10px 0; - font-size : 10pt; - line-height : 15px; - white-space : nowrap; - overflow-x : auto; - text-align : left; - - * { - float : none !important; - padding : 0; - margin : 0; - } - - dt { - background : @main-background; - border : @border; - color : @text-color; - display : block; - font-weight : bold; - list-style : none outside none; - padding : @spacing * 1px; - - &:hover { - border-color : @border-color-hover; - } - } - - > dl dl { - padding : 0 0 0 15px; - border-left : 1px dashed @border-color; - } - -// -// DROPDOWN CARET -// -------------------------------------------------- - - nav { - display : inline-block; - height : 15px; - width : 15px; - margin-right : 3px; - vertical-align : middle; - content : ' '; - cursor : pointer; - background : @caret-image no-repeat scroll 0 0 transparent; - } - - dt.kint-parent:hover nav { - background-position : 0 -15px; - } - - dt.kint-parent.kint-show:hover > nav { - background-position : 0 -45px; - } - - dt.kint-show > nav { - background-position : 0 -30px; - } - - dt.kint-parent + dd { - display : none; - } - - dt.kint-parent.kint-show + dd { - display : block; - } - -// -// INDIVIDUAL ITEMS -// -------------------------------------------------- - - var { - color : @variable-type-color; - font-style : normal; - } - - dt:hover var { - color : @variable-type-color-hover; - } - - dfn { - font-style : normal; - font-family : monospace; - color : @variable-name-color; - } - - pre { - color : @text-color; - margin : 0 0 0 15px; - padding : 5px; - overflow-y : hidden; - border-top : 0; - border : @border; - background : @main-background; - display : block; - } - - footer { - padding : 0 3px 3px; - font-size : .7em - } - - a { - color : @text-color; - text-shadow : none; - - &:hover { - color : @variable-name-color; - border-bottom : 1px dotted @variable-name-color; - } - } - -// -// TABS -// -------------------------------------------------- - - ul { - list-style : none; - padding-left : @spacing * 3px; - } - - ul.kint-tabs { - margin : 0 0 0 @spacing * 3px; - padding-left : 0; - background : @main-background; - border : @border; - border-top : 0; - - li { - background : @secondary-background; - cursor : pointer; - display : inline-block; - height : 16px + ceil(8px * (@spacing / 5)); - line-height : 16px + ceil(8px * (@spacing / 5)); - margin : 0 @spacing * 1px @spacing * 1px; - padding : 0 2px + @spacing * 2px floor(3px * (@spacing / 5)); - border : @border; - - &:hover { - border : 1px solid @border-color-hover; - } - - &:hover var { - color : @variable-type-color-hover; - } - - &.kint-active-tab { - background : @main-background; - border : @border; - border-top : 0; - font-weight : bold; - margin-top : -1px; - padding-bottom : floor(3px * (@spacing / 5)); - padding-top : 1px + ceil(3px * (@spacing / 5)); - border-right : @border; - } - } - - li+li { - margin-left : 0 - } - } - - dt:hover + dd > ul > li.kint-active-tab { - border-color : @border-color-hover; - } - - dt:hover + dd > ul > li.kint-active-tab var { - color : @variable-type-color-hover; - } - - ul:not(.kint-tabs)>li:not(:first-child) { - display : none; - } -} - -// -// REPORT -// -------------------------------------------------- - -.kint-report { - border-collapse : collapse; - empty-cells : show; - border-spacing : 0; - - * { - text-align : left; - padding : 0; - margin : 0; - font-size : 9pt; - overflow : hidden; - font-family : @default-font; - color : @text-color; - } - - dt { - padding : 0; - border : 0; - background: none; - } - - dt.kint-parent { - max-width : 180px; - min-width : 100%; - overflow : hidden; - text-overflow : ellipsis; - white-space : nowrap; - } - - dt.kint-parent.kint-show { - border-bottom: @border; - } - - td, - th { - border : @border; - vertical-align : top; - } - - td { - background : @main-background; - white-space : pre; - } - - td > dl { - border : 0; - padding : 0; - } - - dl, - pre, - label { - padding : 0; - } - - pre { - border-top : 0; - border-bottom : 0; - border-right : 0; - } - - label[for]:before { - display : none; - } - - th:first-child { - background : 0; - border : 0; - } - - td:first-child, - th { - font-weight : bold; - background : @secondary-background; - color : @variable-name-color; - } - - td.kint-empty { - background : #d33682 !important; - } - - tr:hover { - > td { - box-shadow : 0px 0px 1px 0px @border-color-hover inset; - } - - var { - color: @variable-type-color-hover; - } - - } -} - -// -// TRACE -// -------------------------------------------------- -.kint-trace { - .kint-source { - line-height : 1em + 0.02 * @spacing - } - - .kint-source span { - padding-right : 1px; - border-right : 3px inset @variable-type-color; - } - - .kint-source .kint-highlight { - background : @secondary-background; - } - - .kint-parent > b { - min-width : 18px; - display : inline-block; - text-align : right; - color : @variable-name-color; - } - - var { - margin-right : 5px; - } -} - -// -// MISC -// -------------------------------------------------- - -// keyboard navigation caret -.kint-focused { - .keyboard-caret -} - -.kint-color-preview { - box-shadow : 0 0 2px 0 #b6cedb; - height : 16px; - text-align : center; - text-shadow : -1px 0 #839496, 0 1px #839496, 1px 0 #839496, 0 -1px #839496; - width : 230px; - color : #fdf6e3; -} \ No newline at end of file diff --git a/kint/kint-0.9/view/less/original.less b/kint/kint-0.9/view/less/original.less deleted file mode 100644 index 9da7ba9..0000000 --- a/kint/kint-0.9/view/less/original.less +++ /dev/null @@ -1,49 +0,0 @@ -@import "_kint.less"; - -@default-font: Consolas, "Courier New", monospace; -@spacing : 4; - -@main-background: #e0eaef; -@secondary-background : #c1d4df; - -@text-color: #1d1e1e; -@variable-name-color: #1d1e1e; -@variable-type-color: #0092db; -@variable-type-color-hover: #5cb730; - -@border-color: #b6cedb; -@border-color-hover: #0092db; - -@caret-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAA8CAMAAACO5hB7AAAACVBMVEX///82b4tctzBls0NMAAAAQklEQVR42rWRIQ4AAAgCwf8/2qgER2BeuwJsgAqIzekMfMryPL9XQSkobE6vwKcsz/N7FfPvh09lnPf/b+7673+f0uHuAZ/EdkNQAAAAAElFTkSuQmCC"); - -.keyboard-caret() { - box-shadow : 0 0 3px 2px #5cb730; -} - -.kint { - > dl > dt { - background : -webkit-linear-gradient(top, #e3ecf0 0, #c0d4df 100%); - background : linear-gradient(to bottom, #e3ecf0 0, #c0d4df 100%); - } - - ul.kint-tabs { - background : -webkit-linear-gradient(top, #9dbed0 0px, #b2ccda 100%); - background : linear-gradient(to bottom, #9dbed0 0px, #b2ccda 100%); - } - - &:not(.kint-trace) > dl > dd > ul.kint-tabs li { - background : @main-background; - &.kint-active-tab { - background : @secondary-background; - } - } - - &.kint-trace > dl > dt { - background : -webkit-linear-gradient(top, #c0d4df 0px, #e3ecf0 100%); - background : linear-gradient(to bottom, #c0d4df 0px, #e3ecf0 100%); - } - - .kint-source .kint-highlight { - background : #f0eb96; - } -} \ No newline at end of file diff --git a/kint/kint-0.9/view/less/solarized-dark.less b/kint/kint-0.9/view/less/solarized-dark.less deleted file mode 100644 index 0d1dc23..0000000 --- a/kint/kint-0.9/view/less/solarized-dark.less +++ /dev/null @@ -1,37 +0,0 @@ -@import "_kint.less"; - -@default-font: Consolas, "Courier New", monospace; -@spacing : 5; - -@main-background: #002b36; // base 03 -@secondary-background : #073642; // base 02 - -@text-color: #839496; // base 0 -@variable-name-color: #93a1a1; // base 1 -@variable-type-color: #268bd2; // blue -@variable-type-color-hover: #2aa198; // cyan - -@border-color: #586e75; // base 01 -@border-color-hover: #268bd2; // blue - -@caret-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAA8CAMAAACO5hB7AAAA7VBMVEVYbnWToaH///9YbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnWToaGToaGToaGToaGToaGToaGToaGToaGToaFYbnWToaFYbnVYbnWToaGToaFYbnWToaFYbnWToaFYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnWToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaFYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnWToaGToaGToaGToaGToaGToaGToaGToaGToaFYbnWToaEeRtj1AAAATXRSTlMAAACLab0B7iP2R7CL9iPuaUewAb36F0/QnPoX0JxPYQaurepi6QV8FhV7MzFhM6586RYFMa3qYnsVBpNQ+ZGOGJ3PkM9QkZAY+Y6TnV7gnYsAAAEcSURBVHhebdHVbgMxEEBRu8sUZmqapBBoSuGUmWb+/3NayxtrLOe+Hck745XZgd6/eb3CVcKt7HmR+gKxlCGOETG5vFbOoahR6NxI5zHt6nuq+2dqnqfzzH3mfcz70vb8H6MJt5u6a96hS30E4PjEFgAEp2fKNojKUfVEOoS044ex7u3YPE/nmfvM+5j3pe17T9oe/77O41w+n4vnrbrwZxbTshVhvtx5Kb8vliRLRWmeSQSTjJq/El5x5fUXYmNN9hcQC5y4g/hGvVksNtT8451rns2IScb7mn567ll2GNpWr9YWfvQgzWsKs8HOA/m960g6rjTzA8HAV/NHwiOmPLwDKA/J/gggYsRVgFvqbr/fpWYv90zzZKKs9Qfx00Jx65oxLAAAAABJRU5ErkJggg=="); - -.keyboard-caret() { - box-shadow : 0 0 3px 2px #859900 inset; // green - border-radius : 7px; -} - -body { - background : @secondary-background; - color : #fff; // for non-kint elements to remain at least semi-readable -} - -.kint { - background : @secondary-background; - box-shadow : 0 0 5px 3px @secondary-background; - - > dl > dt, - ul.kint-tabs { - box-shadow : 4px 0 2px -3px @variable-type-color inset; - } -} \ No newline at end of file diff --git a/kint/kint-0.9/view/less/solarized.less b/kint/kint-0.9/view/less/solarized.less deleted file mode 100644 index 9a76181..0000000 --- a/kint/kint-0.9/view/less/solarized.less +++ /dev/null @@ -1,27 +0,0 @@ -@import "_kint.less"; - -@default-font: Consolas, "Courier New", monospace; -@spacing : 5; - -@main-background: #fdf6e3; // base 3 -@secondary-background : #eee8d5; // base 2 - -@text-color: #657b83; // base 00 -@variable-name-color: #586e75; // base 01 -@variable-type-color: #268bd2; // blue -@variable-type-color-hover: #2aa198; // cyan - -@border-color: #93a1a1; // base 1 -@border-color-hover: #268bd2; // blue - -@caret-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAA8CAMAAACO5hB7AAAA7VBMVEVYbnWToaH///9YbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnWToaGToaGToaGToaGToaGToaGToaGToaGToaFYbnWToaFYbnVYbnWToaGToaFYbnWToaFYbnWToaFYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnWToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaGToaFYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnVYbnWToaGToaGToaGToaGToaGToaGToaGToaGToaFYbnWToaEeRtj1AAAATXRSTlMAAACLab0B7iP2R7CL9iPuaUewAb36F0/QnPoX0JxPYQaurepi6QV8FhV7MzFhM6586RYFMa3qYnsVBpNQ+ZGOGJ3PkM9QkZAY+Y6TnV7gnYsAAAEcSURBVHhebdHVbgMxEEBRu8sUZmqapBBoSuGUmWb+/3NayxtrLOe+Hck745XZgd6/eb3CVcKt7HmR+gKxlCGOETG5vFbOoahR6NxI5zHt6nuq+2dqnqfzzH3mfcz70vb8H6MJt5u6a96hS30E4PjEFgAEp2fKNojKUfVEOoS044ex7u3YPE/nmfvM+5j3pe17T9oe/77O41w+n4vnrbrwZxbTshVhvtx5Kb8vliRLRWmeSQSTjJq/El5x5fUXYmNN9hcQC5y4g/hGvVksNtT8451rns2IScb7mn567ll2GNpWr9YWfvQgzWsKs8HOA/m960g6rjTzA8HAV/NHwiOmPLwDKA/J/gggYsRVgFvqbr/fpWYv90zzZKKs9Qfx00Jx65oxLAAAAABJRU5ErkJggg=="); - -.keyboard-caret() { - box-shadow : 0 0 3px 2px #859900 inset; // green - border-radius : 7px; -} - -.kint > dl > dt, -.kint ul.kint-tabs { - box-shadow : 4px 0 2px -3px @variable-type-color inset; -} \ No newline at end of file diff --git a/kint/kint-0.9/view/trace.phtml b/kint/kint-0.9/view/trace.phtml deleted file mode 100644 index 3641862..0000000 --- a/kint/kint-0.9/view/trace.phtml +++ /dev/null @@ -1,77 +0,0 @@ - Kint::$enabled, - 'displayCalledFrom' => Kint::$displayCalledFrom, -); -Kint::$enabled = true; -Kint::$displayCalledFrom = false; - -echo '
'; - -foreach ( $output as $i => $step ) { - echo '
' - . '' . ( $i + 1 ) . ' ' - . '' - . ''; - - if ( isset( $step['file'] ) ) { - echo Kint::shortenPath( $step['file'], $step['line'] ); - } else { - echo 'PHP internal call'; - } - - echo ''; - - echo $step['function']; - - if ( isset( $step['args'] ) ) { - echo '(' . implode( ', ', array_keys( $step['args'] ) ) . ')'; - } - echo '
'; - $firstTab = ' class="kint-active-tab"'; - echo '
    '; - - if ( !empty( $step['source'] ) ) { - echo "Source"; - $firstTab = ''; - } - - if ( !empty( $step['args'] ) ) { - echo "Arguments"; - $firstTab = ''; - } - - if ( !empty( $step['object'] ) ) { - kintParser::reset(); - $calleDump = kintParser::factory( $step['object'] ); - - echo "Callee object [{$calleDump->subtype}]"; - $firstTab = ''; - } - - - echo '
    '; - - - if ( !empty( $step['source'] ) ) { - echo "
  • {$step['source']}
  • "; - } - - if ( !empty( $step['args'] ) ) { - echo "
  • "; - foreach ( $step['args'] as $k => $arg ) { - kintParser::reset(); - echo Kint_Decorators_Rich::decorate( kintParser::factory( $arg, $k ) ); - } - echo "
  • "; - } - if ( !empty( $step['object'] ) ) { - echo "
  • " . Kint_Decorators_Rich::decorate( $calleDump ) . "
  • "; - } - - echo '
'; -} -echo '
'; -Kint::$enabled = $settings['enabled']; -Kint::$displayCalledFrom = $settings['displayCalledFrom']; -unset( $settings ); diff --git a/kint/kint.info.yml b/kint/kint.info.yml index d6df8b2..2553238 100644 --- a/kint/kint.info.yml +++ b/kint/kint.info.yml @@ -1,6 +1,6 @@ +name: 'Devel Kint' type: module -name: Kint -description: 'Debug wrapper functions' +description: 'Wrapper for Kint debugging tool' package: Development core: 8.x tags: diff --git a/kint/kint.module b/kint/kint.module index ffb1fb3..4a2d353 100644 --- a/kint/kint.module +++ b/kint/kint.module @@ -1,13 +1,13 @@ hasPermission('access kint')) { + if (\Drupal::currentUser()->hasPermission('access kint')) { $args = func_get_args(); call_user_func_array(drupal_is_cli() ? 's' : array('Kint', 'dump'), $args); } @@ -15,25 +15,35 @@ function kint() { /** * Alias of Kint::trace(). - * Print backtrace in Kint debug tool. + * + * Prints backtrace in Kint debug tool. */ function kint_trace() { kint_require(); - if (Kint::enabled() && \Drupal::currentUser()->hasPermission('access kint')) { + if (\Drupal::currentUser()->hasPermission('access kint')) { call_user_func_array(array('Kint', 'trace'), array()); } } +/** + * Alias of Kint::kintLite(). + * + * Prints with lightweight formatting, using whitespace for formatting instead + * of HTML. + */ function kint_lite() { - if (Kint::enabled() && \Drupal::currentUser()->hasPermission('access kint')) { + if (\Drupal::currentUser()->hasPermission('access kint')) { $args = func_get_args(); call_user_func_array('kintLite', $args); } } +/** + * Prints passed argument(s) to the 'message' area of the page. + */ function ksm() { kint_require(); - if (Kint::enabled() && \Drupal::currentUser()->hasPermission('access kint')) { + if (\Drupal::currentUser()->hasPermission('access kint')) { $args = func_get_args(); $msg = @Kint::dump($args); drupal_set_message($msg); @@ -53,11 +63,9 @@ function kint_permission() { ); } +/** + * Load the Kint class. + */ function kint_require() { - require_once drupal_get_path('module', 'kint') . '/kint-0.9/Kint.class.php'; + require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'kint') . '/kint/Kint.class.php'; } - - - - -