Exemple #1
0
        //		foreach(R(new TwitterAPI())->friends_timeline() as $message) $messages[] = Message::parse($message);
        foreach (R(new WassrAPI())->friends_timeline() as $message) {
            $messages[] = Message::parse($message);
        }
        $messages = omerge($messages, "key");
        rosort($messages, "created_at");
        return $messages;
    }
    public static function update($text)
    {
        R(new TwitterAPI())->update($text);
        R(new WassrAPI())->update($text);
    }
}
$flow = new Flow();
if ($flow->isPost() && $flow->isVars("text")) {
    Message::update($flow->inVars("text"));
    $flow->redirect_self();
}
$flow->vars("messages", Message::friends_timeline());
//$flow->output(__FILE__);
exit;
?>
<rt:template>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<form method="post">
	<textarea rows="3" cols="50" name="text"></textarea>
Exemple #2
0
<?php

include_once dirname(__FILE__) . "/__settings__.php";
application_settings(__FILE__, null, dirname(dirname(__FILE__)));
import("core.Log");
import("core.Flow");
import("core.File");
import("ext.Test");
import("ext.Setup");
header_output_text();
$flow = new Flow();
if ($flow->isVars("class")) {
    test($flow->inVars("class"), $flow->inVars("method"), $flow->inVars("block"));
} else {
    if (!$flow->isVars("full")) {
        Test::exec_type(Test::FAIL);
    }
    tests(root_path());
}