Consider this code for instance:
<?php echo MyLib::getSection($row);?>
where MyLib
:
abstract class MyLib
{
public static function getSection($row)
{
return '<span title="$row->tooltip">'.$row->text.'</span>';
}
}
But I need to escape the values in $row->tooltip
and $row->text
. Is there an equivalent of $this->escape()
that I can call from within the getSection()
method? If I were to call the static function directly, which class should I address to, to avoid override layers as best as possible?