在smarty访问静态变量


Access static variable in smarty

我有一个类sheldon

Class sheldon
{
  public static $text = 1
}

在smarty中,我试图访问这个变量,如

~$sheldon::$text`

但是它不工作,它给了我错误"语法错误:不可识别的标签:"

我该怎么做来解决这个问题?

{assign var=foo value=sheldon::$text}
{$foo}