private - nested classes php or other method
142
I am looking for a method like the suggested php >=5.6 nested classes.
example
class Parent {
public function call(){
return new $this->Child;
}
class Child {
}
}
Basically what I'm looking to do is something like
Secure::Encryption::Get();
or
Secure::Encryption($type)::Get();
You can do something similar in JavaScript ex:
function Secure(){
return {
Encryption: function(){
return:{
Get:function(){}
}
}
}
}
I want to have private members only accesible to theEncryption
member. I know that nested classes are not possible yet so I'm looking for an alternative