IO v7. Функции фреймворка
output_headers_api()
output_headers_api(): void
pdo_connect()
pdo_connect(): object
Connect to mysql
pdo_query()
pdo_query(
string $sql,
array $arr
): object
Query
io_rand_str()
io_rand_str(
int $len = 16,
string $arr = ''
): string|int
$arr = 'nabs'
n: numbersa: symbolsb: big symbolss: special symbols
get_domain()
get_domain(): string
Получение домена
getRealIP()
getRealIP(
int $method = 2
): string
Получение реального IP пользователя
$methods = 1, 2
getRealHost()
getRealHost(): string
isHttps()
isHttps(): bool
cidr_match()
cidr_match(
string $ip,
$range
): bool
cidr_match_arr()
cidr_match_arr(
string $ip,
$arr
): bool
iostrtotimestamp()
iostrtotimestamp(
$datetimestr,
$timezone = null,
$datetime_timezone = null
)
Переводит в datetimestr строку во временную зону timezone, учитывая, что строка находится во временной зоне datetime_timezone и возвращает timestamp.
curry_attr()
curry_attr(
$attr_name,
$default = null
)
curry_meta_decode()
curry_meta_decode()
xarr()
xarr(
array $arr,
string|int|array $key,
mixed $default = null
): mixed
xadd()
xadd(
array $arr,
string|int $key,
mixed $value
): array
xget()
xget(
string|int $key,
mixed $default = null
): string|int
xpost()
xpost(
string|int $key,
mixed $default = null
): string|int
parseUrl()
parseUrl(
string $url,
&$first,
&$end
): string
parseUrlWithoutGet()
parseUrlWithoutGet(
string $url,
&$first,
&$end
): string
UrlGetUnset()
UrlGetUnset(
string $url,
$key
): string
UrlGet()
UrlGet(
string $url
): array
UrlGetAddArr()
UrlGetAddArr(
string $url,
$getarr,
array $p = []
): string
UrlGetAdd2()
UrlGetAdd2(
string $url,
$atr
): string
UrlGetAdd()
UrlGetAdd(
string $url,
$atr
): string
UrlGetAddA()
UrlGetAddA(
string $url,
$getarr
): string
check_permission()
check_permission(
string $permission,
$account = null
): bool
getAvatar()
getAvatar(
string $user_login
): array
getLogo()
getLogo(
int $company_pkid
): array
getGenPageTime()
getGenPageTime(): int
outGenPageTime()
outGenPageTime(
string $message = ''
): void
iosetcookie()
iosetcookie(
string $key,
mixed $value,
array $params = []
): void
Set cookie
build_post_fields()
build_post_fields(
$data,
string $existingKeys = '',
array &$returnArray = []
): array
Use this to send data with multidimensional arrays and CURLFilescurl_setopt($ch, CURLOPT_POSTFIELDS, build_post_fields($postfields));
param string $existingKeys - will set the paramater name, probably don't want to use
param array $returnArray - Can pass data to start with, only put good data here
https://stackoverflow.com/questions/3453353/how-to-upload-files-multipart-form-data-with-multidimensional-postfields-using
http://stackoverflow.com/questions/35000754/array-2-string-conversion-while-using-curlopt-postfields/35002423#comment69460359_35002423
reverseFiles2()
reverseFiles2(): array
http_build_query_for_curl()
http_build_query_for_curl(
$arrays,
array &$new = [],
$prefix = null
): void
Конвертирует многоуровневый массив
https://stackoverflow.com/questions/3772096/posting-multidimensional-array-with-php-and-curl
curl()
curl(
string $url,
$post = null,
array $headers = []
): array
detect_is_crawler()
detect_is_crawler(
string $user_agent
): bool
Проверка на бота
https://gist.github.com/geerlingguy/a438b41a9a8f988ee106
detect_is_browser()
detect_is_browser(
string $user_agent
): bool
Проверка на браузер
https://gist.github.com/geerlingguy/a438b41a9a8f988ee106
detect_is_bot()
detect_is_bot(
string $user_agent
): bool
Проверка на бота по user_agent
ioSendMail()
ioSendMail(
string $email,
string $title,
string $content
): bool
Отправка почты
crop_photo()
crop_photo(
$file,
$size_name
): void
Обработка фото
s3_file_upload()
s3_file_upload(
string $src_path,
string $dest_path
): array|null
Загрузка файла в S3 облако
s3_file_search()
s3_file_search(
string $dest_path,
string $output_file = ''
): array|null
Поиск файла в S3 облаке
upload_photo()
upload_photo(
string $file_path,
string $file_name
): int
Загрузка фото
get_photos_by_pkid()
get_photos_by_pkid(
array $pkids = []
): array
Возвращает фотографии по массиву ID из базы
Вход: [10, 11, 152, 32]
Выход:
[
10 => [],
11 => [],
152 => [],
32 => [],
]
dbToArray()
dbToArray(
$items
): array
Конвератация массива объектов в обычный массив
iogetdbtime()
iogetdbtime(
$time
): string
Функция работы со временем и UTC
iogetdbtimeutc()
iogetdbtimeutc(
$time
): string
Функция работы со временем и UTC
iogetdbtimeutc_rfc822()
iogetdbtimeutc_rfc822(
$time
): string
Функция работы со временем и UTC
mb_trim()
mb_trim(
string $name
): string
Trim UTF-8 string
convert_to_correct_phone_number()
convert_to_correct_phone_number(
string $phone
): string
Конвертация телефона в международный формат
ioFlush()
ioFlush(): void