[Solar-talk] help with apps

Jeff Surgeson solar at 3hex.com
Wed Aug 9 16:20:18 PDT 2006


Hi Paul

Need a pointer or two if you have the time :-D

Example:
I have 2 complete standalone Apps, each with own data models, basicly the same 
format as a bookmarks app except there is no content model, both extend from 
Solar_App, I want to then create a 3rd App which will load the first 2 App's 
and allow me to access and set all off their methods etc etc. 

I have sort of done it however I am having problems in setting each of the 
apps properties and calling some of the methods as they are protected, 

Normaly each app would setup its own $_layout & $_layout_style property's etc 
etc but I want to do this now from the 3rd app.

I have tried defining a object property for each app I want to include in my 
3rd app:

public $app_one;
public $app_two;

and then in its setup()

$this->app_one = Solar::factory(Vendor_App_One);
$this->app_two = Solar::factory(Vendor_App_Two);

Then I am able to access $app_one's or two methods through

$list = $this->app_one->method();

However you cant access protected method's and I cant figure out how to set 
the extended properties of app_one like $_layout from the 3rd app.

In you docs you talk about passing a 2nd config param in Solar::factory()

$config = array('a' => 'b');
factory(Vendor_App_One, $config)

But I cant seem to make this work in my case.

Do I even want to be doing all of this?

-- 
Jeff Surgeson / South Africa


More information about the solar-talk mailing list