-
-
Notifications
You must be signed in to change notification settings - Fork 2
Advanced Guide
Nana Axel edited this page Sep 6, 2019
·
10 revisions
If you want, you can customize the behaviour of WaterPipe using the WaterPipeConfig
class. Available options are:
-
queryStringEnabled
: This option is aboolean
defining if the use of query strings are enabled in your pipes. The default value istrue
; -
defaultCharset
: This option is astring
defining the default charset to use when processing responses. The default value is"utf-8"
; -
useStdrr
: This option is aboolean
defining if WaterPipe have to use theSTDERR
output channel to print errors and uncaught exceptions. The default value istrue
.
To configure WaterPipe, you just have to retrieve the singleton and define values, before creating pipes.
<?php
use \ElementaryFramework\WaterPipe\WaterPipeConfig;
// Edit configuration
$config = WaterPipeConfig::get();
$config->setUseStderr(false);
$config->setDefaultCharset("ISO-8859-1");
// You can now create your pipes...