Browse Source

Add Text_Highlighter to Composer

- Fixes critical mistake in boot.php regarding set_include_path
- Fixes minor mistake in text.php regarding strpos order of arguments

Note: This change significantly increases Composer running time because
Text_Highlither is a PEAR package. I'm already planning to replace it
with scrivo/highlight.php.
pull/3290/head
Hypolite Petovan 4 years ago
parent
commit
1ab28bbe03
  1. 4
      boot.php
  2. 9
      composer.json
  3. 220
      composer.lock
  4. 37
      include/text.php
  5. 455
      library/Text_Highlighter/README
  6. 15
      vendor/bin/composer-php
  7. 11
      vendor/bin/composer-php.bat
  8. 17
      vendor/bin/generate
  9. 7
      vendor/bin/generate.bat
  10. 7
      vendor/bin/pear.bat
  11. 7
      vendor/bin/peardev.bat
  12. 7
      vendor/bin/pecl.bat
  13. 110
      vendor/composer/autoload_classmap.php
  14. 4
      vendor/composer/autoload_real.php
  15. 110
      vendor/composer/autoload_static.php
  16. 16
      vendor/composer/include_paths.php
  17. 232
      vendor/composer/installed.json
  18. 2421
      vendor/pear-pear.php.net/Archive_Tar/Archive/Tar.php
  19. 360
      vendor/pear-pear.php.net/Console_Getopt/Console/Getopt.php
  20. 337
      vendor/pear-pear.php.net/PEAR/OS/Guess.php
  21. 1113
      vendor/pear-pear.php.net/PEAR/PEAR.php
  22. 499
      vendor/pear-pear.php.net/PEAR/PEAR/Builder.php
  23. 1560
      vendor/pear-pear.php.net/PEAR/PEAR/ChannelFile.php
  24. 67
      vendor/pear-pear.php.net/PEAR/PEAR/ChannelFile/Parser.php
  25. 389
      vendor/pear-pear.php.net/PEAR/PEAR/Command.php
  26. 80
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Auth.php
  27. 30
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Auth.xml
  28. 84
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Build.php
  29. 10
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Build.xml
  30. 882
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Channels.php
  31. 123
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Channels.xml
  32. 272
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Common.php
  33. 414
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Config.php
  34. 92
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Config.xml
  35. 1269
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Install.php
  36. 276
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Install.xml
  37. 138
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Mirror.php
  38. 18
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Mirror.xml
  39. 1123
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Package.php
  40. 237
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Package.xml
  41. 420
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Pickle.php
  42. 36
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Pickle.xml
  43. 1144
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Registry.php
  44. 58
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Registry.xml
  45. 809
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Remote.php
  46. 109
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Remote.xml
  47. 343
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Test.php
  48. 54
      vendor/pear-pear.php.net/PEAR/PEAR/Command/Test.xml
  49. 838
      vendor/pear-pear.php.net/PEAR/PEAR/Common.php
  50. 2131
      vendor/pear-pear.php.net/PEAR/PEAR/Config.php
  51. 1357
      vendor/pear-pear.php.net/PEAR/PEAR/Dependency2.php
  52. 764
      vendor/pear-pear.php.net/PEAR/PEAR/DependencyDB.php
  53. 1763
      vendor/pear-pear.php.net/PEAR/PEAR/Downloader.php
  54. 1981
      vendor/pear-pear.php.net/PEAR/PEAR/Downloader/Package.php
  55. 979
      vendor/pear-pear.php.net/PEAR/PEAR/ErrorStack.php
  56. 388
      vendor/pear-pear.php.net/PEAR/PEAR/Exception.php
  57. 223
      vendor/pear-pear.php.net/PEAR/PEAR/Frontend.php
  58. 750
      vendor/pear-pear.php.net/PEAR/PEAR/Frontend/CLI.php
  59. 1794
      vendor/pear-pear.php.net/PEAR/PEAR/Installer.php
  60. 266
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role.php
  61. 105
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Cfg.php
  62. 15
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Cfg.xml
  63. 173
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Common.php
  64. 27
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Data.php
  65. 15
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Data.xml
  66. 27
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Doc.php
  67. 15
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Doc.xml
  68. 27
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Ext.php
  69. 12
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Ext.xml
  70. 28
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Man.php
  71. 15
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Man.xml
  72. 27
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Php.php
  73. 15
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Php.xml
  74. 27
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Script.php
  75. 15
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Script.xml
  76. 33
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Src.php
  77. 12
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Src.xml
  78. 27
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Test.php
  79. 15
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Test.xml
  80. 27
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Www.php
  81. 15
      vendor/pear-pear.php.net/PEAR/PEAR/Installer/Role/Www.xml
  82. 491
      vendor/pear-pear.php.net/PEAR/PEAR/PackageFile.php
  83. 1284
      vendor/pear-pear.php.net/PEAR/PEAR/PackageFile/Generator/v1.php
  84. 886
      vendor/pear-pear.php.net/PEAR/PEAR/PackageFile/Generator/v2.php
  85. 458
      vendor/pear-pear.php.net/PEAR/PEAR/PackageFile/Parser/v1.php
  86. 112
      vendor/pear-pear.php.net/PEAR/PEAR/PackageFile/Parser/v2.php
  87. 1602
      vendor/pear-pear.php.net/PEAR/PEAR/PackageFile/v1.php
  88. 2059
      vendor/pear-pear.php.net/PEAR/PEAR/PackageFile/v2.php
  89. 2135
      vendor/pear-pear.php.net/PEAR/PEAR/PackageFile/v2/Validator.php
  90. 1603
      vendor/pear-pear.php.net/PEAR/PEAR/PackageFile/v2/rw.php
  91. 200
      vendor/pear-pear.php.net/PEAR/PEAR/Packager.php
  92. 187
      vendor/pear-pear.php.net/PEAR/PEAR/Proxy.php
  93. 475
      vendor/pear-pear.php.net/PEAR/PEAR/REST.php
  94. 870
      vendor/pear-pear.php.net/PEAR/PEAR/REST/10.php
  95. 340
      vendor/pear-pear.php.net/PEAR/PEAR/REST/11.php
  96. 396
      vendor/pear-pear.php.net/PEAR/PEAR/REST/13.php
  97. 2388
      vendor/pear-pear.php.net/PEAR/PEAR/Registry.php
  98. 972
      vendor/pear-pear.php.net/PEAR/PEAR/RunTest.php
  99. 207
      vendor/pear-pear.php.net/PEAR/PEAR/Task/Common.php
  100. 350
      vendor/pear-pear.php.net/PEAR/PEAR/Task/Postinstallscript.php

4
boot.php

