PHP code example of mesd / phantasos-client-bundle
1. Go to this page and download the library: Download mesd/phantasos-client-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mesd / phantasos-client-bundle example snippets
$bundles = array(
...
new Mesd\PhantasosClientBundle\MesdPhantasosClientBundle()
);
/**
* @Route('/myapp/media_is_ready', name="my_app_media_callback")
* @Method({"POST"})
*/
public function myMediaIsDoneCallbackAction(Request $request)
{
$mediaId = $request->request->get('media_id');
// Application specific stuff here ...
return new Response('Message Recieved', 200);
}
$ticket = $this->get('mesd_phantasos_client')->requestUploadTicket();
// The upload ticket contains information such as the media id that will need to be saved in your application
$mediaLink = new MediaLink() // Or whatever you are using to persist the media information in the using application
$mediaLink->setMediaId($ticket->getMediaId());
// Persist the media link and do whatever other application specific things need to be done
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.