mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-20 02:11:52 -04:00
Add a request method to extract arrays (#3629)
This commit is contained in:
1 parent
8d8b792007
commit
235ff3863d
1 file changed
+13
@@ -58,6 +58,19 @@ class Minz_Request {
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
/**
|
||||
* Extract text lines to array.
|
||||
*
|
||||
* It will return an array where each cell contains one line of a text. The new line
|
||||
* character is used to break the text into lines. This method is well suited to use
|
||||
* to split textarea content.
|
||||
*/
|
||||
public static function paramTextToArray($key, $default = []) {
|
||||
if (isset(self::$params[$key])) {
|
||||
return preg_split('/\R/', self::$params[$key]);
|
||||
}
|
||||
return $default;
|
||||
}
|
||||
public static function defaultControllerName() {
|
||||
return self::$default_controller_name;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user