wp-studio 1.7.8-beta2 → 1.7.8-beta4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -1
- package/assets/demo.gif +0 -0
- package/dist/cli/{_events-BRGCap7g.mjs → _events-C2dFSpKE.mjs} +2 -2
- package/dist/cli/{certificate-manager-Dd4zv2_k.mjs → certificate-manager-BMngpL-s.mjs} +12 -4
- package/dist/cli/{index-9Oz-0bqF.mjs → index-CkFXAp-n.mjs} +5 -5
- package/dist/cli/{index-CT4S2538.mjs → index-odShRBgM.mjs} +171 -117
- package/dist/cli/{login-D4E3GoXe.mjs → login-BeT1uKwW.mjs} +2 -2
- package/dist/cli/{logout-DE-RoshK.mjs → logout-BFQJBJD0.mjs} +2 -2
- package/dist/cli/main.mjs +3 -2
- package/dist/cli/proxy-daemon.mjs +1 -1
- package/dist/cli/{resume-DLoXmzNG.mjs → resume-D_K0QEl5.mjs} +1 -1
- package/dist/cli/{set-B8YYUENH.mjs → set-C5l116L7.mjs} +2 -2
- package/dist/cli/{set-B0L-QiXT.mjs → set-DzcR6sFr.mjs} +2 -2
- package/dist/cli/{status-DEOAA0yx.mjs → status-CbXnAskz.mjs} +1 -1
- package/dist/cli/{wp-CobSX6C6.mjs → wp-CUKyZNTP.mjs} +1 -1
- package/dist/cli/wp-files/latest/available-site-translations.json +1 -1
- package/dist/cli/wp-files/latest/languages/admin-de_DE.l10n.php +2 -2
- package/dist/cli/wp-files/latest/languages/admin-network-de_DE.l10n.php +1 -1
- package/dist/cli/wp-files/latest/languages/admin-pl_PL.l10n.php +2 -2
- package/dist/cli/wp-files/latest/languages/de_DE-0cc31205f20441b3df1d1b46100f6b8d.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-0ce75ad2f775d1cac9696967d484808c.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-0eebe503220d4a00341eb011b92769b4.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-17179a5f2930647c89151e365f843b6e.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-1780a2033cf98d69ce13c2e5c8510004.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-1a0cd6a7128913b15c1a10dd68951869.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-1bba9045bb07c89671c88a3f328548e8.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-1c4303f02ff93b290e9faad991eeb06f.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-1d17475f620f63a92e2c5d2681c51ee8.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-2617ce121227a46077ede6c69aa9fcb5.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-270d72d1cff17227d37f3244759cbecb.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-28b3c3d595952907e08d98287077426c.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-2b390f85a3048c5b4255fb45960b6514.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-2c5d274ea625dd91556554ad82901529.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-320f4ad9792aaa6dedb1e71cbdf85d57.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-440127dd25bde48a531ded36f33e927b.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-49c6d4acf36cf3aca9f0b2a77617304f.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-4a38fe1c0c45989e44682ba6109d9f46.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-4bfa11da57ff2600004bb500368247f4.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-50278328b502f4eb3f2b8b7ab49324a1.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-5251f7623766a714c8207c7edb938628.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-529362903a5a05b34b06b5e793fb4cf8.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-569e85ef168299eb8c8f24d8ef8c8a78.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-6025add6bde16aaeb12787d250f9b414.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-60d06fac6f98e8e8f0ec5a945738b660.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-68f2cec7514bf8563c723a4d675fcfe6.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7233008897033de5ee0d14f86a42a65a.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7289286ed59e90a8f36ae797df62220b.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7436b7ee9e4f11ac0d618d8cc886eb66.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-77fdfadaf2e1ca3a027d1956b910bc50.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7b74c8457eaa7fcc50db41b431f8a003.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7c90cd4398ee2d9d3628c387a87a70e5.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7d5ca435e60d92f024d46c9257aaa0f7.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-7f13c36c641b114bf18cd0bcc9ecc7e0.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-803bf1ce2131e13efc590c1bc47851fc.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-81c889563f09dd13de1701135dc62941.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-81d6f084cb273e02e15b01bd9ece87f7.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-8240df461220d1d3a028a9a4c5652a5b.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-8860e58c20c6a2ab5876a0f07be43bd9.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-93882e8f9976382d7f724ac595ed7151.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-947c76bb5095da30e16668eec15406b2.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-9b256ea9cd54df92095e04c76758ceb0.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-9c3519f4870fac83dc0dbf18cb6bd4c4.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-9d47a87c240c1d10701cd6a02b28aa1b.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-a25d1cc7bf7ca0b4e114f6bea64943f4.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-a2796e57f680e25d84c4b352ee6d7280.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-a9dc201dcd011fe71849743133052619.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-aabfce98c410957228848dc581e3c420.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-ac23eee47530ac63a1178c827db28087.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-bf0f094965d3d4a95b47babcb35fc136.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-bf23b24175490c2e46aaf92ff6a0c70f.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-c31d5f185753910c14afebc6deb2ce24.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-ca28138671823450e87dfd354f7afc6b.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-daeb084aab42199d26393a56c3465bc0.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-e2791ba830489d23043be8650a22a22b.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-e2e4c4b80f3adf2c70b431bfdb1b4872.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-e53526243551a102928735ec9eed4edf.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-f575f481034e90e21d832e415fd95fcf.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-f70806bf0c7d62f2908bd5a1c3fe4efc.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE-f8f49d9fc4a9cf7d78ec99285417bd9c.json +1 -1
- package/dist/cli/wp-files/latest/languages/de_DE.l10n.php +27 -27
- package/dist/cli/wp-files/latest/languages/pl_PL-0cc31205f20441b3df1d1b46100f6b8d.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-0eebe503220d4a00341eb011b92769b4.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-1c4303f02ff93b290e9faad991eeb06f.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-1d17475f620f63a92e2c5d2681c51ee8.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-2b390f85a3048c5b4255fb45960b6514.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-4a38fe1c0c45989e44682ba6109d9f46.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-4bfa11da57ff2600004bb500368247f4.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-50278328b502f4eb3f2b8b7ab49324a1.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-5251f7623766a714c8207c7edb938628.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-529362903a5a05b34b06b5e793fb4cf8.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-569e85ef168299eb8c8f24d8ef8c8a78.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-6025add6bde16aaeb12787d250f9b414.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-7436b7ee9e4f11ac0d618d8cc886eb66.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-77fdfadaf2e1ca3a027d1956b910bc50.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-7b74c8457eaa7fcc50db41b431f8a003.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-7d5ca435e60d92f024d46c9257aaa0f7.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-81d6f084cb273e02e15b01bd9ece87f7.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-8240df461220d1d3a028a9a4c5652a5b.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-9b256ea9cd54df92095e04c76758ceb0.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-9c3519f4870fac83dc0dbf18cb6bd4c4.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-9d47a87c240c1d10701cd6a02b28aa1b.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-a9dc201dcd011fe71849743133052619.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-aabfce98c410957228848dc581e3c420.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-ca28138671823450e87dfd354f7afc6b.json +1 -1
- package/dist/cli/wp-files/latest/languages/pl_PL-e2e4c4b80f3adf2c70b431bfdb1b4872.json +1 -1
- package/dist/cli/wp-files/sqlite-command/composer.json +4 -3
- package/dist/cli/wp-files/sqlite-command/composer.lock +132 -80
- package/dist/cli/wp-files/sqlite-command/vendor/autoload.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_classmap.php +58 -70
- package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_namespaces.php +1 -0
- package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_psr4.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_real.php +5 -5
- package/dist/cli/wp-files/sqlite-command/vendor/composer/autoload_static.php +78 -80
- package/dist/cli/wp-files/sqlite-command/vendor/composer/installed.json +104 -49
- package/dist/cli/wp-files/sqlite-command/vendor/composer/installed.php +29 -16
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/CHANGELOG.md +103 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Comparator/Comparator.php +62 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Comparator/DateComparator.php +50 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Comparator/NumberComparator.php +78 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Exception/AccessDeniedException.php +19 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Exception/DirectoryNotFoundException.php +19 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Finder.php +851 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Gitignore.php +91 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Glob.php +116 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/CustomFilterIterator.php +61 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php +58 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php +48 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php +110 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php +51 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php +58 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/FilenameFilterIterator.php +45 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/LazyIterator.php +32 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php +107 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/PathFilterIterator.php +56 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +134 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php +57 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/SortableIterator.php +115 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/Iterator/VcsIgnoredFilterIterator.php +173 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/LICENSE +19 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/README.md +14 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/SplFileInfo.php +80 -0
- package/dist/cli/wp-files/sqlite-command/vendor/symfony/finder/composer.json +31 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/mustache/.gitattributes +8 -0
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache → wp-cli}/mustache/LICENSE +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/mustache/README.md +76 -0
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache → wp-cli}/mustache/composer.json +6 -16
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/mustache/src/Mustache/Autoloader.php +88 -0
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache/AbstractCache.php +7 -15
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache/FilesystemCache.php +15 -20
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache/NoopCache.php +4 -8
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Cache.php +7 -10
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Compiler.php +87 -144
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Context.php +19 -23
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Engine.php +134 -251
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/InvalidArgumentException.php +2 -6
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/LogicException.php +2 -6
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/RuntimeException.php +2 -6
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/SyntaxException.php +8 -7
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/UnknownFilterException.php +7 -7
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/UnknownHelperException.php +7 -7
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception/UnknownTemplateException.php +7 -7
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Exception.php +5 -4
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/HelperCollection.php +17 -22
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/LambdaHelper.php +8 -28
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/ArrayLoader.php +9 -12
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/CascadingLoader.php +15 -18
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/FilesystemLoader.php +18 -24
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/InlineLoader.php +13 -19
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/MutableLoader.php +7 -4
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/ProductionFilesystemLoader.php +16 -23
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader/StringLoader.php +4 -8
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Loader.php +7 -8
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Logger/AbstractLogger.php +26 -22
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Logger/StreamLogger.php +20 -25
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Logger.php +37 -13
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Parser.php +93 -100
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Source/FilesystemSource.php +7 -11
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Source.php +5 -4
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Template.php +32 -39
- package/dist/cli/wp-files/sqlite-command/vendor/{mustache/mustache/src → wp-cli/mustache/src/Mustache}/Tokenizer.php +29 -33
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.actrc +3 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.gitattributes +6 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.mailmap +234 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/README.md +4 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/VERSION +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/CHANGELOG.md +0 -65
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/README.md +1 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/certificates/cacert.pem +372 -315
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/certificates/cacert.pem.sha256 +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/composer.json +5 -7
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Iri.php +18 -20
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Requests.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Response/Headers.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Transport/Curl.php +1 -5
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Transport/Fsockopen.php +0 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Utility/CaseInsensitiveDictionary.php +0 -12
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/src/Utility/FilteredIterator.php +2 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/composer.json +13 -30
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/dependencies.yml +6 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/manifest.json +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Autoloader.php +2 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/AutoloaderStep.php +1 -10
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/CheckRoot.php +2 -20
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/DefineProtectedCommands.php +3 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/IncludeFrameworkAutoloader.php +4 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/IncludeRequestsAutoloader.php +3 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/InitializeContexts.php +0 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/InitializeLogger.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php +3 -6
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/{RegisterShutdownHandler.php → LoadDispatcher.php} +4 -6
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LoadRequiredCommand.php +5 -9
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LoadUtilityFunctions.php +0 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Completions.php +6 -149
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Configurator.php +49 -202
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Admin.php +21 -113
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Auto.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Cli.php +1 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Frontend.php +1 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php +26 -63
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CompositeCommand.php +9 -19
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php +19 -284
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/DocParser.php +5 -17
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Exception/NonExistentKeyException.php +3 -6
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Extractor.php +54 -30
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Base.php +3 -7
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Comment.php +2 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Post.php +3 -8
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Signup.php +1 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/Site.php +4 -12
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Fetchers/User.php +1 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/FileCache.php +33 -135
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Formatter.php +57 -221
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Inflector.php +4 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/CSV.php +1 -6
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/Query.php +1 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/Table.php +1 -7
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Iterators/Transform.php +0 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Base.php +0 -15
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Quiet.php +3 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Loggers/Regular.php +3 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/NoOp.php +0 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Process.php +7 -40
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/RequestsLibrary.php +1 -4
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php +234 -795
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/SynopsisParser.php +26 -116
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/SynopsisValidator.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Traverser/RecursiveDataStructureTraverser.php +26 -69
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/UpgraderSkin.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/WpHttpCacheManager.php +5 -67
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/WpOrgApi.php +3 -3
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/boot-fs.php +2 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/bootstrap.php +2 -5
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/class-wp-cli.php +62 -311
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/CLI_Alias_Command.php +60 -292
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/CLI_Cache_Command.php +1 -1
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/CLI_Command.php +31 -191
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/commands/src/Help_Command.php +35 -177
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/config-spec.php +4 -28
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/utils-wp.php +47 -81
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/utils.php +200 -512
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/wp-cli.php +2 -2
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/wp-settings-cli.php +465 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/templates/man-params.mustache +4 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/templates/man.mustache +0 -8
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ArgValidationTest.php +74 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/CommandFactoryTest.php +420 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ConfiguratorTest.php +87 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/DocParserTest.php +213 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ExtractorTest.php +293 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/FileCacheTest.php +207 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/HelpTest.php +119 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/InflectorTest.php +37 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/LoggingTest.php +124 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/ProcessTest.php +30 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/SynopsisParserTest.php +194 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/UtilsTest.php +1092 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WPCLITest.php +16 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WP_CLI/Iterators/CSVTest.php +109 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WP_CLI/Traversers/RecursiveDataStructureTraverserTest.php +151 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WP_CLI/WpOrgApiTest.php +166 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/WpVersionCompareTest.php +78 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/bootstrap.php +17 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-class-win.php +70 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-class.php +70 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-function-win.php +19 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/commandfactory-doc_comment-function.php +19 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/bar.ab2 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/baz.ab1 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/baz.ac1 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/baz.efg2 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.ab1 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.ab2 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.efg1 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/data/expand_globs/foo.efg2 +0 -0
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/tests/mock-requests-transport.php +34 -0
- package/dist/cli/wp-files/sqlite-command/version +1 -1
- package/package.json +4 -3
- package/patches/archiver+7.0.1.patch +14 -0
- package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/.php-cs-fixer.php +0 -20
- package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/README.md +0 -94
- package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/src/RenderedString.php +0 -51
- package/dist/cli/wp-files/sqlite-command/vendor/mustache/mustache/src/compat.php +0 -282
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/.typos.toml +0 -14
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/AGENTS.md +0 -121
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/scripts/proxy/proxy.py +0 -5
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/scripts/proxy/start.sh +0 -19
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/bundle/rmccue/requests/scripts/proxy/stop.sh +0 -10
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/Path.php +0 -260
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/php/WP_CLI/ShutdownHandler.php +0 -329
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/schemas/wp-cli-config.json +0 -218
- package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/schemas/wp-cli.example.yml +0 -55
- /package/dist/cli/wp-files/sqlite-command/vendor/wp-cli/wp-cli/{codecov.yml → tests/data/expand_globs/bar.ab1} +0 -0
|
@@ -3,33 +3,27 @@
|
|
|
3
3
|
/*
|
|
4
4
|
* This file is part of Mustache.php.
|
|
5
5
|
*
|
|
6
|
-
* (c) 2010-
|
|
6
|
+
* (c) 2010-2017 Justin Hileman
|
|
7
7
|
*
|
|
8
8
|
* For the full copyright and license information, please view the LICENSE
|
|
9
9
|
* file that was distributed with this source code.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
namespace Mustache;
|
|
13
|
-
|
|
14
|
-
use Mustache\Exception\SyntaxException;
|
|
15
|
-
|
|
16
12
|
/**
|
|
17
13
|
* Mustache Parser class.
|
|
18
14
|
*
|
|
19
15
|
* This class is responsible for turning a set of Mustache tokens into a parse tree.
|
|
20
16
|
*/
|
|
21
|
-
class
|
|
17
|
+
class Mustache_Parser
|
|
22
18
|
{
|
|
23
19
|
private $lineNum;
|
|
24
20
|
private $lineTokens;
|
|
25
21
|
private $pragmas;
|
|
26
|
-
private $defaultPragmas =
|
|
27
|
-
|
|
28
|
-
// Optional Mustache specs
|
|
29
|
-
private $dynamicNames = true;
|
|
30
|
-
private $inheritance = true;
|
|
22
|
+
private $defaultPragmas = array();
|
|
31
23
|
|
|
32
24
|
private $pragmaFilters;
|
|
25
|
+
private $pragmaBlocks;
|
|
26
|
+
private $pragmaDynamicNames;
|
|
33
27
|
|
|
34
28
|
/**
|
|
35
29
|
* Process an array of Mustache tokens and convert them into a parse tree.
|
|
@@ -38,46 +32,30 @@ class Parser
|
|
|
38
32
|
*
|
|
39
33
|
* @return array Mustache token parse tree
|
|
40
34
|
*/
|
|
41
|
-
public function parse(array $tokens =
|
|
35
|
+
public function parse(array $tokens = array())
|
|
42
36
|
{
|
|
43
37
|
$this->lineNum = -1;
|
|
44
38
|
$this->lineTokens = 0;
|
|
45
39
|
$this->pragmas = $this->defaultPragmas;
|
|
46
40
|
|
|
47
|
-
$this->pragmaFilters
|
|
41
|
+
$this->pragmaFilters = isset($this->pragmas[Mustache_Engine::PRAGMA_FILTERS]);
|
|
42
|
+
$this->pragmaBlocks = isset($this->pragmas[Mustache_Engine::PRAGMA_BLOCKS]);
|
|
43
|
+
$this->pragmaDynamicNames = isset($this->pragmas[Mustache_Engine::PRAGMA_DYNAMIC_NAMES]);
|
|
48
44
|
|
|
49
45
|
return $this->buildTree($tokens);
|
|
50
46
|
}
|
|
51
47
|
|
|
52
|
-
/**
|
|
53
|
-
* Disable optional Mustache specs.
|
|
54
|
-
*
|
|
55
|
-
* @internal Users should set options in Mustache\Engine, not here :)
|
|
56
|
-
*
|
|
57
|
-
* @param bool[] $options
|
|
58
|
-
*/
|
|
59
|
-
public function setOptions(array $options)
|
|
60
|
-
{
|
|
61
|
-
if (isset($options['dynamic_names'])) {
|
|
62
|
-
$this->dynamicNames = $options['dynamic_names'] !== false;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (isset($options['inheritance'])) {
|
|
66
|
-
$this->inheritance = $options['inheritance'] !== false;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
48
|
/**
|
|
71
49
|
* Enable pragmas across all templates, regardless of the presence of pragma
|
|
72
50
|
* tags in the individual templates.
|
|
73
51
|
*
|
|
74
|
-
* @internal Users should set global pragmas in
|
|
52
|
+
* @internal Users should set global pragmas in Mustache_Engine, not here :)
|
|
75
53
|
*
|
|
76
54
|
* @param string[] $pragmas
|
|
77
55
|
*/
|
|
78
56
|
public function setPragmas(array $pragmas)
|
|
79
57
|
{
|
|
80
|
-
$this->pragmas =
|
|
58
|
+
$this->pragmas = array();
|
|
81
59
|
foreach ($pragmas as $pragma) {
|
|
82
60
|
$this->enablePragma($pragma);
|
|
83
61
|
}
|
|
@@ -87,7 +65,7 @@ class Parser
|
|
|
87
65
|
/**
|
|
88
66
|
* Helper method for recursively building a parse tree.
|
|
89
67
|
*
|
|
90
|
-
* @throws
|
|
68
|
+
* @throws Mustache_Exception_SyntaxException when nesting errors or mismatched section tags are encountered
|
|
91
69
|
*
|
|
92
70
|
* @param array &$tokens Set of Mustache tokens
|
|
93
71
|
* @param array $parent Parent token (default: null)
|
|
@@ -96,117 +74,118 @@ class Parser
|
|
|
96
74
|
*/
|
|
97
75
|
private function buildTree(array &$tokens, $parent = null)
|
|
98
76
|
{
|
|
99
|
-
$nodes =
|
|
77
|
+
$nodes = array();
|
|
100
78
|
|
|
101
79
|
while (!empty($tokens)) {
|
|
102
80
|
$token = array_shift($tokens);
|
|
103
81
|
|
|
104
|
-
if ($token[
|
|
82
|
+
if ($token[Mustache_Tokenizer::LINE] === $this->lineNum) {
|
|
105
83
|
$this->lineTokens++;
|
|
106
84
|
} else {
|
|
107
|
-
$this->lineNum = $token[
|
|
85
|
+
$this->lineNum = $token[Mustache_Tokenizer::LINE];
|
|
108
86
|
$this->lineTokens = 0;
|
|
109
87
|
}
|
|
110
88
|
|
|
111
|
-
if ($token[
|
|
112
|
-
if (isset($token[
|
|
89
|
+
if ($token[Mustache_Tokenizer::TYPE] !== Mustache_Tokenizer::T_COMMENT) {
|
|
90
|
+
if ($this->pragmaDynamicNames && isset($token[Mustache_Tokenizer::NAME])) {
|
|
113
91
|
list($name, $isDynamic) = $this->getDynamicName($token);
|
|
114
92
|
if ($isDynamic) {
|
|
115
|
-
$token[
|
|
116
|
-
$token[
|
|
93
|
+
$token[Mustache_Tokenizer::NAME] = $name;
|
|
94
|
+
$token[Mustache_Tokenizer::DYNAMIC] = true;
|
|
117
95
|
}
|
|
118
96
|
}
|
|
119
97
|
|
|
120
|
-
if ($this->pragmaFilters && isset($token[
|
|
121
|
-
list($name, $filters) = $this->getNameAndFilters($token[
|
|
98
|
+
if ($this->pragmaFilters && isset($token[Mustache_Tokenizer::NAME])) {
|
|
99
|
+
list($name, $filters) = $this->getNameAndFilters($token[Mustache_Tokenizer::NAME]);
|
|
122
100
|
if (!empty($filters)) {
|
|
123
|
-
$token[
|
|
124
|
-
$token[
|
|
101
|
+
$token[Mustache_Tokenizer::NAME] = $name;
|
|
102
|
+
$token[Mustache_Tokenizer::FILTERS] = $filters;
|
|
125
103
|
}
|
|
126
104
|
}
|
|
127
105
|
}
|
|
128
106
|
|
|
129
|
-
switch ($token[
|
|
130
|
-
case
|
|
107
|
+
switch ($token[Mustache_Tokenizer::TYPE]) {
|
|
108
|
+
case Mustache_Tokenizer::T_DELIM_CHANGE:
|
|
131
109
|
$this->checkIfTokenIsAllowedInParent($parent, $token);
|
|
132
110
|
$this->clearStandaloneLines($nodes, $tokens);
|
|
133
111
|
break;
|
|
134
112
|
|
|
135
|
-
case
|
|
136
|
-
case
|
|
113
|
+
case Mustache_Tokenizer::T_SECTION:
|
|
114
|
+
case Mustache_Tokenizer::T_INVERTED:
|
|
137
115
|
$this->checkIfTokenIsAllowedInParent($parent, $token);
|
|
138
116
|
$this->clearStandaloneLines($nodes, $tokens);
|
|
139
117
|
$nodes[] = $this->buildTree($tokens, $token);
|
|
140
118
|
break;
|
|
141
119
|
|
|
142
|
-
case
|
|
120
|
+
case Mustache_Tokenizer::T_END_SECTION:
|
|
143
121
|
if (!isset($parent)) {
|
|
144
122
|
$msg = sprintf(
|
|
145
123
|
'Unexpected closing tag: /%s on line %d',
|
|
146
|
-
$token[
|
|
147
|
-
$token[
|
|
124
|
+
$token[Mustache_Tokenizer::NAME],
|
|
125
|
+
$token[Mustache_Tokenizer::LINE]
|
|
148
126
|
);
|
|
149
|
-
throw new
|
|
127
|
+
throw new Mustache_Exception_SyntaxException($msg, $token);
|
|
150
128
|
}
|
|
151
129
|
|
|
152
|
-
$sameName = $token[
|
|
153
|
-
$tokenDynamic = isset($token[
|
|
154
|
-
$parentDynamic = isset($parent[
|
|
130
|
+
$sameName = $token[Mustache_Tokenizer::NAME] !== $parent[Mustache_Tokenizer::NAME];
|
|
131
|
+
$tokenDynamic = isset($token[Mustache_Tokenizer::DYNAMIC]) && $token[Mustache_Tokenizer::DYNAMIC];
|
|
132
|
+
$parentDynamic = isset($parent[Mustache_Tokenizer::DYNAMIC]) && $parent[Mustache_Tokenizer::DYNAMIC];
|
|
155
133
|
|
|
156
134
|
if ($sameName || ($tokenDynamic !== $parentDynamic)) {
|
|
157
135
|
$msg = sprintf(
|
|
158
136
|
'Nesting error: %s%s (on line %d) vs. %s%s (on line %d)',
|
|
159
137
|
$parentDynamic ? '*' : '',
|
|
160
|
-
$parent[
|
|
161
|
-
$parent[
|
|
138
|
+
$parent[Mustache_Tokenizer::NAME],
|
|
139
|
+
$parent[Mustache_Tokenizer::LINE],
|
|
162
140
|
$tokenDynamic ? '*' : '',
|
|
163
|
-
$token[
|
|
164
|
-
$token[
|
|
141
|
+
$token[Mustache_Tokenizer::NAME],
|
|
142
|
+
$token[Mustache_Tokenizer::LINE]
|
|
165
143
|
);
|
|
166
|
-
throw new
|
|
144
|
+
throw new Mustache_Exception_SyntaxException($msg, $token);
|
|
167
145
|
}
|
|
168
146
|
|
|
169
147
|
$this->clearStandaloneLines($nodes, $tokens);
|
|
170
|
-
$parent[
|
|
171
|
-
$parent[
|
|
148
|
+
$parent[Mustache_Tokenizer::END] = $token[Mustache_Tokenizer::INDEX];
|
|
149
|
+
$parent[Mustache_Tokenizer::NODES] = $nodes;
|
|
172
150
|
|
|
173
151
|
return $parent;
|
|
174
152
|
|
|
175
|
-
case
|
|
153
|
+
case Mustache_Tokenizer::T_PARTIAL:
|
|
176
154
|
$this->checkIfTokenIsAllowedInParent($parent, $token);
|
|
177
155
|
//store the whitespace prefix for laters!
|
|
178
156
|
if ($indent = $this->clearStandaloneLines($nodes, $tokens)) {
|
|
179
|
-
$token[
|
|
157
|
+
$token[Mustache_Tokenizer::INDENT] = $indent[Mustache_Tokenizer::VALUE];
|
|
180
158
|
}
|
|
181
159
|
$nodes[] = $token;
|
|
182
160
|
break;
|
|
183
161
|
|
|
184
|
-
case
|
|
162
|
+
case Mustache_Tokenizer::T_PARENT:
|
|
185
163
|
$this->checkIfTokenIsAllowedInParent($parent, $token);
|
|
186
164
|
$nodes[] = $this->buildTree($tokens, $token);
|
|
187
165
|
break;
|
|
188
166
|
|
|
189
|
-
case
|
|
190
|
-
if ($this->
|
|
191
|
-
|
|
192
|
-
|
|
167
|
+
case Mustache_Tokenizer::T_BLOCK_VAR:
|
|
168
|
+
if ($this->pragmaBlocks) {
|
|
169
|
+
// BLOCKS pragma is enabled, let's do this!
|
|
170
|
+
if (isset($parent) && $parent[Mustache_Tokenizer::TYPE] === Mustache_Tokenizer::T_PARENT) {
|
|
171
|
+
$token[Mustache_Tokenizer::TYPE] = Mustache_Tokenizer::T_BLOCK_ARG;
|
|
193
172
|
}
|
|
194
173
|
$this->clearStandaloneLines($nodes, $tokens);
|
|
195
174
|
$nodes[] = $this->buildTree($tokens, $token);
|
|
196
175
|
} else {
|
|
197
176
|
// pretend this was just a normal "escaped" token...
|
|
198
|
-
$token[
|
|
177
|
+
$token[Mustache_Tokenizer::TYPE] = Mustache_Tokenizer::T_ESCAPED;
|
|
199
178
|
// TODO: figure out how to figure out if there was a space after this dollar:
|
|
200
|
-
$token[
|
|
179
|
+
$token[Mustache_Tokenizer::NAME] = '$' . $token[Mustache_Tokenizer::NAME];
|
|
201
180
|
$nodes[] = $token;
|
|
202
181
|
}
|
|
203
182
|
break;
|
|
204
183
|
|
|
205
|
-
case
|
|
206
|
-
$this->enablePragma($token[
|
|
184
|
+
case Mustache_Tokenizer::T_PRAGMA:
|
|
185
|
+
$this->enablePragma($token[Mustache_Tokenizer::NAME]);
|
|
207
186
|
// no break
|
|
208
187
|
|
|
209
|
-
case
|
|
188
|
+
case Mustache_Tokenizer::T_COMMENT:
|
|
210
189
|
$this->clearStandaloneLines($nodes, $tokens);
|
|
211
190
|
$nodes[] = $token;
|
|
212
191
|
break;
|
|
@@ -220,10 +199,10 @@ class Parser
|
|
|
220
199
|
if (isset($parent)) {
|
|
221
200
|
$msg = sprintf(
|
|
222
201
|
'Missing closing tag: %s opened on line %d',
|
|
223
|
-
$parent[
|
|
224
|
-
$parent[
|
|
202
|
+
$parent[Mustache_Tokenizer::NAME],
|
|
203
|
+
$parent[Mustache_Tokenizer::LINE]
|
|
225
204
|
);
|
|
226
|
-
throw new
|
|
205
|
+
throw new Mustache_Exception_SyntaxException($msg, $parent);
|
|
227
206
|
}
|
|
228
207
|
|
|
229
208
|
return $nodes;
|
|
@@ -259,7 +238,7 @@ class Parser
|
|
|
259
238
|
|
|
260
239
|
if ($next = reset($tokens)) {
|
|
261
240
|
// If we're on a new line, bail.
|
|
262
|
-
if ($next[
|
|
241
|
+
if ($next[Mustache_Tokenizer::LINE] !== $this->lineNum) {
|
|
263
242
|
return;
|
|
264
243
|
}
|
|
265
244
|
|
|
@@ -271,7 +250,7 @@ class Parser
|
|
|
271
250
|
if (count($tokens) !== 1) {
|
|
272
251
|
// Unless it's the last token in the template, the next token
|
|
273
252
|
// must end in newline for this to be standalone.
|
|
274
|
-
if (substr($next[
|
|
253
|
+
if (substr($next[Mustache_Tokenizer::VALUE], -1) !== "\n") {
|
|
275
254
|
return;
|
|
276
255
|
}
|
|
277
256
|
}
|
|
@@ -291,12 +270,14 @@ class Parser
|
|
|
291
270
|
*
|
|
292
271
|
* True if token type is T_TEXT and value is all whitespace characters.
|
|
293
272
|
*
|
|
273
|
+
* @param array $token
|
|
274
|
+
*
|
|
294
275
|
* @return bool True if token is a whitespace token
|
|
295
276
|
*/
|
|
296
277
|
private function tokenIsWhitespace(array $token)
|
|
297
278
|
{
|
|
298
|
-
if ($token[
|
|
299
|
-
return preg_match('/^\s*$/', $token[
|
|
279
|
+
if ($token[Mustache_Tokenizer::TYPE] === Mustache_Tokenizer::T_TEXT) {
|
|
280
|
+
return preg_match('/^\s*$/', $token[Mustache_Tokenizer::VALUE]);
|
|
300
281
|
}
|
|
301
282
|
|
|
302
283
|
return false;
|
|
@@ -305,60 +286,64 @@ class Parser
|
|
|
305
286
|
/**
|
|
306
287
|
* Check whether a token is allowed inside a parent tag.
|
|
307
288
|
*
|
|
308
|
-
* @throws
|
|
289
|
+
* @throws Mustache_Exception_SyntaxException if an invalid token is found inside a parent tag
|
|
309
290
|
*
|
|
310
291
|
* @param array|null $parent
|
|
292
|
+
* @param array $token
|
|
311
293
|
*/
|
|
312
294
|
private function checkIfTokenIsAllowedInParent($parent, array $token)
|
|
313
295
|
{
|
|
314
|
-
if (isset($parent) && $parent[
|
|
315
|
-
throw new
|
|
296
|
+
if (isset($parent) && $parent[Mustache_Tokenizer::TYPE] === Mustache_Tokenizer::T_PARENT) {
|
|
297
|
+
throw new Mustache_Exception_SyntaxException('Illegal content in < parent tag', $token);
|
|
316
298
|
}
|
|
317
299
|
}
|
|
318
300
|
|
|
319
301
|
/**
|
|
320
302
|
* Parse dynamic names.
|
|
321
303
|
*
|
|
322
|
-
* @throws
|
|
323
|
-
* @throws
|
|
304
|
+
* @throws Mustache_Exception_SyntaxException when a tag does not allow *
|
|
305
|
+
* @throws Mustache_Exception_SyntaxException on multiple *s, or dots or filters with *
|
|
324
306
|
*/
|
|
325
307
|
private function getDynamicName(array $token)
|
|
326
308
|
{
|
|
327
|
-
$name = $token[
|
|
309
|
+
$name = $token[Mustache_Tokenizer::NAME];
|
|
328
310
|
$isDynamic = false;
|
|
329
311
|
|
|
330
|
-
if (
|
|
312
|
+
if (preg_match('/^\s*\*\s*/', $name)) {
|
|
331
313
|
$this->ensureTagAllowsDynamicNames($token);
|
|
332
314
|
$name = preg_replace('/^\s*\*\s*/', '', $name);
|
|
333
315
|
$isDynamic = true;
|
|
334
316
|
}
|
|
335
317
|
|
|
336
|
-
return
|
|
318
|
+
return array($name, $isDynamic);
|
|
337
319
|
}
|
|
338
320
|
|
|
339
321
|
/**
|
|
340
322
|
* Check whether the given token supports dynamic tag names.
|
|
341
323
|
*
|
|
342
|
-
* @throws
|
|
324
|
+
* @throws Mustache_Exception_SyntaxException when a tag does not allow *
|
|
325
|
+
*
|
|
326
|
+
* @param array $token
|
|
343
327
|
*/
|
|
344
328
|
private function ensureTagAllowsDynamicNames(array $token)
|
|
345
329
|
{
|
|
346
|
-
switch ($token[
|
|
347
|
-
case
|
|
348
|
-
case
|
|
349
|
-
case
|
|
330
|
+
switch ($token[Mustache_Tokenizer::TYPE]) {
|
|
331
|
+
case Mustache_Tokenizer::T_PARTIAL:
|
|
332
|
+
case Mustache_Tokenizer::T_PARENT:
|
|
333
|
+
case Mustache_Tokenizer::T_END_SECTION:
|
|
350
334
|
return;
|
|
351
335
|
}
|
|
352
336
|
|
|
353
337
|
$msg = sprintf(
|
|
354
338
|
'Invalid dynamic name: %s in %s tag',
|
|
355
|
-
$token[
|
|
356
|
-
|
|
339
|
+
$token[Mustache_Tokenizer::NAME],
|
|
340
|
+
Mustache_Tokenizer::getTagName($token[Mustache_Tokenizer::TYPE])
|
|
357
341
|
);
|
|
358
342
|
|
|
359
|
-
throw new
|
|
343
|
+
throw new Mustache_Exception_SyntaxException($msg, $token);
|
|
360
344
|
}
|
|
361
345
|
|
|
346
|
+
|
|
362
347
|
/**
|
|
363
348
|
* Split a tag name into name and filters.
|
|
364
349
|
*
|
|
@@ -371,7 +356,7 @@ class Parser
|
|
|
371
356
|
$filters = array_map('trim', explode('|', $name));
|
|
372
357
|
$name = array_shift($filters);
|
|
373
358
|
|
|
374
|
-
return
|
|
359
|
+
return array($name, $filters);
|
|
375
360
|
}
|
|
376
361
|
|
|
377
362
|
/**
|
|
@@ -384,9 +369,17 @@ class Parser
|
|
|
384
369
|
$this->pragmas[$name] = true;
|
|
385
370
|
|
|
386
371
|
switch ($name) {
|
|
387
|
-
case
|
|
372
|
+
case Mustache_Engine::PRAGMA_BLOCKS:
|
|
373
|
+
$this->pragmaBlocks = true;
|
|
374
|
+
break;
|
|
375
|
+
|
|
376
|
+
case Mustache_Engine::PRAGMA_FILTERS:
|
|
388
377
|
$this->pragmaFilters = true;
|
|
389
378
|
break;
|
|
379
|
+
|
|
380
|
+
case Mustache_Engine::PRAGMA_DYNAMIC_NAMES:
|
|
381
|
+
$this->pragmaDynamicNames = true;
|
|
382
|
+
break;
|
|
390
383
|
}
|
|
391
384
|
}
|
|
392
385
|
}
|
|
@@ -3,17 +3,12 @@
|
|
|
3
3
|
/*
|
|
4
4
|
* This file is part of Mustache.php.
|
|
5
5
|
*
|
|
6
|
-
* (c) 2010-
|
|
6
|
+
* (c) 2010-2017 Justin Hileman
|
|
7
7
|
*
|
|
8
8
|
* For the full copyright and license information, please view the LICENSE
|
|
9
9
|
* file that was distributed with this source code.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
namespace Mustache\Source;
|
|
13
|
-
|
|
14
|
-
use Mustache\Exception\RuntimeException;
|
|
15
|
-
use Mustache\Source;
|
|
16
|
-
|
|
17
12
|
/**
|
|
18
13
|
* Mustache template Filesystem Source.
|
|
19
14
|
*
|
|
@@ -22,7 +17,7 @@ use Mustache\Source;
|
|
|
22
17
|
* It is more suitable for production use, and is used by default in the
|
|
23
18
|
* ProductionFilesystemLoader.
|
|
24
19
|
*/
|
|
25
|
-
class
|
|
20
|
+
class Mustache_Source_FilesystemSource implements Mustache_Source
|
|
26
21
|
{
|
|
27
22
|
private $fileName;
|
|
28
23
|
private $statProps;
|
|
@@ -32,6 +27,7 @@ class FilesystemSource implements Source
|
|
|
32
27
|
* Filesystem Source constructor.
|
|
33
28
|
*
|
|
34
29
|
* @param string $fileName
|
|
30
|
+
* @param array $statProps
|
|
35
31
|
*/
|
|
36
32
|
public function __construct($fileName, array $statProps)
|
|
37
33
|
{
|
|
@@ -42,15 +38,15 @@ class FilesystemSource implements Source
|
|
|
42
38
|
/**
|
|
43
39
|
* Get the Source key (used to generate the compiled class name).
|
|
44
40
|
*
|
|
45
|
-
* @throws
|
|
41
|
+
* @throws Mustache_Exception_RuntimeException when a source file cannot be read
|
|
46
42
|
*
|
|
47
43
|
* @return string
|
|
48
44
|
*/
|
|
49
45
|
public function getKey()
|
|
50
46
|
{
|
|
51
|
-
$chunks =
|
|
47
|
+
$chunks = array(
|
|
52
48
|
'fileName' => $this->fileName,
|
|
53
|
-
|
|
49
|
+
);
|
|
54
50
|
|
|
55
51
|
if (!empty($this->statProps)) {
|
|
56
52
|
if (!isset($this->stat)) {
|
|
@@ -58,7 +54,7 @@ class FilesystemSource implements Source
|
|
|
58
54
|
}
|
|
59
55
|
|
|
60
56
|
if ($this->stat === false) {
|
|
61
|
-
throw new
|
|
57
|
+
throw new Mustache_Exception_RuntimeException(sprintf('Failed to read source file "%s".', $this->fileName));
|
|
62
58
|
}
|
|
63
59
|
|
|
64
60
|
foreach ($this->statProps as $prop) {
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
/*
|
|
4
4
|
* This file is part of Mustache.php.
|
|
5
5
|
*
|
|
6
|
-
* (c) 2010-
|
|
6
|
+
* (c) 2010-2017 Justin Hileman
|
|
7
7
|
*
|
|
8
8
|
* For the full copyright and license information, please view the LICENSE
|
|
9
9
|
* file that was distributed with this source code.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Mustache template Source interface.
|
|
14
|
+
*/
|
|
15
|
+
interface Mustache_Source
|
|
15
16
|
{
|
|
16
17
|
/**
|
|
17
18
|
* Get the Source key (used to generate the compiled class name).
|
|
@@ -3,23 +3,21 @@
|
|
|
3
3
|
/*
|
|
4
4
|
* This file is part of Mustache.php.
|
|
5
5
|
*
|
|
6
|
-
* (c) 2010-
|
|
6
|
+
* (c) 2010-2017 Justin Hileman
|
|
7
7
|
*
|
|
8
8
|
* For the full copyright and license information, please view the LICENSE
|
|
9
9
|
* file that was distributed with this source code.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
namespace Mustache;
|
|
13
|
-
|
|
14
12
|
/**
|
|
15
13
|
* Abstract Mustache Template class.
|
|
16
14
|
*
|
|
17
15
|
* @abstract
|
|
18
16
|
*/
|
|
19
|
-
abstract class
|
|
17
|
+
abstract class Mustache_Template
|
|
20
18
|
{
|
|
21
19
|
/**
|
|
22
|
-
* @var
|
|
20
|
+
* @var Mustache_Engine
|
|
23
21
|
*/
|
|
24
22
|
protected $mustache;
|
|
25
23
|
|
|
@@ -28,15 +26,12 @@ abstract class Template
|
|
|
28
26
|
*/
|
|
29
27
|
protected $strictCallables = false;
|
|
30
28
|
|
|
31
|
-
/**
|
|
32
|
-
* @var bool
|
|
33
|
-
*/
|
|
34
|
-
protected $lambdas = true;
|
|
35
|
-
|
|
36
29
|
/**
|
|
37
30
|
* Mustache Template constructor.
|
|
31
|
+
*
|
|
32
|
+
* @param Mustache_Engine $mustache
|
|
38
33
|
*/
|
|
39
|
-
public function __construct(
|
|
34
|
+
public function __construct(Mustache_Engine $mustache)
|
|
40
35
|
{
|
|
41
36
|
$this->mustache = $mustache;
|
|
42
37
|
}
|
|
@@ -44,17 +39,17 @@ abstract class Template
|
|
|
44
39
|
/**
|
|
45
40
|
* Mustache Template instances can be treated as a function and rendered by simply calling them.
|
|
46
41
|
*
|
|
47
|
-
* $m = new
|
|
42
|
+
* $m = new Mustache_Engine;
|
|
48
43
|
* $tpl = $m->loadTemplate('Hello, {{ name }}!');
|
|
49
|
-
* echo $tpl(
|
|
44
|
+
* echo $tpl(array('name' => 'World')); // "Hello, World!"
|
|
50
45
|
*
|
|
51
|
-
* @see
|
|
46
|
+
* @see Mustache_Template::render
|
|
52
47
|
*
|
|
53
|
-
* @param mixed $context Array or object rendering context (default:
|
|
48
|
+
* @param mixed $context Array or object rendering context (default: array())
|
|
54
49
|
*
|
|
55
50
|
* @return string Rendered template
|
|
56
51
|
*/
|
|
57
|
-
public function __invoke($context =
|
|
52
|
+
public function __invoke($context = array())
|
|
58
53
|
{
|
|
59
54
|
return $this->render($context);
|
|
60
55
|
}
|
|
@@ -62,11 +57,11 @@ abstract class Template
|
|
|
62
57
|
/**
|
|
63
58
|
* Render this template given the rendering context.
|
|
64
59
|
*
|
|
65
|
-
* @param mixed $context Array or object rendering context (default:
|
|
60
|
+
* @param mixed $context Array or object rendering context (default: array())
|
|
66
61
|
*
|
|
67
62
|
* @return string Rendered template
|
|
68
63
|
*/
|
|
69
|
-
public function render($context =
|
|
64
|
+
public function render($context = array())
|
|
70
65
|
{
|
|
71
66
|
return $this->renderInternal(
|
|
72
67
|
$this->prepareContextStack($context)
|
|
@@ -80,11 +75,12 @@ abstract class Template
|
|
|
80
75
|
*
|
|
81
76
|
* NOTE: This method is not part of the Mustache.php public API.
|
|
82
77
|
*
|
|
83
|
-
* @param
|
|
78
|
+
* @param Mustache_Context $context
|
|
79
|
+
* @param string $indent (default: '')
|
|
84
80
|
*
|
|
85
81
|
* @return string Rendered template
|
|
86
82
|
*/
|
|
87
|
-
abstract public function renderInternal(
|
|
83
|
+
abstract public function renderInternal(Mustache_Context $context, $indent = '');
|
|
88
84
|
|
|
89
85
|
/**
|
|
90
86
|
* Tests whether a value should be iterated over (e.g. in a section context).
|
|
@@ -97,19 +93,19 @@ abstract class Template
|
|
|
97
93
|
* between between a list of things (numeric, normalized array) and a set of variables to be used as section context
|
|
98
94
|
* (associative array). In other words, this will be iterated over:
|
|
99
95
|
*
|
|
100
|
-
* $items =
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
96
|
+
* $items = array(
|
|
97
|
+
* array('name' => 'foo'),
|
|
98
|
+
* array('name' => 'bar'),
|
|
99
|
+
* array('name' => 'baz'),
|
|
100
|
+
* );
|
|
105
101
|
*
|
|
106
102
|
* ... but this will be used as a section context block:
|
|
107
103
|
*
|
|
108
|
-
* $items =
|
|
109
|
-
* 1 =>
|
|
110
|
-
* 'banana' =>
|
|
111
|
-
* 42 =>
|
|
112
|
-
*
|
|
104
|
+
* $items = array(
|
|
105
|
+
* 1 => array('name' => 'foo'),
|
|
106
|
+
* 'banana' => array('name' => 'bar'),
|
|
107
|
+
* 42 => array('name' => 'baz'),
|
|
108
|
+
* );
|
|
113
109
|
*
|
|
114
110
|
* @param mixed $value
|
|
115
111
|
*
|
|
@@ -119,7 +115,7 @@ abstract class Template
|
|
|
119
115
|
{
|
|
120
116
|
switch (gettype($value)) {
|
|
121
117
|
case 'object':
|
|
122
|
-
return $value instanceof
|
|
118
|
+
return $value instanceof Traversable;
|
|
123
119
|
|
|
124
120
|
case 'array':
|
|
125
121
|
$i = 0;
|
|
@@ -143,11 +139,11 @@ abstract class Template
|
|
|
143
139
|
*
|
|
144
140
|
* @param mixed $context Optional first context frame (default: null)
|
|
145
141
|
*
|
|
146
|
-
* @return
|
|
142
|
+
* @return Mustache_Context
|
|
147
143
|
*/
|
|
148
144
|
protected function prepareContextStack($context = null)
|
|
149
145
|
{
|
|
150
|
-
$stack = new
|
|
146
|
+
$stack = new Mustache_Context(null, $this->mustache->useBuggyPropertyShadowing());
|
|
151
147
|
|
|
152
148
|
$helpers = $this->mustache->getHelpers();
|
|
153
149
|
if (!$helpers->isEmpty()) {
|
|
@@ -166,16 +162,13 @@ abstract class Template
|
|
|
166
162
|
*
|
|
167
163
|
* Invoke the value if it is callable, otherwise return the value.
|
|
168
164
|
*
|
|
169
|
-
* @param mixed
|
|
165
|
+
* @param mixed $value
|
|
166
|
+
* @param Mustache_Context $context
|
|
170
167
|
*
|
|
171
168
|
* @return string
|
|
172
169
|
*/
|
|
173
|
-
protected function resolveValue($value,
|
|
170
|
+
protected function resolveValue($value, Mustache_Context $context)
|
|
174
171
|
{
|
|
175
|
-
if (!$this->lambdas) {
|
|
176
|
-
return $value;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
172
|
if (($this->strictCallables ? is_object($value) : !is_string($value)) && is_callable($value)) {
|
|
180
173
|
$result = call_user_func($value);
|
|
181
174
|
|