Example #1
0
 public function call($service, $apiName, $params, $callback, $opt = array())
 {
     $request = Request::createRequest();
     $request->setApi($service, $apiName, $opt);
     $request->setParam($params);
     $request->setOptions($opt);
     $this->requestList[$callback] = $request;
 }
Example #2
0
 public function call($service, $apiName, $params, $opt = array())
 {
     $callback = 'solo';
     $request = Request::createRequest();
     $request->setApi($service, $apiName, $opt);
     $request->setParam($params);
     $response = Transport::exec(array($callback => $request), $opt);
     return $response[$callback];
 }
Example #3
0
<?php

// we now in presentation layer
// we will include business layer to load business logic
include 'model/request.php';
// init Contact Model from Business Logic
$contact = new Request();
// insert new Contact if post data exists
if (isset($_POST["email"]) && $_POST["text"]) {
    $contact->createRequest($_POST["email"], $_POST["subject"], $_POST["text"]);
}
// now load all Movies
$data = $contact->getAllRequests();
// prepare HTML Table
function getHTMLTable($tabledata)
{
    $html = '<br />';
    $html .= '<h1>Liste der bereits erstellten Anfragen:</h1>';
    $html .= '<table id="moviestable">';
    $html .= '<thead><tr>';
    $html .= '<th>Email</th>';
    $html .= '<th>Subject</th>';
    $html .= '<th>Text</th>';
    $html .= '</tr></thead>';
    foreach ($tabledata as $contact) {
        $html .= '<tbody><tr>';
        $html .= '<td>' . $contact['email'] . '</td>';
        $html .= '<td>' . $contact['subject'] . '</td>';
        $html .= '<td>' . $contact['text'] . '</td>';
        $html .= '</tr></tbody>';
    }
Example #4
0
<?php

if (User::checkAuth()) {
    redirect('/profile');
}
if (is_ajax()) {
    $result = Request::createRequest($_REQUEST);
    echo json_encode(array('result' => $result ? 1 : 2));
    return;
}
?>
<!DOCTYPE html>
<html>
<head lang="en">

    <!--fonts:css-->
    <link rel="stylesheet" href="css/fonts.css">
    <!--endinject-->

    <link href="css/invite/style.css" rel="stylesheet">
    <link href="css/invite/position.css" rel="stylesheet">

    <script src="libs/jquery.js"></script>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <div id="enter">
        <form action="/enter" method="post">
            <button type="submit" id="enter-button">ВХОД</button>
        </form>
Example #5
0
<?php

require '../vendor/autoload.php';
use Kernel\Dispatcher;
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/7/17
 * Time: 下午 08:14
 */
//Load global helper function
require dirname(__DIR__) . '/bootstrap/app.php';
$request = new Request();
$request->setBaseUrl($_SERVER['HTTP_HOST']);
$request->createRequest();
$response = Dispatcher::dispatch($request);
$response->sendContent();
$response->sendHeader();
Example #6
0
<?php

/*  __        __   _     _
    \ \      / /__| |__ | |    ___   __ _
     \ \ /\ / / _ \ '_ \| |   / _ \ / _` |
      \ V  V /  __/ |_) | |__| (_) | (_| |
       \_/\_/ \___|_.__/|_____\___/ \__, |
                                     |___/ by Mario Kunz
 */
session_start();
/* loads config */
require_once 'config/config.php';
require_once 'lib/Dispatcher.php';
require_once 'lib/Request.php';
require_once 'lib/Response.php';
/* creates new instance of Dispatcher and invokes the dispatch method */
$dispatcher = new Dispatcher();
$dispatcher->dispatch(Request::createRequest(), new Response());