Documentation

Documentation

Table of Contents

Packages

Application

Namespaces

Colors
Controls
Sessions

Interfaces

Cache_Adapter
IAuthModule
IAuthModule2
ICatchall
IHandler
IVirtualFeed
Logger_Adapter

Classes

API
Article
Auth_Base
Cache_Local
Config
Counters
Db
Db_Migrations
Db_Prefs
Debug
Digest
DiskCache
Errors
FeedEnclosure
FeedItem
FeedItem_Atom
FeedItem_Common
FeedItem_RSS
FeedParser
Feeds
Handler
Handler_Administrative
Handler_Protected
Handler_Public
Labels
Logger
Logger_SQL
Logger_Stdout
Logger_Syslog
Mailer
OPML
Plugin
PluginHandler
PluginHost
Pref_Feeds
Pref_Filters
Pref_Labels
Pref_System
Pref_Users
Prefs
RPC
RSSUtils
Sanitizer
Templator
TimeHelper
DummyContextInterface
DummySpanContextInterface
DummyScopeInterface
DummySpanInterface
Tracer
UrlHelper
UserHelper

Constants

LABEL_BASE_INDEX  = -1024
PLUGIN_FEED_BASE_INDEX  = -128
SCHEMA_VERSION  = \Config::SCHEMA_VERSION
SUBSTRING_FOR_DATE  = 'SUBSTRING'

Functions

stylesheet_tag()  : string
javascript_tag()  : string
format_warning()  : string
format_notice()  : string
format_error()  : string
print_notice()  : string
print_warning()  : string
print_error()  : string
format_backtrace()  : string
ttrss_error_handler()  : bool
ttrss_fatal_handler()  : bool
get_pref()  : bool|int|null|string
set_pref()  : bool
get_translations()  : array<string, string>
startup_gettext()  : void
get_version()  : array<string, mixed>|string
get_schema_version()  : int
_debug()  : void
getFeedUnread()  : int
sanitize()  : false|string
fetch_file_contents()  : bool|string
rewrite_relative_url()  : string
validate_url()  : bool|string
authenticate_user()  : bool
smart_date_time()  : string
make_local_datetime()  : string
get_self_url_prefix()  : string
clean()  : mixed|null
This is used for user http parameters unless HTML code is actually needed.
with_trailing_slash()  : string
make_password()  : string
validate_csrf()  : bool
truncate_string()  : string
mb_substr_replace()  : string
truncate_middle()  : string
sql_bool_to_bool()  : bool
Convert values accepted by tt-rss as true/false to PHP booleans
bool_to_sql_bool()  : int
workaround for PDO casting all query parameters to string unless type is specified explicitly, which breaks booleans having false value because they become empty string literals ("") causing DB type mismatches and breaking SQL queries
file_is_locked()  : bool
make_lockfile()  : resource|false
checkbox_to_sql_bool()  : int
checkbox-specific workaround for PDO casting all query parameters to string unless type is specified explicitly, which breaks booleans having false value because they become empty string literals ("") causing DB type mismatches and breaking SQL queries
uniqid_short()  : string
T_sprintf()  : string
T_nsprintf()  : string
init_plugins()  : bool
gzdecode()  : false|string
get_random_bytes()  : string
read_stdin()  : string|null
implements_interface()  : bool
get_theme_path()  : string
theme_exists()  : bool
arr_qmarks()  : string
get_scripts_timestamp()  : int

Constants

LABEL_BASE_INDEX

public mixed LABEL_BASE_INDEX = -1024

PLUGIN_FEED_BASE_INDEX

public mixed PLUGIN_FEED_BASE_INDEX = -128

SCHEMA_VERSION

public mixed SCHEMA_VERSION = \Config::SCHEMA_VERSION
Tags
deprecated

by Config::SCHEMA_VERSION

SUBSTRING_FOR_DATE

public mixed SUBSTRING_FOR_DATE = 'SUBSTRING'

Functions

stylesheet_tag()

stylesheet_tag(string $filename[, array<string, mixed> $attributes = [] ]) : string
Parameters
$filename : string
$attributes : array<string, mixed> = []
Return values
string

javascript_tag()