@ -646,12 +646,12 @@ class App {
startup();
set_include_path(
'include' . PATH_SEPARATOR
get_include_path() . PATH_SEPARATOR
. 'include' . PATH_SEPARATOR
. 'library' . PATH_SEPARATOR
. 'library/langdet' . PATH_SEPARATOR
. '.' );
$this->scheme = 'http';
if ((x($_SERVER, 'HTTPS') && $_SERVER['HTTPS']) ||

9
composer.json

@ -14,8 +14,15 @@
},
"require": {
"ezyang/htmlpurifier": "~4.7.0",
"mobiledetect/mobiledetectlib": "2.8.*"
"mobiledetect/mobiledetectlib": "2.8.*",
"pear-pear.php.net/Text_Highlighter": "*"
},
"repositories": [
{
"type": "pear",
"url": "https://pear.php.net"
}
],
"autoload": {
"psr-4": {
"Friendica\\": "src/"

220
composer.lock

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "49b00f1ed3192e5173bd5577a3b91ba2",
"content-hash": "4d3a9e742e7ad746fb7206f3b5aff5af",
"packages": [
{
"name": "ezyang/htmlpurifier",
@ -101,6 +101,224 @@
"php mobile detect"
],
"time": "2017-03-29T13:59:30+00:00"
},
{
"name": "pear-pear.php.net/Archive_Tar",
"version": "1.4.2",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/Archive_Tar-1.4.2.tgz",
"reference": null,
"shasum": null
},
"require": {
"php": ">=5.2.0.0"
},
"replace": {
"pear-pear/archive_tar": "== 1.4.2.0"
},
"type": "pear-library",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"New BSD License"
],
"description": "This class provides handling of tar files in PHP.\nIt supports creating, listing, extracting and adding to tar files.\nGzip support is available if PHP has the zlib extension built-in or\nloaded. Bz2 compression is also supported with the bz2 extension loaded."
},
{
"name": "pear-pear.php.net/Console_Getopt",
"version": "1.4.1",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/Console_Getopt-1.4.1.tgz",
"reference": null,
"shasum": null
},
"require": {
"php": ">=5.4.0.0"
},
"replace": {
"pear-pear/console_getopt": "== 1.4.1.0"
},
"type": "pear-library",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"BSD-2-Clause"
],
"description": "This is a PHP implementation of \"getopt\" supporting both\nshort and long options."
},
{
"name": "pear-pear.php.net/PEAR",
"version": "1.10.3",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/PEAR-1.10.3.tgz",
"reference": null,
"shasum": null
},
"require": {
"ext-pcre": "*",
"ext-xml": "*",
"pear-pear.php.net/archive_tar": ">=1.4.0.0",
"pear-pear.php.net/console_getopt": ">=1.4.1.0",
"pear-pear.php.net/structures_graph": ">=1.1.0.0",
"pear-pear.php.net/xml_util": ">=1.3.0.0",
"php": ">=5.4.0.0"
},
"conflict": {
"pear-pear.php.net/pear_frontend_gtk": "<0.4.0.0",
"pear-pear.php.net/pear_frontend_web": "<=0.4.0.0"
},
"replace": {
"pear-pear/pear": "== 1.10.3.0"
},
"type": "pear-library",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"New BSD License"
],
"description": "The PEAR package contains:\n * the PEAR installer, for creating, distributing\n and installing packages\n * the PEAR_Exception PHP5 error handling mechanism\n * the PEAR_ErrorStack advanced error handling mechanism\n * the PEAR_Error error handling mechanism\n * the OS_Guess class for retrieving info about the OS\n where PHP is running on\n * the System class for quick handling of common operations\n with files and directories\n * the PEAR base class\n Features in a nutshell:\n * full support for channels\n * pre-download dependency validation\n * new package.xml 2.0 format allows tremendous flexibility while maintaining BC\n * support for optional dependency groups and limited support for sub-packaging\n * robust dependency support\n * full dependency validation on uninstall\n * remote install for hosts with only ftp access - no more problems with\n restricted host installation\n * full support for mirroring\n * support for bundling several packages into a single tarball\n * support for static dependencies on a url-based package\n * support for custom file roles and installation tasks"
},
{
"name": "pear-pear.php.net/Structures_Graph",
"version": "1.1.1",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/Structures_Graph-1.1.1.tgz",
"reference": null,
"shasum": null
},
"require": {
"php": ">=5.3.0.0"
},
"replace": {
"pear-pear/structures_graph": "== 1.1.1.0"
},
"type": "pear-library",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"LGPL-3.0+"
],
"description": "Structures_Graph is a package for creating and manipulating graph datastructures. It allows building of directed\nand undirected graphs, with data and metadata stored in nodes. The library provides functions for graph traversing\nas well as for characteristic extraction from the graph topology."
},
{
"name": "pear-pear.php.net/Text_Highlighter",
"version": "0.8.0",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/Text_Highlighter-0.8.0.tgz",
"reference": null,
"shasum": null
},
"require": {
"pear-pear.php.net/console_getopt": ">=1.4.1.0",
"pear-pear.php.net/pear": ">=1.10.3.0",
"pear-pear.php.net/xml_parser": ">=1.3.7.0",
"php": ">=5.4.0.0"
},
"replace": {
"pear-pear/text_highlighter": "== 0.8.0.0"
},
"type": "pear-library",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"PHP License"
],
"description": "Text_Highlighter is a package for syntax highlighting.\n\nIt provides a base class provining all the functionality,\nand a descendent classes geneator class.\n\nThe main idea is to simplify creation of subclasses\nimplementing syntax highlighting for particular language.\nSubclasses do not implement any new functioanality,\nthey just provide syntax highlighting rules.\nThe rules sources are in XML format.\n\nTo create a highlighter for a language, there is no need\nto code a new class manually. Simply describe the rules\nin XML file and use Text_Highlighter_Generator to create\na new class."
},
{
"name": "pear-pear.php.net/XML_Parser",
"version": "1.3.7",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/XML_Parser-1.3.7.tgz",
"reference": null,
"shasum": null
},
"require": {
"pear-pear.php.net/pear": "*",
"php": ">=4.2.0.0"
},
"replace": {
"pear-pear/xml_parser": "== 1.3.7.0"
},
"type": "pear-library",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"BSD License"
],
"description": "This is an XML parser based on PHPs built-in xml extension.\nIt supports two basic modes of operation: \"func\" and \"event\". In \"func\" mode, it will look for a function named after each element (xmltag_ELEMENT for start tags and xmltag_ELEMENT_ for end tags), and in \"event\" mode it uses a set of generic callbacks.\n\nSince version 1.2.0 there's a new XML_Parser_Simple class that makes parsing of most XML documents easier, by automatically providing a stack for the elements.\nFurthermore its now possible to split the parser from the handler object, so you do not have to extend XML_Parser anymore in order to parse a document with it."
},
{
"name": "pear-pear.php.net/XML_Util",
"version": "1.4.2",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/XML_Util-1.4.2.tgz",
"reference": null,
"shasum": null
},
"require": {
"ext-pcre": "*",
"php": ">=5.4.0.0"
},
"replace": {
"pear-pear/xml_util": "== 1.4.2.0"
},
"type": "pear-library",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"BSD License"
],
"description": "Selection of methods that are often needed when working with XML documents. Functionality includes creating of attribute lists from arrays, creation of tags, validation of XML names and more."
}
],
"packages-dev": [],

37
include/text.php

