コード例 #1
0
ファイル: Bootstrap.php プロジェクト: tritumRz/rest
 protected function setupComposer()
 {
     // Load composer autoloader
     if (file_exists(__DIR__ . '/../vendor/')) {
         require_once __DIR__ . '/../vendor/autoload.php';
     } else {
         if (!class_exists('Cundd\\CunddComposer\\Autoloader')) {
             require_once __DIR__ . '/../../cundd_composer/Classes/Autoloader.php';
         }
         if (!class_exists('Cundd\\CunddComposer\\Utility\\GeneralUtility')) {
             require_once __DIR__ . '/../../cundd_composer/Classes/Utility/GeneralUtility.php';
         }
         \Cundd\CunddComposer\Autoloader::register();
     }
 }
コード例 #2
0
ファイル: server_typo3.php プロジェクト: tritumRz/rest
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
/*
 * rest
 * @author daniel
 * Date: 21.09.13
 * Time: 20:49
 */
// Defining circumstances for CLI mode:
define('TYPO3_cliMode', TRUE);
define('TYPO3_MODE', 'CLI');
if (file_exists(__DIR__ . '/vendor/react/')) {
    require_once __DIR__ . '/vendor/autoload.php';
} else {
    \Cundd\CunddComposer\Autoloader::register();
}
$port = 1337;
$host = '127.0.0.1';
if (isset($argv[2])) {
    $port = $argv[2];
}
if (isset($argv[3])) {
    $host = $argv[3];
}
$restServer = new \Cundd\Rest\Server($port, $host);
$restServer->start();
コード例 #3
0
ファイル: server.php プロジェクト: tritumRz/rest
 private function requireComposer()
 {
     if (file_exists(__DIR__ . '/vendor/react/')) {
         require_once __DIR__ . '/vendor/autoload.php';
     } elseif (class_exists('Cundd\\CunddComposer\\Autoloader')) {
         \Cundd\CunddComposer\Autoloader::register();
     }
 }
コード例 #4
0
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 */
/**
 * @author COD
 * Created 09.01.14 11:03
 */
namespace Cundd\Rest\Command;

use Cundd\CunddComposer\Autoloader;
use Cundd\Rest\Domain\Model\Document;
use TYPO3\CMS\Extbase\Mvc\Controller\CommandController;
if (file_exists(__DIR__ . '/../../../../vendor/autoload.php')) {
    require_once __DIR__ . '/../../../../vendor/autoload.php';
} else {
    Autoloader::register();
}
class RestCommandController extends CommandController
{
    /**
     * ASCII command escape
     */
    const ESCAPE = "";
    /**
     * ASCII style normal
     */
    const NORMAL = "[0m";
    /**
     * ASCII color green
     */
    const GREEN = "[0;32m";