Giter VIP home page Giter VIP logo

steamboatengine's Introduction

ABANDONED

Последний раз использовалось в doctorpiter, версия 1.3.6

SteamBoatEngine

SteamBoat Engine

Изменения в версии 1.30

  • не будет AjurCurrency

  • не будет AjurWeather

  • не будет BBParser

  • не будет PSDReader -- https://gist.github.com/devluis/8174317

  • не будет EMPortal

  • не будет SBLogger

  • все пути к каталогам без tailing slash

  • удаляем устаревшие функции

? Template class ?

SBEngine

LogSiteUsage более не запрашивает getenv('LOG_SITE_USAGE'), зато требует наличие этого ключа в списке опций при инициализации:

SBEngine::init(options, logger)

Options:

  • PROJECT_PUBLIC
  • PROJECT_STORAGE
  • PROJECT_CLASSES
  • STORAGE
  • LOG_SITE_USAGE

MySQLWrapper

Теперь вызывается:

new \SteamBoat\MySQLWrapper($config, $pdo_connector, $logger = null);

Изменения в функциях

function getDataSetFromSphinx() --> ????????????????????? не реализовано в Arris\Toolkit\SphinxToolkit::getDatasetIDs() (добавляем в каждый проект индивидуально, в трейты)

  • SBCommon::getRandomString --> SBEngine::getRandomString()

  • SBCommon::getRandomFilename --> SBEngine::getRandomFilename()

  • SBCommon::is_ssl() --> SBEngine::is_ssl()

  • getEngineVersion --> SBEngine::getEngineVersion()

  • getSiteUsageMetrics --> SBEngine::getSiteUsageMetrics()

  • logSiteUsage --> SBEngine::logSiteUsage()

  • simpleSendEMAIL --> SBEngine::simpleSendEMAIL()

  • sanitizeHTMLData --> SBEngine::sanitizeHTMLData()

  • normalizeSerialData --> SBEngine::normalizeSerialData()

  • unEscapeString --> SBEngine::unEscapeString()

но вообще её надо выпилить, хз зачем её применяют

MySQLWrapper

Теперь создается как new MySQLWrapper($_CONFIG['DB_CONNECTIONS']['DATA'], AppLogger::scope('mysql'), DB::C());

То есть третьим аргументом передается статический коннекшен к БД, например Arris\DB::C(). Это обязательный параметр! Фактически, это внедрение зависимости.


ToDo

fix -> Arris\http_redirect

public static function redirectCode(string $uri, bool $replace_prev_headers = false, int $code = 302)
    {
        // Функция редиректа с принудительной отсылкой заголовка
        // see also https://gist.github.com/phoenixg/5326222

        $scheme = (self::is_ssl() ? "https://" : "http://");
        $code = array_key_exists($code, self::HTTP_CODES) ? self::HTTP_CODES[$code] : self::HTTP_CODES[302]; /// <---- ADD THIS

        header($code);

        if (strstr($uri, "http://") or strstr($uri, "https://")) {
            header("Location: " . $uri, $replace_prev_headers, $code);
        } else {
            header("Location: {$scheme}" . $_SERVER['HTTP_HOST'] . $uri, $replace_prev_headers, $code);
        }
        exit(0);
    }

steamboatengine's People

Contributors

karelwintersky avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.