@ -2125,47 +2125,48 @@ function format_network_name($network, $url = 0) {
* @param string $lang Programming language
* @return string Formated html
*/
function text_highlight($s,$lang) {
if($lang === 'js')
function text_highlight($s, $lang) {
if ($lang === 'js') {
$lang = 'javascript';
if(! strpos('Text_Highlighter',get_include_path())) {
set_include_path(get_include_path() . PATH_SEPARATOR . 'library/Text_Highlighter');
}
require_once('library/Text_Highlighter/Text/Highlighter.php');
require_once('library/Text_Highlighter/Text/Highlighter/Renderer/Html.php');
// @TODO: Replace Text_Highlighter_Renderer_Html by scrivo/highlight.php
// Autoload the library to make constants available
class_exists('Text_Highlighter_Renderer_Html');
$options = array(
'numbers' => HL_NUMBERS_LI,
'tabsize' => 4,
);
);
$tag_added = false;
$s = trim(html_entity_decode($s,ENT_COMPAT));
$s = str_replace(" ","\t",$s);
$s = trim(html_entity_decode($s, ENT_COMPAT));
$s = str_replace(' ', "\t", $s);
// The highlighter library insists on an opening php tag for php code blocks. If
// it isn't present, nothing is highlighted. So we're going to see if it's present.
// If not, we'll add it, and then quietly remove it after we get the processed output back.
if($lang === 'php') {
if(strpos('<?php',$s) !== 0) {
if ($lang === 'php') {
if (strpos($s, '<?php') !== 0) {
$s = '<?php' . "\n" . $s;
$tag_added = true;
}
}
$renderer = new Text_Highlighter_Renderer_HTML($options);
$renderer = new Text_Highlighter_Renderer_Html($options);
$hl = Text_Highlighter::factory($lang);
$hl->setRenderer($renderer);
$o = $hl->highlight($s);
$o = str_replace([" ","\n"],["&nbsp;&nbsp;&nbsp;&nbsp;",''],$o);
$o = str_replace("\n", '', $o);
if($tag_added) {
$b = substr($o,0,strpos($o,'<li>'));
$e = substr($o,strpos($o,'</li>'));
if ($tag_added) {
$b = substr($o, 0, strpos($o, '<li>'));
$e = substr($o, strpos($o, '</li>'));
$o = $b . $e;
}
return('<code>' . $o . '</code>');
return '<code>' . $o . '</code>';
}

455
library/Text_Highlighter/README

@ -1,455 +0,0 @@
# $Id$
Introduction
============
Text_Highlighter is a class for syntax highlighting. The main idea is to
simplify creation of subclasses implementing syntax highlighting for
particular language. Subclasses do not implement any new functioanality, they
just provide syntax highlighting rules. The rules sources are in XML format.
To create a highlighter for a language, there is no need to code a new class
manually. Simply describe the rules in XML file and use Text_Highlighter_Generator
to create a new class.
This document does not contain a formal description of API - it is very
simple, and I believe providing some examples of code is sufficient.
Highlighter XML source
======================
Basics
------
Creating a new syntax highlighter begins with describing the highlighting
rules. There are two basic elements: block and region. A block is just a
portion of text matching a regular expression and highlighted with a single
color. Keyword is an example of a block. A region is defined by two regular
expressions: one for start of region, and another for the end. The main
difference from a block is that a region can contain blocks and regions
(including same-named regions). An example of a region is a group of
statements enclosed in curly brackets (this is used in many languages, for
example PHP and C). Also, characters matching start and end of a region may be
highlighted with their own color, and region contents with another.
Blocks and regions may be declared as contained. Contained blocks and regions
can only appear inside regions. If a region or a block is not declared as
contained, it can appear both on top level and inside regions. Block or region
declared as not-contained can only appear on top level.
For any region, a list of blocks and regions that can appear inside this
region can be specified.
In this document, the term "color group" is used. Chunks of text assigned to
same color group will be highlighted with same color. Note that in versions
prior 0.5.0 color goups were refered as CSS classes, but since 0.5.0 not only
HTML output is supported, so "color group" is more appropriate term.
Elements
--------
The toplevel element is <highlight>. Attribute lang is required and denotes
the name of the language. Its value is used as a part of generated class name,
and must only contain letters, digits and underscores. Optional attribute
case, when given value yes, makes the language case sensitive (default is case
insensitive). Allowed subelements are:
* <authors>: Information about the authors of the file.
<author>: Information about a single author of the file. (May be used
multiple times, one per author.)
- name="...": Author's name. Required.
- email="...": Author's email address. Optional.
* <default>: Default color group.
- innerGroup="...": color group name. Required.
* <region>: Region definition
- name="...": Region name. Required.
- innerGroup="...": Default color group of region contents. Required.
- delimGroup="...": color group of start and end of region. Optional,
defaults to value of innerGroup attribute.
- start="...", end="...": Regular expression matching start and end
of region. Required. Regular expression delimiters are optional, but
if you need to specify delimiter, use /. The only case when the
delimiters are needed, is specifying regular expression modifiers,
such as m or U. Examples: \/\* or /$/m.
- contained="yes": Marks region as contained.
- never-contained="yes": Marks region as not-contained.
- <contains>: Elements allowed inside this region.
- all="yes" Region can contain any other region or block
(except not-contained). May be used multiple times.
- <but> Do not allow certain regions or blocks.
- region="..." Name of region not allowed within
current region.
- block="..." Name of block not allowed within
current region.
- region="..." Name of region allowed within current region.
- block="..." Name of block allowed within current region.
- <onlyin> Only allow this region within certain regions. May be
used multiple times.
- block="..." Name of parent region
* <block>: Block definition
- name="...": Block name. Required.
- innerGroup="...": color group of block contents. Optional. If not
specified, color group of parent region or default color group will be
used. One would only want to omit this attribute if there are
keyword groups (see below) inherited from this block, and no special
highlighting should apply when the block does not match the keyword.
- match="..." Regular expression matching the block. Required.
Regular expression delimiters are optional, but if you need to
specify delimiter, use /. The only case when the delimiters are
needed, is specifying regular expression modifiers, such as m or U.
Examples: #|\/\/ or /$/m.
- contained="yes": Marks block as contained.
- never-contained="yes": Marks block as not-contained.
- <onlyin> Only allow this block within certain regions. May be used
multiple times.
- block="..." Name of parent region
- multiline="yes": Marks block as multi-line. By default, whole
blocks are assumed to reside in a single line. This make the things
faster. If you need to declare a multi-line block, use this
attribute.
- <partgroup>: Assigns another color group to a part of the block that
matched a subpattern.
- index="n": Subpattern index. Required.
- innerGroup="...": color group name. Required.
This is an example from CSS highlighter: the measure is matched as
a whole, but the measurement units are highlighted with different
color.
<block name="measure" match="\d*\.?\d+(\%|em|ex|pc|pt|px|in|mm|cm)"
innerGroup="number" contained="yes">
<onlyin region="property"/>
<partGroup index="1" innerGroup="string" />
</block>
* <keywords>: Keyword group definition. Keyword groups are useful when you
want to highlight some words that match a condition for a block with a
different color. Keywords are defined with literal match, not regular
expressions. For example, you have a block named identifier matching a
general identifier, and want to highlight reserved words (which match
this block as well) with different color. You inherit a keyword group
"reserved" from "identifier" block.
- name="...": Keyword group. Required.
- ifdef="...", ifndef="..." : Conditional declaration. See
"Conditions" below.
- inherits="...": Inherited block name. Required.
- innerGroup="...": color group of keyword group. Required.
- case="yes|no": Overrides case-sensitivity of the language.
Optional, defaults to global value.
- <keyword>: Single keyword definition.
- match="..." The keyword. Note: this is not a regular
expression, but literal match (possibly case insensitive).
Note that for BC reasons element partClass is alias for partGroup, and
attributes innerClass and delimClass are aliases of innerGroup and
delimGroup, respectively.
Conditions
----------
Conditional declarations allow enabling or disabling certain highlighting
rules at runtime. For example, Java highlighter has a very big list of
keywords matching Java standard classes. Finding a match in this list can take
much time. For that reason, corresponding keyword group is declared with
"ifdef" attribute :
<keywords name="builtin" inherits="identifier" innerClass="builtin"
case="yes" ifdef="java.builtins">
<keyword match="AbstractAction" />
<keyword match="AbstractBorder" />
<keyword match="AbstractButton" />
...
...
<keyword match="_Remote_Stub" />
<keyword match="_ServantActivatorStub" />
<keyword match="_ServantLocatorStub" />
</keywords>
This keyword group will be only enabled when "java.builtins" is passed as an
element of "defines" option:
$options = array(
'defines' => array(
'java.builtins',
),
'numbers' => HL_NUMBERS_TABLE,
);
$highlighter = Text_Highlighter::factory('java', $options);
"ifndef" attribute has reverse meaning.
Currently, "ifdef" and "ifndef" attributes are only supported for <keywords>
tag.
Class generation
================
Creating XML description of highlighting rules is the most complicated part of
the process. To generate the class, you need just few lines of code:
<?php
require_once 'Text/Highlighter/Generator.php';
$generator = new Text_Highlighter_Generator('php.xml');
$generator->generate();
$generator->saveCode('PHP.php');
?>
Command-line class generation tool
==================================
Example from previous section looks pretty simple, but it does not handle any
errors which may occur during parsing of XML source. The package provides a
command-line script to make generation of classes even more simple, and takes
care of possible errors. It is called generate (on Unix/Linux) or generate.bat
(on Windows). This script is able to process multiple files in one run, and
also to process XML from standard input and write generated code to standard
output.
Usage:
generate options
Options:
-x filename, --xml=filename
source XML file. Multiple input files can be specified, in which
case each -x option must be followed by -p unless -d is specified
Defaults to stdin
-p filename, --php=filename
destination PHP file. Defaults to stdout. If specied multiple times,
each -p must follow -x
-d dirname, --dir=dirname
Default destination directory. File names will be taken from XML input
("lang" attribute of <highlight> tag)
-h, --help
This help
Examples
Read from php.xml, write to PHP.php
generate -x php.xml -p PHP.php
Read from php.xml, write to standard output
generate -x php.xml
Read from php.xml, write to PHP.php, read from xml.xml, write to XML.php
generate -x php.xml -p PHP.php -x xml.xml -p XML.php
Read from php.xml, write to /some/dir/PHP.php, read from xml.xml, write to
/some/dir/XML.php (assuming that xml.xml contains <highlight lang="xml">, and
php.xml contains <highlight lang="php">)
generate -x php.xml -x xml.xml -d /some/dir/
Renderers
=========
Introduction
------------
Text_Highlighter supports renderes. Using renderers, you can get output in
different formats. Two renderers are included in the package:
- HTML renderer. Generates HTML output. A style sheet should be linked to
the document to display colored text
- Console renderer. Can be used to output highlighted text to
color-capable terminals, either directly or trough less -r
Renderers API
-------------
Renderers are subclasses of Text_Highlighter_Renderer. Renderer should
override at least two methods - acceptToken and getOutput. Overriding other
methods is optional, depending on the nature of renderer's output and details
of implementation.
string reset()
resets renderer state. This method is called every time before a new
source file is highlighted.
string preprocess(string $code)
preprocesses code. Can be used, for example, to normalize whitespace
before highlighting. Returns preprocessed string.
void acceptToken(string $group, string $content)
the core method of the renderer. Highlighter passes chunks of text to
this method in $content, and color group in $group
void finalize()
signals the renderer that no more tokens are available.
mixed getOutput()
returns generated output.
Setting renderer options
--------------------------------
Renderers accept an optional argument to their constructor - options array.
Elements of this array are renderer-specific.
HTML renderer
-------------
HTML renderer produces HTML output with optional line numbering. The renderer
itself does not provide information about actual colors of highlighted text.
Instead, <span class="hl-XXX"> is used, where XXX is replaced with color group
name (hl-var, hl-string, etc.). It is up to you to create a CSS stylesheet.
If 'use_language' option with value evaluating to true was passed, class names
will be formatted as "LANG-hl-XXX", where LANG is language name as defined in
highlighter XML source ("lang" attribute of <highlight> tag) in lower case.
There are 3 special CSS classes:
hl-main - this class applies to whole output or right table column,
depending on 'numbers' option
hl-gutter - applies to left column in table
hl-table - applies to whole table
HTML renderer accepts following options (each being optional):
* numbers - line numbering style.
0 - no numbering (default)
HL_NUMBERS_LI - use <ol></ol> for line numbering
HL_NUMBERS_TABLE - create a 2-column table, with line numbers in left
column and highlighted text in right column
* tabsize - tabulation size. Defaults to 4
Example:
require_once 'Text/Highlighter/Renderer/Html.php';
$options = array(
'numbers' => HL_NUMBERS_LI,
'tabsize' => 8,
);
$renderer = new Text_Highlighter_Renderer_HTML($options);
Console renderer
----------------
Console renderer produces output for displaying on a color-capable terminal,
either directly or through less -r, using ANSI escape sequences. By default,
this renderer only highlights most common color groups. Additional colors
can be specified using 'colors' option. This renderer also accepts 'numbers'
option - a boolean value, and 'tabsize' option.
Example :
require_once 'Text/Highlighter/Renderer/Console.php';
$colors = array(
'prepro' => "\033[35m",
'types' => "\033[32m",
);
$options = array(
'numbers' => true,
'tabsize' => 8,
'colors' => $colors,
);
$renderer = new Text_Highlighter_Renderer_Console($options);
ANSI color escape sequences have the following format:
ESC[#;#;....;#m
where ESC is character with ASCII code 27 (033 octal, 0x1B hexadecimal). # is
one of the following:
0 for normal display
1 for bold on
4 underline (mono only)
5 blink on
7 reverse video on
8 nondisplayed (invisible)
30 black foreground
31 red foreground
32 green foreground
33 yellow foreground
34 blue foreground
35 magenta foreground
36 cyan foreground
37 white foreground
40 black background
41 red background
42 green background
43 yellow background
44 blue background
45 magenta background
46 cyan background
47 white background
How to use Text_Highlighter class
=================================
Creating a highlighter object
-----------------------------
To create a highlighter for a certain language, use Text_Highlighter::factory()
static method:
require_once 'Text/Highlighter.php';
$hl = Text_Highlighter::factory('php');
Setting a renderer
------------------
Actual output is produced by a renderer.
require_once 'Text/Highlighter.php';
require_once 'Text/Highlighter/Renderer/Html.php';
$options = array(
'numbers' => HL_NUMBERS_LI,
'tabsize' => 8,
);
$renderer = new Text_Highlighter_Renderer_HTML($options);
$hl = Text_Highlighter::factory('php');
$hl->setRenderer($renderer);
Note that for BC reasons, it is possible to use highlighter without setting a
renderer. If no renderer is set, HTML renderer will be used by default. In
this case, you should pass options as second parameter to factory method. The
following example works exactly as previous one:
require_once 'Text/Highlighter.php';
$options = array(
'numbers' => HL_NUMBERS_LI,
'tabsize' => 8,
);
$hl = Text_Highlighter::factory('php', $options);
Getting output
--------------
And finally, do the highlighting and get the output:
require_once 'Text/Highlighter.php';
require_once 'Text/Highlighter/Renderer/Html.php';
$options = array(
'numbers' => HL_NUMBERS_LI,
'tabsize' => 8,
);
$renderer = new Text_Highlighter_Renderer_HTML($options);
$hl = Text_Highlighter::factory('php');
$hl->setRenderer($renderer);
$html = $hl->highlight(file_get_contents('example.php'));
# vim: set autoindent tabstop=4 shiftwidth=4 softtabstop=4 tw=78: */

15
vendor/bin/composer-php

@ -0,0 +1,15 @@
#!/usr/bin/env sh
SRC_DIR=`pwd`
BIN_DIR=`dirname $0`
VENDOR_DIR=$BIN_DIR/"../"
DIRS=""
for vendor in $VENDOR_DIR/*; do
if [ -d "$vendor" ]; then
for package in $vendor/*; do
if [ -d "$package" ]; then
DIRS="${DIRS}:${package}"
fi
done
fi
done
php -d include_path=".$DIRS" $@

11
vendor/bin/composer-php.bat

@ -0,0 +1,11 @@
@echo off
setlocal enabledelayedexpansion
set BIN_DIR=%~dp0
set VENDOR_DIR=%BIN_DIR%\../
set DIRS=.
FOR /D %%V IN (%VENDOR_DIR%\*) DO (
FOR /D %%P IN (%%V\*) DO (
set DIRS=!DIRS!;%%~fP
)
)
php.exe -d include_path=!DIRS! %*

17
vendor/bin/generate

@ -0,0 +1,17 @@
#!/usr/bin/env sh
dir=$(d=${0%[/\\]*}; cd "$d"; cd "../pear-pear.php.net/Text_Highlighter/bin" && pwd)
# See if we are running in Cygwin by checking for cygpath program
if command -v 'cygpath' >/dev/null 2>&1; then
# Cygwin paths start with /cygdrive/ which will break windows PHP,
# so we need to translate the dir path to windows format. However
# we could be using cygwin PHP which does not require this, so we
# test if the path to PHP starts with /cygdrive/ rather than /usr/bin
if [[ $(which php) == /cygdrive/* ]]; then
dir=$(cygpath -m "$dir");
fi
fi
dir=$(echo $dir | sed 's/ /\ /g')
"${dir}/generate" "$@"

7
vendor/bin/generate.bat

@ -0,0 +1,7 @@
@echo off
pushd .
cd %~dp0
cd "../pear-pear.php.net/Text_Highlighter/bin"
set BIN_TARGET=%CD%\generate
popd
composer-php "%BIN_TARGET%" %*

7
vendor/bin/pear.bat

@ -0,0 +1,7 @@
@echo off
pushd .
cd %~dp0
cd "../pear-pear.php.net/PEAR/bin"
set BIN_TARGET=%CD%\pear.bat
popd
call "%BIN_TARGET%" %*

7
vendor/bin/peardev.bat

@ -0,0 +1,7 @@
@echo off
pushd .
cd %~dp0
cd "../pear-pear.php.net/PEAR/bin"
set BIN_TARGET=%CD%\peardev.bat
popd
call "%BIN_TARGET%" %*

7
vendor/bin/pecl.bat

@ -0,0 +1,7 @@
@echo off
pushd .
cd %~dp0
cd "../pear-pear.php.net/PEAR/bin"
set BIN_TARGET=%CD%\pecl.bat
popd
call "%BIN_TARGET%" %*

110
vendor/composer/autoload_classmap.php

@ -6,6 +6,8 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Archive_Tar' => $vendorDir . '/pear-pear.php.net/Archive_Tar/Archive/Tar.php',
'Console_Getopt' => $vendorDir . '/pear-pear.php.net/Console_Getopt/Console/Getopt.php',
'Detection\\MobileDetect' => $vendorDir . '/mobiledetect/mobiledetectlib/namespaced/Detection/MobileDetect.php',
'Friendica\\Core\\Config' => $baseDir . '/src/Core/Config.php',
'Friendica\\Core\\PConfig' => $baseDir . '/src/Core/PConfig.php',
@ -240,4 +242,112 @@ return array(
'HTMLPurifier_VarParser_Native' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php',
'HTMLPurifier_Zipper' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Zipper.php',
'Mobile_Detect' => $vendorDir . '/mobiledetect/mobiledetectlib/Mobile_Detect.php',
'OS_Guess' => $vendorDir . '/pear-pear.php.net/PEAR/OS/Guess.php',
'PEAR' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR.php',
'PEAR_Builder' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Builder.php',
'PEAR_ChannelFile' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/ChannelFile.php',
'PEAR_ChannelFile_Parser' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/ChannelFile/Parser.php',
'PEAR_Command' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Command.php',
'PEAR_Command_Auth' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Command/Auth.php',
'PEAR_Command_Build' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Command/Build.php',
'PEAR_Command_Channels' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Command/Channels.php',
'PEAR_Command_Common' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Command/Common.php',
'PEAR_Command_Config' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Command/Config.php',
'PEAR_Command_Install' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Command/Install.php',
'PEAR_Command_Mirror' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Command/Mirror.php',
'PEAR_Command_Package' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Command/Package.php',
'PEAR_Command_Pickle' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Command/Pickle.php',
'PEAR_Command_Registry' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Command/Registry.php',
'PEAR_Command_Remote' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Command/Remote.php',
'PEAR_Command_Test' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Command/Test.php',
'PEAR_Common' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Common.php',
'PEAR_Config' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Config.php',
'PEAR_Dependency2' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Dependency2.php',
'PEAR_DependencyDB' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/DependencyDB.php',
'PEAR_Downloader' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Downloader.php',
'PEAR_Downloader_Package' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Downloader/Package.php',
'PEAR_Error' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR.php',
'PEAR_ErrorStack' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/ErrorStack.php',
'PEAR_Exception' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Exception.php',
'PEAR_Frontend' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Frontend.php',
'PEAR_Frontend_CLI' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Frontend/CLI.php',
'PEAR_Installer' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Installer.php',
'PEAR_Installer_Role' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Installer/Role.php',
'PEAR_Installer_Role_Cfg' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Cfg.php',
'PEAR_Installer_Role_Common' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Common.php',
'PEAR_Installer_Role_Data' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Data.php',
'PEAR_Installer_Role_Doc' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Doc.php',
'PEAR_Installer_Role_Ext' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Ext.php',
'PEAR_Installer_Role_Man' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Man.php',
'PEAR_Installer_Role_Php' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Php.php',
'PEAR_Installer_Role_Script' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Script.php',
'PEAR_Installer_Role_Src' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Src.php',
'PEAR_Installer_Role_Test' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Test.php',
'PEAR_Installer_Role_Www' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Www.php',
'PEAR_PackageFile' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/PackageFile.php',
'PEAR_PackageFile_Generator_v1' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/PackageFile/Generator/v1.php',
'PEAR_PackageFile_Generator_v2' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/PackageFile/Generator/v2.php',
'PEAR_PackageFile_Parser_v1' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/PackageFile/Parser/v1.php',
'PEAR_PackageFile_Parser_v2' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/PackageFile/Parser/v2.php',
'PEAR_PackageFile_v1' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/PackageFile/v1.php',
'PEAR_PackageFile_v2' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/PackageFile/v2.php',
'PEAR_PackageFile_v2_Validator' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/PackageFile/v2/Validator.php',
'PEAR_PackageFile_v2_rw' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/PackageFile/v2/rw.php',
'PEAR_Packager' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Packager.php',
'PEAR_Proxy' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Proxy.php',
'PEAR_REST' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/REST.php',
'PEAR_REST_10' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/REST/10.php',
'PEAR_REST_11' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/REST/11.php',
'PEAR_REST_13' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/REST/13.php',
'PEAR_Registry' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Registry.php',
'PEAR_RunTest' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/RunTest.php',
'PEAR_Task_Common' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Task/Common.php',
'PEAR_Task_Postinstallscript' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Task/Postinstallscript.php',
'PEAR_Task_Postinstallscript_rw' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Task/Postinstallscript/rw.php',
'PEAR_Task_Replace' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Task/Replace.php',
'PEAR_Task_Replace_rw' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Task/Replace/rw.php',
'PEAR_Task_Unixeol' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Task/Unixeol.php',
'PEAR_Task_Unixeol_rw' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Task/Unixeol/rw.php',
'PEAR_Task_Windowseol' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Task/Windowseol.php',
'PEAR_Task_Windowseol_rw' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Task/Windowseol/rw.php',
'PEAR_Validate' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Validate.php',
'PEAR_Validator_PECL' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/Validator/PECL.php',
'PEAR_XMLParser' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR/XMLParser.php',
'Structures_Graph' => $vendorDir . '/pear-pear.php.net/Structures_Graph/Structures/Graph.php',
'Structures_Graph_Manipulator_AcyclicTest' => $vendorDir . '/pear-pear.php.net/Structures_Graph/Structures/Graph/Manipulator/AcyclicTest.php',
'Structures_Graph_Manipulator_TopologicalSorter' => $vendorDir . '/pear-pear.php.net/Structures_Graph/Structures/Graph/Manipulator/TopologicalSorter.php',
'Structures_Graph_Node' => $vendorDir . '/pear-pear.php.net/Structures_Graph/Structures/Graph/Node.php',
'System' => $vendorDir . '/pear-pear.php.net/PEAR/System.php',
'Text_Highlighter' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter.php',
'Text_Highlighter_ABAP' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/ABAP.php',
'Text_Highlighter_AVRC' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/AVRC.php',
'Text_Highlighter_CPP' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/CPP.php',
'Text_Highlighter_CSS' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/CSS.php',
'Text_Highlighter_DIFF' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/DIFF.php',
'Text_Highlighter_DTD' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/DTD.php',
'Text_Highlighter_Generator' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Generator.php',
'Text_Highlighter_HTML' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/HTML.php',
'Text_Highlighter_JAVA' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/JAVA.php',
'Text_Highlighter_JAVASCRIPT' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/JAVASCRIPT.php',
'Text_Highlighter_MYSQL' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/MYSQL.php',
'Text_Highlighter_PERL' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/PERL.php',
'Text_Highlighter_PHP' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/PHP.php',
'Text_Highlighter_PYTHON' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/PYTHON.php',
'Text_Highlighter_RUBY' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/RUBY.php',
'Text_Highlighter_Renderer' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer.php',
'Text_Highlighter_Renderer_Array' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/Array.php',
'Text_Highlighter_Renderer_BB' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/BB.php',
'Text_Highlighter_Renderer_Console' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/Console.php',
'Text_Highlighter_Renderer_Html' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/Html.php',
'Text_Highlighter_Renderer_HtmlTags' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/HtmlTags.php',
'Text_Highlighter_Renderer_JSON' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/JSON.php',
'Text_Highlighter_Renderer_XML' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/XML.php',
'Text_Highlighter_SH' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/SH.php',
'Text_Highlighter_SQL' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/SQL.php',
'Text_Highlighter_VBSCRIPT' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/VBSCRIPT.php',
'Text_Highlighter_XML' => $vendorDir . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/XML.php',
'XML_Parser' => $vendorDir . '/pear-pear.php.net/XML_Parser/XML/Parser.php',
'XML_Parser_Error' => $vendorDir . '/pear-pear.php.net/XML_Parser/XML/Parser.php',
'XML_Parser_Simple' => $vendorDir . '/pear-pear.php.net/XML_Parser/XML/Parser/Simple.php',
'XML_Util' => $vendorDir . '/pear-pear.php.net/XML_Util/XML/Util.php',
);

4
vendor/composer/autoload_real.php

@ -23,6 +23,10 @@ class ComposerAutoloaderInitFriendica
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitFriendica', 'loadClassLoader'));
$includePaths = require __DIR__ . '/include_paths.php';
array_push($includePaths, get_include_path());
set_include_path(implode(PATH_SEPARATOR, $includePaths));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';

110
vendor/composer/autoload_static.php

@ -42,6 +42,8 @@ class ComposerStaticInitFriendica
);
public static $classMap = array (
'Archive_Tar' => __DIR__ . '/..' . '/pear-pear.php.net/Archive_Tar/Archive/Tar.php',
'Console_Getopt' => __DIR__ . '/..' . '/pear-pear.php.net/Console_Getopt/Console/Getopt.php',
'Detection\\MobileDetect' => __DIR__ . '/..' . '/mobiledetect/mobiledetectlib/namespaced/Detection/MobileDetect.php',
'Friendica\\Core\\Config' => __DIR__ . '/../..' . '/src/Core/Config.php',
'Friendica\\Core\\PConfig' => __DIR__ . '/../..' . '/src/Core/PConfig.php',
@ -276,6 +278,114 @@ class ComposerStaticInitFriendica
'HTMLPurifier_VarParser_Native' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/VarParser/Native.php',
'HTMLPurifier_Zipper' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Zipper.php',
'Mobile_Detect' => __DIR__ . '/..' . '/mobiledetect/mobiledetectlib/Mobile_Detect.php',
'OS_Guess' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/OS/Guess.php',
'PEAR' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR.php',
'PEAR_Builder' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Builder.php',
'PEAR_ChannelFile' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/ChannelFile.php',
'PEAR_ChannelFile_Parser' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/ChannelFile/Parser.php',
'PEAR_Command' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Command.php',
'PEAR_Command_Auth' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Command/Auth.php',
'PEAR_Command_Build' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Command/Build.php',
'PEAR_Command_Channels' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Command/Channels.php',
'PEAR_Command_Common' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Command/Common.php',
'PEAR_Command_Config' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Command/Config.php',
'PEAR_Command_Install' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Command/Install.php',
'PEAR_Command_Mirror' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Command/Mirror.php',
'PEAR_Command_Package' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Command/Package.php',
'PEAR_Command_Pickle' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Command/Pickle.php',
'PEAR_Command_Registry' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Command/Registry.php',
'PEAR_Command_Remote' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Command/Remote.php',
'PEAR_Command_Test' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Command/Test.php',
'PEAR_Common' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Common.php',
'PEAR_Config' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Config.php',
'PEAR_Dependency2' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Dependency2.php',
'PEAR_DependencyDB' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/DependencyDB.php',
'PEAR_Downloader' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Downloader.php',
'PEAR_Downloader_Package' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Downloader/Package.php',
'PEAR_Error' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR.php',
'PEAR_ErrorStack' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/ErrorStack.php',
'PEAR_Exception' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Exception.php',
'PEAR_Frontend' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Frontend.php',
'PEAR_Frontend_CLI' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Frontend/CLI.php',
'PEAR_Installer' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Installer.php',
'PEAR_Installer_Role' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Installer/Role.php',
'PEAR_Installer_Role_Cfg' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Cfg.php',
'PEAR_Installer_Role_Common' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Common.php',
'PEAR_Installer_Role_Data' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Data.php',
'PEAR_Installer_Role_Doc' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Doc.php',
'PEAR_Installer_Role_Ext' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Ext.php',
'PEAR_Installer_Role_Man' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Man.php',
'PEAR_Installer_Role_Php' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Php.php',
'PEAR_Installer_Role_Script' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Script.php',
'PEAR_Installer_Role_Src' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Src.php',
'PEAR_Installer_Role_Test' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Test.php',
'PEAR_Installer_Role_Www' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Installer/Role/Www.php',
'PEAR_PackageFile' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/PackageFile.php',
'PEAR_PackageFile_Generator_v1' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/PackageFile/Generator/v1.php',
'PEAR_PackageFile_Generator_v2' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/PackageFile/Generator/v2.php',
'PEAR_PackageFile_Parser_v1' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/PackageFile/Parser/v1.php',
'PEAR_PackageFile_Parser_v2' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/PackageFile/Parser/v2.php',
'PEAR_PackageFile_v1' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/PackageFile/v1.php',
'PEAR_PackageFile_v2' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/PackageFile/v2.php',
'PEAR_PackageFile_v2_Validator' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/PackageFile/v2/Validator.php',
'PEAR_PackageFile_v2_rw' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/PackageFile/v2/rw.php',
'PEAR_Packager' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Packager.php',
'PEAR_Proxy' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Proxy.php',
'PEAR_REST' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/REST.php',
'PEAR_REST_10' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/REST/10.php',
'PEAR_REST_11' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/REST/11.php',
'PEAR_REST_13' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/REST/13.php',
'PEAR_Registry' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Registry.php',
'PEAR_RunTest' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/RunTest.php',
'PEAR_Task_Common' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Task/Common.php',
'PEAR_Task_Postinstallscript' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Task/Postinstallscript.php',
'PEAR_Task_Postinstallscript_rw' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Task/Postinstallscript/rw.php',
'PEAR_Task_Replace' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Task/Replace.php',
'PEAR_Task_Replace_rw' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Task/Replace/rw.php',
'PEAR_Task_Unixeol' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Task/Unixeol.php',
'PEAR_Task_Unixeol_rw' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Task/Unixeol/rw.php',
'PEAR_Task_Windowseol' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Task/Windowseol.php',
'PEAR_Task_Windowseol_rw' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Task/Windowseol/rw.php',
'PEAR_Validate' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Validate.php',
'PEAR_Validator_PECL' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/Validator/PECL.php',
'PEAR_XMLParser' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/PEAR/XMLParser.php',
'Structures_Graph' => __DIR__ . '/..' . '/pear-pear.php.net/Structures_Graph/Structures/Graph.php',
'Structures_Graph_Manipulator_AcyclicTest' => __DIR__ . '/..' . '/pear-pear.php.net/Structures_Graph/Structures/Graph/Manipulator/AcyclicTest.php',
'Structures_Graph_Manipulator_TopologicalSorter' => __DIR__ . '/..' . '/pear-pear.php.net/Structures_Graph/Structures/Graph/Manipulator/TopologicalSorter.php',
'Structures_Graph_Node' => __DIR__ . '/..' . '/pear-pear.php.net/Structures_Graph/Structures/Graph/Node.php',
'System' => __DIR__ . '/..' . '/pear-pear.php.net/PEAR/System.php',
'Text_Highlighter' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter.php',
'Text_Highlighter_ABAP' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/ABAP.php',
'Text_Highlighter_AVRC' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/AVRC.php',
'Text_Highlighter_CPP' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/CPP.php',
'Text_Highlighter_CSS' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/CSS.php',
'Text_Highlighter_DIFF' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/DIFF.php',
'Text_Highlighter_DTD' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/DTD.php',
'Text_Highlighter_Generator' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Generator.php',
'Text_Highlighter_HTML' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/HTML.php',
'Text_Highlighter_JAVA' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/JAVA.php',
'Text_Highlighter_JAVASCRIPT' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/JAVASCRIPT.php',
'Text_Highlighter_MYSQL' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/MYSQL.php',
'Text_Highlighter_PERL' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/PERL.php',
'Text_Highlighter_PHP' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/PHP.php',
'Text_Highlighter_PYTHON' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/PYTHON.php',
'Text_Highlighter_RUBY' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/RUBY.php',
'Text_Highlighter_Renderer' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer.php',
'Text_Highlighter_Renderer_Array' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/Array.php',
'Text_Highlighter_Renderer_BB' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/BB.php',
'Text_Highlighter_Renderer_Console' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/Console.php',
'Text_Highlighter_Renderer_Html' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/Html.php',
'Text_Highlighter_Renderer_HtmlTags' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/HtmlTags.php',
'Text_Highlighter_Renderer_JSON' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/JSON.php',
'Text_Highlighter_Renderer_XML' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/Renderer/XML.php',
'Text_Highlighter_SH' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/SH.php',
'Text_Highlighter_SQL' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/SQL.php',
'Text_Highlighter_VBSCRIPT' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/VBSCRIPT.php',
'Text_Highlighter_XML' => __DIR__ . '/..' . '/pear-pear.php.net/Text_Highlighter/Text/Highlighter/XML.php',
'XML_Parser' => __DIR__ . '/..' . '/pear-pear.php.net/XML_Parser/XML/Parser.php',
'XML_Parser_Error' => __DIR__ . '/..' . '/pear-pear.php.net/XML_Parser/XML/Parser.php',
'XML_Parser_Simple' => __DIR__ . '/..' . '/pear-pear.php.net/XML_Parser/XML/Parser/Simple.php',
'XML_Util' => __DIR__ . '/..' . '/pear-pear.php.net/XML_Util/XML/Util.php',
);
public static function getInitializer(ClassLoader $loader)

16
vendor/composer/include_paths.php

@ -0,0 +1,16 @@
<?php
// include_paths.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
$vendorDir . '/pear-pear.php.net/Console_Getopt',
$vendorDir . '/pear-pear.php.net/Archive_Tar',
$vendorDir . '/pear-pear.php.net/Structures_Graph',
$vendorDir . '/pear-pear.php.net/XML_Util',
$vendorDir . '/pear-pear.php.net/XML_Parser',
$vendorDir . '/pear-pear.php.net/PEAR',
$vendorDir . '/pear-pear.php.net/Text_Highlighter',
);

232
vendor/composer/installed.json

@ -98,5 +98,237 @@
"mobile detector",
"php mobile detect"
]
},
{
"name": "pear-pear.php.net/Console_Getopt",
"version": "1.4.1",
"version_normalized": "1.4.1.0",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/Console_Getopt-1.4.1.tgz",
"reference": null,
"shasum": null
},
"require": {
"php": ">=5.4.0.0"
},
"replace": {
"pear-pear/console_getopt": "== 1.4.1.0"
},
"type": "pear-library",
"installation-source": "dist",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"BSD-2-Clause"
],
"description": "This is a PHP implementation of \"getopt\" supporting both\nshort and long options."
},
{
"name": "pear-pear.php.net/Archive_Tar",
"version": "1.4.2",
"version_normalized": "1.4.2.0",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/Archive_Tar-1.4.2.tgz",
"reference": null,
"shasum": null
},
"require": {
"php": ">=5.2.0.0"
},
"replace": {
"pear-pear/archive_tar": "== 1.4.2.0"
},
"type": "pear-library",
"installation-source": "dist",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"New BSD License"
],
"description": "This class provides handling of tar files in PHP.\nIt supports creating, listing, extracting and adding to tar files.\nGzip support is available if PHP has the zlib extension built-in or\nloaded. Bz2 compression is also supported with the bz2 extension loaded."
},
{
"name": "pear-pear.php.net/Structures_Graph",
"version": "1.1.1",
"version_normalized": "1.1.1.0",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/Structures_Graph-1.1.1.tgz",
"reference": null,
"shasum": null
},
"require": {
"php": ">=5.3.0.0"
},
"replace": {
"pear-pear/structures_graph": "== 1.1.1.0"
},
"type": "pear-library",
"installation-source": "dist",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"LGPL-3.0+"
],
"description": "Structures_Graph is a package for creating and manipulating graph datastructures. It allows building of directed\nand undirected graphs, with data and metadata stored in nodes. The library provides functions for graph traversing\nas well as for characteristic extraction from the graph topology."
},
{
"name": "pear-pear.php.net/XML_Util",
"version": "1.4.2",
"version_normalized": "1.4.2.0",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/XML_Util-1.4.2.tgz",
"reference": null,
"shasum": null
},
"require": {
"ext-pcre": "*",
"php": ">=5.4.0.0"
},
"replace": {
"pear-pear/xml_util": "== 1.4.2.0"
},
"type": "pear-library",
"installation-source": "dist",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"BSD License"
],
"description": "Selection of methods that are often needed when working with XML documents. Functionality includes creating of attribute lists from arrays, creation of tags, validation of XML names and more."
},
{
"name": "pear-pear.php.net/XML_Parser",
"version": "1.3.7",
"version_normalized": "1.3.7.0",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/XML_Parser-1.3.7.tgz",
"reference": null,
"shasum": null
},
"require": {
"pear-pear.php.net/pear": "*",
"php": ">=4.2.0.0"
},
"replace": {
"pear-pear/xml_parser": "== 1.3.7.0"
},
"type": "pear-library",
"installation-source": "dist",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"BSD License"
],
"description": "This is an XML parser based on PHPs built-in xml extension.\nIt supports two basic modes of operation: \"func\" and \"event\". In \"func\" mode, it will look for a function named after each element (xmltag_ELEMENT for start tags and xmltag_ELEMENT_ for end tags), and in \"event\" mode it uses a set of generic callbacks.\n\nSince version 1.2.0 there's a new XML_Parser_Simple class that makes parsing of most XML documents easier, by automatically providing a stack for the elements.\nFurthermore its now possible to split the parser from the handler object, so you do not have to extend XML_Parser anymore in order to parse a document with it."
},
{
"name": "pear-pear.php.net/PEAR",
"version": "1.10.3",
"version_normalized": "1.10.3.0",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/PEAR-1.10.3.tgz",
"reference": null,
"shasum": null
},
"require": {
"ext-pcre": "*",
"ext-xml": "*",
"pear-pear.php.net/archive_tar": ">=1.4.0.0",
"pear-pear.php.net/console_getopt": ">=1.4.1.0",
"pear-pear.php.net/structures_graph": ">=1.1.0.0",
"pear-pear.php.net/xml_util": ">=1.3.0.0",
"php": ">=5.4.0.0"
},
"conflict": {
"pear-pear.php.net/pear_frontend_gtk": "<0.4.0.0",
"pear-pear.php.net/pear_frontend_web": "<=0.4.0.0"
},
"replace": {
"pear-pear/pear": "== 1.10.3.0"
},
"type": "pear-library",
"installation-source": "dist",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"New BSD License"
],
"description": "The PEAR package contains:\n * the PEAR installer, for creating, distributing\n and installing packages\n * the PEAR_Exception PHP5 error handling mechanism\n * the PEAR_ErrorStack advanced error handling mechanism\n * the PEAR_Error error handling mechanism\n * the OS_Guess class for retrieving info about the OS\n where PHP is running on\n * the System class for quick handling of common operations\n with files and directories\n * the PEAR base class\n Features in a nutshell:\n * full support for channels\n * pre-download dependency validation\n * new package.xml 2.0 format allows tremendous flexibility while maintaining BC\n * support for optional dependency groups and limited support for sub-packaging\n * robust dependency support\n * full dependency validation on uninstall\n * remote install for hosts with only ftp access - no more problems with\n restricted host installation\n * full support for mirroring\n * support for bundling several packages into a single tarball\n * support for static dependencies on a url-based package\n * support for custom file roles and installation tasks"
},
{
"name": "pear-pear.php.net/Text_Highlighter",
"version": "0.8.0",
"version_normalized": "0.8.0.0",
"dist": {
"type": "file",
"url": "https://pear.php.net/get/Text_Highlighter-0.8.0.tgz",
"reference": null,
"shasum": null
},
"require": {
"pear-pear.php.net/console_getopt": ">=1.4.1.0",
"pear-pear.php.net/pear": ">=1.10.3.0",
"pear-pear.php.net/xml_parser": ">=1.3.7.0",
"php": ">=5.4.0.0"
},
"replace": {
"pear-pear/text_highlighter": "== 0.8.0.0"
},
"type": "pear-library",
"installation-source": "dist",
"autoload": {
"classmap": [
""
]
},
"include-path": [
"/"
],
"license": [
"PHP License"
],
"description": "Text_Highlighter is a package for syntax highlighting.\n\nIt provides a base class provining all the functionality,\nand a descendent classes geneator class.\n\nThe main idea is to simplify creation of subclasses\nimplementing syntax highlighting for particular language.\nSubclasses do not implement any new functioanality,\nthey just provide syntax highlighting rules.\nThe rules sources are in XML format.\n\nTo create a highlighter for a language, there is no need\nto code a new class manually. Simply describe the rules\nin XML file and use Text_Highlighter_Generator to create\na new class."
}
]

2421
vendor/pear-pear.php.net/Archive_Tar/Archive/Tar.php
File diff suppressed because it is too large
View File

360
vendor/pear-pear.php.net/Console_Getopt/Console/Getopt.php

@ -0,0 +1,360 @@
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
/**
* PHP Version 5
*
* Copyright (c) 1997-2004 The PHP Group
*
* This source file is subject to version 3.0 of the PHP license,
* that is bundled with this package in the file LICENSE, and is
* available through the world-wide-web at the following url:
* http://www.php.net/license/3_0.txt.
* If you did not receive a copy of the PHP license and are unable to
* obtain it through the world-wide-web, please send a note to
* license@php.net so we can mail you a copy immediately.
*
* @category Console
* @package Console_Getopt
* @author Andrei Zmievski <andrei@php.net>
* @license http://www.php.net/license/3_0.txt PHP 3.0
* @version CVS: $Id$
* @link http://pear.php.net/package/Console_Getopt
*/
require_once 'PEAR.php';
/**
* Command-line options parsing class.
*
* @category Console
* @package Console_Getopt
* @author Andrei Zmievski <andrei@php.net>
* @license http://www.php.net/license/3_0.txt PHP 3.0
* @link http://pear.php.net/package/Console_Getopt
*/
class Console_Getopt
{
/**
* Parses the command-line options.
*
* The first parameter to this function should be the list of command-line
* arguments without the leading reference to the running program.
*
* The second parameter is a string of allowed short options. Each of the
* option letters can be followed by a colon ':' to specify that the option
* requires an argument, or a double colon '::' to specify that the option
* takes an optional argument.
*
* The third argument is an optional array of allowed long options. The
* leading '--' should not be included in the option name. Options that
* require an argument should be followed by '=', and options that take an
* option argument should be followed by '=='.
*
* The return value is an array of two elements: the list of parsed
* options and the list of non-option command-line arguments. Each entry in
* the list of parsed options is a pair of elements - the first one
* specifies the option, and the second one specifies the option argument,
* if there was one.
*
* Long and short options can be mixed.
*
* Most of the semantics of this function are based on GNU getopt_long().
*
* @param array $args an array of command-line arguments
* @param string $short_options specifies the list of allowed short options
* @param array $long_options specifies the list of allowed long options
* @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
*
* @return array two-element array containing the list of parsed options and
* the non-option arguments
*/
public static function getopt2($args, $short_options, $long_options = null, $skip_unknown = false)
{
return Console_Getopt::doGetopt(2, $args, $short_options, $long_options, $skip_unknown);
}
/**
* This function expects $args to start with the script name (POSIX-style).
* Preserved for backwards compatibility.
*
* @param array $args an array of command-line arguments
* @param string $short_options specifies the list of allowed short options
* @param array $long_options specifies the list of allowed long options
*
* @see getopt2()
* @return array two-element array containing the list of parsed options and
* the non-option arguments
*/
public static function getopt($args, $short_options, $long_options = null, $skip_unknown = false)
{
return Console_Getopt::doGetopt(1, $args, $short_options, $long_options, $skip_unknown);
}
/**
* The actual implementation of the argument parsing code.
*
* @param int $version Version to use
* @param array $args an array of command-line arguments
* @param string $short_options specifies the list of allowed short options
* @param array $long_options specifies the list of allowed long options
* @param boolean $skip_unknown suppresses Console_Getopt: unrecognized option
*
* @return array
*/
public static function doGetopt($version, $args, $short_options, $long_options = null, $skip_unknown = false)
{
// in case you pass directly readPHPArgv() as the first arg
if (PEAR::isError($args)) {
return $args;
}
if (empty($args)) {
return array(array(), array());
}
$non_opts = $opts = array();
settype($args, 'array');
if ($long_options) {
sort($long_options);
}
/*
* Preserve backwards compatibility with callers that relied on
* erroneous POSIX fix.
*/
if ($version < 2) {
if (isset($args[0]{0}) && $args[0]{0} != '-') {
array_shift($args);
}
}
reset($args);
while (list($i, $arg) = each($args)) {
/* The special element '--' means explicit end of
options. Treat the rest of the arguments as non-options
and end the loop. */
if ($arg == '--') {
$non_opts = array_merge($non_opts, array_slice($args, $i + 1));
break;
}
if ($arg{0} != '-' || (strlen($arg) > 1 && $arg{1} == '-' && !$long_options)) {
$non_opts = array_merge($non_opts, array_slice($args, $i));
break;
} elseif (strlen($arg) > 1 && $arg{1} == '-') {
$error = Console_Getopt::_parseLongOption(substr($arg, 2),
$long_options,
$opts,
$args,
$skip_unknown);
if (PEAR::isError($error)) {
return $error;