Is there any professional way to set the visibility of a method to internal/package inside my namespace?
Example:
namespace ExampleFramework;
class Request {
...
public function getResponse() {
return new Response(...); // Should work
}
}
class Response {
internal function __construct(...) {
...
}
}
namespace AnotherFramework;
$request = new Request();
$response = $request->getResponse(); // Should work
$wrongResponse = new Response(...); // Should NOT work