Skip to content

Commit

Permalink
add spl_autoload_unregister
Browse files Browse the repository at this point in the history
  • Loading branch information
withinboredom committed Aug 18, 2024
1 parent 8045f86 commit 8b93203
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drafts/function-autoloading.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ an `Error` is thrown: 'Default autoloader can only load classes.'

There will not be a default function autoloader.

### spl_autoload_unregister

`spl_autoload_unregister` will be updated to accept the new constants as the second parameter to unregister an
autoloader from either mode.

### spl_autoload_call

The `spl_autoload_call` function will be modified to accept a second parameter of one,
Expand Down Expand Up @@ -143,6 +148,7 @@ None at this time.
Potentially, constants and stream wrappers can be added in a similar fashion.

## Proposed Voting Choices

<!-- markdownlint-disable MD037 -->
<doodle title="Implement Function Autoloading v4, as described" auth="withinboredom" voteType="single" closed="true" closeon="2022-01-01T00:00:00Z">
* Yes
Expand Down
4 changes: 4 additions & 0 deletions published/function-autoloading.ptxt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ For codebases that want to take advantage of function autoloading, it may be des

There will not be a default function autoloader.

==== spl_autoload_unregister ====

''%%spl_autoload_unregister%%'' will be updated to accept the new constants as the second parameter to unregister an autoloader from either mode.

==== spl_autoload_call ====

The ''%%spl_autoload_call%%'' function will be modified to accept a second parameter of one, (but not both) of the new constants, with the default value set to SPL_AUTOLOAD_CLASS. The name of the first parameter will be changed to ''%%$name%%'' to reflect that it can be a class or function name.
Expand Down

0 comments on commit 8b93203

Please sign in to comment.