michaeluno/admin-page-framework-compiler
Composer 安装命令:
composer require michaeluno/admin-page-framework-compiler
包简介
A compiler script for Admin Page Framework, a WordPress development framework.
README 文档
README
A compiler script for Admin Page Framework, a WordPress development framework.
Installation
Composer
To install the library using Composer, run
composer require michaeluno/admin-page-framework-compiler
Basic Usage
$oCompiler = new \AdminPageFrameworkCompiler\Compiler( $sSourceDirPath, $sDestinationDirPath ); $oCompiler->run();
Options
The options array takes the following arguments.
output_buffer: (boolean) whether output buffer should be printed.exclude_classes: (array) an array holding class names to exclude.css_heredoc_keys: (array, optional) an array holding heredoc/nowdoc keywords used to assign CSS rules to a variable. For nowdoc keywords, omit enclosing single quotes.js_heredoc_keys: (array, optional) an array holding heredoc/nowdoc keywords used to assign JavaScript scripts to a variable. For nowdoc keywords, omit enclosing single quotes.excludes: (array, optional) an array storing information of items not to compile. Those items will be added but not formatted.classes: (array) Class names to exclude from compiling.paths: (array) File paths to exclude from compiling.file_names: (array) File names with a file extension to exclude from compiling.
combine: (array, optional) Combine optioninheritance: (boolean) Whether to combine files in the same directory with hierarchical relationships.exclude_classes: (string|array, optional) Class names to exclude from combining.
search: (array) the arguments for the directory search options.allowed_extensions: (array) allowed file extensions to be listed. e.g.[ 'php', 'inc' ]exclude_dir_paths: (array) directory paths to exclude from the list.exclude_dir_names: (array) directory base names to exclude from the list. e.g.[ 'temp', '_bak', '_del', 'lib', 'vendor', ]exclude_file_names: (array) a sub-string of file names to exclude from the list. e.g.[ '.min' ]exclude_substrings: (array) sub-strings of paths to exclude from the list. e.g.[ '.min', '_del', 'temp', 'library', 'vendor' ]is_recursive: (boolean) whether to scan sub-directories.ignore_note_file_names: (array) ignore note file names that tell the parser to skip the directory. When one of the files exist in the parsing directory, the directory will be skipped. Default:[ 'ignore-class-map.txt' ],
comment_header: (array, optional) what header comment to insert at the top of the generated filetext: (string, optional) the header comment to setpath: (string, optional) the file path to extract the comment fromclass: (string, optional) the class name to use its doc-block as the header commenttype: (string, optional) indicates what type of data to collect. Accepted values areDOCBLOCK,CONSTANTS. WhentypeisCONSTANTS, the constants of the header class must includeVERSION,NAME,DESCRIPTION,URI,AUTHOR,COPYRIGHT,LICENSE.
class Sample_Registry { const VERSION = '1.0.0'; const NAME = 'Sample Project'; const DESCRIPTION = 'Provides an enhanced task management system for WordPress.'; const URI = 'https://en.michaeluno.jp/'; const AUTHOR = 'miunosoft (Michael Uno)'; const AUTHOR_URI = 'https://en.michaeluno.jp/'; const COPYRIGHT = 'Copyright (c) 2014, <Michael Uno>'; const LICENSE = 'GPL v2 or later'; const CONTRIBUTORS = ''; }
php_cs_fixer: (array, optional) PHP CS Fixer options.config: (string, object) The config object or the config file path.rules: (array) An array holding custom rules.
code_formatters: (array, optional) an array holding class names or object instances of those classes that extend theAbstractCodeFormatterclass and perform formatting of code. When an item is added, theget()will be called to retrieve the filtered PHP code. The PHP code is passed per-file basis.
Example
$oCompiler = new \AdminPageFrameworkCompiler\Compiler( $sSourceDirPath, $sDestinationDirPath, [ 'output_buffer' => true, 'exclude_classes' => [], 'css_heredoc_keys' => [ 'CSSRULES' ], // to disable inline CSS minification, set an empty array 'js_heredoc_keys' => [ 'JAVASCRIPTS' ], // to disable inline JavaScript minification, set an empty array 'search' => [ 'allowed_extensions' => [ 'php' ], // e.g. array( 'php', 'inc' ) // 'exclude_dir_paths' => array( $sTargetBaseDir . '/include/class/admin' ), 'exclude_dir_names' => [ '_document', 'document', 'cli' ], 'exclude_dir_names_regex' => [ '/\.bundle$/' ], 'exclude_file_names' => [ 'AdminPageFramework_InclusionClassFilesHeader.php', 'AdminPageFramework_MinifiedVersionHeader.php', 'AdminPageFramework_BeautifiedVersionHeader.php', ], 'is_recursive' => true, ], 'include' => [ 'allowed_extensions' => [ 'js', 'css', 'map' ], // e.g. array( 'php', 'inc' ) ], 'comment_header' => [ 'path' => $sFilePath, ], ] ); $oCompiler->run();
michaeluno/admin-page-framework-compiler 适用场景与选型建议
michaeluno/admin-page-framework-compiler 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 02 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「build」 「wordpress」 「tool」 「compiler」 「Admin Page Framework」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 michaeluno/admin-page-framework-compiler 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 michaeluno/admin-page-framework-compiler 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 michaeluno/admin-page-framework-compiler 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
A simple library for make Lexer and Parsers to build a language
Dash (LOVE) Docset Builder in PHP (LOVE).
Enables the use of the key press ctrl+d or alt+d to run dev build.
PHP Class to provide quick validation building and execution logic based on validation results.
A quick skeleton project starter with frequently needed boiler-plate setups (ci, badges, etc.)
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-02-22