Autoloading Attribute
See original GitHub issueDescription
An attribute on classes preventing or enabling them to autoload
What does this proposal attempt to solve or improve?
Attributes will be less code and cleaner code rather than overriding a method and returning.
Which (other) solutions should be considered?
N/A
Examples
//This item will not autoload
[Autoload(false)]
public class CoolItem : ModItem { }
Notes
Could be paired with the #848 pull request
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Autoloading Classes - Manual
By registering autoloaders, PHP is given a last chance to load the class or ... Autoloading can then be triggered by accessing the...
Read more >13.11. Generating Attribute Methods Using AUTOLOAD
Perl's AUTOLOAD mechanism intercepts all possible undefined method calls. So as not to permit arbitrary data names, we'll store the list of permitted...
Read more >Generating Attribute Methods Using AUTOLOAD - Perl ...
The AUTOLOAD method will check to verify that the accessed field is in that hash. package Person; use strict; use Carp; use vars...
Read more >Use autoloading and namespaces in PHP
In the PHP language, autoloading is a way to automatically include class files of a project in your code.
Read more >ProvideAutoLoadAttribute Class
This attribute registers the package as an extender. The GUID passed in determines what is being extended. The attributes on a package do...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I need to look into it more, but the current system doesn’t work well with Items that want to have custom constructors, because you have to leave a default one just to allow tML to know you don’t want it autoloaded
Worth discussing, there’s room for improvement in autoloading, and having it work well with constructors