Using $this when not in object context错误原因及解决办法

NoSuchKey