TinyButStrong - the PHP Template Engine
Categories > TinyButStrong general >

Correct/clarify the documentation for Show()?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs

By: Ken Tanzer
Date: 2014-07-22
Time: 06:08

Correct/clarify the documentation for Show()?

Hi.  The TBS documentation says this:

4.3. Method Show()

Render options for OpenTBS:

• Render the merged archive as an HTTP download: ($file_name is optional)
$TBS->Show(OPENTBS_DOWNLOAD, $file_name);
• Render the merged archive as an HTTP output with your customized HTTP headers:
header(...); // your custom headers here
$TBS->Show(OPENTBS_NOHEADER); // output the binary file without header

but in order to output the file without header, I had to specify OPENTBS_DOWNLOAD && OPENTBS_NOHEADER.   Without the OPENTBS_DOWNLOAD an empty document was generated.

It would be great if you could  change the documentation would be great.  Or let me know if I'm missing something!  Thanks.

Ken
By: Ken Tanzer
Date: 2014-07-22
Time: 06:35

Re: Correct/clarify the documentation for Show()?

Oops.  I meant  OPENTBS_DOWNLOAD + OPENTBS_NOHEADER.  Sorry for the typo.

Ken
By: Skrol29
Date: 2014-07-23
Time: 15:42

Re: Correct/clarify the documentation for Show()?

Hi Ken,

That is correct, OPENTBS_NOHEADER works only with OPENTBS_DOWNLOAD.
I will change the documentation.

Regards