javascript_tag(string $filename[, array<string, mixed> $attributes = [] ]) : string
Parameters
$filename : string
$attributes : array<string, mixed> = []
Return values
string

format_warning()

format_warning(string $msg[, string $id = "" ]) : string
Parameters
$msg : string
$id : string = ""
Return values
string

format_notice()

format_notice(string $msg[, string $id = "" ]) : string
Parameters
$msg : string
$id : string = ""
Return values
string

format_error()

format_error(string $msg[, string $id = "" ]) : string
Parameters
$msg : string
$id : string = ""
Return values
string

print_notice()

print_notice(string $msg) : string
Parameters
$msg : string
Return values
string

print_warning()

print_warning(string $msg) : string
Parameters
$msg : string
Return values
string

print_error()

print_error(string $msg) : string
Parameters
$msg : string
Return values
string

format_backtrace()

format_backtrace(array<int, array<string, mixed>> $trace) : string
Parameters
$trace : array<int, array<string, mixed>>
Return values
string

ttrss_error_handler()

ttrss_error_handler(int $errno, string $errstr, string $file, int $line) : bool
Parameters
$errno : int
$errstr : string
$file : string
$line : int
Return values
bool

ttrss_fatal_handler()

ttrss_fatal_handler() : bool
Return values
bool

get_pref()

get_pref(string $pref_name[, int|null $owner_uid = null ]) : bool|int|null|string
Parameters
$pref_name : string
$owner_uid : int|null = null
Tags
deprecated

by Prefs::get()

Return values
bool|int|null|string

set_pref()

set_pref(string $pref_name, bool|int|string $value[, int|null $owner_uid = null ][, bool $strip_tags = true ]) : bool
Parameters
$pref_name : string
$value : bool|int|string
$owner_uid : int|null = null
$strip_tags : bool = true
Tags
deprecated

by Prefs::set()

Return values
bool

get_translations()

get_translations() : array<string, string>
Return values
array<string, string>

get_version()

get_version() : array<string, mixed>|string
Tags
deprecated

by Config::get_version()

Return values
array<string, mixed>|string

get_schema_version()

get_schema_version() : int
Tags
deprecated

by Config::get_schema_version()

Return values
int

_debug()

_debug(string $msg) : void
Parameters
$msg : string
Tags
deprecated

by Debug::log()

getFeedUnread()

getFeedUnread(int|string $feed[, bool $is_cat = false ]) : int
Parameters
$feed : int|string

feed id or tag name

$is_cat : bool = false
Tags
deprecated

by Feeds::_get_counters()

throws
PDOException
Return values
int

sanitize()

sanitize(string $str[, bool $force_remove_images = false ][, int|null $owner = null ][, string|null $site_url = null ][, array<int, string>|null $highlight_words = null ][, int|null $article_id = null ]) : false|string
Parameters
$str : string
$force_remove_images : bool = false
$owner : int|null = null
$site_url : string|null = null
$highlight_words : array<int, string>|null = null

Words to highlight in the HTML output.

$article_id : int|null = null
Tags
deprecated

by Sanitizer::sanitize()

Return values
false|string

The HTML, or false if an error occurred.

fetch_file_contents()

fetch_file_contents(array<string, bool|int|string>|string $params) : bool|string
Parameters
$params : array<string, bool|int|string>|string
Tags
deprecated

by UrlHelper::fetch()

Return values
bool|string

false if something went wrong, otherwise string contents

rewrite_relative_url()

rewrite_relative_url(string $base_url, string $rel_url) : string
Parameters
$base_url : string

Base URL (i.e. from where the document is)

$rel_url : string

Possibly relative URL in the document

Tags
deprecated

by UrlHelper::rewrite_relative()

Converts a (possibly) relative URL to a absolute one, using provided base URL. Provides some exceptions for additional schemes like data: if called with owning element/attribute.

Return values
string

Absolute URL

validate_url()

validate_url(string $url) : bool|string
Parameters
$url : string
Tags
deprecated

by UrlHelper::validate()

Return values
bool|string

false if something went wrong, otherwise the URL string

authenticate_user()

