خرید بک لینک

Vote count: 0

This code is from osTicket, https://github.com/osTicket/osTicket/blob/1.9.x/main.inc.php,

   /**** static functions ****/
    function start() {
        // Prep basic translation support
        Inteationalization::bootstrap();

        if(!($ost = new osTicket()))
            retu null;

        //Set default time zone... user/staff settting will override it (on login).
        $_SESSION['TZ_OFFSET'] = $ost->getConfig()->getTZoffset();
        $_SESSION['TZ_DST'] = $ost->getConfig()->observeDaylightSaving();

        // Bootstrap installed plugins
        $ost->plugins->bootstrap();

        // Mirror content updates to the search backend
        $ost->searcher = new SearchInterface();

        retu $ost;
    }

In another file, this is done:

osTicket::start()

It works. How come the static keyword isn't required?

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 8 خرداد 1395 ساعت: 3:39

صفحه بندی