Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

smarty_internal_method_unregisterplugin.php 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Smarty Method UnregisterPlugin
  4. *
  5. * Smarty::unregisterPlugin() method
  6. *
  7. * @package Smarty
  8. * @subpackage PluginsInternal
  9. * @author Uwe Tews
  10. */
  11. class Smarty_Internal_Method_UnregisterPlugin
  12. {
  13. /**
  14. * Valid for Smarty and template object
  15. *
  16. * @var int
  17. */
  18. public $objMap = 3;
  19. /**
  20. * Registers plugin to be used in templates
  21. *
  22. * @api Smarty::unregisterPlugin()
  23. * @link http://www.smarty.net/docs/en/api.unregister.plugin.tpl
  24. *
  25. * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
  26. * @param string $type plugin type
  27. * @param string $name name of template tag
  28. *
  29. * @return \Smarty|\Smarty_Internal_Template
  30. */
  31. public function unregisterPlugin(Smarty_Internal_TemplateBase $obj, $type, $name)
  32. {
  33. $smarty = isset($obj->smarty) ? $obj->smarty : $obj;
  34. if (isset($smarty->registered_plugins[$type][$name])) {
  35. unset($smarty->registered_plugins[$type][$name]);
  36. }
  37. return $obj;
  38. }
  39. }