Esempio n. 1
0
 /**
  * fetches all plugins recursively for given table
  *
  * @param Doctrine_Table $table     table object to retrieve the plugins from
  * @return array                    an array of Doctrine_Plugin objects
  */
 public function getAllPlugins(Doctrine_Table $table)
 {
     $plugins = array();
     foreach ($table->getPlugins() as $name => $plugin) {
         if ($plugin === null) {
             continue;
         }
         $plugins[] = $plugin;
         $pluginTable = $plugin->getTable();
         if ($pluginTable instanceof Doctrine_Table) {
             $plugins = array_merge($plugins, $this->getAllPlugins($pluginTable));
         }
     }
     return $plugins;
 }