function __construct($port = NULL, $host = NULL) { $bootstrap = new \Cundd\Rest\Bootstrap(); $bootstrap->init(); if ($port) { $this->port = $port; } if ($host) { $this->host = $host; } $this->app = new \Cundd\Rest\Dispatcher(); }
function __construct($port = NULL, $host = NULL) { $bootstrap = new \Cundd\Rest\Bootstrap(); $bootstrap->init(); if ($port) { $this->port = $port; } if ($host) { $this->host = $host; } /** @var \Cundd\Rest\Dispatcher $app */ $this->dispatcher = GeneralUtility::makeInstance('Cundd\\Rest\\ObjectManager')->get('Cundd\\Rest\\Dispatcher'); }
<?php if (!defined('TYPO3_MODE')) { die('Access denied.'); } if (file_exists(__DIR__ . '/vendor/')) { require_once __DIR__ . '/vendor/autoload.php'; } else { Tx_CunddComposer_Autoloader::register(); } if (!class_exists('Cundd\\Rest\\Bootstrap')) { throw new RuntimeException('Could not find class \\Cundd\\Rest\\Bootstrap. ' . 'Maybe the Composer dependencies have not been installed', 1397921464); } $bootstrap = new \Cundd\Rest\Bootstrap(); $bootstrap->init(); $app = new \Cundd\Rest\Dispatcher(); $app->dispatch();