I have a class which performs various functions. Within the class, I need to create an object, so, my intention was just to add another class to the file as shown below. My concern, however, is that the name of the additional class (i.e. mySubClass) might conflict with some other class name I am using. Since mySubClass will only be used in connection with myMainClass, is there a way to make it local (analogous to a local variable) to only myMainClass?
class myMainClass {
public function myMethod() {
$obj=new MySubClass();
}
}
class mySubClass {
public $prop1=array();
public $prop2=array();
public $prop3=123;
}