/** * Generates the SWF file */ public function swf() { $swfFile = new \System\IO\File(PATH_MODULES . self::SWF_FILE); $renderer = new \System\Output\Renderer\DataRenderer(); $renderer->render($swfFile->getContents()); $surface = \System\Output\RenderSurface::getSurface('\\System\\Output\\BufferSurface'); $surface->addHeader('Content-Type: application/x-shockwave-flash'); $surface->setRenderer($renderer); $this->setRenderSurface($surface); }
/** * Handles the transferring of the request to the service. */ public final function interact() { $reply = new \System\Collection\Vector(); if ($this->hasServiceResult('\\System\\System\\Interaction\\Service\\InteractionRcv::interact')) { $serviceResult = $this->getServiceResult('\\System\\System\\Interaction\\Service\\InteractionRcv::interact'); $reply = $serviceResult->reply; } $renderer = new \System\Output\Renderer\DataRenderer(); $renderer->render(\System\System\Interaction\Interaction::encode($reply)); $renderSurface = \System\Output\RenderSurface::getSurface('\\System\\Output\\GZIPBufferSurface'); $renderSurface->setRenderer($renderer); $this->setRenderSurface($renderSurface); }