authenticate_user([string|null $login = null ][, string|null $password = null ][, bool $check_only = false ][, string|null $service = null ]) : bool
Parameters
$login : string|null = null
$password : string|null = null
$check_only : bool = false
$service : string|null = null
Tags
deprecated

by UserHelper::authenticate()

Return values
bool

smart_date_time()

smart_date_time(int $timestamp[, int $tz_offset = 0 ][, int|null $owner_uid = null ][, bool $eta_min = false ]) : string
Parameters
$timestamp : int
$tz_offset : int = 0
$owner_uid : int|null = null
$eta_min : bool = false
Tags
deprecated

by TimeHelper::smart_date_time()

Return values
string

make_local_datetime()

make_local_datetime(string $timestamp, bool $long[, int|null $owner_uid = null ][, bool $no_smart_dt = false ][, bool $eta_min = false ]) : string
Parameters
$timestamp : string
$long : bool
$owner_uid : int|null = null
$no_smart_dt : bool = false
$eta_min : bool = false
Tags
deprecated

by TimeHelper::make_local_datetime()

Return values
string

get_self_url_prefix()

get_self_url_prefix() : string
Tags
deprecated

by Config::get_self_url()

Return values
string

clean()

This is used for user http parameters unless HTML code is actually needed.

clean(mixed $param) : mixed|null
Parameters
$param : mixed
Return values
mixed|null

with_trailing_slash()

with_trailing_slash(string $str) : string
Parameters
$str : string
Return values
string

make_password()

make_password([int $length = 12 ]) : string
Parameters
$length : int = 12
Return values
string

validate_csrf()

validate_csrf(string|null $csrf_token) : bool
Parameters
$csrf_token : string|null
Return values
bool

truncate_string()

truncate_string(string $str, int $max_len[, string $suffix = '&hellip;' ]) : string
Parameters
$str : string
$max_len : int
$suffix : string = '&hellip;'
Return values
string

mb_substr_replace()

mb_substr_replace(string $original, string $replacement, int $position, int $length) : string
Parameters
$original : string
$replacement : string
$position : int
$length : int
Return values
string

truncate_middle()

truncate_middle(string $str, int $max_len[, string $suffix = '&hellip;' ]) : string
Parameters
$str : string
$max_len : int
$suffix : string = '&hellip;'
Return values
string

bool_to_sql_bool()

workaround for PDO casting all query parameters to string unless type is specified explicitly, which breaks booleans having false value because they become empty string literals ("") causing DB type mismatches and breaking SQL queries

bool_to_sql_bool(bool $s) : int
Parameters
$s : bool
Return values
int

file_is_locked()

file_is_locked(string $filename) : bool
Parameters
$filename : string
Return values
bool

make_lockfile()

make_lockfile(string $filename) : resource|false
Parameters
$filename : string
Return values
resource|false

A file pointer resource on success, or false on error.

checkbox_to_sql_bool()

checkbox-specific workaround for PDO casting all query parameters to string unless type is specified explicitly, which breaks booleans having false value because they become empty string literals ("") causing DB type mismatches and breaking SQL queries

checkbox_to_sql_bool(mixed $val) : int
Parameters
$val : mixed
Return values
int

uniqid_short()

uniqid_short() : string
Return values
string

T_sprintf()

T_sprintf() : string
Return values
string

T_nsprintf()

T_nsprintf() : string
Return values
string

init_plugins()

init_plugins() : bool
Return values
bool

gzdecode()

gzdecode(string $string) : false|string
Parameters
$string : string
Return values
false|string

The decoded string or false if an error occurred.

get_random_bytes()

get_random_bytes(int $length) : string
Parameters
$length : int
Return values
string

read_stdin()

read_stdin() : string|null
Return values
string|null

implements_interface()

implements_interface(object|string $class, string $interface) : bool
Parameters
$class : object|string
$interface : string
Return values
bool

get_theme_path()

get_theme_path(string $theme) : string
Parameters
$theme : string
Return values
string

theme_exists()

theme_exists(string $theme) : bool
Parameters
$theme : string
Return values
bool

arr_qmarks()

arr_qmarks(array<int, mixed> $arr) : string
Parameters
$arr : array<int, mixed>
Return values
string

get_scripts_timestamp()

get_scripts_timestamp() : int
Return values
int

Search results