guard-mthaml 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +34 -0
- data/lib/guard/mthaml.rb +140 -0
- data/lib/guard/mthaml/compiler/MtHaml.php +255 -0
- data/lib/guard/mthaml/templates/Guardfile +12 -0
- data/lib/guard/mthaml/version.rb +5 -0
- data/vendor/autoload.php +7 -0
- data/vendor/coffeescript/coffeescript/LICENSE +22 -0
- data/vendor/coffeescript/coffeescript/README.md +96 -0
- data/vendor/coffeescript/coffeescript/composer.json +23 -0
- data/vendor/coffeescript/coffeescript/grammar.y +309 -0
- data/vendor/coffeescript/coffeescript/make.php +115 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Compiler.php +76 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Error.php +15 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Helpers.php +116 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Init.php +96 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Lexer.php +1356 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Nodes.php +105 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Parser.php +3326 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Rewriter.php +552 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Scope.php +196 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/SyntaxError.php +9 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/Value.php +20 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Access.php +31 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Arr.php +69 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Assign.php +353 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Base.php +288 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Block.php +294 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Call.php +283 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Class.php +282 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Closure.php +49 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Code.php +203 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Comment.php +39 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Existence.php +42 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Extends.php +26 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/For.php +250 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/If.php +161 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/In.php +99 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Index.php +27 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Literal.php +96 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Obj.php +126 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Op.php +292 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Param.php +119 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Parens.php +45 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Range.php +225 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Return.php +56 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Slice.php +47 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Splat.php +100 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Switch.php +121 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Throw.php +37 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Try.php +79 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/Value.php +210 -0
- data/vendor/coffeescript/coffeescript/src/CoffeeScript/yy/While.php +112 -0
- data/vendor/coffeescript/coffeescript/tests/cases/arrays.coffee +77 -0
- data/vendor/coffeescript/coffeescript/tests/cases/assignment.coffee +352 -0
- data/vendor/coffeescript/coffeescript/tests/cases/booleans.coffee +21 -0
- data/vendor/coffeescript/coffeescript/tests/cases/classes.coffee +681 -0
- data/vendor/coffeescript/coffeescript/tests/cases/comments.coffee +207 -0
- data/vendor/coffeescript/coffeescript/tests/cases/compilation.coffee +72 -0
- data/vendor/coffeescript/coffeescript/tests/cases/comprehensions.coffee +501 -0
- data/vendor/coffeescript/coffeescript/tests/cases/control_flow.coffee +430 -0
- data/vendor/coffeescript/coffeescript/tests/cases/eval.coffee +29 -0
- data/vendor/coffeescript/coffeescript/tests/cases/exception_handling.coffee +102 -0
- data/vendor/coffeescript/coffeescript/tests/cases/formatting.coffee +146 -0
- data/vendor/coffeescript/coffeescript/tests/cases/function_invocation.coffee +552 -0
- data/vendor/coffeescript/coffeescript/tests/cases/functions.coffee +188 -0
- data/vendor/coffeescript/coffeescript/tests/cases/helpers.coffee +96 -0
- data/vendor/coffeescript/coffeescript/tests/cases/importing.coffee +18 -0
- data/vendor/coffeescript/coffeescript/tests/cases/interpolation.coffee +138 -0
- data/vendor/coffeescript/coffeescript/tests/cases/javascript_literals.coffee +10 -0
- data/vendor/coffeescript/coffeescript/tests/cases/numbers.coffee +76 -0
- data/vendor/coffeescript/coffeescript/tests/cases/objects.coffee +271 -0
- data/vendor/coffeescript/coffeescript/tests/cases/operators.coffee +277 -0
- data/vendor/coffeescript/coffeescript/tests/cases/option_parser.coffee +43 -0
- data/vendor/coffeescript/coffeescript/tests/cases/ranges.coffee +88 -0
- data/vendor/coffeescript/coffeescript/tests/cases/regexps.coffee +63 -0
- data/vendor/coffeescript/coffeescript/tests/cases/scope.coffee +43 -0
- data/vendor/coffeescript/coffeescript/tests/cases/slicing_and_splicing.coffee +143 -0
- data/vendor/coffeescript/coffeescript/tests/cases/soaks.coffee +134 -0
- data/vendor/coffeescript/coffeescript/tests/cases/strict.coffee +155 -0
- data/vendor/coffeescript/coffeescript/tests/cases/strings.coffee +107 -0
- data/vendor/coffeescript/coffeescript/tests/css/style.css +43 -0
- data/vendor/coffeescript/coffeescript/tests/index.php +119 -0
- data/vendor/coffeescript/coffeescript/tests/js/lib/coffeescript_1.1.1.js +8 -0
- data/vendor/coffeescript/coffeescript/tests/js/lib/coffeescript_1.2.0.js +8 -0
- data/vendor/coffeescript/coffeescript/tests/js/lib/coffeescript_1.3.0.js +8 -0
- data/vendor/coffeescript/coffeescript/tests/js/lib/coffeescript_1.3.1.js +8 -0
- data/vendor/coffeescript/coffeescript/tests/js/lib/diff.js +276 -0
- data/vendor/coffeescript/coffeescript/tests/js/main.js +123 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/LICENSE.txt +10 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/Lempar.php +948 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/Action.php +257 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/ActionTable.php +299 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/Config.php +574 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/Data.php +1857 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/Parser.php +851 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/PropagationLink.php +126 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/Rule.php +144 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/State.php +283 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/Symbol.php +288 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/PHP/ParserGenerator/cli.php +5 -0
- data/vendor/coffeescript/coffeescript/vendor/ParserGenerator/ParserGenerator.php +811 -0
- data/vendor/composer/ClassLoader.php +383 -0
- data/vendor/composer/autoload_classmap.php +9 -0
- data/vendor/composer/autoload_namespaces.php +12 -0
- data/vendor/composer/autoload_psr4.php +10 -0
- data/vendor/composer/autoload_real.php +50 -0
- data/vendor/composer/installed.json +166 -0
- data/vendor/michelf/php-markdown/License.md +36 -0
- data/vendor/michelf/php-markdown/Michelf/Markdown.inc.php +10 -0
- data/vendor/michelf/php-markdown/Michelf/Markdown.php +3117 -0
- data/vendor/michelf/php-markdown/Michelf/MarkdownExtra.inc.php +11 -0
- data/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php +38 -0
- data/vendor/michelf/php-markdown/Michelf/MarkdownInterface.inc.php +9 -0
- data/vendor/michelf/php-markdown/Michelf/MarkdownInterface.php +37 -0
- data/vendor/michelf/php-markdown/Readme.md +305 -0
- data/vendor/michelf/php-markdown/Readme.php +31 -0
- data/vendor/michelf/php-markdown/composer.json +31 -0
- data/vendor/mthaml/mthaml/CHANGELOG +48 -0
- data/vendor/mthaml/mthaml/LICENSE +44 -0
- data/vendor/mthaml/mthaml/README.markdown +262 -0
- data/vendor/mthaml/mthaml/composer.json +45 -0
- data/vendor/mthaml/mthaml/docs/Makefile +153 -0
- data/vendor/mthaml/mthaml/docs/_static/mthaml.css +30 -0
- data/vendor/mthaml/mthaml/docs/_theme/mthaml/theme.conf +4 -0
- data/vendor/mthaml/mthaml/docs/conf.py +242 -0
- data/vendor/mthaml/mthaml/docs/index.rst +18 -0
- data/vendor/mthaml/mthaml/docs/twig-syntax.rst +274 -0
- data/vendor/mthaml/mthaml/examples/README.md +5 -0
- data/vendor/mthaml/mthaml/examples/autoload.php +8 -0
- data/vendor/mthaml/mthaml/examples/example-php.haml +5 -0
- data/vendor/mthaml/mthaml/examples/example-php.php +37 -0
- data/vendor/mthaml/mthaml/examples/example-twig-noext.twig +11 -0
- data/vendor/mthaml/mthaml/examples/example-twig.haml +9 -0
- data/vendor/mthaml/mthaml/examples/example-twig.php +60 -0
- data/vendor/mthaml/mthaml/examples/example.twig.haml +8 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Autoloader.php +22 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Environment.php +178 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Escaping.php +33 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Exception.php +9 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Exception/SyntaxErrorException.php +9 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/AbstractFilter.php +43 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Cdata.php +16 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/CoffeeScript.php +33 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Css.php +26 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Escaped.php +22 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/FilterInterface.php +15 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Javascript.php +26 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Less.php +27 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Less/LeafoLess.php +20 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Less/OyejorgeLess.php +23 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Markdown.php +58 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Markdown/CebeMarkdown.php +22 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Markdown/Ciconia.php +21 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Markdown/MichelfMarkdown.php +21 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Markdown/Parsedown.php +21 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Php.php +37 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Plain.php +24 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Preserve.php +19 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Scss.php +37 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Filter/Twig.php +47 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Indentation/Indentation.php +96 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Indentation/IndentationException.php +9 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Indentation/IndentationInterface.php +50 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Indentation/Undefined.php +41 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Comment.php +71 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Doctype.php +96 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/EscapableAbstract.php +19 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Filter.php +51 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Insert.php +42 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/InterpolatedString.php +73 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/NestAbstract.php +117 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/NestInterface.php +10 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/NodeAbstract.php +77 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefClass.php +42 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefId.php +42 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Root.php +35 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Run.php +71 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Statement.php +45 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Tag.php +90 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/TagAttribute.php +62 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/TagAttributeInterpolation.php +24 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/TagAttributeList.php +24 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Node/Text.php +37 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/Autoclose.php +25 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/Escaping.php +105 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/MergeAttrs.php +110 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/Midblock.php +37 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/NodeVisitorAbstract.php +226 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/NodeVisitorInterface.php +97 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/PhpRenderer.php +288 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/Printer.php +265 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/RendererAbstract.php +581 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/NodeVisitor/TwigRenderer.php +252 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Parser.php +862 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Parser/Buffer.php +147 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Runtime.php +218 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Runtime/AttributeInterpolation.php +16 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Runtime/AttributeList.php +16 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Support/Php/Executor.php +157 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Support/Twig/Extension.php +47 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Support/Twig/Lexer.php +48 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Support/Twig/Loader.php +81 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Target/Php.php +23 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Target/TargetAbstract.php +87 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Target/TargetInterface.php +12 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/Target/Twig.php +23 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/TreeBuilder.php +100 -0
- data/vendor/mthaml/mthaml/lib/MtHaml/TreeBuilderException.php +9 -0
- data/vendor/mthaml/mthaml/phpunit.xml +25 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/EnvironmentTest.php +59 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/HamlSpecTest.php +83 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/IndentationTest.php +140 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/Node/DoctypeTest.php +51 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/Node/NodeTest.php +110 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/NodeVisitor/PhpRendererTest.php +113 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/NodeVisitor/TwigRendererTest.php +68 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/NodeVisitorsTest.php +44 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/Parser/BufferTest.php +77 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/ParserTest.php +47 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/RuntimeTest.php +356 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/Support/Php/ExecutorTest.php +83 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/Support/Twig/LoaderTest.php +65 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/TestCase.php +49 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/TestCaseTest.php +50 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/Support/Php/Executor.001.haml +1 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_php.test +20 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/attr_list_twig.test +12 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/boolean_attr_php.test +16 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/boolean_attr_twig.test +16 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/bug28_php.test +15 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/bug28_twig.test +15 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/bug42.test +13 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/bug8_twig.test +10 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/coffeescript_filter.test +31 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/comments.test +26 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/cond_cmt.test +25 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/doctype.test +18 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/doctype_html4.test +20 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/doctype_invalid.test +12 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/doctype_invalid_xhtml.test +12 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/doctype_php.test +18 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/doctype_xhtml.test +30 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/filters.test +51 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/insert_non_echo_php.test +11 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/insert_non_echo_twig.test +11 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/interpolation_in_html_attrs_php.test +31 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/interpolation_in_html_attrs_twig.test +31 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/less_filter_leafo.test +33 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/less_filter_oyejorge.test +49 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/markdown_filter_cebemarkdown.test +35 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/markdown_filter_ciconia.test +36 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/markdown_filter_michelf.test +34 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/markdown_filter_parsedown.test +31 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/markdown_optimization_filter_michelf.test +23 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/mergeattrs.test +18 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/nuke_inner_whitespace.test +77 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/nuke_outer_whitespace.test +122 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/object_ref_php.test +14 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/object_ref_twig.test +14 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/php.test +109 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/php_autoescaping.test +22 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/php_autoescaping_once.test +25 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/php_blocks.test +29 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/php_filters.test +42 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/scss_filter.test +32 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/strip_inline_comments_php.test +22 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/test.test +24 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/trailing_semicolon_php.test +14 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/try_catch_php.test +17 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/twig.test +112 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/twig_blocks.test +29 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/twig_filters.test +37 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/twig_whitespace.test +32 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/environment/whitespace.test +63 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/autoclose.test +30 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/escaping.test +52 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/escaping_attr_once.test +52 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/escaping_html_false.test +52 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/mergeattrs.test +26 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/midblock.test +54 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/nodevisitors/midblock_002.test +32 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/attr_list.test +14 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/attrs.test +42 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/attrs_002.test +35 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/attrs_003.test +30 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/attrs_html_linebreak.test +17 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/blocks.test +27 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/blocks_002.test +15 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/boolean_attr.test +19 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/bug28.test +15 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/bug8.test +11 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/cond_cmt.test +23 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/doctype.test +11 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/double_equal.test +7 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/empty_line_after_multiline.test +10 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_001.test +8 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_002.test +8 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_003.test +8 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_004.test +6 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_005.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_006.test +7 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_007.test +7 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_008.test +7 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_009.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_010.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_013.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_016.test +7 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_017.test +8 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_018.test +6 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_019.test +6 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/errors_020.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/filters.test +20 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/filters_002.test +19 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/filters_003.test +13 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/filters_004.test +21 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/filters_005.test +22 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/filters_006.test +23 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/insertflags.test +17 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/interpolation.test +36 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/interpolation_in_html_attrs.test +17 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/multiline.test +18 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/multiline_code.test +59 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/multiple_attr_kinds.test +47 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/non_rendered_comment.test +31 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/ns.test +11 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/object_ref.test +22 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/object_ref_error1.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/object_ref_error2.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/quotes_in_haml.test +10 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/ruby19_attrs.test +11 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/ruby_attrs_comma.test +23 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/ruby_attrs_comma_errors_001.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/ruby_attrs_comma_errors_002.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/ruby_attrs_comma_errors_003.test +5 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/standard.test +114 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/parser/tagflags.test +39 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/php_filters.test +28 -0
- data/vendor/mthaml/mthaml/test/MtHaml/Tests/fixtures/runtime/twig_filters.test +31 -0
- data/vendor/mthaml/mthaml/test/bootstrap.php +3 -0
- metadata +398 -0
@@ -0,0 +1,383 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
/*
|
4
|
+
* This file is part of Composer.
|
5
|
+
*
|
6
|
+
* (c) Nils Adermann <naderman@naderman.de>
|
7
|
+
* Jordi Boggiano <j.boggiano@seld.be>
|
8
|
+
*
|
9
|
+
* For the full copyright and license information, please view the LICENSE
|
10
|
+
* file that was distributed with this source code.
|
11
|
+
*/
|
12
|
+
|
13
|
+
namespace Composer\Autoload;
|
14
|
+
|
15
|
+
/**
|
16
|
+
* ClassLoader implements a PSR-0 class loader
|
17
|
+
*
|
18
|
+
* See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
|
19
|
+
*
|
20
|
+
* $loader = new \Composer\Autoload\ClassLoader();
|
21
|
+
*
|
22
|
+
* // register classes with namespaces
|
23
|
+
* $loader->add('Symfony\Component', __DIR__.'/component');
|
24
|
+
* $loader->add('Symfony', __DIR__.'/framework');
|
25
|
+
*
|
26
|
+
* // activate the autoloader
|
27
|
+
* $loader->register();
|
28
|
+
*
|
29
|
+
* // to enable searching the include path (eg. for PEAR packages)
|
30
|
+
* $loader->setUseIncludePath(true);
|
31
|
+
*
|
32
|
+
* In this example, if you try to use a class in the Symfony\Component
|
33
|
+
* namespace or one of its children (Symfony\Component\Console for instance),
|
34
|
+
* the autoloader will first look for the class under the component/
|
35
|
+
* directory, and it will then fallback to the framework/ directory if not
|
36
|
+
* found before giving up.
|
37
|
+
*
|
38
|
+
* This class is loosely based on the Symfony UniversalClassLoader.
|
39
|
+
*
|
40
|
+
* @author Fabien Potencier <fabien@symfony.com>
|
41
|
+
* @author Jordi Boggiano <j.boggiano@seld.be>
|
42
|
+
*/
|
43
|
+
class ClassLoader
|
44
|
+
{
|
45
|
+
// PSR-4
|
46
|
+
private $prefixLengthsPsr4 = array();
|
47
|
+
private $prefixDirsPsr4 = array();
|
48
|
+
private $fallbackDirsPsr4 = array();
|
49
|
+
|
50
|
+
// PSR-0
|
51
|
+
private $prefixesPsr0 = array();
|
52
|
+
private $fallbackDirsPsr0 = array();
|
53
|
+
|
54
|
+
private $useIncludePath = false;
|
55
|
+
private $classMap = array();
|
56
|
+
|
57
|
+
public function getPrefixes()
|
58
|
+
{
|
59
|
+
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
60
|
+
}
|
61
|
+
|
62
|
+
public function getPrefixesPsr4()
|
63
|
+
{
|
64
|
+
return $this->prefixDirsPsr4;
|
65
|
+
}
|
66
|
+
|
67
|
+
public function getFallbackDirs()
|
68
|
+
{
|
69
|
+
return $this->fallbackDirsPsr0;
|
70
|
+
}
|
71
|
+
|
72
|
+
public function getFallbackDirsPsr4()
|
73
|
+
{
|
74
|
+
return $this->fallbackDirsPsr4;
|
75
|
+
}
|
76
|
+
|
77
|
+
public function getClassMap()
|
78
|
+
{
|
79
|
+
return $this->classMap;
|
80
|
+
}
|
81
|
+
|
82
|
+
/**
|
83
|
+
* @param array $classMap Class to filename map
|
84
|
+
*/
|
85
|
+
public function addClassMap(array $classMap)
|
86
|
+
{
|
87
|
+
if ($this->classMap) {
|
88
|
+
$this->classMap = array_merge($this->classMap, $classMap);
|
89
|
+
} else {
|
90
|
+
$this->classMap = $classMap;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
/**
|
95
|
+
* Registers a set of PSR-0 directories for a given prefix, either
|
96
|
+
* appending or prepending to the ones previously set for this prefix.
|
97
|
+
*
|
98
|
+
* @param string $prefix The prefix
|
99
|
+
* @param array|string $paths The PSR-0 root directories
|
100
|
+
* @param bool $prepend Whether to prepend the directories
|
101
|
+
*/
|
102
|
+
public function add($prefix, $paths, $prepend = false)
|
103
|
+
{
|
104
|
+
if (!$prefix) {
|
105
|
+
if ($prepend) {
|
106
|
+
$this->fallbackDirsPsr0 = array_merge(
|
107
|
+
(array) $paths,
|
108
|
+
$this->fallbackDirsPsr0
|
109
|
+
);
|
110
|
+
} else {
|
111
|
+
$this->fallbackDirsPsr0 = array_merge(
|
112
|
+
$this->fallbackDirsPsr0,
|
113
|
+
(array) $paths
|
114
|
+
);
|
115
|
+
}
|
116
|
+
|
117
|
+
return;
|
118
|
+
}
|
119
|
+
|
120
|
+
$first = $prefix[0];
|
121
|
+
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
122
|
+
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
123
|
+
|
124
|
+
return;
|
125
|
+
}
|
126
|
+
if ($prepend) {
|
127
|
+
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
128
|
+
(array) $paths,
|
129
|
+
$this->prefixesPsr0[$first][$prefix]
|
130
|
+
);
|
131
|
+
} else {
|
132
|
+
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
133
|
+
$this->prefixesPsr0[$first][$prefix],
|
134
|
+
(array) $paths
|
135
|
+
);
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
139
|
+
/**
|
140
|
+
* Registers a set of PSR-4 directories for a given namespace, either
|
141
|
+
* appending or prepending to the ones previously set for this namespace.
|
142
|
+
*
|
143
|
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
144
|
+
* @param array|string $paths The PSR-0 base directories
|
145
|
+
* @param bool $prepend Whether to prepend the directories
|
146
|
+
*
|
147
|
+
* @throws \InvalidArgumentException
|
148
|
+
*/
|
149
|
+
public function addPsr4($prefix, $paths, $prepend = false)
|
150
|
+
{
|
151
|
+
if (!$prefix) {
|
152
|
+
// Register directories for the root namespace.
|
153
|
+
if ($prepend) {
|
154
|
+
$this->fallbackDirsPsr4 = array_merge(
|
155
|
+
(array) $paths,
|
156
|
+
$this->fallbackDirsPsr4
|
157
|
+
);
|
158
|
+
} else {
|
159
|
+
$this->fallbackDirsPsr4 = array_merge(
|
160
|
+
$this->fallbackDirsPsr4,
|
161
|
+
(array) $paths
|
162
|
+
);
|
163
|
+
}
|
164
|
+
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
165
|
+
// Register directories for a new namespace.
|
166
|
+
$length = strlen($prefix);
|
167
|
+
if ('\\' !== $prefix[$length - 1]) {
|
168
|
+
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
169
|
+
}
|
170
|
+
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
171
|
+
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
172
|
+
} elseif ($prepend) {
|
173
|
+
// Prepend directories for an already registered namespace.
|
174
|
+
$this->prefixDirsPsr4[$prefix] = array_merge(
|
175
|
+
(array) $paths,
|
176
|
+
$this->prefixDirsPsr4[$prefix]
|
177
|
+
);
|
178
|
+
} else {
|
179
|
+
// Append directories for an already registered namespace.
|
180
|
+
$this->prefixDirsPsr4[$prefix] = array_merge(
|
181
|
+
$this->prefixDirsPsr4[$prefix],
|
182
|
+
(array) $paths
|
183
|
+
);
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
/**
|
188
|
+
* Registers a set of PSR-0 directories for a given prefix,
|
189
|
+
* replacing any others previously set for this prefix.
|
190
|
+
*
|
191
|
+
* @param string $prefix The prefix
|
192
|
+
* @param array|string $paths The PSR-0 base directories
|
193
|
+
*/
|
194
|
+
public function set($prefix, $paths)
|
195
|
+
{
|
196
|
+
if (!$prefix) {
|
197
|
+
$this->fallbackDirsPsr0 = (array) $paths;
|
198
|
+
} else {
|
199
|
+
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
200
|
+
}
|
201
|
+
}
|
202
|
+
|
203
|
+
/**
|
204
|
+
* Registers a set of PSR-4 directories for a given namespace,
|
205
|
+
* replacing any others previously set for this namespace.
|
206
|
+
*
|
207
|
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
208
|
+
* @param array|string $paths The PSR-4 base directories
|
209
|
+
*
|
210
|
+
* @throws \InvalidArgumentException
|
211
|
+
*/
|
212
|
+
public function setPsr4($prefix, $paths)
|
213
|
+
{
|
214
|
+
if (!$prefix) {
|
215
|
+
$this->fallbackDirsPsr4 = (array) $paths;
|
216
|
+
} else {
|
217
|
+
$length = strlen($prefix);
|
218
|
+
if ('\\' !== $prefix[$length - 1]) {
|
219
|
+
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
220
|
+
}
|
221
|
+
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
222
|
+
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
223
|
+
}
|
224
|
+
}
|
225
|
+
|
226
|
+
/**
|
227
|
+
* Turns on searching the include path for class files.
|
228
|
+
*
|
229
|
+
* @param bool $useIncludePath
|
230
|
+
*/
|
231
|
+
public function setUseIncludePath($useIncludePath)
|
232
|
+
{
|
233
|
+
$this->useIncludePath = $useIncludePath;
|
234
|
+
}
|
235
|
+
|
236
|
+
/**
|
237
|
+
* Can be used to check if the autoloader uses the include path to check
|
238
|
+
* for classes.
|
239
|
+
*
|
240
|
+
* @return bool
|
241
|
+
*/
|
242
|
+
public function getUseIncludePath()
|
243
|
+
{
|
244
|
+
return $this->useIncludePath;
|
245
|
+
}
|
246
|
+
|
247
|
+
/**
|
248
|
+
* Registers this instance as an autoloader.
|
249
|
+
*
|
250
|
+
* @param bool $prepend Whether to prepend the autoloader or not
|
251
|
+
*/
|
252
|
+
public function register($prepend = false)
|
253
|
+
{
|
254
|
+
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
255
|
+
}
|
256
|
+
|
257
|
+
/**
|
258
|
+
* Unregisters this instance as an autoloader.
|
259
|
+
*/
|
260
|
+
public function unregister()
|
261
|
+
{
|
262
|
+
spl_autoload_unregister(array($this, 'loadClass'));
|
263
|
+
}
|
264
|
+
|
265
|
+
/**
|
266
|
+
* Loads the given class or interface.
|
267
|
+
*
|
268
|
+
* @param string $class The name of the class
|
269
|
+
* @return bool|null True if loaded, null otherwise
|
270
|
+
*/
|
271
|
+
public function loadClass($class)
|
272
|
+
{
|
273
|
+
if ($file = $this->findFile($class)) {
|
274
|
+
includeFile($file);
|
275
|
+
|
276
|
+
return true;
|
277
|
+
}
|
278
|
+
}
|
279
|
+
|
280
|
+
/**
|
281
|
+
* Finds the path to the file where the class is defined.
|
282
|
+
*
|
283
|
+
* @param string $class The name of the class
|
284
|
+
*
|
285
|
+
* @return string|false The path if found, false otherwise
|
286
|
+
*/
|
287
|
+
public function findFile($class)
|
288
|
+
{
|
289
|
+
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
|
290
|
+
if ('\\' == $class[0]) {
|
291
|
+
$class = substr($class, 1);
|
292
|
+
}
|
293
|
+
|
294
|
+
// class map lookup
|
295
|
+
if (isset($this->classMap[$class])) {
|
296
|
+
return $this->classMap[$class];
|
297
|
+
}
|
298
|
+
|
299
|
+
$file = $this->findFileWithExtension($class, '.php');
|
300
|
+
|
301
|
+
// Search for Hack files if we are running on HHVM
|
302
|
+
if ($file === null && defined('HHVM_VERSION')) {
|
303
|
+
$file = $this->findFileWithExtension($class, '.hh');
|
304
|
+
}
|
305
|
+
|
306
|
+
if ($file === null) {
|
307
|
+
// Remember that this class does not exist.
|
308
|
+
return $this->classMap[$class] = false;
|
309
|
+
}
|
310
|
+
|
311
|
+
return $file;
|
312
|
+
}
|
313
|
+
|
314
|
+
private function findFileWithExtension($class, $ext)
|
315
|
+
{
|
316
|
+
// PSR-4 lookup
|
317
|
+
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
318
|
+
|
319
|
+
$first = $class[0];
|
320
|
+
if (isset($this->prefixLengthsPsr4[$first])) {
|
321
|
+
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
|
322
|
+
if (0 === strpos($class, $prefix)) {
|
323
|
+
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
|
324
|
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
325
|
+
return $file;
|
326
|
+
}
|
327
|
+
}
|
328
|
+
}
|
329
|
+
}
|
330
|
+
}
|
331
|
+
|
332
|
+
// PSR-4 fallback dirs
|
333
|
+
foreach ($this->fallbackDirsPsr4 as $dir) {
|
334
|
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
335
|
+
return $file;
|
336
|
+
}
|
337
|
+
}
|
338
|
+
|
339
|
+
// PSR-0 lookup
|
340
|
+
if (false !== $pos = strrpos($class, '\\')) {
|
341
|
+
// namespaced class name
|
342
|
+
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
343
|
+
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
344
|
+
} else {
|
345
|
+
// PEAR-like class name
|
346
|
+
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
347
|
+
}
|
348
|
+
|
349
|
+
if (isset($this->prefixesPsr0[$first])) {
|
350
|
+
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
351
|
+
if (0 === strpos($class, $prefix)) {
|
352
|
+
foreach ($dirs as $dir) {
|
353
|
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
354
|
+
return $file;
|
355
|
+
}
|
356
|
+
}
|
357
|
+
}
|
358
|
+
}
|
359
|
+
}
|
360
|
+
|
361
|
+
// PSR-0 fallback dirs
|
362
|
+
foreach ($this->fallbackDirsPsr0 as $dir) {
|
363
|
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
364
|
+
return $file;
|
365
|
+
}
|
366
|
+
}
|
367
|
+
|
368
|
+
// PSR-0 include paths.
|
369
|
+
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
370
|
+
return $file;
|
371
|
+
}
|
372
|
+
}
|
373
|
+
}
|
374
|
+
|
375
|
+
/**
|
376
|
+
* Scope isolated include.
|
377
|
+
*
|
378
|
+
* Prevents access to $this/self from included files.
|
379
|
+
*/
|
380
|
+
function includeFile($file)
|
381
|
+
{
|
382
|
+
include $file;
|
383
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
// autoload_namespaces.php @generated by Composer
|
4
|
+
|
5
|
+
$vendorDir = dirname(dirname(__FILE__));
|
6
|
+
$baseDir = dirname($vendorDir);
|
7
|
+
|
8
|
+
return array(
|
9
|
+
'MtHaml\\' => array($vendorDir . '/mthaml/mthaml/lib'),
|
10
|
+
'Michelf' => array($vendorDir . '/michelf/php-markdown'),
|
11
|
+
'CoffeeScript' => array($vendorDir . '/coffeescript/coffeescript/src'),
|
12
|
+
);
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
// autoload_real.php @generated by Composer
|
4
|
+
|
5
|
+
class ComposerAutoloaderInit17e64cb9b57858533d303e3ace0ae982
|
6
|
+
{
|
7
|
+
private static $loader;
|
8
|
+
|
9
|
+
public static function loadClassLoader($class)
|
10
|
+
{
|
11
|
+
if ('Composer\Autoload\ClassLoader' === $class) {
|
12
|
+
require __DIR__ . '/ClassLoader.php';
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
public static function getLoader()
|
17
|
+
{
|
18
|
+
if (null !== self::$loader) {
|
19
|
+
return self::$loader;
|
20
|
+
}
|
21
|
+
|
22
|
+
spl_autoload_register(array('ComposerAutoloaderInit17e64cb9b57858533d303e3ace0ae982', 'loadClassLoader'), true, true);
|
23
|
+
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24
|
+
spl_autoload_unregister(array('ComposerAutoloaderInit17e64cb9b57858533d303e3ace0ae982', 'loadClassLoader'));
|
25
|
+
|
26
|
+
$map = require __DIR__ . '/autoload_namespaces.php';
|
27
|
+
foreach ($map as $namespace => $path) {
|
28
|
+
$loader->set($namespace, $path);
|
29
|
+
}
|
30
|
+
|
31
|
+
$map = require __DIR__ . '/autoload_psr4.php';
|
32
|
+
foreach ($map as $namespace => $path) {
|
33
|
+
$loader->setPsr4($namespace, $path);
|
34
|
+
}
|
35
|
+
|
36
|
+
$classMap = require __DIR__ . '/autoload_classmap.php';
|
37
|
+
if ($classMap) {
|
38
|
+
$loader->addClassMap($classMap);
|
39
|
+
}
|
40
|
+
|
41
|
+
$loader->register(true);
|
42
|
+
|
43
|
+
return $loader;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
function composerRequire17e64cb9b57858533d303e3ace0ae982($file)
|
48
|
+
{
|
49
|
+
require $file;
|
50
|
+
}
|