oop - PHP private const -


i have class benefits use of constants in internal implementation, limit visibility of these constants. why doesn't php permit private constants? there way achieve or php trying discourage type of design misstep ignorant of?

use private static properties. in case have same variable throughout objects , if want extend it's scope nested can expose getter method value , restrict variables settings.


Comments

Popular posts from this blog

iphone - Using nested NSDictionary with Picker -

javascript - Iterate over array and calculate average values of array-parts -

php - Time zone issue -