Files
kulakpos_web/vendor/thecodingmachine/safe/generated/8.1/yaz.php

140 lines
2.5 KiB
PHP
Raw Normal View History

2026-03-30 14:54:57 +07:00
<?php
namespace Safe;
use Safe\Exceptions\YazException;
/**
2026-04-18 20:32:18 +07:00
* @param resource $id
* @param string $query
* @param array|null $result
2026-03-30 14:54:57 +07:00
* @throws YazException
*
*/
function yaz_ccl_parse($id, string $query, ?array &$result): void
{
error_clear_last();
$safeResult = \yaz_ccl_parse($id, $query, $result);
if ($safeResult === false) {
throw YazException::createFromPhpError();
}
}
/**
2026-04-18 20:32:18 +07:00
* @param resource $id
2026-03-30 14:54:57 +07:00
* @throws YazException
*
*/
function yaz_close($id): void
{
error_clear_last();
$safeResult = \yaz_close($id);
if ($safeResult === false) {
throw YazException::createFromPhpError();
}
}
/**
2026-04-18 20:32:18 +07:00
* @param string $zurl
* @param mixed $options
* @return mixed
2026-03-30 14:54:57 +07:00
* @throws YazException
*
*/
function yaz_connect(string $zurl, $options = null)
{
error_clear_last();
if ($options !== null) {
$safeResult = \yaz_connect($zurl, $options);
} else {
$safeResult = \yaz_connect($zurl);
}
if ($safeResult === false) {
throw YazException::createFromPhpError();
}
return $safeResult;
}
/**
2026-04-18 20:32:18 +07:00
* @param resource $id
* @param string $databases
2026-03-30 14:54:57 +07:00
* @throws YazException
*
*/
function yaz_database($id, string $databases): void
{
error_clear_last();
$safeResult = \yaz_database($id, $databases);
if ($safeResult === false) {
throw YazException::createFromPhpError();
}
}
/**
2026-04-18 20:32:18 +07:00
* @param resource $id
* @param string $elementset
2026-03-30 14:54:57 +07:00
* @throws YazException
*
*/
function yaz_element($id, string $elementset): void
{
error_clear_last();
$safeResult = \yaz_element($id, $elementset);
if ($safeResult === false) {
throw YazException::createFromPhpError();
}
}
/**
2026-04-18 20:32:18 +07:00
* @param resource $id
2026-03-30 14:54:57 +07:00
* @throws YazException
*
*/
function yaz_present($id): void
{
error_clear_last();
$safeResult = \yaz_present($id);
if ($safeResult === false) {
throw YazException::createFromPhpError();
}
}
/**
2026-04-18 20:32:18 +07:00
* @param resource $id
* @param string $type
* @param string $query
2026-03-30 14:54:57 +07:00
* @throws YazException
*
*/
function yaz_search($id, string $type, string $query): void
{
error_clear_last();
$safeResult = \yaz_search($id, $type, $query);
if ($safeResult === false) {
throw YazException::createFromPhpError();
}
}
/**
2026-04-18 20:32:18 +07:00
* @param array $options
* @return mixed
2026-03-30 14:54:57 +07:00
* @throws YazException
*
*/
function yaz_wait(?array &$options = null)
{
error_clear_last();
$safeResult = \yaz_wait($options);
if ($safeResult === false) {
throw YazException::createFromPhpError();
}
return $safeResult;
}