So I got this source code
//get activated bundles
$bundle_list = new AutoRouter('dev',true);
$bundle_list = $bundle_list->getActivatedBundles();
for($a =0; $a < sizeof($bundle_list); $a++)
{
var_dump($bundle_list[$a]);
}
The dump returns several objects like this
object(Symfony\Bundle\FrameworkBundle\FrameworkBundle)[38]
protected 'name' => null
protected 'extension' => null
protected 'path' => null
protected 'container' => null
object(Symfony\Bundle\SecurityBundle\SecurityBundle)[41]
protected 'name' => null
protected 'extension' => null
protected 'path' => null
protected 'container' => null
object(Symfony\Bundle\TwigBundle\TwigBundle)[40]
protected 'name' => null
protected 'extension' => null
protected 'path' => null
protected 'container' => null
I need to extract the object names as string like this:
(string) "Symfony\Bundle\FrameworkBundle\FrameworkBundle"
(string) "Symfony\Bundle\SecurityBundle\SecurityBundle"
(string) "Symfony\Bundle\TwigBundle\TwigBundle"
Something like
for($a =0; $a < sizeof($bundle_list); $a++)
{
var_dump((string) $bundle_list[$a]);
}
get_class()? php.net/manual/en/function.get-class.php