确定请求是否来自 Silverstripe CMS 的最佳方法是什么?

What is the best way to establish if the request comes from the Silverstripe CMS?

如果您想确定请求是否来自 Silverstripe 框架中的 CMS,而不是 "front-end",那么最好的方法是什么?

public function IsAdmin()
{
    return Controller::curr() instanceof LeftAndMain ? true : false;
}

这个呢?

if (is_subclass_of(Controller::curr(), "LeftAndMain"))