The class a property holds in `file`: by its own name, or by the alias a load there gave it.
(property: string, file: string, context: ResolutionContext)
| 269 | |
| 270 | /** The class a property holds in `file`: by its own name, or by the alias a load there gave it. */ |
| 271 | function propertyClass(property: string, file: string, context: ResolutionContext): Node | null { |
| 272 | const table = classTable(context); |
| 273 | const alias = table.loadable.has(property.toLowerCase()) ? undefined : aliasesIn(file, table, context).get(property); |
| 274 | const classes = table.loadable.get(alias ?? property.toLowerCase()); |
| 275 | if (!classes) return null; |
| 276 | if (classes.length === 1) return classes[0]!; |
| 277 | // One name in two HMVC modules: the caller's own, and no guess past that. |
| 278 | const module = MODULE_OF.exec(file)?.[1]; |
| 279 | const own = module ? classes.filter((c) => MODULE_OF.exec(c.filePath)?.[1] === module) : []; |
| 280 | return own.length === 1 ? own[0]! : null; |
| 281 | } |
| 282 | |
| 283 | export const codeigniterResolver: FrameworkResolver = { |
| 284 | name: 'codeigniter', |