コード例 #1
0
 /**
  * setInputString
  *
  * Returns the true/false depended on wheater the string was accepted.
  * That a string is accepted by this method, does NOT mean that it is a valid AMF request.
  *
  * @param string $string New input string
  *
  * @author Asbjørn Sloth Tønnesen <asbjorn@lila.io>
  * @return bool
  */
 public static function setInputString($string)
 {
     if (!(is_string($string) && strlen($string) > 0)) {
         throw new SabreAMF_InvalidAMFException();
     }
     self::$dataInputStream = null;
     self::$dataInputData = $string;
     return true;
 }
コード例 #2
0
ファイル: server.php プロジェクト: J-P-Hanafin/TimeTrex-1
<?php

/* $Id: server.php 210 2009-01-05 15:24:11Z evertpot $ */
// Include the server class
include 'SabreAMF/Server.php';
// Init server
$server = new SabreAMF_Server();
foreach ($server->getRequests() as $request) {
    // Loop through requests
    $server->setResponse($request['response'], SabreAMF_Const::R_RESULT, $request['data']);
}
$server->sendResponse();
//Send the responses back to the client