Timeline for How can I force an object that respects an interface to output a certain data type / structure with its functions?
Current License: CC BY-SA 4.0
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 17, 2018 at 19:18 | vote | accept | coolpasta | ||
| Nov 17, 2018 at 16:03 | comment | added | Michael Borgwardt | @coolpasta: it's been too long since I've done PHP, fortunately someone else came to the rescue. | |
| Nov 17, 2018 at 16:02 | comment | added | Michael Borgwardt | @DocBrown: it says specifically that it's his code, not an example for a general situation. | |
| S Nov 17, 2018 at 15:53 | history | suggested | bdsl | CC BY-SA 4.0 | correct function call syntax and other minor changes. |
| Nov 17, 2018 at 15:40 | review | Close votes | |||
| Nov 29, 2018 at 3:05 | |||||
| Nov 17, 2018 at 14:15 | review | Suggested edits | |||
| S Nov 17, 2018 at 15:53 | |||||
| Nov 17, 2018 at 13:05 | answer | added | bdsl | timeline score: 5 | |
| Nov 17, 2018 at 11:46 | comment | added | coolpasta | @MichaelBorgwardt That seems interesting, can you please share a snippet of code of how that would look? | |
| Nov 17, 2018 at 10:05 | comment | added | Michael Borgwardt | PHP has classes, doesn't it? Just define your output() function to return the type Output, which is a class that has main_flags and name as members. | |
| Nov 17, 2018 at 9:12 | answer | added | Doc Brown | timeline score: 1 | |
| Nov 17, 2018 at 9:01 | history | edited | coolpasta | CC BY-SA 4.0 | deleted 5 characters in body |
| Nov 17, 2018 at 8:52 | history | edited | coolpasta | CC BY-SA 4.0 | added 504 characters in body |
| Nov 17, 2018 at 8:40 | history | asked | coolpasta | CC BY-SA 4.0 |