There are a number of PHP frameworks/libraries which utilize such a fluent programming style (also known as method chaining, method cascading, etc.). So I don't think there is anything wrong with this approach. I personally use it a lot.
Your implementation is incorrect however. Basically, each method call that would be subject to chaining must return an instantiated object to allow subsequent method calls to be made against it.
For example, say I wanted to modify your load()
method to allow chaining on the new component_name
object that is loaded. That might look like this:
public load ($component) {
//Assuming component exists
include($component);
$this->component = new component_name($parameters); // not sure where $parameters comes from in your code here
$components[] = $component;
return $this->component;
}
And usage would be:
$core_object->load('some_component_name')->some_method_on_component_name();