Skip to content
Snippets Groups Projects

Feature make standalone

Merged Georgi requested to merge feature_make_standalone into master
2 unresolved threads
13 files
+ 1296
1231
Compare changes
  • Side-by-side
  • Inline
Files
13
+ 24
26
<?php
namespace SGalinski\SgVimeo\Backend;
/***************************************************************
* Copyright notice
*
@@ -26,39 +24,39 @@ namespace SGalinski\SgVimeo\Backend;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use Exception;
namespace SGalinski\SgVimeo\Backend;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use SGalinski\SgVimeo\Service\LicenceCheckService;
use TYPO3\CMS\Core\Http\Response;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
/**
* Class Ajax
*
* @package SGalinski\SgVimeo\Backend
*/
class Ajax {
/**
* Checks whether the license is valid
*
* @param ServerRequestInterface $request
* @param ResponseInterface $response
* @return ResponseInterface
* @throws \InvalidArgumentException
* @throws Exception
*/
public function checkLicense(
ServerRequestInterface $request,
ResponseInterface $response = NULL
) {
if ($response === NULL) {
$response = new Response();
}
class Ajax
{
/**
* Checks whether the license is valid
*
* @param ServerRequestInterface $request
* @param \Psr\Http\Message\ResponseInterface|null $response
* @return ResponseInterface
*/
public function checkLicense(
ServerRequestInterface $request,
ResponseInterface $response = NULL
)
{
if ($response === NULL) {
$response = new Response();
}
LicenceCheckService::setLastAjaxNotificationCheckTimestamp();
$responseData = LicenceCheckService::getLicenseCheckResponseData(TRUE);
$response->getBody()->write(json_encode($responseData));
return $response;
}
LicenceCheckService::setLastAjaxNotificationCheckTimestamp();
$responseData = LicenceCheckService::getLicenseCheckResponseData(TRUE);
$response->getBody()->write(json_encode($responseData));
return $response;
}
}
Loading