Overloading confusing example
Nobody has claimed this yet.
- Dominant language
- XML
- Stars
- 596
- Forks
- 890
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 55
Description
The final line of this example is quite confusing.
The error triggered when accessing the private property occurs within the __get() method. Despite this, accessing an overloaded private property is indeed possible, and that is the intended purpose of this chapter.
A solution would be to eliminate the $data property, remove the error trigger, and ensure clarity in conveying that it is permissible to access a private property of a class overloaded with the __get() method.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open language/oop5/overloading.xml around lines 127-237 and inspect the final line of the example. Remove the $data property and error trigger as proposed, then revise the example so it clearly explains that accessing a private property through __get() is permissible. Verify that the resulting example communicates the intended purpose of the overloading chapter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100