Skip to main content
5 events
when toggle format what by license comment
Apr 26, 2023 at 3:20 comment added slepic @julio yes, definitely. Although most constructors are probably public, it's not that uncommon to use different visibility for constructor. For example singleton design pattern has private constructor by design. Although one might argue about usefulness of the singleton pattern.
Apr 25, 2023 at 19:37 comment added julio As for visibility: should __construct() have visibility declared?
Apr 25, 2023 at 16:49 comment added julio Thansk for your time. I was told to write classes trying them not to depend on anything outside, that's why I don't use templating. I use array() in declarations and when a multidimensional array is used so I know it's a multi array, then I use []. And yes, I'm not escaping anything. I leave that for the developer but (as I wrote on the docblock) I will have to escape input data when checking for correct attribute values and adding JS support. +1
Apr 25, 2023 at 6:00 history edited slepic CC BY-SA 4.0
added 539 characters in body
Apr 25, 2023 at 3:42 history answered slepic CC BY-SA 4.0