예제 #1
0
 public function flow_verify(Flow $flow)
 {
     if (!$flow->isSessions("_onetimeticket") || $flow->inVars("_onetimeticket") !== $flow->inSessions("_onetimeticket")) {
         $flow->vars("_onetimeticket", $flow->inSessions("_onetimeticket"));
         throw new Exception("invalid ticket");
     }
 }
예제 #2
0
파일: index.php 프로젝트: hisaboh/w2t
        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>
	<input type="submit" value="update" />
예제 #3
0
파일: test.php 프로젝트: hisaboh/w2t
<?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());
}