1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-05 16:17:28 +02:00

[FormatAbstract] Remove interface functions

LogMANOriginal
2016-11-16 17:14:22 +01:00
parent 4d7d864315
commit dce03fc6b8

@@ -1,34 +1,13 @@
The `FormatAbstract` class implements the [`FormatInterface`](FormatInterface) interface with basic functional behavior and adds common helper functions for new formats:
* [setCharset](#the-setcharset-function)
* [getCharset](#the-getcharset-function)
* [setContentType](#the-setcontenttype-function)
* [callContentType](#the-callcontenttype-function)
* [getItems](#the-getitems-function)
* [setExtraInfos](#the-setextrainfos-function)
* [getExtraInfos](#the-getextrainfos-function)
* [sanitizeHtml](#the-sanitizehtml-function)
* [array_trim](#the-array_trim-function)
#Functions
#The `setCharset` function
The `setCharset` function receives the character set value as string and returns the object instance.
```PHP
setCharset(string): self
```
#The `getCharset` function
The `getCharset` function returns the character set value.
```PHP
getCharset(): string
```
#The `setContentType` function
##The `setContentType` function
The `setContentType` function receives a string defining the content type for the HTML header and must return the object instance.
@@ -36,7 +15,7 @@ The `setContentType` function receives a string defining the content type for th
setContentType(string): self
```
#The `callContentType` function
##The `callContentType` function
The `callContentType` function applies the content type to the header data and must return the object instance.
@@ -44,38 +23,7 @@ The `callContentType` function applies the content type to the header data and m
callContentType(): self
```
#The `getItems` function
The `getItems` function returns the items previously set by the [`setItems`](FormatInterface#the-setitems-function) function. If no items where set previously this function returns an error.
```PHP
getItems(): array
```
#The `setExtraInfos` function
The `setExtraInfos` function receives an array of elements with additional information to generate format outputs and must return the object instance.
```PHP
setExtraInfos(array $infos): self
```
Currently supported information are:
Name | Description
-----|------------
`name` | Defines the name as generated by the bridge
`uri` | Defines the URI of the feed as generated by the bridge
#The `getExtraInfos` function
The `getExtraInfos` function returns the information previously set via the [`setExtraInfos`](#the-setextrainfos-function) function.
```PHP
getExtraInfos(): array
```
#The `sanitizeHtml` function
##The `sanitizeHtml` function
The `sanitizeHtml` function receives an HTML formatted string and returns the string with disabled `<script>`, `<iframe>` and `<link>` tags.
@@ -83,7 +31,7 @@ The `sanitizeHtml` function receives an HTML formatted string and returns the st
sanitizeHtml(string $html): string
```
#The `array_trim` function
##The `array_trim` function
The `array_trim` function receives an array of strings and returns the same array with all elements trimmed (like using the `trim` function on all elements)