Making _get_plugin_filepath() public
| From: | messju mohr | Date: | Sun, 29 Feb 2004 11:31:22 +0000 |
| Subject: | Making _get_plugin_filepath() public | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-2165@lists.php.net to get a copy of this message | ||
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