Generate the output of the requested Resource instance.

@return mixed
420102
public function output()
    {
        // Check that the method for this HTTP request method exists.
        $methodName = 'http_' . $this->request->httpMethod();
        if (method_exists($this, $methodName)) {
            // Execute the requested Resource instance's method that 
            // corresponds with the requested HTTP method.
            return $this->$methodName();
        } else {
            // The Resource instance didn't define a method for the request's 
            // HTTP method - return a 405.
            return $this->response->send(
                    405,
                    'The requested resource does not support the HTTP method'.
                    ' "' . $this->request->httpMethod() . '".'
            );
        }   
    }
153773
public function render()
    {
        $key = $this->getInputProcessor()->getUniqueRequestId();
        $caching_time = $this->config->getCachingTime();
        if ($caching_time && ($output = Cache::get($key))) {
            return $output;
        } else {
            $this->prepare();
            $provider = $this->config->getDataProvider();
            $provider->reset();
            $output = View::make(
                $this->getMainTemplate(),
                $this->getViewData()
            )->render();
            if ($caching_time) {
                Cache::put($key, $output, $caching_time);
            }
            return $output;
        }
    }
817451
public function generate()
	{
		if (!$this->mpdf) {
			$this->init();
		}
		// Better to avoid having mpdf set any headers as these can interfer with symfony responses
		$output = $this->mpdf->Output('', 'S');
		$time = microtime(true) - $this->start_time;
		$this->logger->debug("sasedev_mpdf: pdf generation took " . $time . " seconds");
		return $output;
	}
972167
public function getOutput(): string
    {
        $this->prepareFlush();
        $path = $this->getViewPath($this->view);

        if (!file_exists($path)) {
            throw new ResponseException("View ({$this->view}) not found on path={$path}");
        }

        ob_start(null, 0, PHP_OUTPUT_HANDLER_CLEANABLE | PHP_OUTPUT_HANDLER_FLUSHABLE | PHP_OUTPUT_HANDLER_REMOVABLE);

        require $path;

        return ob_get_clean();
    }
882852
public function process()
    {
        if ($this->cacheOutput && $this->cache) {
            $contents = $this->input->process();
            $key = md5($contents);

            if (!($output = $this->cache->get($key))) {
                $output = $this->output->process($contents, $this->generator);
                $this->cache->set($key, $output);
            }
        } else {
            $output = $this->output->process(
                $this->input->process(),
                $this->generator
            );
        }

        return $output;
    }
511417
public function output()
    {
        $content = $this->getContent();

        //Set headers
        header($this->getStatusText());
        foreach ($this->headers as $header) {
            header($header);
        }

        return $content;
    }
949842
public function generate() {
		$output_path = $this->timestampedFileName( 'pdf' );
		$this->generateWithDocraptor( $this->pdfProfile, $this->generateHtml(), $output_path );
		delete_transient( 'dirsize_cache' ); /** @see get_dirsize() */
		return $output_path;
	}
789781
public function generateResponse(){
        // Create request
        $this->startTimeline("request.create");

        $request    = $this->container->get("app.request")
            ->withAttribute("app.debug", $this->debug)
        ;

        $this->endTimeline("request.create");

        // Create response
        $this->startTimeline("response.create");

        $response   = $this->container->newInstance(Response::class, [
            "handler"   => $this->generateHandler($request),
        ]);

        $this->endTimeline("response.create");

        return $response;
    }
19717
public function output()
    {
        $imageFile = $this->storage->getPath($this);

        if(file_exists($imageFile))
        {
            header('Content-Type: image');
            header('Content-Length: ' . filesize($imageFile));

            readfile($imageFile);
            exit;
        }
    }
869114
public function output()
    {
        if (! $this->output) {
            $this->output = new Stage\Bucket\BucketAutoOutput($this->builder, $this);
        }

        return $this->output;
    }
591487
public function generate()
    {
        // Make a new key pair
        /** @var resource $private_key */
        $private_key = openssl_pkey_new([
            'private_key_bits'      => 2048,
            'private_key_type'      => OPENSSL_KEYTYPE_RSA,
            'encrypt_key'           => false,
        ]);

        // Export the key pair to a string
        $this->private_key_text = '';
        openssl_pkey_export($private_key, $this->private_key_text);

        // Get the public key
        $public_key_data       = openssl_pkey_get_details($private_key);
        $this->public_key_text = $public_key_data['key'];

        return $this;
    }
403711
protected function output(){
		//encode the command stream
		$debug = ob_get_contents(); ob_end_clean();
		$this->log->add('Response CMD: '.print_r($this->cmd,true));
		$this->stream->setPayload($this->encode($this->cmd,'response'));
		$rv = array('debug'=>$debug,'response'=>$this->stream->encode(),'data'=>$this->data);
		return http_build_query($rv);
	}
1337759
public function generate()
    {
        $generator = $this->generator;
        $data = $this->data;

        $fgm = new FileGeneratorManager();
        $fm = new FileManager();
        $tm = new TemplateManager();
        $dbm = new DataBuilderManager();

        $result = $dbm->build($generator->data_builder, $data);

        if (!$result->ok()) {
            return $result;
        }

        // Overwrite filename if driver is local
        $diskName = Config::get('medialibrary.disk_name');

        if (Config::get("filesystems.disks.$diskName.driver", 'local') === 'local') {
            $generator->filename = bin2hex(random_bytes(32)).'-'.$generator->filename;
        }

        $data = $result->getResource();
        $result = $fgm->render($generator->data_builder, $generator->filetype, [
            'body'     => $generator->body,
            'filename' => sys_get_temp_dir().'/'.$generator->filename,
        ], $data);

        $bag = new Bag($result->getResource());

        file_put_contents($bag->get('filename'), $bag->get('body'));

        $result = $fm->create([]);
        $resource = $result->getResource();

        $resource
            ->addMedia($bag->get('filename'))
            ->addCustomHeaders([
                'ContentDisposition' => 'attachment; filename='.basename($bag->get('filename')).'',
            ])
            ->toMediaCollection('file');

        return $result;
    }
832764
public function generate()
    {
        $version = date('YmdHis');

        $this->_generateMigrationFile($version);
        print PHP_EOL . Color::success('Version ' . $version . ' was successfully generated') . PHP_EOL;
    }
1079179
public function getOutputFile()
    {
        if (!$this->outputFile) {
            $path = new OutputFile($this);
            $this->setOutputFile($path->get());
        }

        return $this->outputFile;
    }
847347
private function getOutputs() : string
    {
        ob_start();
        extract($this->data);
        require $this->file;
        $contents = ob_get_contents();
        ob_end_clean();

        return $contents;
    }
394100
private function generate()
	{
		// only load sections if we dont have a cache
		$this->discoverComponentSections();

		// generate output by processing sections
		$this->output['sections'] = $this->processComponentSections($this->sections);

		// remove duplicate available versions & order
		$this->output['versions']['available'] = array_unique($this->output['versions']['available']);

		// get the highest version available
		$this->output['versions']['max'] = end($this->output['versions']['available']);

		// create cache folder
		$cacheFile = PATH_APP . DS . 'cache' . DS . 'api' . DS . 'documentation.json';

		if (App::has('filesystem') && !App::get('filesystem')->exists(dirname($cacheFile)))
		{
			App::get('filesystem')->makeDirectory(dirname($cacheFile));
		}

		// save cache file
		file_put_contents($cacheFile, json_encode($this->output));
	}