Пример #1
0
<?php

/**
 * This file is part of Selective Tweets.
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @author     Andy Young <*****@*****.**>
 * @license    MIT
 *
 * HTTP-accessible script to alert when tracker crashes
 * For use with e.g. Pingdom monitoring service
 */
require '../app/WebApp.php';
$controller = SelectiveTweets_WebApp::factory();
$result = $controller->detectTrackerCrash();
if ($result === SelectiveTweets_BaseApp::CRASHED) {
    echo 'FAIL';
} elseif ($result === SelectiveTweets_BaseApp::OK) {
    echo 'OK';
} else {
    echo 'TEST_FAILED';
}
Пример #2
0
/**
 * html-safe shorthand function
 */
function _h($str)
{
    return SelectiveTweets_WebApp::htmlSafe($str);
}