本文整理匯總了PHP中assign::load_plugins方法的典型用法代碼示例。如果您正苦於以下問題:PHP assign::load_plugins方法的具體用法?PHP assign::load_plugins怎麽用?PHP assign::load_plugins使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類assign
的用法示例。
在下文中一共展示了assign::load_plugins方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: annotate_plugin_config_files
/**
* Annotate files from plugin configuration
* @param backup_nested_element $assign the backup structure of the activity
* @param string $subtype the plugin type to handle
* @return void
*/
protected function annotate_plugin_config_files(backup_nested_element $assign, $subtype)
{
$dummyassign = new assign(null, null, null);
$plugins = $dummyassign->load_plugins($subtype);
foreach ($plugins as $plugin) {
$component = $plugin->get_subtype() . '_' . $plugin->get_type();
$areas = $plugin->get_config_file_areas();
foreach ($areas as $area) {
$assign->annotate_files($component, $area, null);
}
}
}
示例2: add_plugin_config_files
/**
* Restore files from plugin configuration
* @param string $subtype the plugin type to handle
* @return void
*/
protected function add_plugin_config_files($subtype)
{
$dummyassign = new assign(null, null, null);
$plugins = $dummyassign->load_plugins($subtype);
foreach ($plugins as $plugin) {
$component = $plugin->get_subtype() . '_' . $plugin->get_type();
$areas = $plugin->get_config_file_areas();
foreach ($areas as $area) {
$this->add_related_files($component, $area, null);
}
}
}