├── .gitignore
├── README.md
├── composer.json
├── data
└── config
│ ├── app.php
│ └── database.example.php
├── eyz
├── Core.php
├── install
│ └── view
│ │ └── install.html
├── lib
│ ├── ApiBaseController.php
│ ├── BaseController.php
│ ├── Config.php
│ ├── EyzValidation.php
│ ├── FileConfig.php
│ ├── Model.php
│ ├── Request.php
│ ├── Route.php
│ ├── SingletonModel.php
│ └── common.php
└── tpl
│ └── default_error.tpl
├── public
├── .htaccess
├── favicon.ico
├── index.php
├── static
│ └── bootstrap
│ │ └── dist
│ │ ├── css
│ │ ├── bootstrap-grid.css
│ │ ├── bootstrap-grid.css.map
│ │ ├── bootstrap-grid.min.css
│ │ ├── bootstrap-grid.min.css.map
│ │ ├── bootstrap-reboot.css
│ │ ├── bootstrap-reboot.css.map
│ │ ├── bootstrap-reboot.min.css
│ │ ├── bootstrap-reboot.min.css.map
│ │ ├── bootstrap.css
│ │ ├── bootstrap.css.map
│ │ ├── bootstrap.min.css
│ │ └── bootstrap.min.css.map
│ │ └── js
│ │ ├── bootstrap.bundle.js
│ │ ├── bootstrap.bundle.js.map
│ │ ├── bootstrap.bundle.min.js
│ │ ├── bootstrap.bundle.min.js.map
│ │ ├── bootstrap.js
│ │ ├── bootstrap.js.map
│ │ ├── bootstrap.min.js
│ │ └── bootstrap.min.js.map
└── view
│ └── vatfs
│ └── default
│ ├── admin
│ └── index
│ │ ├── index.html
│ │ └── login.html
│ ├── index
│ └── index
│ │ ├── detail.html
│ │ ├── index.html
│ │ ├── page.html
│ │ ├── player.html
│ │ └── search.html
│ └── static
│ ├── css
│ ├── DPlayer.min.css
│ ├── sdetail.v
│ ├── signin.css
│ ├── style-v.css
│ ├── swiperTab.css
│ └── video-js.min.css
│ ├── js
│ ├── DPlayer.min.js
│ ├── common.js
│ ├── hls.min.js
│ ├── index.js
│ ├── jquery2.1.4.min.js
│ ├── sweetalert.min.js
│ └── swiperTab.js
│ ├── logo.png
│ ├── play-v.png
│ ├── search.png
│ └── ysqss.ico
├── vatfs
├── admin
│ └── controller
│ │ └── IndexController.php
├── app.php
├── collectSiteConfig.json
├── command
│ └── cli-collect.php
├── index
│ └── controller
│ │ ├── CollectController.php
│ │ └── IndexController.php
├── route.php
└── siteConfig.json
├── vendor
├── autoload.php
├── catfan
│ └── medoo
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ ├── composer.json
│ │ └── src
│ │ └── Medoo.php
├── composer
│ ├── ClassLoader.php
│ ├── LICENSE
│ ├── autoload_classmap.php
│ ├── autoload_files.php
│ ├── autoload_namespaces.php
│ ├── autoload_psr4.php
│ ├── autoload_real.php
│ ├── autoload_static.php
│ └── installed.json
├── filp
│ └── whoops
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE.md
│ │ ├── composer.json
│ │ └── src
│ │ └── Whoops
│ │ ├── Exception
│ │ ├── ErrorException.php
│ │ ├── Formatter.php
│ │ ├── Frame.php
│ │ ├── FrameCollection.php
│ │ └── Inspector.php
│ │ ├── Handler
│ │ ├── CallbackHandler.php
│ │ ├── Handler.php
│ │ ├── HandlerInterface.php
│ │ ├── JsonResponseHandler.php
│ │ ├── PlainTextHandler.php
│ │ ├── PrettyPageHandler.php
│ │ └── XmlResponseHandler.php
│ │ ├── Resources
│ │ ├── css
│ │ │ └── whoops.base.css
│ │ ├── js
│ │ │ ├── clipboard.min.js
│ │ │ ├── prettify.min.js
│ │ │ ├── whoops.base.js
│ │ │ └── zepto.min.js
│ │ └── views
│ │ │ ├── env_details.html.php
│ │ │ ├── frame_code.html.php
│ │ │ ├── frame_list.html.php
│ │ │ ├── frames_container.html.php
│ │ │ ├── frames_description.html.php
│ │ │ ├── header.html.php
│ │ │ ├── header_outer.html.php
│ │ │ ├── layout.html.php
│ │ │ ├── panel_details.html.php
│ │ │ ├── panel_details_outer.html.php
│ │ │ ├── panel_left.html.php
│ │ │ └── panel_left_outer.html.php
│ │ ├── Run.php
│ │ ├── RunInterface.php
│ │ └── Util
│ │ ├── HtmlDumperOutput.php
│ │ ├── Misc.php
│ │ ├── SystemFacade.php
│ │ └── TemplateHelper.php
├── psr
│ └── log
│ │ ├── LICENSE
│ │ ├── Psr
│ │ └── Log
│ │ │ ├── AbstractLogger.php
│ │ │ ├── InvalidArgumentException.php
│ │ │ ├── LogLevel.php
│ │ │ ├── LoggerAwareInterface.php
│ │ │ ├── LoggerAwareTrait.php
│ │ │ ├── LoggerInterface.php
│ │ │ ├── LoggerTrait.php
│ │ │ ├── NullLogger.php
│ │ │ └── Test
│ │ │ ├── LoggerInterfaceTest.php
│ │ │ └── TestLogger.php
│ │ ├── README.md
│ │ └── composer.json
├── symfony
│ ├── polyfill-ctype
│ │ ├── Ctype.php
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── bootstrap.php
│ │ └── composer.json
│ └── polyfill-mbstring
│ │ ├── LICENSE
│ │ ├── Mbstring.php
│ │ ├── README.md
│ │ ├── Resources
│ │ └── unidata
│ │ │ ├── lowerCase.php
│ │ │ ├── titleCaseRegexp.php
│ │ │ └── upperCase.php
│ │ ├── bootstrap.php
│ │ └── composer.json
├── twig
│ └── twig
│ │ ├── CHANGELOG
│ │ ├── LICENSE
│ │ ├── README.rst
│ │ ├── composer.json
│ │ ├── doc
│ │ ├── advanced.rst
│ │ ├── advanced_legacy.rst
│ │ ├── api.rst
│ │ ├── coding_standards.rst
│ │ ├── deprecated.rst
│ │ ├── filters
│ │ │ ├── abs.rst
│ │ │ ├── batch.rst
│ │ │ ├── capitalize.rst
│ │ │ ├── column.rst
│ │ │ ├── convert_encoding.rst
│ │ │ ├── country_name.rst
│ │ │ ├── currency_name.rst
│ │ │ ├── currency_symbol.rst
│ │ │ ├── data_uri.rst
│ │ │ ├── date.rst
│ │ │ ├── date_modify.rst
│ │ │ ├── default.rst
│ │ │ ├── escape.rst
│ │ │ ├── filter.rst
│ │ │ ├── first.rst
│ │ │ ├── format.rst
│ │ │ ├── format_currency.rst
│ │ │ ├── format_date.rst
│ │ │ ├── format_datetime.rst
│ │ │ ├── format_number.rst
│ │ │ ├── format_time.rst
│ │ │ ├── html_to_markdown.rst
│ │ │ ├── index.rst
│ │ │ ├── inky_to_html.rst
│ │ │ ├── inline_css.rst
│ │ │ ├── join.rst
│ │ │ ├── json_encode.rst
│ │ │ ├── keys.rst
│ │ │ ├── language_name.rst
│ │ │ ├── last.rst
│ │ │ ├── length.rst
│ │ │ ├── locale_name.rst
│ │ │ ├── lower.rst
│ │ │ ├── map.rst
│ │ │ ├── markdown_to_html.rst
│ │ │ ├── merge.rst
│ │ │ ├── nl2br.rst
│ │ │ ├── number_format.rst
│ │ │ ├── raw.rst
│ │ │ ├── reduce.rst
│ │ │ ├── replace.rst
│ │ │ ├── reverse.rst
│ │ │ ├── round.rst
│ │ │ ├── slice.rst
│ │ │ ├── sort.rst
│ │ │ ├── spaceless.rst
│ │ │ ├── split.rst
│ │ │ ├── striptags.rst
│ │ │ ├── timezone_name.rst
│ │ │ ├── title.rst
│ │ │ ├── trim.rst
│ │ │ ├── u.rst
│ │ │ ├── upper.rst
│ │ │ └── url_encode.rst
│ │ ├── functions
│ │ │ ├── attribute.rst
│ │ │ ├── block.rst
│ │ │ ├── constant.rst
│ │ │ ├── country_timezones.rst
│ │ │ ├── cycle.rst
│ │ │ ├── date.rst
│ │ │ ├── dump.rst
│ │ │ ├── html_classes.rst
│ │ │ ├── include.rst
│ │ │ ├── index.rst
│ │ │ ├── max.rst
│ │ │ ├── min.rst
│ │ │ ├── parent.rst
│ │ │ ├── random.rst
│ │ │ ├── range.rst
│ │ │ ├── source.rst
│ │ │ └── template_from_string.rst
│ │ ├── index.rst
│ │ ├── installation.rst
│ │ ├── internals.rst
│ │ ├── intro.rst
│ │ ├── recipes.rst
│ │ ├── tags
│ │ │ ├── apply.rst
│ │ │ ├── autoescape.rst
│ │ │ ├── block.rst
│ │ │ ├── deprecated.rst
│ │ │ ├── do.rst
│ │ │ ├── embed.rst
│ │ │ ├── extends.rst
│ │ │ ├── flush.rst
│ │ │ ├── for.rst
│ │ │ ├── from.rst
│ │ │ ├── if.rst
│ │ │ ├── import.rst
│ │ │ ├── include.rst
│ │ │ ├── index.rst
│ │ │ ├── macro.rst
│ │ │ ├── sandbox.rst
│ │ │ ├── set.rst
│ │ │ ├── use.rst
│ │ │ ├── verbatim.rst
│ │ │ └── with.rst
│ │ ├── templates.rst
│ │ └── tests
│ │ │ ├── constant.rst
│ │ │ ├── defined.rst
│ │ │ ├── divisibleby.rst
│ │ │ ├── empty.rst
│ │ │ ├── even.rst
│ │ │ ├── index.rst
│ │ │ ├── iterable.rst
│ │ │ ├── null.rst
│ │ │ ├── odd.rst
│ │ │ └── sameas.rst
│ │ ├── drupal_test.sh
│ │ └── src
│ │ ├── Cache
│ │ ├── CacheInterface.php
│ │ ├── FilesystemCache.php
│ │ └── NullCache.php
│ │ ├── Compiler.php
│ │ ├── Environment.php
│ │ ├── Error
│ │ ├── Error.php
│ │ ├── LoaderError.php
│ │ ├── RuntimeError.php
│ │ └── SyntaxError.php
│ │ ├── ExpressionParser.php
│ │ ├── Extension
│ │ ├── AbstractExtension.php
│ │ ├── CoreExtension.php
│ │ ├── DebugExtension.php
│ │ ├── EscaperExtension.php
│ │ ├── ExtensionInterface.php
│ │ ├── GlobalsInterface.php
│ │ ├── OptimizerExtension.php
│ │ ├── ProfilerExtension.php
│ │ ├── RuntimeExtensionInterface.php
│ │ ├── SandboxExtension.php
│ │ ├── StagingExtension.php
│ │ └── StringLoaderExtension.php
│ │ ├── ExtensionSet.php
│ │ ├── FileExtensionEscapingStrategy.php
│ │ ├── Lexer.php
│ │ ├── Loader
│ │ ├── ArrayLoader.php
│ │ ├── ChainLoader.php
│ │ ├── FilesystemLoader.php
│ │ └── LoaderInterface.php
│ │ ├── Markup.php
│ │ ├── Node
│ │ ├── AutoEscapeNode.php
│ │ ├── BlockNode.php
│ │ ├── BlockReferenceNode.php
│ │ ├── BodyNode.php
│ │ ├── CheckSecurityNode.php
│ │ ├── CheckToStringNode.php
│ │ ├── DeprecatedNode.php
│ │ ├── DoNode.php
│ │ ├── EmbedNode.php
│ │ ├── Expression
│ │ │ ├── AbstractExpression.php
│ │ │ ├── ArrayExpression.php
│ │ │ ├── ArrowFunctionExpression.php
│ │ │ ├── AssignNameExpression.php
│ │ │ ├── Binary
│ │ │ │ ├── AbstractBinary.php
│ │ │ │ ├── AddBinary.php
│ │ │ │ ├── AndBinary.php
│ │ │ │ ├── BitwiseAndBinary.php
│ │ │ │ ├── BitwiseOrBinary.php
│ │ │ │ ├── BitwiseXorBinary.php
│ │ │ │ ├── ConcatBinary.php
│ │ │ │ ├── DivBinary.php
│ │ │ │ ├── EndsWithBinary.php
│ │ │ │ ├── EqualBinary.php
│ │ │ │ ├── FloorDivBinary.php
│ │ │ │ ├── GreaterBinary.php
│ │ │ │ ├── GreaterEqualBinary.php
│ │ │ │ ├── InBinary.php
│ │ │ │ ├── LessBinary.php
│ │ │ │ ├── LessEqualBinary.php
│ │ │ │ ├── MatchesBinary.php
│ │ │ │ ├── ModBinary.php
│ │ │ │ ├── MulBinary.php
│ │ │ │ ├── NotEqualBinary.php
│ │ │ │ ├── NotInBinary.php
│ │ │ │ ├── OrBinary.php
│ │ │ │ ├── PowerBinary.php
│ │ │ │ ├── RangeBinary.php
│ │ │ │ ├── SpaceshipBinary.php
│ │ │ │ ├── StartsWithBinary.php
│ │ │ │ └── SubBinary.php
│ │ │ ├── BlockReferenceExpression.php
│ │ │ ├── CallExpression.php
│ │ │ ├── ConditionalExpression.php
│ │ │ ├── ConstantExpression.php
│ │ │ ├── Filter
│ │ │ │ └── DefaultFilter.php
│ │ │ ├── FilterExpression.php
│ │ │ ├── FunctionExpression.php
│ │ │ ├── GetAttrExpression.php
│ │ │ ├── InlinePrint.php
│ │ │ ├── MethodCallExpression.php
│ │ │ ├── NameExpression.php
│ │ │ ├── NullCoalesceExpression.php
│ │ │ ├── ParentExpression.php
│ │ │ ├── TempNameExpression.php
│ │ │ ├── Test
│ │ │ │ ├── ConstantTest.php
│ │ │ │ ├── DefinedTest.php
│ │ │ │ ├── DivisiblebyTest.php
│ │ │ │ ├── EvenTest.php
│ │ │ │ ├── NullTest.php
│ │ │ │ ├── OddTest.php
│ │ │ │ └── SameasTest.php
│ │ │ ├── TestExpression.php
│ │ │ ├── Unary
│ │ │ │ ├── AbstractUnary.php
│ │ │ │ ├── NegUnary.php
│ │ │ │ ├── NotUnary.php
│ │ │ │ └── PosUnary.php
│ │ │ └── VariadicExpression.php
│ │ ├── FlushNode.php
│ │ ├── ForLoopNode.php
│ │ ├── ForNode.php
│ │ ├── IfNode.php
│ │ ├── ImportNode.php
│ │ ├── IncludeNode.php
│ │ ├── MacroNode.php
│ │ ├── ModuleNode.php
│ │ ├── Node.php
│ │ ├── NodeCaptureInterface.php
│ │ ├── NodeOutputInterface.php
│ │ ├── PrintNode.php
│ │ ├── SandboxNode.php
│ │ ├── SetNode.php
│ │ ├── TextNode.php
│ │ └── WithNode.php
│ │ ├── NodeTraverser.php
│ │ ├── NodeVisitor
│ │ ├── AbstractNodeVisitor.php
│ │ ├── EscaperNodeVisitor.php
│ │ ├── MacroAutoImportNodeVisitor.php
│ │ ├── NodeVisitorInterface.php
│ │ ├── OptimizerNodeVisitor.php
│ │ ├── SafeAnalysisNodeVisitor.php
│ │ └── SandboxNodeVisitor.php
│ │ ├── Parser.php
│ │ ├── Profiler
│ │ ├── Dumper
│ │ │ ├── BaseDumper.php
│ │ │ ├── BlackfireDumper.php
│ │ │ ├── HtmlDumper.php
│ │ │ └── TextDumper.php
│ │ ├── Node
│ │ │ ├── EnterProfileNode.php
│ │ │ └── LeaveProfileNode.php
│ │ ├── NodeVisitor
│ │ │ └── ProfilerNodeVisitor.php
│ │ └── Profile.php
│ │ ├── RuntimeLoader
│ │ ├── ContainerRuntimeLoader.php
│ │ ├── FactoryRuntimeLoader.php
│ │ └── RuntimeLoaderInterface.php
│ │ ├── Sandbox
│ │ ├── SecurityError.php
│ │ ├── SecurityNotAllowedFilterError.php
│ │ ├── SecurityNotAllowedFunctionError.php
│ │ ├── SecurityNotAllowedMethodError.php
│ │ ├── SecurityNotAllowedPropertyError.php
│ │ ├── SecurityNotAllowedTagError.php
│ │ ├── SecurityPolicy.php
│ │ └── SecurityPolicyInterface.php
│ │ ├── Source.php
│ │ ├── Template.php
│ │ ├── TemplateWrapper.php
│ │ ├── Test
│ │ ├── IntegrationTestCase.php
│ │ └── NodeTestCase.php
│ │ ├── Token.php
│ │ ├── TokenParser
│ │ ├── AbstractTokenParser.php
│ │ ├── ApplyTokenParser.php
│ │ ├── AutoEscapeTokenParser.php
│ │ ├── BlockTokenParser.php
│ │ ├── DeprecatedTokenParser.php
│ │ ├── DoTokenParser.php
│ │ ├── EmbedTokenParser.php
│ │ ├── ExtendsTokenParser.php
│ │ ├── FlushTokenParser.php
│ │ ├── ForTokenParser.php
│ │ ├── FromTokenParser.php
│ │ ├── IfTokenParser.php
│ │ ├── ImportTokenParser.php
│ │ ├── IncludeTokenParser.php
│ │ ├── MacroTokenParser.php
│ │ ├── SandboxTokenParser.php
│ │ ├── SetTokenParser.php
│ │ ├── TokenParserInterface.php
│ │ ├── UseTokenParser.php
│ │ └── WithTokenParser.php
│ │ ├── TokenStream.php
│ │ ├── TwigFilter.php
│ │ ├── TwigFunction.php
│ │ ├── TwigTest.php
│ │ └── Util
│ │ ├── DeprecationCollector.php
│ │ └── TemplateDirIterator.php
└── webgeeker
│ └── validation
│ ├── LICENSE
│ ├── composer.json
│ ├── composer.lock
│ ├── phpunit.xml
│ ├── readme.md
│ ├── src
│ └── Validation
│ │ ├── Validation.php
│ │ └── ValidationException.php
│ └── tests
│ └── Validation
│ ├── MyValidation.php
│ ├── MyValidation2.php
│ └── ValidationTest.php
└── version
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .user.ini
3 | .git
4 | .DS_Store
5 | .project
6 | .idea
7 | runtime
8 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "require": {
3 | "catfan/medoo": "^1.7",
4 | "filp/whoops": "^2.5",
5 | "twig/twig": "^3.0",
6 | "twbs/bootstrap": "^4.3",
7 | "workerman/gateway-worker": "^3.0",
8 | "workerman/gatewayclient": "^3.0",
9 | "webgeeker/validation":"^0.4",
10 | "aliyuncs/oss-sdk-php": "^2.3"
11 | },
12 | "scripts": {
13 | "post-update-cmd": [
14 | "rm -rf public/static/bootstrap",
15 | "mkdir -p public/static/bootstrap",
16 | "cp -R vendor/twbs/bootstrap/dist public/static/bootstrap",
17 | "rm -rf vendor/twbs"
18 | ],
19 | "post-install-cmd": [
20 | "rm -rf public/static/bootstrap",
21 | "mkdir -p public/static/bootstrap",
22 | "cp -R vendor/twbs/bootstrap/dist public/static/bootstrap",
23 | "rm -rf vendor/twbs"
24 | ]
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/data/config/app.php:
--------------------------------------------------------------------------------
1 | false,
10 | "default_module" => "index",//默认模块
11 | "default_controller" => "index",//默认控制器
12 | "default_method" => "index",//默认方法
13 |
14 | "default_template" => "default",//默认模版
15 | ];
--------------------------------------------------------------------------------
/data/config/database.example.php:
--------------------------------------------------------------------------------
1 | '',
11 | 'database_name' => '',
12 | 'server' => '',
13 | 'username' => '',
14 | 'password' => '',
15 | // [optional]
16 | 'charset' => 'utf8mb4',
17 | 'port' => 3306,
18 | 'prefix' => 'eyz_',
19 | ];
--------------------------------------------------------------------------------
/eyz/lib/ApiBaseController.php:
--------------------------------------------------------------------------------
1 | 1,
18 | "msg" => $msg,
19 | "data" => $data
20 | ];
21 | throw new \Exception(json_encode($result,JSON_UNESCAPED_UNICODE),'1000');
22 | }
23 |
24 | public function error($msg = '', $data = '', array $header = [])
25 | {
26 | header("Access-Control-Allow-Origin: *");
27 | header('Access-Control-Allow-Headers: X-Requested-With,Content-Type,XX-Device-Type,XX-Token,XX-Api-Version,XX-Wxapp-AppId');
28 |
29 | $code = 0;
30 | if (is_array($msg)) {
31 | $code = $msg["code"];
32 | $msg = $msg["msg"];
33 | }
34 | $result = [
35 | "code" => $code,
36 | "msg" => $msg,
37 | "data" => $data,
38 | ];
39 | throw new \Exception(json_encode($result,JSON_UNESCAPED_UNICODE),'1000');
40 | }
41 | }
--------------------------------------------------------------------------------
/eyz/lib/EyzValidation.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 啊嘞,出错啦
6 |
30 |
31 |
32 |
33 |
出错啦
34 |
35 |
36 | - 当前页面访问出错
37 | - 请确认访问地址是否正确
38 | - 返回首页 本程序基于 eyz
39 |
40 |
41 |
42 |
53 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | Options +FollowSymlinks -Multiviews
3 | RewriteEngine On
4 | RewriteCond %{REQUEST_FILENAME} !-d
5 | RewriteCond %{REQUEST_FILENAME} !-f
6 | RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
7 |
8 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eyunzhu/vatfs/87e68bd8e6597b9807a62309a11af355f7258265/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 | 00:00:02.000
3 | 关注微信公众号:古图
4 | 00:00:02.001 --> 00:00:04.500
5 | 获取更多资源
--------------------------------------------------------------------------------
/public/view/vatfs/default/static/css/signin.css:
--------------------------------------------------------------------------------
1 | .bd-placeholder-img {
2 | font-size: 1.125rem;
3 | text-anchor: middle;
4 | -webkit-user-select: none;
5 | -moz-user-select: none;
6 | -ms-user-select: none;
7 | user-select: none;
8 | }
9 |
10 | @media (min-width: 768px) {
11 | .bd-placeholder-img-lg {
12 | font-size: 3.5rem;
13 | }
14 | }
15 |
16 | html,
17 | body {
18 | height: 100%;
19 | }
20 |
21 | body {
22 | display: -ms-flexbox;
23 | display: flex;
24 | -ms-flex-align: center;
25 | align-items: center;
26 | padding-top: 40px;
27 | padding-bottom: 40px;
28 | background-color: #f5f5f5;
29 | }
30 |
31 | .form-signin {
32 | width: 100%;
33 | max-width: 330px;
34 | padding: 15px;
35 | margin: auto;
36 | }
37 | .form-signin .checkbox {
38 | font-weight: 400;
39 | }
40 | .form-signin .form-control {
41 | position: relative;
42 | box-sizing: border-box;
43 | height: auto;
44 | padding: 10px;
45 | font-size: 16px;
46 | }
47 | .form-signin .form-control:focus {
48 | z-index: 2;
49 | }
50 | .form-signin input[type="email"] {
51 | margin-bottom: -1px;
52 | border-bottom-right-radius: 0;
53 | border-bottom-left-radius: 0;
54 | }
55 | .form-signin input[type="password"] {
56 | margin-bottom: 10px;
57 | border-top-left-radius: 0;
58 | border-top-right-radius: 0;
59 | }
--------------------------------------------------------------------------------
/public/view/vatfs/default/static/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eyunzhu/vatfs/87e68bd8e6597b9807a62309a11af355f7258265/public/view/vatfs/default/static/logo.png
--------------------------------------------------------------------------------
/public/view/vatfs/default/static/play-v.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eyunzhu/vatfs/87e68bd8e6597b9807a62309a11af355f7258265/public/view/vatfs/default/static/play-v.png
--------------------------------------------------------------------------------
/public/view/vatfs/default/static/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eyunzhu/vatfs/87e68bd8e6597b9807a62309a11af355f7258265/public/view/vatfs/default/static/search.png
--------------------------------------------------------------------------------
/public/view/vatfs/default/static/ysqss.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eyunzhu/vatfs/87e68bd8e6597b9807a62309a11af355f7258265/public/view/vatfs/default/static/ysqss.ico
--------------------------------------------------------------------------------
/vatfs/app.php:
--------------------------------------------------------------------------------
1 |
4 | * e-mail : support@eyunzhu.com
5 | * github : https://github.com/eyunzhu/vatfs
6 | * blog : http://eyunzhu.com
7 | * QQ群 : 490993740
8 | * 欢迎交流使用本程序,但请保留版权
9 | */
10 |
11 | return [
12 | "debug" => false,
13 | "default_module" => "index",//默认模块
14 | "default_controller" => "index",//默认控制器
15 | "default_method" => "index",//默认方法
16 |
17 | "default_template" => "default",//默认模版
18 | ];
--------------------------------------------------------------------------------
/vatfs/route.php:
--------------------------------------------------------------------------------
1 |
4 | * e-mail : support@eyunzhu.com
5 | * github : https://github.com/eyunzhu/vatfs
6 | * blog : http://eyunzhu.com
7 | * QQ群 : 490993740
8 | * 欢迎交流使用本程序,但请保留版权
9 | */
10 |
11 | return [
12 | "/detail/:vid" => "index/index/detail",
13 | "/detail" => "index/index/detail",
14 |
15 | "/search/:kw/:page" => "index/index/search",
16 | "/search/:kw" => "index/index/search",
17 | "/search" => "index/index/search",
18 |
19 | "/login" => "admin/index/login",
20 | "/player" => "index/index/player"
21 | ];
--------------------------------------------------------------------------------
/vendor/autoload.php:
--------------------------------------------------------------------------------
1 | =5.4",
17 | "ext-pdo": "*"
18 | },
19 | "suggest": {
20 | "ext-pdo_mysql": "For MySQL or MariaDB database",
21 | "ext-pdo_sqlsrv": "For MSSQL database on both Window/Liunx platform",
22 | "ext-pdo_dblib": "For MSSQL or Sybase database on Linux/UNIX platform",
23 | "ext-pdo_oci": "For Oracle database",
24 | "ext-pdo_oci8": "For Oracle version 8 database",
25 | "ext-pdo_pqsql": "For PostgreSQL database",
26 | "ext-pdo_sqlite": "For SQLite database"
27 | },
28 | "autoload": {
29 | "psr-4": {
30 | "Medoo\\": "/src"
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/vendor/composer/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Copyright (c) Nils Adermann, Jordi Boggiano
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is furnished
9 | to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 |
22 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_classmap.php:
--------------------------------------------------------------------------------
1 | $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
10 | '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
11 | );
12 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_namespaces.php:
--------------------------------------------------------------------------------
1 | array($vendorDir . '/workerman/workerman'),
10 | 'Whoops\\' => array($vendorDir . '/filp/whoops/src/Whoops'),
11 | 'WebGeeker\\Validation\\' => array($vendorDir . '/webgeeker/validation/src/Validation'),
12 | 'Twig\\' => array($vendorDir . '/twig/twig/src'),
13 | 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
14 | 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
15 | 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
16 | 'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'),
17 | 'Medoo\\' => array($vendorDir . '/catfan/medoo/src'),
18 | 'GatewayWorker\\' => array($vendorDir . '/workerman/gateway-worker/src'),
19 | 'GatewayClient\\' => array($vendorDir . '/workerman/gatewayclient'),
20 | );
21 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # 2.5.0
2 |
3 | * Automatically configure xdebug if available.
4 |
5 | # 2.4.1
6 |
7 | * Try harder to close all output buffers
8 |
9 | # 2.4.0
10 |
11 | * Allow to prepend and append handlers.
12 |
13 | # 2.3.2
14 |
15 | * Various fixes from the community.
16 |
17 | # 2.3.1
18 |
19 | * Prevent exception in Whoops when caught exception frame is not related to real file
20 |
21 | # 2.3.0
22 |
23 | * Show previous exception messages.
24 |
25 | # 2.2.0
26 |
27 | * Support PHP 7.2
28 |
29 | # 2.1.0
30 |
31 | * Add a `SystemFacade` to allow clients to override Whoops behavior.
32 | * Show frame arguments in `PrettyPageHandler`.
33 | * Highlight the line with the error.
34 | * Add icons to search on Google and Stack Overflow.
35 |
36 | # 2.0.0
37 |
38 | Backwards compatibility breaking changes:
39 |
40 | * `Run` class is now `final`. If you inherited from `Run`, please now instead use a custom `SystemFacade` injected into the `Run` constructor, or contribute your changes to our core.
41 | * PHP < 5.5 support dropped.
42 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/LICENSE.md:
--------------------------------------------------------------------------------
1 | # The MIT License
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "filp/whoops",
3 | "license": "MIT",
4 | "description": "php error handling for cool kids",
5 | "keywords": ["library", "error", "handling", "exception", "whoops", "throwable"],
6 | "homepage": "https://filp.github.io/whoops/",
7 | "authors": [
8 | {
9 | "name": "Filipe Dobreira",
10 | "homepage": "https://github.com/filp",
11 | "role": "Developer"
12 | }
13 | ],
14 | "require": {
15 | "php": "^5.5.9 || ^7.0",
16 | "psr/log": "^1.0.1"
17 | },
18 | "require-dev": {
19 | "phpunit/phpunit": "^4.8.35 || ^5.7",
20 | "mockery/mockery": "^0.9 || ^1.0",
21 | "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0"
22 | },
23 | "suggest": {
24 | "symfony/var-dumper": "Pretty print complex values better with var-dumper available",
25 | "whoops/soap": "Formats errors as SOAP responses"
26 | },
27 | "autoload": {
28 | "psr-4": {
29 | "Whoops\\": "src/Whoops/"
30 | }
31 | },
32 | "autoload-dev": {
33 | "psr-4": {
34 | "Whoops\\": "tests/Whoops/"
35 | }
36 | },
37 | "extra": {
38 | "branch-alias": {
39 | "dev-master": "2.2-dev"
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/src/Whoops/Exception/ErrorException.php:
--------------------------------------------------------------------------------
1 |
5 | */
6 |
7 | namespace Whoops\Exception;
8 |
9 | use ErrorException as BaseErrorException;
10 |
11 | /**
12 | * Wraps ErrorException; mostly used for typing (at least now)
13 | * to easily cleanup the stack trace of redundant info.
14 | */
15 | class ErrorException extends BaseErrorException
16 | {
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/src/Whoops/Handler/CallbackHandler.php:
--------------------------------------------------------------------------------
1 |
5 | */
6 |
7 | namespace Whoops\Handler;
8 |
9 | use InvalidArgumentException;
10 |
11 | /**
12 | * Wrapper for Closures passed as handlers. Can be used
13 | * directly, or will be instantiated automagically by Whoops\Run
14 | * if passed to Run::pushHandler
15 | */
16 | class CallbackHandler extends Handler
17 | {
18 | /**
19 | * @var callable
20 | */
21 | protected $callable;
22 |
23 | /**
24 | * @throws InvalidArgumentException If argument is not callable
25 | * @param callable $callable
26 | */
27 | public function __construct($callable)
28 | {
29 | if (!is_callable($callable)) {
30 | throw new InvalidArgumentException(
31 | 'Argument to ' . __METHOD__ . ' must be valid callable'
32 | );
33 | }
34 |
35 | $this->callable = $callable;
36 | }
37 |
38 | /**
39 | * @return int|null
40 | */
41 | public function handle()
42 | {
43 | $exception = $this->getException();
44 | $inspector = $this->getInspector();
45 | $run = $this->getRun();
46 | $callable = $this->callable;
47 |
48 | // invoke the callable directly, to get simpler stacktraces (in comparison to call_user_func).
49 | // this assumes that $callable is a properly typed php-callable, which we check in __construct().
50 | return $callable($exception, $inspector, $run);
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php:
--------------------------------------------------------------------------------
1 |
5 | */
6 |
7 | namespace Whoops\Handler;
8 |
9 | use Whoops\Exception\Inspector;
10 | use Whoops\RunInterface;
11 |
12 | interface HandlerInterface
13 | {
14 | /**
15 | * @return int|null A handler may return nothing, or a Handler::HANDLE_* constant
16 | */
17 | public function handle();
18 |
19 | /**
20 | * @param RunInterface $run
21 | * @return void
22 | */
23 | public function setRun(RunInterface $run);
24 |
25 | /**
26 | * @param \Throwable $exception
27 | * @return void
28 | */
29 | public function setException($exception);
30 |
31 | /**
32 | * @param Inspector $inspector
33 | * @return void
34 | */
35 | public function setInspector(Inspector $inspector);
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/src/Whoops/Resources/views/frame_list.html.php:
--------------------------------------------------------------------------------
1 |
4 | $frame): ?>
5 |
6 |
7 |
8 | breakOnDelimiter('\\', $tpl->escape($frame->getClass() ?: '')) ?>
9 | breakOnDelimiter('\\', $tpl->escape($frame->getFunction() ?: '')) ?>
10 |
11 |
12 |
13 | getFile() ? $tpl->breakOnDelimiter('/', $tpl->shorten($tpl->escape($frame->getFile()))) : '<#unknown>' ?>getLine() ?>
15 |
16 |
17 | ">
2 | render($frame_list) ?>
3 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/src/Whoops/Resources/views/frames_description.html.php:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/src/Whoops/Resources/views/header_outer.html.php:
--------------------------------------------------------------------------------
1 |
2 | render($header) ?>
3 |
4 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/src/Whoops/Resources/views/layout.html.php:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | escape($page_title) ?>
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | render($panel_left_outer) ?>
22 |
23 | render($panel_details_outer) ?>
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/src/Whoops/Resources/views/panel_details.html.php:
--------------------------------------------------------------------------------
1 | render($frame_code) ?>
2 | render($env_details) ?>
--------------------------------------------------------------------------------
/vendor/filp/whoops/src/Whoops/Resources/views/panel_details_outer.html.php:
--------------------------------------------------------------------------------
1 |
2 | render($panel_details) ?>
3 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/src/Whoops/Resources/views/panel_left.html.php:
--------------------------------------------------------------------------------
1 | render($header_outer);
3 | $tpl->render($frames_description);
4 | $tpl->render($frames_container);
5 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/src/Whoops/Resources/views/panel_left_outer.html.php:
--------------------------------------------------------------------------------
1 |
2 | render($panel_left) ?>
3 |
--------------------------------------------------------------------------------
/vendor/filp/whoops/src/Whoops/Util/HtmlDumperOutput.php:
--------------------------------------------------------------------------------
1 |
5 | */
6 |
7 | namespace Whoops\Util;
8 |
9 | /**
10 | * Used as output callable for Symfony\Component\VarDumper\Dumper\HtmlDumper::dump()
11 | *
12 | * @see TemplateHelper::dump()
13 | */
14 | class HtmlDumperOutput
15 | {
16 | private $output;
17 |
18 | public function __invoke($line, $depth)
19 | {
20 | // A negative depth means "end of dump"
21 | if ($depth >= 0) {
22 | // Adds a two spaces indentation to the line
23 | $this->output .= str_repeat(' ', $depth) . $line . "\n";
24 | }
25 | }
26 |
27 | public function getOutput()
28 | {
29 | return $this->output;
30 | }
31 |
32 | public function clear()
33 | {
34 | $this->output = null;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/psr/log/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 PHP Framework Interoperability Group
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/psr/log/Psr/Log/InvalidArgumentException.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/psr/log/Psr/Log/NullLogger.php:
--------------------------------------------------------------------------------
1 | logger) { }`
11 | * blocks.
12 | */
13 | class NullLogger extends AbstractLogger
14 | {
15 | /**
16 | * Logs with an arbitrary level.
17 | *
18 | * @param mixed $level
19 | * @param string $message
20 | * @param array $context
21 | *
22 | * @return void
23 | *
24 | * @throws \Psr\Log\InvalidArgumentException
25 | */
26 | public function log($level, $message, array $context = array())
27 | {
28 | // noop
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/psr/log/README.md:
--------------------------------------------------------------------------------
1 | PSR Log
2 | =======
3 |
4 | This repository holds all interfaces/classes/traits related to
5 | [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md).
6 |
7 | Note that this is not a logger of its own. It is merely an interface that
8 | describes a logger. See the specification for more details.
9 |
10 | Installation
11 | ------------
12 |
13 | ```bash
14 | composer require psr/log
15 | ```
16 |
17 | Usage
18 | -----
19 |
20 | If you need a logger, you can use the interface like this:
21 |
22 | ```php
23 | logger = $logger;
34 | }
35 |
36 | public function doSomething()
37 | {
38 | if ($this->logger) {
39 | $this->logger->info('Doing work');
40 | }
41 |
42 | try {
43 | $this->doSomethingElse();
44 | } catch (Exception $exception) {
45 | $this->logger->error('Oh no!', array('exception' => $exception));
46 | }
47 |
48 | // do something useful
49 | }
50 | }
51 | ```
52 |
53 | You can then pick one of the implementations of the interface to get a logger.
54 |
55 | If you want to implement the interface, you can require this package and
56 | implement `Psr\Log\LoggerInterface` in your code. Please read the
57 | [specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)
58 | for details.
59 |
--------------------------------------------------------------------------------
/vendor/psr/log/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "psr/log",
3 | "description": "Common interface for logging libraries",
4 | "keywords": ["psr", "psr-3", "log"],
5 | "homepage": "https://github.com/php-fig/log",
6 | "license": "MIT",
7 | "authors": [
8 | {
9 | "name": "PHP-FIG",
10 | "homepage": "http://www.php-fig.org/"
11 | }
12 | ],
13 | "require": {
14 | "php": ">=5.3.0"
15 | },
16 | "autoload": {
17 | "psr-4": {
18 | "Psr\\Log\\": "Psr/Log/"
19 | }
20 | },
21 | "extra": {
22 | "branch-alias": {
23 | "dev-master": "1.1.x-dev"
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-ctype/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018-2019 Fabien Potencier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-ctype/README.md:
--------------------------------------------------------------------------------
1 | Symfony Polyfill / Ctype
2 | ========================
3 |
4 | This component provides `ctype_*` functions to users who run php versions without the ctype extension.
5 |
6 | More information can be found in the
7 | [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
8 |
9 | License
10 | =======
11 |
12 | This library is released under the [MIT license](LICENSE).
13 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-ctype/bootstrap.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | use Symfony\Polyfill\Ctype as p;
13 |
14 | if (!function_exists('ctype_alnum')) {
15 | function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
16 | function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
17 | function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
18 | function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
19 | function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
20 | function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
21 | function ctype_print($text) { return p\Ctype::ctype_print($text); }
22 | function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
23 | function ctype_space($text) { return p\Ctype::ctype_space($text); }
24 | function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
25 | function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-ctype/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/polyfill-ctype",
3 | "type": "library",
4 | "description": "Symfony polyfill for ctype functions",
5 | "keywords": ["polyfill", "compatibility", "portable", "ctype"],
6 | "homepage": "https://symfony.com",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Gert de Pagter",
11 | "email": "BackEndTea@gmail.com"
12 | },
13 | {
14 | "name": "Symfony Community",
15 | "homepage": "https://symfony.com/contributors"
16 | }
17 | ],
18 | "require": {
19 | "php": ">=5.3.3"
20 | },
21 | "autoload": {
22 | "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" },
23 | "files": [ "bootstrap.php" ]
24 | },
25 | "suggest": {
26 | "ext-ctype": "For best performance"
27 | },
28 | "minimum-stability": "dev",
29 | "extra": {
30 | "branch-alias": {
31 | "dev-master": "1.13-dev"
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-mbstring/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015-2019 Fabien Potencier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-mbstring/README.md:
--------------------------------------------------------------------------------
1 | Symfony Polyfill / Mbstring
2 | ===========================
3 |
4 | This component provides a partial, native PHP implementation for the
5 | [Mbstring](http://php.net/mbstring) extension.
6 |
7 | More information can be found in the
8 | [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
9 |
10 | License
11 | =======
12 |
13 | This library is released under the [MIT license](LICENSE).
14 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-mbstring/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/polyfill-mbstring",
3 | "type": "library",
4 | "description": "Symfony polyfill for the Mbstring extension",
5 | "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"],
6 | "homepage": "https://symfony.com",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Nicolas Grekas",
11 | "email": "p@tchwork.com"
12 | },
13 | {
14 | "name": "Symfony Community",
15 | "homepage": "https://symfony.com/contributors"
16 | }
17 | ],
18 | "require": {
19 | "php": ">=5.3.3"
20 | },
21 | "autoload": {
22 | "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" },
23 | "files": [ "bootstrap.php" ]
24 | },
25 | "suggest": {
26 | "ext-mbstring": "For best performance"
27 | },
28 | "minimum-stability": "dev",
29 | "extra": {
30 | "branch-alias": {
31 | "dev-master": "1.13-dev"
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/twig/twig/README.rst:
--------------------------------------------------------------------------------
1 | Twig, the flexible, fast, and secure template language for PHP
2 | ==============================================================
3 |
4 | Twig is a template language for PHP, released under the new BSD license (code
5 | and documentation).
6 |
7 | Twig uses a syntax similar to the Django and Jinja template languages which
8 | inspired the Twig runtime environment.
9 |
10 | Sponsors
11 | --------
12 |
13 | .. raw:: html
14 |
15 |
16 |
17 |
18 |
19 | More Information
20 | ----------------
21 |
22 | Read the `documentation`_ for more information.
23 |
24 | .. _documentation: https://twig.symfony.com/documentation
25 |
--------------------------------------------------------------------------------
/vendor/twig/twig/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "twig/twig",
3 | "type": "library",
4 | "description": "Twig, the flexible, fast, and secure template language for PHP",
5 | "keywords": ["templating"],
6 | "homepage": "https://twig.symfony.com",
7 | "license": "BSD-3-Clause",
8 | "authors": [
9 | {
10 | "name": "Fabien Potencier",
11 | "email": "fabien@symfony.com",
12 | "homepage": "http://fabien.potencier.org",
13 | "role": "Lead Developer"
14 | },
15 | {
16 | "name": "Twig Team",
17 | "homepage": "https://twig.symfony.com/contributors",
18 | "role": "Contributors"
19 | },
20 | {
21 | "name": "Armin Ronacher",
22 | "email": "armin.ronacher@active-4.com",
23 | "role": "Project Founder"
24 | }
25 | ],
26 | "require": {
27 | "php": "^7.2.9",
28 | "symfony/polyfill-mbstring": "^1.3",
29 | "symfony/polyfill-ctype": "^1.8"
30 | },
31 | "require-dev": {
32 | "symfony/phpunit-bridge": "^4.4@dev|^5.0",
33 | "symfony/debug": "^3.4|^4.2|^5.0",
34 | "psr/container": "^1.0"
35 | },
36 | "autoload": {
37 | "psr-4" : {
38 | "Twig\\" : "src/"
39 | }
40 | },
41 | "autoload-dev": {
42 | "psr-4" : {
43 | "Twig\\Tests\\" : "tests/"
44 | }
45 | },
46 | "extra": {
47 | "branch-alias": {
48 | "dev-master": "3.0-dev"
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/deprecated.rst:
--------------------------------------------------------------------------------
1 | Deprecated Features
2 | ===================
3 |
4 | This document lists deprecated features in Twig 3.x. Deprecated features are
5 | kept for backward compatibility and removed in the next major release (a
6 | feature that was deprecated in Twig 3.x is removed in Twig 4.0).
7 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/abs.rst:
--------------------------------------------------------------------------------
1 | ``abs``
2 | =======
3 |
4 | The ``abs`` filter returns the absolute value.
5 |
6 | .. code-block:: twig
7 |
8 | {# number = -5 #}
9 |
10 | {{ number|abs }}
11 |
12 | {# outputs 5 #}
13 |
14 | .. note::
15 |
16 | Internally, Twig uses the PHP `abs`_ function.
17 |
18 | .. _`abs`: https://secure.php.net/abs
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/batch.rst:
--------------------------------------------------------------------------------
1 | ``batch``
2 | =========
3 |
4 | The ``batch`` filter "batches" items by returning a list of lists with the
5 | given number of items. A second parameter can be provided and used to fill in
6 | missing items:
7 |
8 | .. code-block:: twig
9 |
10 | {% set items = ['a', 'b', 'c', 'd', 'e', 'f', 'g'] %}
11 |
12 |
13 | {% for row in items|batch(3, 'No item') %}
14 |
15 | {% for column in row %}
16 | {{ column }} |
17 | {% endfor %}
18 |
19 | {% endfor %}
20 |
21 |
22 | The above example will be rendered as:
23 |
24 | .. code-block:: twig
25 |
26 |
27 |
28 | a |
29 | b |
30 | c |
31 |
32 |
33 | d |
34 | e |
35 | f |
36 |
37 |
38 | g |
39 | No item |
40 | No item |
41 |
42 |
43 |
44 | Arguments
45 | ---------
46 |
47 | * ``size``: The size of the batch; fractional numbers will be rounded up
48 | * ``fill``: Used to fill in missing items
49 | * ``preserve_keys``: Whether to preserve keys or not
50 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/capitalize.rst:
--------------------------------------------------------------------------------
1 | ``capitalize``
2 | ==============
3 |
4 | The ``capitalize`` filter capitalizes a value. The first character will be
5 | uppercase, all others lowercase:
6 |
7 | .. code-block:: twig
8 |
9 | {{ 'my first car'|capitalize }}
10 |
11 | {# outputs 'My first car' #}
12 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/column.rst:
--------------------------------------------------------------------------------
1 | ``column``
2 | ==========
3 |
4 | The ``column`` filter returns the values from a single column in the input
5 | array.
6 |
7 | .. code-block:: twig
8 |
9 | {% set items = [{ 'fruit' : 'apple'}, {'fruit' : 'orange' }] %}
10 |
11 | {% set fruits = items|column('fruit') %}
12 |
13 | {# fruits now contains ['apple', 'orange'] #}
14 |
15 | .. note::
16 |
17 | Internally, Twig uses the PHP `array_column`_ function.
18 |
19 | Arguments
20 | ---------
21 |
22 | * ``name``: The column name to extract
23 |
24 | .. _`array_column`: https://secure.php.net/array_column
25 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/convert_encoding.rst:
--------------------------------------------------------------------------------
1 | ``convert_encoding``
2 | ====================
3 |
4 | The ``convert_encoding`` filter converts a string from one encoding to
5 | another. The first argument is the expected output charset and the second one
6 | is the input charset:
7 |
8 | .. code-block:: twig
9 |
10 | {{ data|convert_encoding('UTF-8', 'iso-2022-jp') }}
11 |
12 | .. note::
13 |
14 | This filter relies on the `iconv`_ extension.
15 |
16 | Arguments
17 | ---------
18 |
19 | * ``to``: The output charset
20 | * ``from``: The input charset
21 |
22 | .. _`iconv`: https://secure.php.net/iconv
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/country_name.rst:
--------------------------------------------------------------------------------
1 | ``country_name``
2 | ================
3 |
4 | .. versionadded:: 2.12
5 | The ``country_name`` filter was added in Twig 2.12.
6 |
7 | The ``country_name`` filter returns the country name given its ISO-3166
8 | two-letter code:
9 |
10 | .. code-block:: twig
11 |
12 | {# France #}
13 | {{ 'FR'|country_name }}
14 |
15 | By default, the filter uses the current locale. You can pass it explicitly:
16 |
17 | .. code-block:: twig
18 |
19 | {# États-Unis #}
20 | {{ 'US'|country_name('fr') }}
21 |
22 | .. note::
23 |
24 | The ``country_name`` filter is part of the ``IntlExtension`` which is not
25 | installed by default. Install it first:
26 |
27 | .. code-block:: bash
28 |
29 | $ composer req twig/intl-extra
30 |
31 | Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
32 | explictly on the Twig environment::
33 |
34 | use Twig\Extra\Intl\IntlExtension;
35 |
36 | $twig = new \Twig\Environment(...);
37 | $twig->addExtension(new IntlExtension());
38 |
39 | Arguments
40 | ---------
41 |
42 | * ``locale``: The locale
43 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/currency_name.rst:
--------------------------------------------------------------------------------
1 | ``currency_name``
2 | =================
3 |
4 | .. versionadded:: 2.12
5 | The ``currency_name`` filter was added in Twig 2.12.
6 |
7 | The ``currency_name`` filter returns the currency name given its three-letter
8 | code:
9 |
10 | .. code-block:: twig
11 |
12 | {# Euro #}
13 | {{ 'EUR'|currency_name }}
14 |
15 | {# Japanese Yen #}
16 | {{ 'JPY'|currency_name }}
17 |
18 | By default, the filter uses the current locale. You can pass it explicitly:
19 |
20 | .. code-block:: twig
21 |
22 | {# yen japonais #}
23 | {{ 'JPY'|currency_name('fr_FR') }}
24 |
25 | .. note::
26 |
27 | The ``currency_name`` filter is part of the ``IntlExtension`` which is not
28 | installed by default. Install it first:
29 |
30 | .. code-block:: bash
31 |
32 | $ composer req twig/intl-extra
33 |
34 | Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
35 | explictly on the Twig environment::
36 |
37 | use Twig\Extra\Intl\IntlExtension;
38 |
39 | $twig = new \Twig\Environment(...);
40 | $twig->addExtension(new IntlExtension());
41 |
42 | Arguments
43 | ---------
44 |
45 | * ``locale``: The locale
46 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/currency_symbol.rst:
--------------------------------------------------------------------------------
1 | ``currency_symbol``
2 | ===================
3 |
4 | .. versionadded:: 2.12
5 | The ``currency_symbol`` filter was added in Twig 2.12.
6 |
7 | The ``currency_symbol`` filter returns the currency symbol given its three-letter
8 | code:
9 |
10 | .. code-block:: twig
11 |
12 | {# € #}
13 | {{ 'EUR'|currency_symbol }}
14 |
15 | {# ¥ #}
16 | {{ 'JPY'|currency_symbol }}
17 |
18 | By default, the filter uses the current locale. You can pass it explicitly:
19 |
20 | .. code-block:: twig
21 |
22 | {# ¥ #}
23 | {{ 'JPY'|currency_symbol('fr') }}
24 |
25 | .. note::
26 |
27 | The ``currency_symbol`` filter is part of the ``IntlExtension`` which is not
28 | installed by default. Install it first:
29 |
30 | .. code-block:: bash
31 |
32 | $ composer req twig/intl-extra
33 |
34 | Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
35 | explictly on the Twig environment::
36 |
37 | use Twig\Extra\Intl\IntlExtension;
38 |
39 | $twig = new \Twig\Environment(...);
40 | $twig->addExtension(new IntlExtension());
41 |
42 | Arguments
43 | ---------
44 |
45 | * ``locale``: The locale
46 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/data_uri.rst:
--------------------------------------------------------------------------------
1 | ``data_uri``
2 | ============
3 |
4 | .. versionadded:: 2.12
5 | The ``data_uri`` filter was added in Twig 2.12.
6 |
7 | The ``data_uri`` filter generates a URL using the data scheme as defined in RFC
8 | 2397:
9 |
10 | .. code-block:: twig
11 |
12 | {{ image_data|data_uri }}
13 |
14 | {{ source('path_to_image')|data_uri }}
15 |
16 | {# force the mime type, disable the guessing of the mime type #}
17 | {{ image_data|data_uri(mime="image/svg") }}
18 |
19 | {# also works with plain text #}
20 | {{ 'foobar'|data_uri(mime="text/html") }}
21 |
22 | {# add some extra parameters #}
23 | {{ 'foobar'|data_uri(mime="text/html", parameters={charset: "ascii"}) }}
24 |
25 | .. note::
26 |
27 | The ``data_uri`` filter is part of the ``HtmlExtension`` which is not
28 | installed by default. Install it first:
29 |
30 | .. code-block:: bash
31 |
32 | $ composer req twig/html-extra
33 |
34 | Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
35 | explictly on the Twig environment::
36 |
37 | use Twig\Extra\Html\HtmlExtension;
38 |
39 | $twig = new \Twig\Environment(...);
40 | $twig->addExtension(new HtmlExtension());
41 |
42 | .. note::
43 |
44 | The filter does not perform any length validation on purpose (limits depends
45 | on the usage context), validation should be done before calling this filter.
46 |
47 | Arguments
48 | ---------
49 |
50 | * ``mime``: The mime type
51 | * ``parameters``: An array of parameters
52 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/date_modify.rst:
--------------------------------------------------------------------------------
1 | ``date_modify``
2 | ===============
3 |
4 | The ``date_modify`` filter modifies a date with a given modifier string:
5 |
6 | .. code-block:: twig
7 |
8 | {{ post.published_at|date_modify("+1 day")|date("m/d/Y") }}
9 |
10 | The ``date_modify`` filter accepts strings (it must be in a format supported
11 | by the `strtotime`_ function) or `DateTime`_ instances. You can combine
12 | it with the :doc:`date` filter for formatting.
13 |
14 | Arguments
15 | ---------
16 |
17 | * ``modifier``: The modifier
18 |
19 | .. _`strtotime`: https://secure.php.net/strtotime
20 | .. _`DateTime`: https://secure.php.net/DateTime
21 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/default.rst:
--------------------------------------------------------------------------------
1 | ``default``
2 | ===========
3 |
4 | The ``default`` filter returns the passed default value if the value is
5 | undefined or empty, otherwise the value of the variable:
6 |
7 | .. code-block:: twig
8 |
9 | {{ var|default('var is not defined') }}
10 |
11 | {{ var.foo|default('foo item on var is not defined') }}
12 |
13 | {{ var['foo']|default('foo item on var is not defined') }}
14 |
15 | {{ ''|default('passed var is empty') }}
16 |
17 | When using the ``default`` filter on an expression that uses variables in some
18 | method calls, be sure to use the ``default`` filter whenever a variable can be
19 | undefined:
20 |
21 | .. code-block:: twig
22 |
23 | {{ var.method(foo|default('foo'))|default('foo') }}
24 |
25 | .. note::
26 |
27 | Read the documentation for the :doc:`defined<../tests/defined>` and
28 | :doc:`empty<../tests/empty>` tests to learn more about their semantics.
29 |
30 | Arguments
31 | ---------
32 |
33 | * ``default``: The default value
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/filter.rst:
--------------------------------------------------------------------------------
1 | ``filter``
2 | ==========
3 |
4 | The ``filter`` filter filters elements of a sequence or a mapping using an arrow
5 | function. The arrow function receives the value of the sequence or mapping:
6 |
7 | .. code-block:: twig
8 |
9 | {% set sizes = [34, 36, 38, 40, 42] %}
10 |
11 | {{ sizes|filter(v => v > 38)|join(', ') }}
12 | {# output 40, 42 #}
13 |
14 | Combined with the ``for`` tag, it allows to filter the items to iterate over:
15 |
16 | .. code-block:: twig
17 |
18 | {% for v in sizes|filter(v => v > 38) -%}
19 | {{ v }}
20 | {% endfor %}
21 | {# output 40 42 #}
22 |
23 | It also works with mappings:
24 |
25 | .. code-block:: twig
26 |
27 | {% set sizes = {
28 | xs: 34,
29 | s: 36,
30 | m: 38,
31 | l: 40,
32 | xl: 42,
33 | } %}
34 |
35 | {% for k, v in sizes|filter(v => v > 38) -%}
36 | {{ k }} = {{ v }}
37 | {% endfor %}
38 | {# output l = 40 xl = 42 #}
39 |
40 | The arrow function also receives the key as a second argument:
41 |
42 | .. code-block:: twig
43 |
44 | {% for k, v in sizes|filter((v, k) => v > 38 and k != "xl") -%}
45 | {{ k }} = {{ v }}
46 | {% endfor %}
47 | {# output l = 40 #}
48 |
49 | Note that the arrow function has access to the current context.
50 |
51 | Arguments
52 | ---------
53 |
54 | * ``array``: The sequence or mapping
55 | * ``arrow``: The arrow function
56 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/first.rst:
--------------------------------------------------------------------------------
1 | ``first``
2 | =========
3 |
4 | The ``first`` filter returns the first "element" of a sequence, a mapping, or
5 | a string:
6 |
7 | .. code-block:: twig
8 |
9 | {{ [1, 2, 3, 4]|first }}
10 | {# outputs 1 #}
11 |
12 | {{ { a: 1, b: 2, c: 3, d: 4 }|first }}
13 | {# outputs 1 #}
14 |
15 | {{ '1234'|first }}
16 | {# outputs 1 #}
17 |
18 | .. note::
19 |
20 | It also works with objects implementing the `Traversable`_ interface.
21 |
22 | .. _`Traversable`: https://secure.php.net/manual/en/class.traversable.php
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/format.rst:
--------------------------------------------------------------------------------
1 | ``format``
2 | ==========
3 |
4 | The ``format`` filter formats a given string by replacing the placeholders
5 | (placeholders follows the `sprintf`_ notation):
6 |
7 | .. code-block:: twig
8 |
9 | {{ "I like %s and %s."|format(foo, "bar") }}
10 |
11 | {# outputs I like foo and bar
12 | if the foo parameter equals to the foo string. #}
13 |
14 | .. _`sprintf`: https://secure.php.net/sprintf
15 |
16 | .. seealso:: :doc:`replace`
17 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/format_date.rst:
--------------------------------------------------------------------------------
1 | ``format_date``
2 | ===============
3 |
4 | .. versionadded:: 2.12
5 | The ``format_date`` filter was added in Twig 2.12.
6 |
7 | The ``format_date`` filter formats a date. It behaves in the exact same way as
8 | the ``format_datetime`` filter, but without the time.
9 |
10 | .. note::
11 |
12 | The ``format_date`` filter is part of the ``IntlExtension`` which is not
13 | installed by default. Install it first:
14 |
15 | .. code-block:: bash
16 |
17 | $ composer req twig/intl-extra
18 |
19 | Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
20 | explictly on the Twig environment::
21 |
22 | use Twig\Extra\Intl\IntlExtension;
23 |
24 | $twig = new \Twig\Environment(...);
25 | $twig->addExtension(new IntlExtension());
26 |
27 | Arguments
28 | ---------
29 |
30 | * ``locale``: The locale
31 | * ``dateFormat``: The date format
32 | * ``pattern``: A date time pattern
33 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/format_time.rst:
--------------------------------------------------------------------------------
1 | ``format_time``
2 | ===============
3 |
4 | .. versionadded:: 2.12
5 | The ``format_time`` filter was added in Twig 2.12.
6 |
7 | The ``format_time`` filter formats a time. It behaves in the exact same way as
8 | the ``format_datetime`` filter, but without the date.
9 |
10 | .. note::
11 |
12 | The ``format_time`` filter is part of the ``IntlExtension`` which is not
13 | installed by default. Install it first:
14 |
15 | .. code-block:: bash
16 |
17 | $ composer req twig/intl-extra
18 |
19 | Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
20 | explictly on the Twig environment::
21 |
22 | use Twig\Extra\Intl\IntlExtension;
23 |
24 | $twig = new \Twig\Environment(...);
25 | $twig->addExtension(new IntlExtension());
26 |
27 | Arguments
28 | ---------
29 |
30 | * ``locale``: The locale
31 | * ``timeFormat``: The time format
32 | * ``pattern``: A date time pattern
33 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/index.rst:
--------------------------------------------------------------------------------
1 | Filters
2 | =======
3 |
4 | .. toctree::
5 | :maxdepth: 1
6 |
7 | abs
8 | batch
9 | capitalize
10 | column
11 | convert_encoding
12 | country_name
13 | currency_name
14 | currency_symbol
15 | data_uri
16 | date
17 | date_modify
18 | default
19 | escape
20 | filter
21 | first
22 | format
23 | format_currency
24 | format_date
25 | format_datetime
26 | format_number
27 | format_time
28 | html_to_markdown
29 | inline_css
30 | inky_to_html
31 | join
32 | json_encode
33 | keys
34 | language_name
35 | last
36 | length
37 | locale_name
38 | lower
39 | map
40 | markdown_to_html
41 | merge
42 | nl2br
43 | number_format
44 | raw
45 | reduce
46 | replace
47 | reverse
48 | round
49 | slice
50 | sort
51 | spaceless
52 | split
53 | striptags
54 | timezone_name
55 | title
56 | trim
57 | u
58 | upper
59 | url_encode
60 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/inky_to_html.rst:
--------------------------------------------------------------------------------
1 | ``inky_to_html``
2 | ================
3 |
4 | .. versionadded:: 2.12
5 | The ``inky_to_html`` filter was added in Twig 2.12.
6 |
7 | The ``inky_to_html`` filter processes an `inky email template
8 | `_:
9 |
10 | .. code-block:: twig
11 |
12 | {% apply inky_to_html %}
13 |
14 |
15 |
16 |
17 | {% endapply %}
18 |
19 | You can also use the filter on an included file:
20 |
21 | .. code-block:: twig
22 |
23 | {{ include('some_template.inky.twig')|inky_to_html }}
24 |
25 | .. note::
26 |
27 | The ``inky_to_html`` filter is part of the ``InkyExtension`` which is not
28 | installed by default. Install it first:
29 |
30 | .. code-block:: bash
31 |
32 | $ composer req twig/inky-extra
33 |
34 | Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
35 | explictly on the Twig environment::
36 |
37 | use Twig\Extra\Inky\InkyExtension;
38 |
39 | $twig = new \Twig\Environment(...);
40 | $twig->addExtension(new InkyExtension());
41 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/join.rst:
--------------------------------------------------------------------------------
1 | ``join``
2 | ========
3 |
4 | The ``join`` filter returns a string which is the concatenation of the items
5 | of a sequence:
6 |
7 | .. code-block:: twig
8 |
9 | {{ [1, 2, 3]|join }}
10 | {# returns 123 #}
11 |
12 | The separator between elements is an empty string per default, but you can
13 | define it with the optional first parameter:
14 |
15 | .. code-block:: twig
16 |
17 | {{ [1, 2, 3]|join('|') }}
18 | {# outputs 1|2|3 #}
19 |
20 | A second parameter can also be provided that will be the separator used between
21 | the last two items of the sequence:
22 |
23 | .. code-block:: twig
24 |
25 | {{ [1, 2, 3]|join(', ', ' and ') }}
26 | {# outputs 1, 2 and 3 #}
27 |
28 | Arguments
29 | ---------
30 |
31 | * ``glue``: The separator
32 | * ``and``: The separator for the last pair of input items
33 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/json_encode.rst:
--------------------------------------------------------------------------------
1 | ``json_encode``
2 | ===============
3 |
4 | The ``json_encode`` filter returns the JSON representation of a value:
5 |
6 | .. code-block:: twig
7 |
8 | {{ data|json_encode() }}
9 |
10 | .. note::
11 |
12 | Internally, Twig uses the PHP `json_encode`_ function.
13 |
14 | Arguments
15 | ---------
16 |
17 | * ``options``: A bitmask of `json_encode options`_: ``{{
18 | data|json_encode(constant('JSON_PRETTY_PRINT')) }}``.
19 | Combine constants using :ref:`bitwise operators`:
20 | ``{{ data|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_HEX_QUOT')) }}``
21 |
22 | .. _`json_encode`: https://secure.php.net/json_encode
23 | .. _`json_encode options`: https://secure.php.net/manual/en/json.constants.php
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/keys.rst:
--------------------------------------------------------------------------------
1 | ``keys``
2 | ========
3 |
4 | The ``keys`` filter returns the keys of an array. It is useful when you want to
5 | iterate over the keys of an array:
6 |
7 | .. code-block:: twig
8 |
9 | {% for key in array|keys %}
10 | ...
11 | {% endfor %}
12 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/language_name.rst:
--------------------------------------------------------------------------------
1 | ``language_name``
2 | =================
3 |
4 | .. versionadded:: 2.12
5 | The ``language_name`` filter was added in Twig 2.12.
6 |
7 | The ``language_name`` filter returns the language name given its two-letter
8 | code:
9 |
10 | .. code-block:: twig
11 |
12 | {# German #}
13 | {{ 'de'|language_name }}
14 |
15 | By default, the filter uses the current locale. You can pass it explicitly:
16 |
17 | .. code-block:: twig
18 |
19 | {# allemand #}
20 | {{ 'de'|language_name('fr') }}
21 |
22 | {# français canadien #}
23 | {{ 'fr_CA'|language_name('fr_FR') }}
24 |
25 | .. note::
26 |
27 | The ``language_name`` filter is part of the ``IntlExtension`` which is not
28 | installed by default. Install it first:
29 |
30 | .. code-block:: bash
31 |
32 | $ composer req twig/intl-extra
33 |
34 | Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
35 | explictly on the Twig environment::
36 |
37 | use Twig\Extra\Intl\IntlExtension;
38 |
39 | $twig = new \Twig\Environment(...);
40 | $twig->addExtension(new IntlExtension());
41 |
42 | Arguments
43 | ---------
44 |
45 | * ``locale``: The locale
46 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/last.rst:
--------------------------------------------------------------------------------
1 | ``last``
2 | ========
3 |
4 | The ``last`` filter returns the last "element" of a sequence, a mapping, or
5 | a string:
6 |
7 | .. code-block:: twig
8 |
9 | {{ [1, 2, 3, 4]|last }}
10 | {# outputs 4 #}
11 |
12 | {{ { a: 1, b: 2, c: 3, d: 4 }|last }}
13 | {# outputs 4 #}
14 |
15 | {{ '1234'|last }}
16 | {# outputs 4 #}
17 |
18 | .. note::
19 |
20 | It also works with objects implementing the `Traversable`_ interface.
21 |
22 | .. _`Traversable`: https://secure.php.net/manual/en/class.traversable.php
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/length.rst:
--------------------------------------------------------------------------------
1 | ``length``
2 | ==========
3 |
4 | The ``length`` filter returns the number of items of a sequence or mapping, or
5 | the length of a string.
6 |
7 | For objects that implement the ``Countable`` interface, ``length`` will use the
8 | return value of the ``count()`` method.
9 |
10 | For objects that implement the ``__toString()`` magic method (and not ``Countable``),
11 | it will return the length of the string provided by that method.
12 |
13 | For objects that implement the ``IteratorAggregate`` interface, ``length`` will use the return value of the ``iterator_count()`` method.
14 |
15 | .. code-block:: twig
16 |
17 | {% if users|length > 10 %}
18 | ...
19 | {% endif %}
20 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/locale_name.rst:
--------------------------------------------------------------------------------
1 | ``locale_name``
2 | ===============
3 |
4 | .. versionadded:: 2.12
5 | The ``locale_name`` filter was added in Twig 2.12.
6 |
7 | The ``locale_name`` filter returns the locale name given its two-letter
8 | code:
9 |
10 | .. code-block:: twig
11 |
12 | {# German #}
13 | {{ 'de'|locale_name }}
14 |
15 | By default, the filter uses the current locale. You can pass it explicitly:
16 |
17 | .. code-block:: twig
18 |
19 | {# allemand #}
20 | {{ 'de'|locale_name('fr') }}
21 |
22 | {# français (Canada) #}
23 | {{ 'fr_CA'|locale_name('fr_FR') }}
24 |
25 | .. note::
26 |
27 | The ``locale_name`` filter is part of the ``IntlExtension`` which is not
28 | installed by default. Install it first:
29 |
30 | .. code-block:: bash
31 |
32 | $ composer req twig/intl-extra
33 |
34 | Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
35 | explictly on the Twig environment::
36 |
37 | use Twig\Extra\Intl\IntlExtension;
38 |
39 | $twig = new \Twig\Environment(...);
40 | $twig->addExtension(new IntlExtension());
41 |
42 | Arguments
43 | ---------
44 |
45 | * ``locale``: The locale
46 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/lower.rst:
--------------------------------------------------------------------------------
1 | ``lower``
2 | =========
3 |
4 | The ``lower`` filter converts a value to lowercase:
5 |
6 | .. code-block:: twig
7 |
8 | {{ 'WELCOME'|lower }}
9 |
10 | {# outputs 'welcome' #}
11 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/map.rst:
--------------------------------------------------------------------------------
1 | ``map``
2 | =======
3 |
4 | The ``map`` filter applies an arrow function to the elements of a sequence or a
5 | mapping. The arrow function receives the value of the sequence or mapping:
6 |
7 | .. code-block:: twig
8 |
9 | {% set people = [
10 | {first: "Bob", last: "Smith"},
11 | {first: "Alice", last: "Dupond"},
12 | ] %}
13 |
14 | {{ people|map(p => "#{p.first} #{p.last}")|join(', ') }}
15 | {# outputs Bob Smith, Alice Dupond #}
16 |
17 | The arrow function also receives the key as a second argument:
18 |
19 | .. code-block:: twig
20 |
21 | {% set people = {
22 | "Bob": "Smith",
23 | "Alice": "Dupond",
24 | } %}
25 |
26 | {{ people|map((last, first) => "#{first} #{last}")|join(', ') }}
27 | {# outputs Bob Smith, Alice Dupond #}
28 |
29 | Note that the arrow function has access to the current context.
30 |
31 | Arguments
32 | ---------
33 |
34 | * ``arrow``: The arrow function
35 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/merge.rst:
--------------------------------------------------------------------------------
1 | ``merge``
2 | =========
3 |
4 | The ``merge`` filter merges an array with another array:
5 |
6 | .. code-block:: twig
7 |
8 | {% set values = [1, 2] %}
9 |
10 | {% set values = values|merge(['apple', 'orange']) %}
11 |
12 | {# values now contains [1, 2, 'apple', 'orange'] #}
13 |
14 | New values are added at the end of the existing ones.
15 |
16 | The ``merge`` filter also works on hashes:
17 |
18 | .. code-block:: twig
19 |
20 | {% set items = { 'apple': 'fruit', 'orange': 'fruit', 'peugeot': 'unknown' } %}
21 |
22 | {% set items = items|merge({ 'peugeot': 'car', 'renault': 'car' }) %}
23 |
24 | {# items now contains { 'apple': 'fruit', 'orange': 'fruit', 'peugeot': 'car', 'renault': 'car' } #}
25 |
26 | For hashes, the merging process occurs on the keys: if the key does not
27 | already exist, it is added but if the key already exists, its value is
28 | overridden.
29 |
30 | .. tip::
31 |
32 | If you want to ensure that some values are defined in an array (by given
33 | default values), reverse the two elements in the call:
34 |
35 | .. code-block:: twig
36 |
37 | {% set items = { 'apple': 'fruit', 'orange': 'fruit' } %}
38 |
39 | {% set items = { 'apple': 'unknown' }|merge(items) %}
40 |
41 | {# items now contains { 'apple': 'fruit', 'orange': 'fruit' } #}
42 |
43 | .. note::
44 |
45 | Internally, Twig uses the PHP `array_merge`_ function. It supports
46 | Traversable objects by transforming those to arrays.
47 |
48 | .. _`array_merge`: https://secure.php.net/array_merge
49 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/nl2br.rst:
--------------------------------------------------------------------------------
1 | ``nl2br``
2 | =========
3 |
4 | The ``nl2br`` filter inserts HTML line breaks before all newlines in a string:
5 |
6 | .. code-block:: twig
7 |
8 | {{ "I like Twig.\nYou will like it too."|nl2br }}
9 | {# outputs
10 |
11 | I like Twig.
12 | You will like it too.
13 |
14 | #}
15 |
16 | .. note::
17 |
18 | The ``nl2br`` filter pre-escapes the input before applying the
19 | transformation.
20 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/raw.rst:
--------------------------------------------------------------------------------
1 | ``raw``
2 | =======
3 |
4 | The ``raw`` filter marks the value as being "safe", which means that in an
5 | environment with automatic escaping enabled this variable will not be escaped
6 | if ``raw`` is the last filter applied to it:
7 |
8 | .. code-block:: twig
9 |
10 | {% autoescape %}
11 | {{ var|raw }} {# var won't be escaped #}
12 | {% endautoescape %}
13 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/reduce.rst:
--------------------------------------------------------------------------------
1 | ``reduce``
2 | ==========
3 |
4 | The ``reduce`` filter iteratively reduces a sequence or a mapping to a single
5 | value using an arrow function, so as to reduce it to a single value. The arrow
6 | function receives the return value of the previous iteration and the current
7 | value of the sequence or mapping:
8 |
9 | .. code-block:: twig
10 |
11 | {% set numbers = [1, 2, 3] %}
12 |
13 | {{ numbers|reduce((carry, v) => carry + v) }}
14 | {# output 6 #}
15 |
16 | The ``reduce`` filter takes an ``initial`` value as a second argument:
17 |
18 | .. code-block:: twig
19 |
20 | {{ numbers|reduce((carry, v) => carry + v, 10) }}
21 | {# output 16 #}
22 |
23 | Note that the arrow function has access to the current context.
24 |
25 | Arguments
26 | ---------
27 |
28 | * ``arrow``: The arrow function
29 | * ``initial``: The initial value
30 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/replace.rst:
--------------------------------------------------------------------------------
1 | ``replace``
2 | ===========
3 |
4 | The ``replace`` filter formats a given string by replacing the placeholders
5 | (placeholders are free-form):
6 |
7 | .. code-block:: twig
8 |
9 | {{ "I like %this% and %that%."|replace({'%this%': foo, '%that%': "bar"}) }}
10 |
11 | {# outputs I like foo and bar
12 | if the foo parameter equals to the foo string. #}
13 |
14 | {# using % as a delimiter is purely conventional and optional #}
15 |
16 | {{ "I like this and --that--."|replace({'this': foo, '--that--': "bar"}) }}
17 |
18 | {# outputs I like foo and bar #}
19 |
20 | Arguments
21 | ---------
22 |
23 | * ``from``: The placeholder values
24 |
25 | .. seealso:: :doc:`format`
26 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/reverse.rst:
--------------------------------------------------------------------------------
1 | ``reverse``
2 | ===========
3 |
4 | The ``reverse`` filter reverses a sequence, a mapping, or a string:
5 |
6 | .. code-block:: twig
7 |
8 | {% for user in users|reverse %}
9 | ...
10 | {% endfor %}
11 |
12 | {{ '1234'|reverse }}
13 |
14 | {# outputs 4321 #}
15 |
16 | .. tip::
17 |
18 | For sequences and mappings, numeric keys are not preserved. To reverse
19 | them as well, pass ``true`` as an argument to the ``reverse`` filter:
20 |
21 | .. code-block:: twig
22 |
23 | {% for key, value in {1: "a", 2: "b", 3: "c"}|reverse %}
24 | {{ key }}: {{ value }}
25 | {%- endfor %}
26 |
27 | {# output: 0: c 1: b 2: a #}
28 |
29 | {% for key, value in {1: "a", 2: "b", 3: "c"}|reverse(true) %}
30 | {{ key }}: {{ value }}
31 | {%- endfor %}
32 |
33 | {# output: 3: c 2: b 1: a #}
34 |
35 | .. note::
36 |
37 | It also works with objects implementing the `Traversable`_ interface.
38 |
39 | Arguments
40 | ---------
41 |
42 | * ``preserve_keys``: Preserve keys when reversing a mapping or a sequence.
43 |
44 | .. _`Traversable`: https://secure.php.net/Traversable
45 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/round.rst:
--------------------------------------------------------------------------------
1 | ``round``
2 | =========
3 |
4 | The ``round`` filter rounds a number to a given precision:
5 |
6 | .. code-block:: twig
7 |
8 | {{ 42.55|round }}
9 | {# outputs 43 #}
10 |
11 | {{ 42.55|round(1, 'floor') }}
12 | {# outputs 42.5 #}
13 |
14 | The ``round`` filter takes two optional arguments; the first one specifies the
15 | precision (default is ``0``) and the second the rounding method (default is
16 | ``common``):
17 |
18 | * ``common`` rounds either up or down (rounds the value up to precision decimal
19 | places away from zero, when it is half way there -- making 1.5 into 2 and
20 | -1.5 into -2);
21 |
22 | * ``ceil`` always rounds up;
23 |
24 | * ``floor`` always rounds down.
25 |
26 | .. note::
27 |
28 | The ``//`` operator is equivalent to ``|round(0, 'floor')``.
29 |
30 | Arguments
31 | ---------
32 |
33 | * ``precision``: The rounding precision
34 | * ``method``: The rounding method
35 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/sort.rst:
--------------------------------------------------------------------------------
1 | ``sort``
2 | ========
3 |
4 | .. versionadded:: 2.12
5 | The ``arrow`` argument was added in Twig 2.12.
6 |
7 | The ``sort`` filter sorts an array:
8 |
9 | .. code-block:: twig
10 |
11 | {% for user in users|sort %}
12 | ...
13 | {% endfor %}
14 |
15 | .. note::
16 |
17 | Internally, Twig uses the PHP `asort`_ function to maintain index
18 | association. It supports Traversable objects by transforming
19 | those to arrays.
20 |
21 | You can pass an arrow function to sort the array:
22 |
23 | .. code-block:: twig
24 |
25 | {% set fruits = [
26 | { name: 'Apples', quantity: 5 },
27 | { name: 'Oranges', quantity: 2 },
28 | { name: 'Grapes', quantity: 4 },
29 | ] %}
30 |
31 | {% for fruit in fruits|sort((a, b) => a.quantity <=> b.quantity)|column('name') %}
32 | {{ fruit }}
33 | {% endfor %}
34 |
35 | {# output in this order: Oranges, Grapes, Apples #}
36 |
37 | Note the usage of the `spaceship`_ operator to simplify the comparison.
38 |
39 | Arguments
40 | ---------
41 |
42 | * ``arrow``: An arrow function
43 |
44 | .. _`asort`: https://secure.php.net/asort
45 | .. _`spaceship`: https://www.php.net/manual/en/language.operators.comparison.php
46 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/split.rst:
--------------------------------------------------------------------------------
1 | ``split``
2 | =========
3 |
4 | The ``split`` filter splits a string by the given delimiter and returns a list
5 | of strings:
6 |
7 | .. code-block:: twig
8 |
9 | {% set foo = "one,two,three"|split(',') %}
10 | {# foo contains ['one', 'two', 'three'] #}
11 |
12 | You can also pass a ``limit`` argument:
13 |
14 | * If ``limit`` is positive, the returned array will contain a maximum of
15 | limit elements with the last element containing the rest of string;
16 |
17 | * If ``limit`` is negative, all components except the last -limit are
18 | returned;
19 |
20 | * If ``limit`` is zero, then this is treated as 1.
21 |
22 | .. code-block:: twig
23 |
24 | {% set foo = "one,two,three,four,five"|split(',', 3) %}
25 | {# foo contains ['one', 'two', 'three,four,five'] #}
26 |
27 | If the ``delimiter`` is an empty string, then value will be split by equal
28 | chunks. Length is set by the ``limit`` argument (one character by default).
29 |
30 | .. code-block:: twig
31 |
32 | {% set foo = "123"|split('') %}
33 | {# foo contains ['1', '2', '3'] #}
34 |
35 | {% set bar = "aabbcc"|split('', 2) %}
36 | {# bar contains ['aa', 'bb', 'cc'] #}
37 |
38 | .. note::
39 |
40 | Internally, Twig uses the PHP `explode`_ or `str_split`_ (if delimiter is
41 | empty) functions for string splitting.
42 |
43 | Arguments
44 | ---------
45 |
46 | * ``delimiter``: The delimiter
47 | * ``limit``: The limit argument
48 |
49 | .. _`explode`: https://secure.php.net/explode
50 | .. _`str_split`: https://secure.php.net/str_split
51 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/striptags.rst:
--------------------------------------------------------------------------------
1 | ``striptags``
2 | =============
3 |
4 | The ``striptags`` filter strips SGML/XML tags and replace adjacent whitespace
5 | by one space:
6 |
7 | .. code-block:: twig
8 |
9 | {{ some_html|striptags }}
10 |
11 | You can also provide tags which should not be stripped:
12 |
13 | .. code-block:: twig
14 |
15 | {{ some_html|striptags('
') }}
16 |
17 | In this example, the ``
``, ``
``, ``
``, and ``
`` tags won't be
18 | removed from the string.
19 |
20 | .. note::
21 |
22 | Internally, Twig uses the PHP `strip_tags`_ function.
23 |
24 | Arguments
25 | ---------
26 |
27 | * ``allowable_tags``: Tags which should not be stripped
28 |
29 | .. _`strip_tags`: https://secure.php.net/strip_tags
30 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/timezone_name.rst:
--------------------------------------------------------------------------------
1 | ``timezone_name``
2 | =================
3 |
4 | .. versionadded:: 2.12
5 | The ``timezone_name`` filter was added in Twig 2.12.
6 |
7 | The ``timezone_name`` filter returns the timezone name given a timezone identifier:
8 |
9 | .. code-block:: twig
10 |
11 | {# Central European Time (Paris) #}
12 | {{ 'Europe/Paris'|timezone_name }}
13 |
14 | {# Pacific Time (Los Angeles) #}
15 | {{ 'America/Los_Angeles'|timezone_name }}
16 |
17 | By default, the filter uses the current locale. You can pass it explicitly:
18 |
19 | .. code-block:: twig
20 |
21 | {# heure du Pacifique nord-américain (Los Angeles) #}
22 | {{ 'America/Los_Angeles'|timezone_name('fr') }}
23 |
24 | .. note::
25 |
26 | The ``timezone_name`` filter is part of the ``IntlExtension`` which is not
27 | installed by default. Install it first:
28 |
29 | .. code-block:: bash
30 |
31 | $ composer req twig/intl-extra
32 |
33 | Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
34 | explictly on the Twig environment::
35 |
36 | use Twig\Extra\Intl\IntlExtension;
37 |
38 | $twig = new \Twig\Environment(...);
39 | $twig->addExtension(new IntlExtension());
40 |
41 | Arguments
42 | ---------
43 |
44 | * ``locale``: The locale
45 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/title.rst:
--------------------------------------------------------------------------------
1 | ``title``
2 | =========
3 |
4 | The ``title`` filter returns a titlecased version of the value. Words will
5 | start with uppercase letters, all remaining characters are lowercase:
6 |
7 | .. code-block:: twig
8 |
9 | {{ 'my first car'|title }}
10 |
11 | {# outputs 'My First Car' #}
12 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/trim.rst:
--------------------------------------------------------------------------------
1 | ``trim``
2 | ========
3 |
4 | The ``trim`` filter strips whitespace (or other characters) from the beginning
5 | and end of a string:
6 |
7 | .. code-block:: twig
8 |
9 | {{ ' I like Twig. '|trim }}
10 |
11 | {# outputs 'I like Twig.' #}
12 |
13 | {{ ' I like Twig.'|trim('.') }}
14 |
15 | {# outputs ' I like Twig' #}
16 |
17 | {{ ' I like Twig. '|trim(side='left') }}
18 |
19 | {# outputs 'I like Twig. ' #}
20 |
21 | {{ ' I like Twig. '|trim(' ', 'right') }}
22 |
23 | {# outputs ' I like Twig.' #}
24 |
25 | .. note::
26 |
27 | Internally, Twig uses the PHP `trim`_, `ltrim`_, and `rtrim`_ functions.
28 |
29 | Arguments
30 | ---------
31 |
32 | * ``character_mask``: The characters to strip
33 |
34 | * ``side``: The default is to strip from the left and the right (`both`) sides, but `left`
35 | and `right` will strip from either the left side or right side only
36 |
37 | .. _`trim`: https://secure.php.net/trim
38 | .. _`ltrim`: https://secure.php.net/ltrim
39 | .. _`rtrim`: https://secure.php.net/rtrim
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/upper.rst:
--------------------------------------------------------------------------------
1 | ``upper``
2 | =========
3 |
4 | The ``upper`` filter converts a value to uppercase:
5 |
6 | .. code-block:: twig
7 |
8 | {{ 'welcome'|upper }}
9 |
10 | {# outputs 'WELCOME' #}
11 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/filters/url_encode.rst:
--------------------------------------------------------------------------------
1 | ``url_encode``
2 | ==============
3 |
4 | The ``url_encode`` filter percent encodes a given string as URL segment
5 | or an array as query string:
6 |
7 | .. code-block:: twig
8 |
9 | {{ "path-seg*ment"|url_encode }}
10 | {# outputs "path-seg%2Ament" #}
11 |
12 | {{ "string with spaces"|url_encode }}
13 | {# outputs "string%20with%20spaces" #}
14 |
15 | {{ {'param': 'value', 'foo': 'bar'}|url_encode }}
16 | {# outputs "param=value&foo=bar" #}
17 |
18 | .. note::
19 |
20 | Internally, Twig uses the PHP ``rawurlencode``.
21 |
22 | .. _`rawurlencode`: https://secure.php.net/rawurlencode
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/attribute.rst:
--------------------------------------------------------------------------------
1 | ``attribute``
2 | =============
3 |
4 | The ``attribute`` function can be used to access a "dynamic" attribute of a
5 | variable:
6 |
7 | .. code-block:: twig
8 |
9 | {{ attribute(object, method) }}
10 | {{ attribute(object, method, arguments) }}
11 | {{ attribute(array, item) }}
12 |
13 | In addition, the ``defined`` test can check for the existence of a dynamic
14 | attribute:
15 |
16 | .. code-block:: twig
17 |
18 | {{ attribute(object, method) is defined ? 'Method exists' : 'Method does not exist' }}
19 |
20 | .. note::
21 |
22 | The resolution algorithm is the same as the one used for the ``.``
23 | notation, except that the item can be any valid expression.
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/block.rst:
--------------------------------------------------------------------------------
1 | ``block``
2 | =========
3 |
4 | When a template uses inheritance and if you want to print a block multiple
5 | times, use the ``block`` function:
6 |
7 | .. code-block:: twig
8 |
9 | {% block title %}{% endblock %}
10 |
11 | {{ block('title') }}
12 |
13 | {% block body %}{% endblock %}
14 |
15 | The ``block`` function can also be used to display one block from another
16 | template:
17 |
18 | .. code-block:: twig
19 |
20 | {{ block("title", "common_blocks.twig") }}
21 |
22 | Use the ``defined`` test to check if a block exists in the context of the
23 | current template:
24 |
25 | .. code-block:: twig
26 |
27 | {% if block("footer") is defined %}
28 | ...
29 | {% endif %}
30 |
31 | {% if block("footer", "common_blocks.twig") is defined %}
32 | ...
33 | {% endif %}
34 |
35 | .. seealso:: :doc:`extends<../tags/extends>`, :doc:`parent<../functions/parent>`
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/constant.rst:
--------------------------------------------------------------------------------
1 | ``constant``
2 | ============
3 |
4 | ``constant`` returns the constant value for a given string:
5 |
6 | .. code-block:: twig
7 |
8 | {{ some_date|date(constant('DATE_W3C')) }}
9 | {{ constant('Namespace\\Classname::CONSTANT_NAME') }}
10 |
11 | You can read constants from object instances as well:
12 |
13 | .. code-block:: twig
14 |
15 | {{ constant('RSS', date) }}
16 |
17 | Use the ``defined`` test to check if a constant is defined:
18 |
19 | .. code-block:: twig
20 |
21 | {% if constant('SOME_CONST') is defined %}
22 | ...
23 | {% endif %}
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/country_timezones.rst:
--------------------------------------------------------------------------------
1 | ``country_timezones``
2 | =====================
3 |
4 | .. versionadded:: 2.12
5 | The ``country_timezones`` function was added in Twig 2.12.
6 |
7 | The ``country_timezones`` function returns the names of the timezones associated
8 | with a given country code:
9 |
10 | .. code-block:: twig
11 |
12 | {# Europe/Paris #}
13 | {{ country_timezones('FR')|join(', ') }}
14 |
15 | .. note::
16 |
17 | The ``country_timezones`` function is part of the ``IntlExtension`` which is not
18 | installed by default. Install it first:
19 |
20 | .. code-block:: bash
21 |
22 | $ composer req twig/intl-extra
23 |
24 | Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
25 | explictly on the Twig environment::
26 |
27 | use Twig\Extra\Intl\IntlExtension;
28 |
29 | $twig = new \Twig\Environment(...);
30 | $twig->addExtension(new IntlExtension());
31 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/cycle.rst:
--------------------------------------------------------------------------------
1 | ``cycle``
2 | =========
3 |
4 | The ``cycle`` function cycles on an array of values:
5 |
6 | .. code-block:: twig
7 |
8 | {% set start_year = date() | date('Y') %}
9 | {% set end_year = start_year + 5 %}
10 |
11 | {% for year in start_year..end_year %}
12 | {{ cycle(['odd', 'even'], loop.index0) }}
13 | {% endfor %}
14 |
15 | The array can contain any number of values:
16 |
17 | .. code-block:: twig
18 |
19 | {% set fruits = ['apple', 'orange', 'citrus'] %}
20 |
21 | {% for i in 0..10 %}
22 | {{ cycle(fruits, i) }}
23 | {% endfor %}
24 |
25 | Arguments
26 | ---------
27 |
28 | * ``position``: The cycle position
29 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/date.rst:
--------------------------------------------------------------------------------
1 | ``date``
2 | ========
3 |
4 | Converts an argument to a date to allow date comparison:
5 |
6 | .. code-block:: twig
7 |
8 | {% if date(user.created_at) < date('-2days') %}
9 | {# do something #}
10 | {% endif %}
11 |
12 | The argument must be in one of PHP’s supported `date and time formats`_.
13 |
14 | You can pass a timezone as the second argument:
15 |
16 | .. code-block:: twig
17 |
18 | {% if date(user.created_at) < date('-2days', 'Europe/Paris') %}
19 | {# do something #}
20 | {% endif %}
21 |
22 | If no argument is passed, the function returns the current date:
23 |
24 | .. code-block:: twig
25 |
26 | {% if date(user.created_at) < date() %}
27 | {# always! #}
28 | {% endif %}
29 |
30 | .. note::
31 |
32 | You can set the default timezone globally by calling ``setTimezone()`` on
33 | the ``core`` extension instance:
34 |
35 | .. code-block:: php
36 |
37 | $twig = new \Twig\Environment($loader);
38 | $twig->getExtension(\Twig\Extension\CoreExtension::class)->setTimezone('Europe/Paris');
39 |
40 | Arguments
41 | ---------
42 |
43 | * ``date``: The date
44 | * ``timezone``: The timezone
45 |
46 | .. _`date and time formats`: https://secure.php.net/manual/en/datetime.formats.php
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/html_classes.rst:
--------------------------------------------------------------------------------
1 | ``html_classes``
2 | ================
3 |
4 | .. versionadded:: 2.12
5 | The ``html_classes`` function was added in Twig 2.12.
6 |
7 | The ``html_classes`` function returns a string by conditionally joining class
8 | names together:
9 |
10 | .. code-block:: jinja
11 |
12 | How are you doing?
17 |
18 | .. note::
19 |
20 | The ``html_classes`` function is part of the ``HtmlExtension`` which is not
21 | installed by default. Install it first:
22 |
23 | .. code-block:: bash
24 |
25 | $ composer req twig/html-extra
26 |
27 | Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension
28 | explictly on the Twig environment::
29 |
30 | use Twig\Extra\Html\HtmlExtension;
31 |
32 | $twig = new \Twig\Environment(...);
33 | $twig->addExtension(new HtmlExtension());
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/index.rst:
--------------------------------------------------------------------------------
1 | Functions
2 | =========
3 |
4 | .. toctree::
5 | :maxdepth: 1
6 |
7 | attribute
8 | block
9 | constant
10 | cycle
11 | date
12 | dump
13 | html_classes
14 | include
15 | max
16 | min
17 | parent
18 | random
19 | range
20 | source
21 | country_timezones
22 | template_from_string
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/max.rst:
--------------------------------------------------------------------------------
1 | ``max``
2 | =======
3 |
4 | ``max`` returns the biggest value of a sequence or a set of values:
5 |
6 | .. code-block:: twig
7 |
8 | {{ max(1, 3, 2) }}
9 | {{ max([1, 3, 2]) }}
10 |
11 | When called with a mapping, max ignores keys and only compares values:
12 |
13 | .. code-block:: twig
14 |
15 | {{ max({2: "e", 1: "a", 3: "b", 5: "d", 4: "c"}) }}
16 | {# returns "e" #}
17 |
18 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/min.rst:
--------------------------------------------------------------------------------
1 | ``min``
2 | =======
3 |
4 | ``min`` returns the lowest value of a sequence or a set of values:
5 |
6 | .. code-block:: twig
7 |
8 | {{ min(1, 3, 2) }}
9 | {{ min([1, 3, 2]) }}
10 |
11 | When called with a mapping, min ignores keys and only compares values:
12 |
13 | .. code-block:: twig
14 |
15 | {{ min({2: "e", 3: "a", 1: "b", 5: "d", 4: "c"}) }}
16 | {# returns "a" #}
17 |
18 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/parent.rst:
--------------------------------------------------------------------------------
1 | ``parent``
2 | ==========
3 |
4 | When a template uses inheritance, it's possible to render the contents of the
5 | parent block when overriding a block by using the ``parent`` function:
6 |
7 | .. code-block:: twig
8 |
9 | {% extends "base.html" %}
10 |
11 | {% block sidebar %}
12 | Table Of Contents
13 | ...
14 | {{ parent() }}
15 | {% endblock %}
16 |
17 | The ``parent()`` call will return the content of the ``sidebar`` block as
18 | defined in the ``base.html`` template.
19 |
20 | .. seealso:: :doc:`extends<../tags/extends>`, :doc:`block<../functions/block>`, :doc:`block<../tags/block>`
21 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/random.rst:
--------------------------------------------------------------------------------
1 | ``random``
2 | ==========
3 |
4 | The ``random`` function returns a random value depending on the supplied
5 | parameter type:
6 |
7 | * a random item from a sequence;
8 | * a random character from a string;
9 | * a random integer between 0 and the integer parameter (inclusive).
10 | * a random integer between the integer parameter (when negative) and 0 (inclusive).
11 | * a random integer between the first integer and the second integer parameter (inclusive).
12 |
13 | .. code-block:: twig
14 |
15 | {{ random(['apple', 'orange', 'citrus']) }} {# example output: orange #}
16 | {{ random('ABC') }} {# example output: C #}
17 | {{ random() }} {# example output: 15386094 (works as the native PHP mt_rand function) #}
18 | {{ random(5) }} {# example output: 3 #}
19 | {{ random(50, 100) }} {# example output: 63 #}
20 |
21 | Arguments
22 | ---------
23 |
24 | * ``values``: The values
25 | * ``max``: The max value when values is an integer
26 |
27 | .. _`mt_rand`: https://secure.php.net/mt_rand
28 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/range.rst:
--------------------------------------------------------------------------------
1 | ``range``
2 | =========
3 |
4 | Returns a list containing an arithmetic progression of integers:
5 |
6 | .. code-block:: twig
7 |
8 | {% for i in range(0, 3) %}
9 | {{ i }},
10 | {% endfor %}
11 |
12 | {# outputs 0, 1, 2, 3, #}
13 |
14 | When step is given (as the third parameter), it specifies the increment (or
15 | decrement for negative values):
16 |
17 | .. code-block:: twig
18 |
19 | {% for i in range(0, 6, 2) %}
20 | {{ i }},
21 | {% endfor %}
22 |
23 | {# outputs 0, 2, 4, 6, #}
24 |
25 | .. note::
26 |
27 | Note that if the start is greater than the end, ``range`` assumes a step of
28 | ``-1``:
29 |
30 | .. code-block:: twig
31 |
32 | {% for i in range(3, 0) %}
33 | {{ i }},
34 | {% endfor %}
35 |
36 | {# outputs 3, 2, 1, 0, #}
37 |
38 | The Twig built-in ``..`` operator is just syntactic sugar for the ``range``
39 | function (with a step of ``1``, or ``-1`` if the start is greater than the end):
40 |
41 | .. code-block:: twig
42 |
43 | {% for i in 0..3 %}
44 | {{ i }},
45 | {% endfor %}
46 |
47 | .. tip::
48 |
49 | The ``range`` function works as the native PHP `range`_ function.
50 |
51 | Arguments
52 | ---------
53 |
54 | * ``low``: The first value of the sequence.
55 | * ``high``: The highest possible value of the sequence.
56 | * ``step``: The increment between elements of the sequence.
57 |
58 | .. _`range`: https://secure.php.net/range
59 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/source.rst:
--------------------------------------------------------------------------------
1 | ``source``
2 | ==========
3 |
4 | The ``source`` function returns the content of a template without rendering it:
5 |
6 | .. code-block:: twig
7 |
8 | {{ source('template.html') }}
9 | {{ source(some_var) }}
10 |
11 | When you set the ``ignore_missing`` flag, Twig will return an empty string if
12 | the template does not exist:
13 |
14 | .. code-block:: twig
15 |
16 | {{ source('template.html', ignore_missing = true) }}
17 |
18 | The function uses the same template loaders as the ones used to include
19 | templates. So, if you are using the filesystem loader, the templates are looked
20 | for in the paths defined by it.
21 |
22 | Arguments
23 | ---------
24 |
25 | * ``name``: The name of the template to read
26 | * ``ignore_missing``: Whether to ignore missing templates or not
27 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/functions/template_from_string.rst:
--------------------------------------------------------------------------------
1 | ``template_from_string``
2 | ========================
3 |
4 | The ``template_from_string`` function loads a template from a string:
5 |
6 | .. code-block:: twig
7 |
8 | {{ include(template_from_string("Hello {{ name }}")) }}
9 | {{ include(template_from_string(page.template)) }}
10 |
11 | To ease debugging, you can also give the template a name that will be part of
12 | any related error message:
13 |
14 | .. code-block:: twig
15 |
16 | {{ include(template_from_string(page.template, "template for page " ~ page.name)) }}
17 |
18 | .. note::
19 |
20 | The ``template_from_string`` function is not available by default. You
21 | must add the ``\Twig\Extension\StringLoaderExtension`` extension explicitly when
22 | creating your Twig environment::
23 |
24 | $twig = new \Twig\Environment(...);
25 | $twig->addExtension(new \Twig\Extension\StringLoaderExtension());
26 |
27 | .. note::
28 |
29 | Even if you will probably always use the ``template_from_string`` function
30 | with the ``include`` function, you can use it with any tag or function that
31 | takes a template as an argument (like the ``embed`` or ``extends`` tags).
32 |
33 | Arguments
34 | ---------
35 |
36 | * ``template``: The template
37 | * ``name``: A name for the template
38 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/index.rst:
--------------------------------------------------------------------------------
1 | Twig
2 | ====
3 |
4 | .. toctree::
5 | :maxdepth: 2
6 |
7 | intro
8 | installation
9 | templates
10 | api
11 | advanced
12 | internals
13 | deprecated
14 | recipes
15 | coding_standards
16 | tags/index
17 | filters/index
18 | functions/index
19 | tests/index
20 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/installation.rst:
--------------------------------------------------------------------------------
1 | Installation
2 | ============
3 |
4 | Install `Composer`_ and run the following command to get the latest version:
5 |
6 | .. code-block:: bash
7 |
8 | composer require "twig/twig:^3.0"
9 |
10 | .. _`Composer`: https://getcomposer.org/download/
11 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/apply.rst:
--------------------------------------------------------------------------------
1 | ``apply``
2 | =========
3 |
4 | The ``apply`` tag allows you to apply Twig filters on a block of template data:
5 |
6 | .. code-block:: twig
7 |
8 | {% apply upper %}
9 | This text becomes uppercase
10 | {% endapply %}
11 |
12 | You can also chain filters and pass arguments to them:
13 |
14 | .. code-block:: twig
15 |
16 | {% apply lower|escape('html') %}
17 | SOME TEXT
18 | {% endapply %}
19 |
20 | {# outputs "<strong>some text</strong>" #}
21 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/block.rst:
--------------------------------------------------------------------------------
1 | ``block``
2 | =========
3 |
4 | Blocks are used for inheritance and act as placeholders and replacements at
5 | the same time. They are documented in detail in the documentation for the
6 | :doc:`extends<../tags/extends>` tag.
7 |
8 | Block names should consist of alphanumeric characters, and underscores. Dashes
9 | are not permitted.
10 |
11 | .. seealso:: :doc:`block<../functions/block>`, :doc:`parent<../functions/parent>`, :doc:`use<../tags/use>`, :doc:`extends<../tags/extends>`
12 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/deprecated.rst:
--------------------------------------------------------------------------------
1 | ``deprecated``
2 | ==============
3 |
4 | Twig generates a deprecation notice (via a call to the ``trigger_error()``
5 | PHP function) where the ``deprecated`` tag is used in a template:
6 |
7 | .. code-block:: twig
8 |
9 | {# base.twig #}
10 | {% deprecated 'The "base.twig" template is deprecated, use "layout.twig" instead.' %}
11 | {% extends 'layout.twig' %}
12 |
13 | Also you can deprecate a block in the following way:
14 |
15 | .. code-block:: twig
16 |
17 | {% block hey %}
18 | {% deprecated 'The "hey" block is deprecated, use "greet" instead.' %}
19 | {{ block('greet') }}
20 | {% endblock %}
21 |
22 | {% block greet %}
23 | Hey you!
24 | {% endblock %}
25 |
26 | Note that by default, the deprecation notices are silenced and never displayed nor logged.
27 | See :ref:`deprecation-notices` to learn how to handle them.
28 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/do.rst:
--------------------------------------------------------------------------------
1 | ``do``
2 | ======
3 |
4 | The ``do`` tag works exactly like the regular variable expression (``{{ ...
5 | }}``) just that it doesn't print anything:
6 |
7 | .. code-block:: twig
8 |
9 | {% do 1 + 2 %}
10 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/flush.rst:
--------------------------------------------------------------------------------
1 | ``flush``
2 | =========
3 |
4 | The ``flush`` tag tells Twig to flush the output buffer:
5 |
6 | .. code-block:: twig
7 |
8 | {% flush %}
9 |
10 | .. note::
11 |
12 | Internally, Twig uses the PHP `flush`_ function.
13 |
14 | .. _`flush`: https://secure.php.net/flush
15 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/from.rst:
--------------------------------------------------------------------------------
1 | ``from``
2 | ========
3 |
4 | The ``from`` tag imports :doc:`macro<../tags/macro>` names into the current
5 | namespace. The tag is documented in detail in the documentation for the
6 | :doc:`macro<../tags/macro>` tag.
7 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/import.rst:
--------------------------------------------------------------------------------
1 | ``import``
2 | ==========
3 |
4 | The ``import`` tag imports :doc:`macro<../tags/macro>` names in a local
5 | variable. The tag is documented in detail in the documentation for the
6 | :doc:`macro<../tags/macro>` tag.
7 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/index.rst:
--------------------------------------------------------------------------------
1 | Tags
2 | ====
3 |
4 | .. toctree::
5 | :maxdepth: 1
6 |
7 | apply
8 | autoescape
9 | block
10 | deprecated
11 | do
12 | embed
13 | extends
14 | flush
15 | for
16 | from
17 | if
18 | import
19 | include
20 | macro
21 | sandbox
22 | set
23 | use
24 | verbatim
25 | with
26 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/sandbox.rst:
--------------------------------------------------------------------------------
1 | ``sandbox``
2 | ===========
3 |
4 | The ``sandbox`` tag can be used to enable the sandboxing mode for an included
5 | template, when sandboxing is not enabled globally for the Twig environment:
6 |
7 | .. code-block:: twig
8 |
9 | {% sandbox %}
10 | {% include 'user.html' %}
11 | {% endsandbox %}
12 |
13 | .. warning::
14 |
15 | The ``sandbox`` tag is only available when the sandbox extension is
16 | enabled (see the :doc:`Twig for Developers<../api>` chapter).
17 |
18 | .. note::
19 |
20 | The ``sandbox`` tag can only be used to sandbox an include tag and it
21 | cannot be used to sandbox a section of a template. The following example
22 | won't work:
23 |
24 | .. code-block:: twig
25 |
26 | {% sandbox %}
27 | {% for i in 1..2 %}
28 | {{ i }}
29 | {% endfor %}
30 | {% endsandbox %}
31 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/verbatim.rst:
--------------------------------------------------------------------------------
1 | ``verbatim``
2 | ============
3 |
4 | The ``verbatim`` tag marks sections as being raw text that should not be
5 | parsed. For example to put Twig syntax as example into a template you can use
6 | this snippet:
7 |
8 | .. code-block:: twig
9 |
10 | {% verbatim %}
11 |
12 | {% for item in seq %}
13 | - {{ item }}
14 | {% endfor %}
15 |
16 | {% endverbatim %}
17 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tags/with.rst:
--------------------------------------------------------------------------------
1 | ``with``
2 | ========
3 |
4 | Use the ``with`` tag to create a new inner scope. Variables set within this
5 | scope are not visible outside of the scope:
6 |
7 | .. code-block:: twig
8 |
9 | {% with %}
10 | {% set foo = 42 %}
11 | {{ foo }} {# foo is 42 here #}
12 | {% endwith %}
13 | foo is not visible here any longer
14 |
15 | Instead of defining variables at the beginning of the scope, you can pass a
16 | hash of variables you want to define in the ``with`` tag; the previous example
17 | is equivalent to the following one:
18 |
19 | .. code-block:: twig
20 |
21 | {% with { foo: 42 } %}
22 | {{ foo }} {# foo is 42 here #}
23 | {% endwith %}
24 | foo is not visible here any longer
25 |
26 | {# it works with any expression that resolves to a hash #}
27 | {% set vars = { foo: 42 } %}
28 | {% with vars %}
29 | ...
30 | {% endwith %}
31 |
32 | By default, the inner scope has access to the outer scope context; you can
33 | disable this behavior by appending the ``only`` keyword:
34 |
35 | .. code-block:: twig
36 |
37 | {% set bar = 'bar' %}
38 | {% with { foo: 42 } only %}
39 | {# only foo is defined #}
40 | {# bar is not defined #}
41 | {% endwith %}
42 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/constant.rst:
--------------------------------------------------------------------------------
1 | ``constant``
2 | ============
3 |
4 | ``constant`` checks if a variable has the exact same value as a constant. You
5 | can use either global constants or class constants:
6 |
7 | .. code-block:: twig
8 |
9 | {% if post.status is constant('Post::PUBLISHED') %}
10 | the status attribute is exactly the same as Post::PUBLISHED
11 | {% endif %}
12 |
13 | You can test constants from object instances as well:
14 |
15 | .. code-block:: twig
16 |
17 | {% if post.status is constant('PUBLISHED', post) %}
18 | the status attribute is exactly the same as Post::PUBLISHED
19 | {% endif %}
20 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/defined.rst:
--------------------------------------------------------------------------------
1 | ``defined``
2 | ===========
3 |
4 | ``defined`` checks if a variable is defined in the current context. This is very
5 | useful if you use the ``strict_variables`` option:
6 |
7 | .. code-block:: twig
8 |
9 | {# defined works with variable names #}
10 | {% if foo is defined %}
11 | ...
12 | {% endif %}
13 |
14 | {# and attributes on variables names #}
15 | {% if foo.bar is defined %}
16 | ...
17 | {% endif %}
18 |
19 | {% if foo['bar'] is defined %}
20 | ...
21 | {% endif %}
22 |
23 | When using the ``defined`` test on an expression that uses variables in some
24 | method calls, be sure that they are all defined first:
25 |
26 | .. code-block:: twig
27 |
28 | {% if var is defined and foo.method(var) is defined %}
29 | ...
30 | {% endif %}
31 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/divisibleby.rst:
--------------------------------------------------------------------------------
1 | ``divisible by``
2 | ================
3 |
4 | ``divisible by`` checks if a variable is divisible by a number:
5 |
6 | .. code-block:: twig
7 |
8 | {% if loop.index is divisible by(3) %}
9 | ...
10 | {% endif %}
11 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/empty.rst:
--------------------------------------------------------------------------------
1 | ``empty``
2 | =========
3 |
4 | ``empty`` checks if a variable is an empty string, an empty array, an empty
5 | hash, exactly ``false``, or exactly ``null``.
6 |
7 | For objects that implement the ``Countable`` interface, ``empty`` will check the
8 | return value of the ``count()`` method.
9 |
10 | For objects that implement the ``__toString()`` magic method (and not ``Countable``),
11 | it will check if an empty string is returned.
12 |
13 | .. code-block:: twig
14 |
15 | {% if foo is empty %}
16 | ...
17 | {% endif %}
18 |
19 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/even.rst:
--------------------------------------------------------------------------------
1 | ``even``
2 | ========
3 |
4 | ``even`` returns ``true`` if the given number is even:
5 |
6 | .. code-block:: twig
7 |
8 | {{ var is even }}
9 |
10 | .. seealso:: :doc:`odd<../tests/odd>`
11 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/index.rst:
--------------------------------------------------------------------------------
1 | Tests
2 | =====
3 |
4 | .. toctree::
5 | :maxdepth: 1
6 |
7 | constant
8 | defined
9 | divisibleby
10 | empty
11 | even
12 | iterable
13 | null
14 | odd
15 | sameas
16 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/iterable.rst:
--------------------------------------------------------------------------------
1 | ``iterable``
2 | ============
3 |
4 | ``iterable`` checks if a variable is an array or a traversable object:
5 |
6 | .. code-block:: twig
7 |
8 | {# evaluates to true if the foo variable is iterable #}
9 | {% if users is iterable %}
10 | {% for user in users %}
11 | Hello {{ user }}!
12 | {% endfor %}
13 | {% else %}
14 | {# users is probably a string #}
15 | Hello {{ users }}!
16 | {% endif %}
17 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/null.rst:
--------------------------------------------------------------------------------
1 | ``null``
2 | ========
3 |
4 | ``null`` returns ``true`` if the variable is ``null``:
5 |
6 | .. code-block:: twig
7 |
8 | {{ var is null }}
9 |
10 | .. note::
11 |
12 | ``none`` is an alias for ``null``.
13 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/odd.rst:
--------------------------------------------------------------------------------
1 | ``odd``
2 | =======
3 |
4 | ``odd`` returns ``true`` if the given number is odd:
5 |
6 | .. code-block:: twig
7 |
8 | {{ var is odd }}
9 |
10 | .. seealso:: :doc:`even<../tests/even>`
11 |
--------------------------------------------------------------------------------
/vendor/twig/twig/doc/tests/sameas.rst:
--------------------------------------------------------------------------------
1 | ``same as``
2 | ===========
3 |
4 | ``same as`` checks if a variable is the same as another variable.
5 | This is the equivalent to ``===`` in PHP:
6 |
7 | .. code-block:: twig
8 |
9 | {% if foo.attribute is same as(false) %}
10 | the foo attribute really is the 'false' PHP value
11 | {% endif %}
12 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Cache/CacheInterface.php:
--------------------------------------------------------------------------------
1 |
22 | */
23 | interface CacheInterface
24 | {
25 | /**
26 | * Generates a cache key for the given template class name.
27 | */
28 | public function generateKey(string $name, string $className): string;
29 |
30 | /**
31 | * Writes the compiled template to cache.
32 | *
33 | * @param string $content The template representation as a PHP class
34 | */
35 | public function write(string $key, string $content): void;
36 |
37 | /**
38 | * Loads a template from the cache.
39 | */
40 | public function load(string $key): void;
41 |
42 | /**
43 | * Returns the modification timestamp of a key.
44 | */
45 | public function getTimestamp(string $key): int;
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Cache/NullCache.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class NullCache implements CacheInterface
20 | {
21 | public function generateKey(string $name, string $className): string
22 | {
23 | return '';
24 | }
25 |
26 | public function write(string $key, string $content): void
27 | {
28 | }
29 |
30 | public function load(string $key): void
31 | {
32 | }
33 |
34 | public function getTimestamp(string $key): int
35 | {
36 | return 0;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Error/LoaderError.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | class LoaderError extends Error
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Error/RuntimeError.php:
--------------------------------------------------------------------------------
1 |
19 | */
20 | class RuntimeError extends Error
21 | {
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Error/SyntaxError.php:
--------------------------------------------------------------------------------
1 |
19 | */
20 | class SyntaxError extends Error
21 | {
22 | /**
23 | * Tweaks the error message to include suggestions.
24 | *
25 | * @param string $name The original name of the item that does not exist
26 | * @param array $items An array of possible items
27 | */
28 | public function addSuggestions(string $name, array $items): void
29 | {
30 | $alternatives = [];
31 | foreach ($items as $item) {
32 | $lev = levenshtein($name, $item);
33 | if ($lev <= \strlen($name) / 3 || false !== strpos($item, $name)) {
34 | $alternatives[$item] = $lev;
35 | }
36 | }
37 |
38 | if (!$alternatives) {
39 | return;
40 | }
41 |
42 | asort($alternatives);
43 |
44 | $this->appendMessage(sprintf(' Did you mean "%s"?', implode('", "', array_keys($alternatives))));
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Extension/AbstractExtension.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | interface GlobalsInterface
23 | {
24 | public function getGlobals(): array;
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Extension/OptimizerExtension.php:
--------------------------------------------------------------------------------
1 | optimizers = $optimizers;
23 | }
24 |
25 | public function getNodeVisitors(): array
26 | {
27 | return [new OptimizerNodeVisitor($this->optimizers)];
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Extension/ProfilerExtension.php:
--------------------------------------------------------------------------------
1 | actives[] = $profile;
24 | }
25 |
26 | /**
27 | * @return void
28 | */
29 | public function enter(Profile $profile)
30 | {
31 | $this->actives[0]->addProfile($profile);
32 | array_unshift($this->actives, $profile);
33 | }
34 |
35 | /**
36 | * @return void
37 | */
38 | public function leave(Profile $profile)
39 | {
40 | $profile->leave();
41 | array_shift($this->actives);
42 |
43 | if (1 === \count($this->actives)) {
44 | $this->actives[0]->leave();
45 | }
46 | }
47 |
48 | public function getNodeVisitors(): array
49 | {
50 | return [new ProfilerNodeVisitor(\get_class($this))];
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php:
--------------------------------------------------------------------------------
1 |
16 | */
17 | interface RuntimeExtensionInterface
18 | {
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Extension/StringLoaderExtension.php:
--------------------------------------------------------------------------------
1 | true]),
21 | ];
22 | }
23 | }
24 | }
25 |
26 | namespace {
27 | use Twig\Environment;
28 | use Twig\TemplateWrapper;
29 |
30 | /**
31 | * Loads a template from a string.
32 | *
33 | * {{ include(template_from_string("Hello {{ name }}")) }}
34 | *
35 | * @param string $template A template as a string or object implementing __toString()
36 | * @param string $name An optional name of the template to be used in error messages
37 | */
38 | function twig_template_from_string(Environment $env, $template, string $name = null): TemplateWrapper
39 | {
40 | return $env->createTemplate((string) $template, $name);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Loader/LoaderInterface.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | interface LoaderInterface
23 | {
24 | /**
25 | * Returns the source context for a given template logical name.
26 | *
27 | * @throws LoaderError When $name is not found
28 | */
29 | public function getSourceContext(string $name): Source;
30 |
31 | /**
32 | * Gets the cache key to use for the cache for a given template name.
33 | *
34 | * @throws LoaderError When $name is not found
35 | */
36 | public function getCacheKey(string $name): string;
37 |
38 | /**
39 | * @param int $time Timestamp of the last modification time of the cached template
40 | *
41 | * @throws LoaderError When $name is not found
42 | */
43 | public function isFresh(string $name, int $time): bool;
44 |
45 | /**
46 | * @return bool
47 | */
48 | public function exists(string $name);
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Markup.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | class Markup implements \Countable, \JsonSerializable
20 | {
21 | private $content;
22 | private $charset;
23 |
24 | public function __construct($content, $charset)
25 | {
26 | $this->content = (string) $content;
27 | $this->charset = $charset;
28 | }
29 |
30 | public function __toString()
31 | {
32 | return $this->content;
33 | }
34 |
35 | public function count()
36 | {
37 | return mb_strlen($this->content, $this->charset);
38 | }
39 |
40 | public function jsonSerialize()
41 | {
42 | return $this->content;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/AutoEscapeNode.php:
--------------------------------------------------------------------------------
1 |
26 | */
27 | class AutoEscapeNode extends Node
28 | {
29 | public function __construct($value, Node $body, int $lineno, string $tag = 'autoescape')
30 | {
31 | parent::__construct(['body' => $body], ['value' => $value], $lineno, $tag);
32 | }
33 |
34 | public function compile(Compiler $compiler): void
35 | {
36 | $compiler->subcompile($this->getNode('body'));
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/BlockNode.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class BlockNode extends Node
23 | {
24 | public function __construct(string $name, Node $body, int $lineno, string $tag = null)
25 | {
26 | parent::__construct(['body' => $body], ['name' => $name], $lineno, $tag);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $compiler
32 | ->addDebugInfo($this)
33 | ->write(sprintf("public function block_%s(\$context, array \$blocks = [])\n", $this->getAttribute('name')), "{\n")
34 | ->indent()
35 | ->write("\$macros = \$this->macros;\n")
36 | ;
37 |
38 | $compiler
39 | ->subcompile($this->getNode('body'))
40 | ->outdent()
41 | ->write("}\n\n")
42 | ;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/BlockReferenceNode.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class BlockReferenceNode extends Node implements NodeOutputInterface
23 | {
24 | public function __construct(string $name, int $lineno, string $tag = null)
25 | {
26 | parent::__construct([], ['name' => $name], $lineno, $tag);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $compiler
32 | ->addDebugInfo($this)
33 | ->write(sprintf("\$this->displayBlock('%s', \$context, \$blocks);\n", $this->getAttribute('name')))
34 | ;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/BodyNode.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | class BodyNode extends Node
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/CheckToStringNode.php:
--------------------------------------------------------------------------------
1 |
26 | */
27 | class CheckToStringNode extends AbstractExpression
28 | {
29 | public function __construct(AbstractExpression $expr)
30 | {
31 | parent::__construct(['expr' => $expr], [], $expr->getTemplateLine(), $expr->getNodeTag());
32 | }
33 |
34 | public function compile(Compiler $compiler): void
35 | {
36 | $expr = $this->getNode('expr');
37 | $compiler
38 | ->raw('$this->sandbox->ensureToStringAllowed(')
39 | ->subcompile($expr)
40 | ->raw(', ')
41 | ->repr($expr->getTemplateLine())
42 | ->raw(', $this->source)')
43 | ;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/DoNode.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class DoNode extends Node
23 | {
24 | public function __construct(AbstractExpression $expr, int $lineno, string $tag = null)
25 | {
26 | parent::__construct(['expr' => $expr], [], $lineno, $tag);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $compiler
32 | ->addDebugInfo($this)
33 | ->write('')
34 | ->subcompile($this->getNode('expr'))
35 | ->raw(";\n")
36 | ;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/AbstractExpression.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | abstract class AbstractExpression extends Node
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php:
--------------------------------------------------------------------------------
1 | raw('$context[')
23 | ->string($this->getAttribute('name'))
24 | ->raw(']')
25 | ;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php:
--------------------------------------------------------------------------------
1 | $left, 'right' => $right], [], $lineno);
24 | }
25 |
26 | public function compile(Compiler $compiler): void
27 | {
28 | $compiler
29 | ->raw('(')
30 | ->subcompile($this->getNode('left'))
31 | ->raw(' ')
32 | ;
33 | $this->operator($compiler);
34 | $compiler
35 | ->raw(' ')
36 | ->subcompile($this->getNode('right'))
37 | ->raw(')')
38 | ;
39 | }
40 |
41 | abstract public function operator(Compiler $compiler): Compiler;
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php:
--------------------------------------------------------------------------------
1 | raw('+');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php:
--------------------------------------------------------------------------------
1 | raw('&&');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php:
--------------------------------------------------------------------------------
1 | raw('&');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php:
--------------------------------------------------------------------------------
1 | raw('|');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php:
--------------------------------------------------------------------------------
1 | raw('^');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php:
--------------------------------------------------------------------------------
1 | raw('.');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php:
--------------------------------------------------------------------------------
1 | raw('/');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php:
--------------------------------------------------------------------------------
1 | getVarName();
21 | $right = $compiler->getVarName();
22 | $compiler
23 | ->raw(sprintf('(is_string($%s = ', $left))
24 | ->subcompile($this->getNode('left'))
25 | ->raw(sprintf(') && is_string($%s = ', $right))
26 | ->subcompile($this->getNode('right'))
27 | ->raw(sprintf(') && (\'\' === $%2$s || $%2$s === substr($%1$s, -strlen($%2$s))))', $left, $right))
28 | ;
29 | }
30 |
31 | public function operator(Compiler $compiler): Compiler
32 | {
33 | return $compiler->raw('');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php:
--------------------------------------------------------------------------------
1 | = 80000) {
21 | parent::compile($compiler);
22 |
23 | return;
24 | }
25 |
26 | $compiler
27 | ->raw('0 === twig_compare(')
28 | ->subcompile($this->getNode('left'))
29 | ->raw(', ')
30 | ->subcompile($this->getNode('right'))
31 | ->raw(')')
32 | ;
33 | }
34 |
35 | public function operator(Compiler $compiler): Compiler
36 | {
37 | return $compiler->raw('==');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php:
--------------------------------------------------------------------------------
1 | raw('(int) floor(');
21 | parent::compile($compiler);
22 | $compiler->raw(')');
23 | }
24 |
25 | public function operator(Compiler $compiler): Compiler
26 | {
27 | return $compiler->raw('/');
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php:
--------------------------------------------------------------------------------
1 | = 80000) {
21 | parent::compile($compiler);
22 |
23 | return;
24 | }
25 |
26 | $compiler
27 | ->raw('1 === twig_compare(')
28 | ->subcompile($this->getNode('left'))
29 | ->raw(', ')
30 | ->subcompile($this->getNode('right'))
31 | ->raw(')')
32 | ;
33 | }
34 |
35 | public function operator(Compiler $compiler): Compiler
36 | {
37 | return $compiler->raw('>');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php:
--------------------------------------------------------------------------------
1 | = 80000) {
21 | parent::compile($compiler);
22 |
23 | return;
24 | }
25 |
26 | $compiler
27 | ->raw('0 <= twig_compare(')
28 | ->subcompile($this->getNode('left'))
29 | ->raw(', ')
30 | ->subcompile($this->getNode('right'))
31 | ->raw(')')
32 | ;
33 | }
34 |
35 | public function operator(Compiler $compiler): Compiler
36 | {
37 | return $compiler->raw('>=');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php:
--------------------------------------------------------------------------------
1 | raw('twig_in_filter(')
22 | ->subcompile($this->getNode('left'))
23 | ->raw(', ')
24 | ->subcompile($this->getNode('right'))
25 | ->raw(')')
26 | ;
27 | }
28 |
29 | public function operator(Compiler $compiler): Compiler
30 | {
31 | return $compiler->raw('in');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php:
--------------------------------------------------------------------------------
1 | = 80000) {
21 | parent::compile($compiler);
22 |
23 | return;
24 | }
25 |
26 | $compiler
27 | ->raw('-1 === twig_compare(')
28 | ->subcompile($this->getNode('left'))
29 | ->raw(', ')
30 | ->subcompile($this->getNode('right'))
31 | ->raw(')')
32 | ;
33 | }
34 |
35 | public function operator(Compiler $compiler): Compiler
36 | {
37 | return $compiler->raw('<');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php:
--------------------------------------------------------------------------------
1 | = 80000) {
21 | parent::compile($compiler);
22 |
23 | return;
24 | }
25 |
26 | $compiler
27 | ->raw('0 >= twig_compare(')
28 | ->subcompile($this->getNode('left'))
29 | ->raw(', ')
30 | ->subcompile($this->getNode('right'))
31 | ->raw(')')
32 | ;
33 | }
34 |
35 | public function operator(Compiler $compiler): Compiler
36 | {
37 | return $compiler->raw('<=');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php:
--------------------------------------------------------------------------------
1 | raw('preg_match(')
22 | ->subcompile($this->getNode('right'))
23 | ->raw(', ')
24 | ->subcompile($this->getNode('left'))
25 | ->raw(')')
26 | ;
27 | }
28 |
29 | public function operator(Compiler $compiler): Compiler
30 | {
31 | return $compiler->raw('');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php:
--------------------------------------------------------------------------------
1 | raw('%');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php:
--------------------------------------------------------------------------------
1 | raw('*');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php:
--------------------------------------------------------------------------------
1 | = 80000) {
21 | parent::compile($compiler);
22 |
23 | return;
24 | }
25 |
26 | $compiler
27 | ->raw('0 !== twig_compare(')
28 | ->subcompile($this->getNode('left'))
29 | ->raw(', ')
30 | ->subcompile($this->getNode('right'))
31 | ->raw(')')
32 | ;
33 | }
34 |
35 | public function operator(Compiler $compiler): Compiler
36 | {
37 | return $compiler->raw('!=');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php:
--------------------------------------------------------------------------------
1 | raw('!twig_in_filter(')
22 | ->subcompile($this->getNode('left'))
23 | ->raw(', ')
24 | ->subcompile($this->getNode('right'))
25 | ->raw(')')
26 | ;
27 | }
28 |
29 | public function operator(Compiler $compiler): Compiler
30 | {
31 | return $compiler->raw('not in');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php:
--------------------------------------------------------------------------------
1 | raw('||');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php:
--------------------------------------------------------------------------------
1 | raw('**');
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php:
--------------------------------------------------------------------------------
1 | raw('range(')
22 | ->subcompile($this->getNode('left'))
23 | ->raw(', ')
24 | ->subcompile($this->getNode('right'))
25 | ->raw(')')
26 | ;
27 | }
28 |
29 | public function operator(Compiler $compiler): Compiler
30 | {
31 | return $compiler->raw('..');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php:
--------------------------------------------------------------------------------
1 | raw('<=>');
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php:
--------------------------------------------------------------------------------
1 | getVarName();
21 | $right = $compiler->getVarName();
22 | $compiler
23 | ->raw(sprintf('(is_string($%s = ', $left))
24 | ->subcompile($this->getNode('left'))
25 | ->raw(sprintf(') && is_string($%s = ', $right))
26 | ->subcompile($this->getNode('right'))
27 | ->raw(sprintf(') && (\'\' === $%2$s || 0 === strpos($%1$s, $%2$s)))', $left, $right))
28 | ;
29 | }
30 |
31 | public function operator(Compiler $compiler): Compiler
32 | {
33 | return $compiler->raw('');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php:
--------------------------------------------------------------------------------
1 | raw('-');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php:
--------------------------------------------------------------------------------
1 | $expr1, 'expr2' => $expr2, 'expr3' => $expr3], [], $lineno);
22 | }
23 |
24 | public function compile(Compiler $compiler): void
25 | {
26 | $compiler
27 | ->raw('((')
28 | ->subcompile($this->getNode('expr1'))
29 | ->raw(') ? (')
30 | ->subcompile($this->getNode('expr2'))
31 | ->raw(') : (')
32 | ->subcompile($this->getNode('expr3'))
33 | ->raw('))')
34 | ;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/ConstantExpression.php:
--------------------------------------------------------------------------------
1 | $value], $lineno);
22 | }
23 |
24 | public function compile(Compiler $compiler): void
25 | {
26 | $compiler->repr($this->getAttribute('value'));
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/FilterExpression.php:
--------------------------------------------------------------------------------
1 | $node, 'filter' => $filterName, 'arguments' => $arguments], [], $lineno, $tag);
23 | }
24 |
25 | public function compile(Compiler $compiler): void
26 | {
27 | $name = $this->getNode('filter')->getAttribute('value');
28 | $filter = $compiler->getEnvironment()->getFilter($name);
29 |
30 | $this->setAttribute('name', $name);
31 | $this->setAttribute('type', 'filter');
32 | $this->setAttribute('needs_environment', $filter->needsEnvironment());
33 | $this->setAttribute('needs_context', $filter->needsContext());
34 | $this->setAttribute('arguments', $filter->getArguments());
35 | $this->setAttribute('callable', $filter->getCallable());
36 | $this->setAttribute('is_variadic', $filter->isVariadic());
37 |
38 | $this->compileCallable($compiler);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/FunctionExpression.php:
--------------------------------------------------------------------------------
1 | $arguments], ['name' => $name, 'is_defined_test' => false], $lineno);
22 | }
23 |
24 | public function compile(Compiler $compiler)
25 | {
26 | $name = $this->getAttribute('name');
27 | $function = $compiler->getEnvironment()->getFunction($name);
28 |
29 | $this->setAttribute('name', $name);
30 | $this->setAttribute('type', 'function');
31 | $this->setAttribute('needs_environment', $function->needsEnvironment());
32 | $this->setAttribute('needs_context', $function->needsContext());
33 | $this->setAttribute('arguments', $function->getArguments());
34 | $callable = $function->getCallable();
35 | if ('constant' === $name && $this->getAttribute('is_defined_test')) {
36 | $callable = 'twig_constant_is_defined';
37 | }
38 | $this->setAttribute('callable', $callable);
39 | $this->setAttribute('is_variadic', $function->isVariadic());
40 |
41 | $this->compileCallable($compiler);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/InlinePrint.php:
--------------------------------------------------------------------------------
1 | $node], [], $lineno);
25 | }
26 |
27 | public function compile(Compiler $compiler): void
28 | {
29 | $compiler
30 | ->raw('print (')
31 | ->subcompile($this->getNode('node'))
32 | ->raw(')')
33 | ;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/ParentExpression.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class ParentExpression extends AbstractExpression
23 | {
24 | public function __construct(string $name, int $lineno, string $tag = null)
25 | {
26 | parent::__construct([], ['output' => false, 'name' => $name], $lineno, $tag);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | if ($this->getAttribute('output')) {
32 | $compiler
33 | ->addDebugInfo($this)
34 | ->write('$this->displayParentBlock(')
35 | ->string($this->getAttribute('name'))
36 | ->raw(", \$context, \$blocks);\n")
37 | ;
38 | } else {
39 | $compiler
40 | ->raw('$this->renderParentBlock(')
41 | ->string($this->getAttribute('name'))
42 | ->raw(', $context, $blocks)')
43 | ;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/TempNameExpression.php:
--------------------------------------------------------------------------------
1 | $name], $lineno);
21 | }
22 |
23 | public function compile(Compiler $compiler): void
24 | {
25 | $compiler
26 | ->raw('$_')
27 | ->raw($this->getAttribute('name'))
28 | ->raw('_')
29 | ;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php:
--------------------------------------------------------------------------------
1 |
25 | */
26 | class ConstantTest extends TestExpression
27 | {
28 | public function compile(Compiler $compiler): void
29 | {
30 | $compiler
31 | ->raw('(')
32 | ->subcompile($this->getNode('node'))
33 | ->raw(' === constant(')
34 | ;
35 |
36 | if ($this->getNode('arguments')->hasNode(1)) {
37 | $compiler
38 | ->raw('get_class(')
39 | ->subcompile($this->getNode('arguments')->getNode(1))
40 | ->raw(')."::".')
41 | ;
42 | }
43 |
44 | $compiler
45 | ->subcompile($this->getNode('arguments')->getNode(0))
46 | ->raw('))')
47 | ;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php:
--------------------------------------------------------------------------------
1 |
23 | */
24 | class DivisiblebyTest extends TestExpression
25 | {
26 | public function compile(Compiler $compiler): void
27 | {
28 | $compiler
29 | ->raw('(0 == ')
30 | ->subcompile($this->getNode('node'))
31 | ->raw(' % ')
32 | ->subcompile($this->getNode('arguments')->getNode(0))
33 | ->raw(')')
34 | ;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Test/EvenTest.php:
--------------------------------------------------------------------------------
1 |
23 | */
24 | class EvenTest extends TestExpression
25 | {
26 | public function compile(Compiler $compiler): void
27 | {
28 | $compiler
29 | ->raw('(')
30 | ->subcompile($this->getNode('node'))
31 | ->raw(' % 2 == 0')
32 | ->raw(')')
33 | ;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Test/NullTest.php:
--------------------------------------------------------------------------------
1 |
23 | */
24 | class NullTest extends TestExpression
25 | {
26 | public function compile(Compiler $compiler): void
27 | {
28 | $compiler
29 | ->raw('(null === ')
30 | ->subcompile($this->getNode('node'))
31 | ->raw(')')
32 | ;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Test/OddTest.php:
--------------------------------------------------------------------------------
1 |
23 | */
24 | class OddTest extends TestExpression
25 | {
26 | public function compile(Compiler $compiler): void
27 | {
28 | $compiler
29 | ->raw('(')
30 | ->subcompile($this->getNode('node'))
31 | ->raw(' % 2 == 1')
32 | ->raw(')')
33 | ;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Test/SameasTest.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class SameasTest extends TestExpression
23 | {
24 | public function compile(Compiler $compiler): void
25 | {
26 | $compiler
27 | ->raw('(')
28 | ->subcompile($this->getNode('node'))
29 | ->raw(' === ')
30 | ->subcompile($this->getNode('arguments')->getNode(0))
31 | ->raw(')')
32 | ;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/TestExpression.php:
--------------------------------------------------------------------------------
1 | $node];
22 | if (null !== $arguments) {
23 | $nodes['arguments'] = $arguments;
24 | }
25 |
26 | parent::__construct($nodes, ['name' => $name], $lineno);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $name = $this->getAttribute('name');
32 | $test = $compiler->getEnvironment()->getTest($name);
33 |
34 | $this->setAttribute('name', $name);
35 | $this->setAttribute('type', 'test');
36 | $this->setAttribute('arguments', $test->getArguments());
37 | $this->setAttribute('callable', $test->getCallable());
38 | $this->setAttribute('is_variadic', $test->isVariadic());
39 |
40 | $this->compileCallable($compiler);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php:
--------------------------------------------------------------------------------
1 | $node], [], $lineno);
24 | }
25 |
26 | public function compile(Compiler $compiler): void
27 | {
28 | $compiler->raw(' ');
29 | $this->operator($compiler);
30 | $compiler->subcompile($this->getNode('node'));
31 | }
32 |
33 | abstract public function operator(Compiler $compiler): Compiler;
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php:
--------------------------------------------------------------------------------
1 | raw('-');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php:
--------------------------------------------------------------------------------
1 | raw('!');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php:
--------------------------------------------------------------------------------
1 | raw('+');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/VariadicExpression.php:
--------------------------------------------------------------------------------
1 | raw('...');
21 |
22 | parent::compile($compiler);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/FlushNode.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 | class FlushNode extends Node
22 | {
23 | public function __construct(int $lineno, string $tag)
24 | {
25 | parent::__construct([], [], $lineno, $tag);
26 | }
27 |
28 | public function compile(Compiler $compiler): void
29 | {
30 | $compiler
31 | ->addDebugInfo($this)
32 | ->write("flush();\n")
33 | ;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/NodeCaptureInterface.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | interface NodeCaptureInterface
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/NodeOutputInterface.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | interface NodeOutputInterface
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/PrintNode.php:
--------------------------------------------------------------------------------
1 |
22 | */
23 | class PrintNode extends Node implements NodeOutputInterface
24 | {
25 | public function __construct(AbstractExpression $expr, int $lineno, string $tag = null)
26 | {
27 | parent::__construct(['expr' => $expr], [], $lineno, $tag);
28 | }
29 |
30 | public function compile(Compiler $compiler): void
31 | {
32 | $compiler
33 | ->addDebugInfo($this)
34 | ->write('echo ')
35 | ->subcompile($this->getNode('expr'))
36 | ->raw(";\n")
37 | ;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/SandboxNode.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 | class SandboxNode extends Node
22 | {
23 | public function __construct(Node $body, int $lineno, string $tag = null)
24 | {
25 | parent::__construct(['body' => $body], [], $lineno, $tag);
26 | }
27 |
28 | public function compile(Compiler $compiler): void
29 | {
30 | $compiler
31 | ->addDebugInfo($this)
32 | ->write("if (!\$alreadySandboxed = \$this->sandbox->isSandboxed()) {\n")
33 | ->indent()
34 | ->write("\$this->sandbox->enableSandbox();\n")
35 | ->outdent()
36 | ->write("}\n")
37 | ->subcompile($this->getNode('body'))
38 | ->write("if (!\$alreadySandboxed) {\n")
39 | ->indent()
40 | ->write("\$this->sandbox->disableSandbox();\n")
41 | ->outdent()
42 | ->write("}\n")
43 | ;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/TextNode.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class TextNode extends Node implements NodeOutputInterface
23 | {
24 | public function __construct(string $data, int $lineno)
25 | {
26 | parent::__construct([], ['data' => $data], $lineno);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $compiler
32 | ->addDebugInfo($this)
33 | ->write('echo ')
34 | ->string($this->getAttribute('data'))
35 | ->raw(";\n")
36 | ;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php:
--------------------------------------------------------------------------------
1 |
23 | */
24 | abstract class AbstractNodeVisitor implements NodeVisitorInterface
25 | {
26 | final public function enterNode(Node $node, Environment $env): Node
27 | {
28 | return $this->doEnterNode($node, $env);
29 | }
30 |
31 | final public function leaveNode(Node $node, Environment $env): ?Node
32 | {
33 | return $this->doLeaveNode($node, $env);
34 | }
35 |
36 | /**
37 | * Called before child nodes are visited.
38 | *
39 | * @return Node The modified node
40 | */
41 | abstract protected function doEnterNode(Node $node, Environment $env);
42 |
43 | /**
44 | * Called after child nodes are visited.
45 | *
46 | * @return Node|null The modified node or null if the node must be removed
47 | */
48 | abstract protected function doLeaveNode(Node $node, Environment $env);
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | interface NodeVisitorInterface
23 | {
24 | /**
25 | * Called before child nodes are visited.
26 | *
27 | * @return Node The modified node
28 | */
29 | public function enterNode(Node $node, Environment $env): Node;
30 |
31 | /**
32 | * Called after child nodes are visited.
33 | *
34 | * @return Node|null The modified node or null if the node must be removed
35 | */
36 | public function leaveNode(Node $node, Environment $env): ?Node;
37 |
38 | /**
39 | * Returns the priority for this visitor.
40 | *
41 | * Priority should be between -10 and 10 (0 is the default).
42 | *
43 | * @return int The priority level
44 | */
45 | public function getPriority();
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Profiler/Dumper/TextDumper.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class TextDumper extends BaseDumper
20 | {
21 | protected function formatTemplate(Profile $profile, $prefix): string
22 | {
23 | return sprintf('%s└ %s', $prefix, $profile->getTemplate());
24 | }
25 |
26 | protected function formatNonTemplate(Profile $profile, $prefix): string
27 | {
28 | return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), $profile->getName());
29 | }
30 |
31 | protected function formatTime(Profile $profile, $percent): string
32 | {
33 | return sprintf('%.2fms/%.0f%%', $profile->getDuration() * 1000, $percent);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class EnterProfileNode extends Node
23 | {
24 | public function __construct(string $extensionName, string $type, string $name, string $varName)
25 | {
26 | parent::__construct([], ['extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName]);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $compiler
32 | ->write(sprintf('$%s = $this->extensions[', $this->getAttribute('var_name')))
33 | ->repr($this->getAttribute('extension_name'))
34 | ->raw("];\n")
35 | ->write(sprintf('$%s->enter($%s = new \Twig\Profiler\Profile($this->getTemplateName(), ', $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
36 | ->repr($this->getAttribute('type'))
37 | ->raw(', ')
38 | ->repr($this->getAttribute('name'))
39 | ->raw("));\n\n")
40 | ;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class LeaveProfileNode extends Node
23 | {
24 | public function __construct(string $varName)
25 | {
26 | parent::__construct([], ['var_name' => $varName]);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $compiler
32 | ->write("\n")
33 | ->write(sprintf("\$%s->leave(\$%s);\n\n", $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
34 | ;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php:
--------------------------------------------------------------------------------
1 |
22 | * @author Robin Chalas
23 | */
24 | class ContainerRuntimeLoader implements RuntimeLoaderInterface
25 | {
26 | private $container;
27 |
28 | public function __construct(ContainerInterface $container)
29 | {
30 | $this->container = $container;
31 | }
32 |
33 | public function load(string $class)
34 | {
35 | return $this->container->has($class) ? $this->container->get($class) : null;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | class FactoryRuntimeLoader implements RuntimeLoaderInterface
20 | {
21 | private $map;
22 |
23 | /**
24 | * @param array $map An array where keys are class names and values factory callables
25 | */
26 | public function __construct(array $map = [])
27 | {
28 | $this->map = $map;
29 | }
30 |
31 | public function load(string $class)
32 | {
33 | if (!isset($this->map[$class])) {
34 | return null;
35 | }
36 |
37 | $runtimeFactory = $this->map[$class];
38 |
39 | return $runtimeFactory();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | interface RuntimeLoaderInterface
20 | {
21 | /**
22 | * Creates the runtime implementation of a Twig element (filter/function/test).
23 | *
24 | * @return object|null The runtime instance or null if the loader does not know how to create the runtime for this class
25 | */
26 | public function load(string $class);
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityError.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 | class SecurityError extends Error
22 | {
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class SecurityNotAllowedFilterError extends SecurityError
20 | {
21 | private $filterName;
22 |
23 | public function __construct(string $message, string $functionName)
24 | {
25 | parent::__construct($message);
26 | $this->filterName = $functionName;
27 | }
28 |
29 | public function getFilterName(): string
30 | {
31 | return $this->filterName;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class SecurityNotAllowedFunctionError extends SecurityError
20 | {
21 | private $functionName;
22 |
23 | public function __construct(string $message, string $functionName)
24 | {
25 | parent::__construct($message);
26 | $this->functionName = $functionName;
27 | }
28 |
29 | public function getFunctionName(): string
30 | {
31 | return $this->functionName;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class SecurityNotAllowedMethodError extends SecurityError
20 | {
21 | private $className;
22 | private $methodName;
23 |
24 | public function __construct(string $message, string $className, string $methodName)
25 | {
26 | parent::__construct($message);
27 | $this->className = $className;
28 | $this->methodName = $methodName;
29 | }
30 |
31 | public function getClassName(): string
32 | {
33 | return $this->className;
34 | }
35 |
36 | public function getMethodName()
37 | {
38 | return $this->methodName;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class SecurityNotAllowedPropertyError extends SecurityError
20 | {
21 | private $className;
22 | private $propertyName;
23 |
24 | public function __construct(string $message, string $className, string $propertyName)
25 | {
26 | parent::__construct($message);
27 | $this->className = $className;
28 | $this->propertyName = $propertyName;
29 | }
30 |
31 | public function getClassName(): string
32 | {
33 | return $this->className;
34 | }
35 |
36 | public function getPropertyName()
37 | {
38 | return $this->propertyName;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class SecurityNotAllowedTagError extends SecurityError
20 | {
21 | private $tagName;
22 |
23 | public function __construct(string $message, string $tagName)
24 | {
25 | parent::__construct($message);
26 | $this->tagName = $tagName;
27 | }
28 |
29 | public function getTagName(): string
30 | {
31 | return $this->tagName;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | interface SecurityPolicyInterface
20 | {
21 | /**
22 | * @throws SecurityError
23 | */
24 | public function checkSecurity($tags, $filters, $functions): void;
25 |
26 | /**
27 | * @throws SecurityNotAllowedMethodError
28 | */
29 | public function checkMethodAllowed($obj, $method): void;
30 |
31 | /**
32 | * @throws SecurityNotAllowedPropertyError
33 | */
34 | public function checkPropertyAllowed($obj, $method): void;
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Source.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class Source
20 | {
21 | private $code;
22 | private $name;
23 | private $path;
24 |
25 | /**
26 | * @param string $code The template source code
27 | * @param string $name The template logical name
28 | * @param string $path The filesystem path of the template if any
29 | */
30 | public function __construct(string $code, string $name, string $path = '')
31 | {
32 | $this->code = $code;
33 | $this->name = $name;
34 | $this->path = $path;
35 | }
36 |
37 | public function getCode(): string
38 | {
39 | return $this->code;
40 | }
41 |
42 | public function getName(): string
43 | {
44 | return $this->name;
45 | }
46 |
47 | public function getPath(): string
48 | {
49 | return $this->path;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 | abstract class AbstractTokenParser implements TokenParserInterface
22 | {
23 | /**
24 | * @var Parser
25 | */
26 | protected $parser;
27 |
28 | public function setParser(Parser $parser): void
29 | {
30 | $this->parser = $parser;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php:
--------------------------------------------------------------------------------
1 |
25 | */
26 | final class DeprecatedTokenParser extends AbstractTokenParser
27 | {
28 | public function parse(Token $token): Node
29 | {
30 | $expr = $this->parser->getExpressionParser()->parseExpression();
31 |
32 | $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
33 |
34 | return new DeprecatedNode($expr, $token->getLine(), $this->getTag());
35 | }
36 |
37 | public function getTag(): string
38 | {
39 | return 'deprecated';
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/DoTokenParser.php:
--------------------------------------------------------------------------------
1 | parser->getExpressionParser()->parseExpression();
26 |
27 | $this->parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3);
28 |
29 | return new DoNode($expr, $token->getLine(), $this->getTag());
30 | }
31 |
32 | public function getTag(): string
33 | {
34 | return 'do';
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php:
--------------------------------------------------------------------------------
1 | parser->getStream();
29 |
30 | if ($this->parser->peekBlockStack()) {
31 | throw new SyntaxError('Cannot use "extend" in a block.', $token->getLine(), $stream->getSourceContext());
32 | } elseif (!$this->parser->isMainScope()) {
33 | throw new SyntaxError('Cannot use "extend" in a macro.', $token->getLine(), $stream->getSourceContext());
34 | }
35 |
36 | if (null !== $this->parser->getParent()) {
37 | throw new SyntaxError('Multiple extends tags are forbidden.', $token->getLine(), $stream->getSourceContext());
38 | }
39 | $this->parser->setParent($this->parser->getExpressionParser()->parseExpression());
40 |
41 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
42 |
43 | return new Node();
44 | }
45 |
46 | public function getTag(): string
47 | {
48 | return 'extends';
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/FlushTokenParser.php:
--------------------------------------------------------------------------------
1 | parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3);
28 |
29 | return new FlushNode($token->getLine(), $this->getTag());
30 | }
31 |
32 | public function getTag(): string
33 | {
34 | return 'flush';
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/ImportTokenParser.php:
--------------------------------------------------------------------------------
1 | parser->getExpressionParser()->parseExpression();
29 | $this->parser->getStream()->expect(/* Token::NAME_TYPE */ 5, 'as');
30 | $var = new AssignNameExpression($this->parser->getStream()->expect(/* Token::NAME_TYPE */ 5)->getValue(), $token->getLine());
31 | $this->parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3);
32 |
33 | $this->parser->addImportedSymbol('template', $var->getAttribute('name'));
34 |
35 | return new ImportNode($macro, $var, $token->getLine(), $this->getTag(), $this->parser->isMainScope());
36 | }
37 |
38 | public function getTag(): string
39 | {
40 | return 'import';
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/TokenParserInterface.php:
--------------------------------------------------------------------------------
1 |
23 | */
24 | interface TokenParserInterface
25 | {
26 | /**
27 | * Sets the parser associated with this token parser.
28 | */
29 | public function setParser(Parser $parser): void;
30 |
31 | /**
32 | * Parses a token and returns a node.
33 | *
34 | * @return Node
35 | *
36 | * @throws SyntaxError
37 | */
38 | public function parse(Token $token);
39 |
40 | /**
41 | * Gets the tag name associated with this token parser.
42 | *
43 | * @return string
44 | */
45 | public function getTag();
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/WithTokenParser.php:
--------------------------------------------------------------------------------
1 |
22 | */
23 | final class WithTokenParser extends AbstractTokenParser
24 | {
25 | public function parse(Token $token): Node
26 | {
27 | $stream = $this->parser->getStream();
28 |
29 | $variables = null;
30 | $only = false;
31 | if (!$stream->test(/* Token::BLOCK_END_TYPE */ 3)) {
32 | $variables = $this->parser->getExpressionParser()->parseExpression();
33 | $only = (bool) $stream->nextIf(/* Token::NAME_TYPE */ 5, 'only');
34 | }
35 |
36 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
37 |
38 | $body = $this->parser->subparse([$this, 'decideWithEnd'], true);
39 |
40 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
41 |
42 | return new WithNode($body, $variables, $only, $token->getLine(), $this->getTag());
43 | }
44 |
45 | public function decideWithEnd(Token $token): bool
46 | {
47 | return $token->test('endwith');
48 | }
49 |
50 | public function getTag(): string
51 | {
52 | return 'with';
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Util/TemplateDirIterator.php:
--------------------------------------------------------------------------------
1 |
16 | */
17 | class TemplateDirIterator extends \IteratorIterator
18 | {
19 | public function current()
20 | {
21 | return file_get_contents(parent::current());
22 | }
23 |
24 | public function key()
25 | {
26 | return (string) parent::key();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/webgeeker/validation/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2018 photondragon
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/vendor/webgeeker/validation/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "webgeeker/validation",
3 | "description": "Validation for WebGeeker",
4 | "license": "MIT",
5 | "authors": [
6 | {
7 | "name": "photondragon",
8 | "email": "photondragon@163.com"
9 | }
10 | ],
11 | "autoload": {
12 | "psr-4": {
13 | "WebGeeker\\Validation\\": "src/Validation/"
14 | }
15 | },
16 | "autoload-dev": {
17 | "psr-4": {
18 | "WebGeeker\\ValidationTest\\": "tests/Validation/"
19 | }
20 | },
21 | "minimum-stability": "stable",
22 | "require": {
23 | "php": ">=5.6"
24 | },
25 | "require-dev": {
26 | "phpunit/phpunit": "^5.7",
27 | "ext-mbstring": "*"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/webgeeker/validation/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ./tests/Validation
5 |
6 |
7 |
--------------------------------------------------------------------------------
/vendor/webgeeker/validation/src/Validation/ValidationException.php:
--------------------------------------------------------------------------------
1 | [
33 | "“{{param}}”必须是整数" => "“{{param}}”必須是整數",
34 | "“{{param}}”必须是字符串" => "“{{param}}”必須是字符串",
35 | ],
36 | "en-us" => [
37 | "“{{param}}”必须是整数" => "{{param}} must be a integer",
38 | "“{{param}}”必须是字符串" => "{{param}} must be a string",
39 | ],
40 | ];
41 |
42 | // 文本翻译对照表
43 | protected static $langCodeToTranslations = [
44 | "zh-tw" => [
45 | "变量" => "變量",
46 | "变量必须是整数" => "變量必須是整數",
47 | ],
48 | "en-us" => [
49 | "变量" => "variable",
50 | "变量必须是整数" => "variable must be an integer",
51 | ],
52 | ];
53 |
54 | }
--------------------------------------------------------------------------------
/version:
--------------------------------------------------------------------------------
1 | 2.1
--------------------------------------------------------------------------------