Provides the terms.txt file.

@return \Symfony\Component\HttpFoundation\Response
The terms.txt file as a response object with 'text/plain' content type.
519352
public function content() {
    $config = $this->config('openy.terms_and_conditions.schema');
    $timestamp = $config->get('accepted_version');
    $content = $this->t('Terms and Conditions were not accepted');

    // Is accepted.
    if ($timestamp) {
      $date = $this->dateFormatter
        ->format($timestamp, 'custom', 'F d, Y', 'UTC');
      $time = $this->dateFormatter
        ->format($timestamp, 'custom', 'H:i:s', 'UTC');
      $content = $this->t(
        'Terms and Conditions were accepted on @date at @time time UTC',
        [
          '@date' => $date,
          '@time' => $time,
        ]
      );
    }

    return new Response($content, 200, ['Content-Type' => 'text/plain']);
  }
61911
public function toSymfonyResponse() {
    $headers = array_merge(
      array('Content-Type' => Constants::MIME_TYPE),
      $this->getHeaders()
    );
    return new \Symfony\Component\HttpFoundation\Response(
      $this->encode(),
      $this->code,
      $headers
    );
  }
1297385
public function getContent() {
        $content = "";
        $maxLen = 0;

        foreach ($this->logs as $log)
            if ($log[0]) {
                $name = $log[0]->getFeature()->getName();
                $maxLen = strlen($name) > $maxLen ? strlen($name) : $maxLen;
            }
        
        foreach ($this->logs as $log)
            $content .= sprintf("%-{$maxLen}s | $log[1]\n", $log[0] ? $log[0]->getFeature()->getName() : "");
        
        return new TextFileContent($content);
    }
1303632
public function disWordFiles()
    {
        $properties     = $this->getProperties();
        $acceptedFiles  = $properties['acceptedFiles'];
        $wordExt        = $this->getWordExtensionConstant();
        $acceptedFiles  = $this->rmAcceptedFiles($acceptedFiles, $wordExt);
        $properties['acceptedFiles']    = $acceptedFiles;
        $this->setProperties($properties);
        return $this;
    }
1223656
protected function getContent()
    {
        $response = new SamlResponse();
        $response->setStatus(new Status(new StatusCode($this->status)));

        $context = new SerializationContext();
        $response->serialize($context->getDocument(), $context);

        return $context->getDocument()->saveXML();
    }
1170927
public function getContent() {
        $class = new \PhpParser\Node\Stmt\Class_($this->targetClass);
        $this->extendClass($class);
        $ast = array_merge($this->ast, array($class));
        $code = fphp\Helper\PhpParser::astToString($ast);
        return new fphp\File\TextFileContent($code);
    }
718950
public static function file()
    {
        if (!isset(self::core()->file)) {
            //====================================================================//
            // Initialize Tasks List
            self::core()->file = new FileManager();

            //====================================================================//
            //  Load Translation File
            self::translator()->load('file');
        }

        return self::core()->file;
    }
390849
public function postIndex()
	{
		if ( ! Input::hasFile('file'))
		{
			return Response::json(array('error' => 'File is required'), 400);
		}

		$contents = trim(File::get(Input::file('file')->getRealPath()));

		if (substr($contents, 0, 3) !== '---')
		{
			throw new Exception('Bad Markdown Formatting');
		}

		if ( ! ($pos = strpos($contents, '---', 3)))
		{
			throw new Exception('Bad Markdown Formatting');
		}

		$frontMatter = trim(substr($contents, 3, $pos - 3));
		$contents = trim(substr($contents, $pos + 3));

		$yaml = new Parser();

		$fields = $yaml->parse($frontMatter);

		return Response::json(array(
			'fields' => $fields,
			'content' => $contents
		));
	}
989887
public function getContent()
	{
		if(!empty($this->content))
			return $this->content;
		elseif ($this->fs->exists($this->file)) {
			$this->content = $this->fs->read($this->file);
			return $this->content;
		} else
			return false;
	}
446290
private function buildHttpResponse()
    {
        $status_text = static::$header[$this->code] ?? 'Unkdown';

        @header('HTTP/1.1 '. $this->code .' '. $status_text, $this->override, $this->code);

        foreach ($this->getHeaders() as $key => $header) {
            header(sprintf('%s: %s', $key, $header));
        }

        if ($this->download) {
            readfile($this->download_filename);

            die;
        }

        return $this->getContent();
    }
1261920
public function getContent()
    {
        if ($this->content === null) {
            fseek($this->stream, 0);
            while (($buf = $this->read()) !== false) {
                $this->content .= $buf;
            }
        }

        return $this->content;
    }
513255
public function asText($text)
    {
        $stream = StreamFactory::string($text);
        return new Response($stream, self::OK, ['Content-Type' => 'text/plain']);
    }
1317658
public function contents()
	{
		if ($this->declaration)
		{
			return $this->name;
		}

		return file_exists($this->targetPath()) ? file_get_contents($this->targetPath()) : '';
	}
162073
public function serialize()
	{
		return serialize(array(	$this->pemFile,
								$this->passphrase,
								$this->endpointEnv,

								$this->isValidated,
								$this->description,
								$this->validFrom,
								$this->validTo));
	}
257731
public function fileAction()
	{
		$contents = '';
		$files = array();
		$type = $this->request->getArgument( 'type' );

		foreach( Base::getAimeos()->getCustomPaths( 'admin/jqadm' ) as $base => $paths )
		{
			foreach( $paths as $path )
			{
				$jsbAbsPath = $base . '/' . $path;
				$jsb2 = new \Aimeos\MW\Jsb2\Standard( $jsbAbsPath, dirname( $jsbAbsPath ) );
				$files = array_merge( $files, $jsb2->getFiles( $type ) );
			}
		}

		foreach( $files as $file )
		{
			if( ( $content = file_get_contents( $file ) ) === false ) {
				throw new \RuntimeException( sprintf( 'File "%1$s" not found', $jsbAbsPath ) );
			}

			$contents .= $content;
		}

		if( $type === 'js' ) {
			$this->response->setHeader( 'Content-Type', 'application/javascript' );
		} elseif( $type === 'css' ) {
			$this->response->setHeader( 'Content-Type', 'text/css' );
		}

		return $contents;
	}
344199
public function getFile(){
        if(!$this->isPropertyAvailable('File')){
            $this->setProperty("File", new File($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath(), "File")),false);
        }
        return $this->getProperty("File");
    }
279844
public function convertToText()
    {
        $pathInfo = pathinfo($this->filename);
        switch (strtolower($pathInfo['extension'])) {
            case 'docx':
                return $this->readDocx();
            case 'xlsx':
                return $this->readXlsx();
            case 'pptx':
                return $this->readPptx();

            default:
                throw new \InvalidArgumentException('File extension "' . $pathInfo['extension'] . '" not supported!');
        }
    }