rfc:namespaces-for-internal-classes
Differences
This shows you the differences between two versions of the page.
rfc:namespaces-for-internal-classes [2008/06/17 19:25] lstrojny s:Filter:Glob: |
rfc:namespaces-for-internal-classes [2017/09/22 13:28] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Request for Comments: How to write RFCs ====== | ||
- | * Version: 0.1 | ||
- | * Date: 2008-03-06 | ||
- | * Author: Lars Strojny < | ||
- | * Status: Work in progress | ||
- | * First Published at: none | ||
- | ===== Introduction ===== | ||
- | |||
- | This RFC discusses the transition to real namespaces for internal classes in e.g. ext/spl. | ||
- | |||
- | ==== Why should we use namespaces for internal classes? ==== | ||
- | |||
- | Currently internal classes are inconsistently named. Just take a look at SPL: | ||
- | * RecursiveIterator | ||
- | * RecursiveIteratorIterator | ||
- | * RecursiveRegexIterator | ||
- | * RegexIterator | ||
- | * RuntimeException | ||
- | * SeekableIterator | ||
- | * SimpleXMLIterator | ||
- | * SplFileInfo | ||
- | * SplFileObject | ||
- | * SplObjectStorage | ||
- | * SplObserver | ||
- | |||
- | Some of the classes in ext/spl are prefixed with " | ||
- | |||
- | * RecursiveIterator: | ||
- | * RecursiveIteratorIterator: | ||
- | * RecursiveRegexIterator: | ||
- | * RegexIterator: | ||
- | * RuntimeException: | ||
- | * SimpleXMLIterator: | ||
- | * SplObserver: | ||
- | * SplSubject: Spl:: | ||
- | * SplFileInfo: | ||
- | * SplFileObject: | ||
- | * SeekableIterator: | ||
- | |||
- | ===== List of renamed classes ===== | ||
- | ==== Array ==== | ||
- | ^ Current name ^ New name ^ | ||
- | | ArrayObject | ||
- | | SplFastArray | ||
- | |||
- | ==== Iterators ==== | ||
- | ^ Current name ^ New name ^ | ||
- | | AppendIterator | ||
- | | ArrayIterator | ||
- | | CachingIterator | ||
- | | DirectoryIterator | ||
- | | EmptyIterator | ||
- | | FilesystemIterator | ||
- | | FilterIterator | ||
- | | GlobIterator | ||
- | | InfiniteIterator | ||
- | | IteratorIterator | ||
- | | LimitIterator | ||
- | | RegexIterator | ||
- | | SeekableIterator | ||
- | | SimpleXMLIterator | ||
- | | ParentIterator | ||
- | | NoRewindIterator | ||
- | | OuterIterator | ||
- | | RecursiveArrayIterator | ||
- | | RecursiveCachingIterator | ||
- | | RecursiveDirectoryIterator | ||
- | | RecursiveFilterIterator | ||
- | | RecursiveIterator | ||
- | | RecursiveIteratorIterator | ||
- | | RecursiveRegexIterator | ||
- | |||
- | ==== Lists ==== | ||
- | ^ Current name ^ New name ^ | ||
- | | SplDoublyLinkedList | ||
- | | SplQueue | ||
- | | SplStack | ||
- | | SplHeap | ||
- | | SplMinHeap | ||
- | | SplMaxHeap | ||
- | | SplPriorityQueue | ||
- | | SplObjectStorage | ||
- | |||
- | ==== Exceptions ==== | ||
- | ^ Current name ^ New name ^ | ||
- | | BadFunctionCallException | ||
- | | BadMethodCallException | ||
- | | DomainException | ||
- | | InvalidArgumentException | ||
- | | LengthException | ||
- | | RangeException | ||
- | | RuntimeException | ||
- | | LogicException | ||
- | | OutOfBoundsException | ||
- | | OutOfRangeException | ||
- | | OverflowException | ||
- | | UnderflowException | ||
- | | UnexpectedValueException | ||
- | |||
- | ==== File related stuff ==== | ||
- | ^ Current name ^ New name ^ | ||
- | | SplFileInfo | ||
- | | SplFileObject | ||
- | | SplTempFileObject | ||
- | |||
- | ==== Observer interfaces ==== | ||
- | ^ Current name ^ New name ^ | ||
- | | SplObserver | ||
- | | SplSubject | ||
- | |||
- | ==== Misc ==== | ||
- | ^ Current name ^ New name ^ | ||
- | | Countable | ||
- | |||
- | ===== Backwards compatibility and other constraints ====== | ||
- | * The current names are removed in PHP 6.0 | ||
- | * The current names are available as deprecated aliases until their removal | ||
- | * The documentation will be updated to advise the usage of the new naming scheme | ||
- | * The current classes will trigger an E_DEPRECATED warning hinting the new name |
rfc/namespaces-for-internal-classes.txt · Last modified: 2017/09/22 13:28 (external edit)