[Solar-talk] find all available apps

Raymond Kolbe rkolbe at gmail.com
Mon Apr 14 19:12:59 CDT 2008


I dont think that would work since it keeps track of all classes including
Solar. Here is an example of what it will return:


array(9) {
  ["Solar_Controller_Front"] => array(1) {
    [0] => string(10) "Solar_Base"
  }
  ["Solar_Class_Stack"] => array(1) {
    [0] => string(10) "Solar_Base"
  }
  ["Solar_Uri_Action"] => array(2) {
    [0] => string(9) "Solar_Uri"
    [1] => string(10) "Solar_Base"
  }
  ["Solar_Request"] => array(1) {
    [0] => string(10) "Solar_Base"
  }
  ["Solar_Session"] => array(1) {
    [0] => string(10) "Solar_Base"
  }
  ["Solar_Session_Handler"] => array(1) {
    [0] => string(10) "Solar_Base"
  }
  ["Solar_Session_Handler_Adapter_Native"] => array(2) {
    [0] => string(29) "Solar_Session_Handler_Adapter"
    [1] => string(10) "Solar_Base"
  }
  ["Solar_Http_Response"] => array(1) {
    [0] => string(10) "Solar_Base"
  }
  ["Trax_App_Tickets"] => array(3) {
    [0] => string(13) "Trax_App_Base"
    [1] => string(21) "Solar_Controller_Page"
    [2] => string(10) "Solar_Base"
  }
}

When running Solar::parents($this) all I get is Trax_App_Base (aka the
parent class to my controller).

Now Trax is one of my projects and I called
die(Solar::dump(Solar::$parents)); right in Trax_App_Tickets::_setup(). It
is only going to show the current controller if anything.

My solution/suggestion would be to just read all of the files in the App
directory minus Base.php (unless you want that too). You could then remove
the .php at the end and have the name to all of your apps in your vendor
project. If you wanted the class names all you would have to do is grab the
beginning of the current class name until you hit the
underscore...Trax....and then tack on 'App_' followed by the class names you
pulled from before.

Hope that helps and hope that is what you are looking for.

Thanks,
Raymond Kolbe

On Mon, Apr 14, 2008 at 6:05 PM, Jeff Surgeson <solar at 3hex.com> wrote:

> Hi All
>
> What is the easiest way to get a list of available vendor apps?
>
> Solar::parent()?
>
> --
> ...........::::::...........
> Jeff Surgeson / South Africa
> _______________________________________________
> Solar-talk mailing list
> Solar-talk at lists.solarphp.com
> http://mailman-mail3.webfaction.com/listinfo/solar-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20080414/e44b757a/attachment.html


More information about the Solar-talk mailing list