Skip to content

Inheritance Chaining for mods #3262

Open
@Vekseid

Description

@Vekseid

For #3259

Xenforo does this. Everything is baked into classes, methods are broken apart, stuff modifies class properties wherever possible.

Well, that's the ideal. Xenforo fails in the last part in a lot of places. >_>

I think we can make it a bit easier to use / develop for than Xenforo though, at least for this.

The way it works is that, rather than extending the class directly, you extend a shortcut. This shortcut gets expanded by the autoloader to point to either the next modification file in the chain, or to the core unmodified file itself.

There are a few things I think we can vastly improve over Xenforo for ease of development, here. We can have people specify priority and the true overrided class in comments, for example. When a mod gets activated or deactivated, it rebuilds the site's autoloader chain cache accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions