I know, based on your code, that cannot be done. Maybe I am not explaining myself properly.
Basically, I want to extend a class, now, I do not want all of the public methods from the parent class to be available as public to the child class, I want some of the parent class methods to become protected in the child class.
My reasoning, I have an object for specific use, my child object ALSO has specific use but is dependent on the parent. Just looking to shed those unnecessary methods from the parent (from public view) in the child for the sake of clarity.
Ex.
I have an object the reads data.
I have an object that writes data.
The object that writes data is dependent on the read object to function. But many of the methods in the read object I do not want exposed to the public in the write object, just for the sake of clarity.
class A {
public function test() {}
public function test2() {}
}
class B extends A {
protected function test() {}
}