public static function getApplicationDirPath():?MApplicationDir
    {
        if (self::isCliApp()) {
            return self::$APPLICATION_DIR_PATH;
        }

        return MSession::get(MCoreApplication::APPLICATION_DIR_PATH);
    }