Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
route-forge
php-thinkphp
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
php-thinkphp
/
_ide_helper.php
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
31 lines (27 loc) · 1.53 KB
main
Breadcrumbs
php-thinkphp
/
_ide_helper.php
Copy path
Top
File metadata and controls
Code
Blame
31 lines (27 loc) · 1.53 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
declare(strict_types=1);
/*
* Route Forge for ThinkPHP —— IDE 智能提示桩(dev-only,勿进运行时)
* -------------------------------------------------------------------------
* 本包通过 think\route\Rule::__call 提供链式 ->tier() / ->forgeAlias()。
* 它们是「魔术方法」——运行时被 __call 拦截转成路由 option,类里并无真实声明,
* 所以 IDE 默认无法对 ->tier() 给出补全/跳转。本文件用 @method 把这些提示补上。
*
* ⚠ 仅供 IDE 索引,切勿 require / composer autoload 进运行时:
* - 本文件不在 composer.json 的 autoload 路径内,正常永远不会被 PHP 执行;
* - 这里以「重新声明同名类 + @method」的方式提供提示,若被运行时加载会与
* 真实类冲突,因此绝对不要把它纳入自动加载或手动 require。
*
* 生效方式:PHPStorm 等 IDE 会索引包根下的本文件并合并其 @method。若你的 IDE
* 未识别,请把本文件所在目录加入 Settings → PHP 的 Include Path / 索引范围。
*
* 维护:ThinkPHP 未来若原生新增同名方法或改动签名,请同步更新或删除本桩。
*/
namespace think\route;
/**
* @method $this tier(string $tier) 按层级归类该路由;值须为 config/forge.php 的 levels 中已定义的层级名。链式返回自身。
* @method $this forgeAlias(string ...$aliases) 声明路由别名(旧路由名);多个别名必须在同一次调用传入(重复调用是覆盖而非合并)。
*/
class Rule
{
}
You can’t perform that action at this time.