Making _get_plugin_filepath() public

messju mohr <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
Hello smarty-dev,

the function _get_plugin_filepath() is considered internal by the
convention that functions whose names start with an underscore are
internal.

On the other hand this function is useful if you have plugins that
should inter-operate in some way.

require_once $smarty->_get_plugin_filepath($type, $name);

is even the proposed way to implement loading a plugin inside another
plugin http://smarty.php.net/manual/en/plugins.writing.php

So this function is not as internal as others are.

For consistency I suggest we should rename the function to
get_plugin_filepath() and make it a public api-function.

For migration of third-party-plugins that use _get_plugin_filepath()
we could leave a wrapper with a warning for a few releases.

function _get_plugin_filepath($type, $name)
{
  $this->trigger_error('the use of _get_plugin_filepath() is deprecated use get_plugin_filepath()', E_USER_WARNING);
  return $this->get_plugin_filepath($type, $name);
}


I know having this alias is a little bloat, but it would be temporary and be bloat at the right place, IMHO.

thoughts?

greetings
messju

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.