The writer factory class used to fetch and work with the content_writer.
More...
|
static | export_user_preference (string $component, string $key, string $value, string $description) |
| Export the specified user preference.
|
|
static | reset () |
| Reset the writer and content_writer.
|
|
static | setup_real_writer_instance () |
| Create a real content_writer for use by PHPUnit tests, where a mock writer will not suffice.
|
|
static | with_context (\context $context) |
| Provide an instance of the writer with the specified context applied.
|
|
|
static | instance () |
| Return an instance of.
|
|
|
content_writer | $realwriter = null |
| The current content_writer instance.
|
|
|
static writer | $instance = null |
| The singleton instance of this writer.
|
|
The writer factory class used to fetch and work with the content_writer.
- Copyright
- 2018 Andrew Nicols andre.nosp@m.w@ni.nosp@m.cols..nosp@m.co.u.nosp@m.k
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_privacy\local\request\writer::__construct |
( |
| ) |
|
|
protected |
Constructor for the content writer.
Protected to prevent direct instantiation.
◆ export_user_preference()
static core_privacy\local\request\writer::export_user_preference |
( |
string | $component, |
|
|
string | $key, |
|
|
string | $value, |
|
|
string | $description ) |
|
static |
Export the specified user preference.
- Parameters
-
string | $component | The name of the component. |
string | $key | The name of th key to be exported. |
string | $value | The value of the preference |
string | $description | A description of the value |
- Return values
-
◆ get_writer_instance()
core_privacy\local\request\writer::get_writer_instance |
( |
| ) |
|
|
protected |
Singleton to return or create and return a copy of a content_writer.
- Return values
-
◆ setup_real_writer_instance()
static core_privacy\local\request\writer::setup_real_writer_instance |
( |
| ) |
|
|
static |
Create a real content_writer for use by PHPUnit tests, where a mock writer will not suffice.
- Return values
-
◆ with_context()
static core_privacy\local\request\writer::with_context |
( |
\context | $context | ) |
|
|
static |
Provide an instance of the writer with the specified context applied.
- Parameters
-
context | $context | The context to apply |
- Return values
-
content_writer | The content_writer |
The documentation for this class was generated from the following file:
- privacy/classes/local/request/writer.php