35 $arr[
'file'] = strtr(
$arr[
'file'], $replace_path);
36 $arr[
'request'] = strtr(
$arr[
'request'], $replace_path);
41 $sth =
$dbh->prepare(
"INSERT INTO `actions` (`request`, `file`, `groups`, `owner_group`) VALUES (:request, :file, :groups, :owner_group)");
42 $arr[
'groups'] = json_encode(
$arr[
'groups']);
43 $sth->bindValue(
':request',
$arr[
'request']);
44 $sth->bindValue(
':file',
$arr[
'file']);
45 $sth->bindValue(
':groups',
$arr[
'groups']);
46 $sth->bindValue(
':owner_group',
$arr[
'owner_group']);
48 return $dbh->lastInsertId();
61 public static function name($id)
63 return preg_replace(
'#^/api/action/#',
'', self::find($id)->request);
if(!($row=Wrong\Models\Crontabs::find($_POST['id']))) if(! $user->access() ->write($row)) $sth
Connect создает подключение к базе данных
static getInstance($ignore_error=false)
Controller контроллер для запросов к БД
Path удаляет и очищает каталоги
Actions контроллер управления моделями действий, расширяет Controller.
static create($arr, $replace_path=[])
static all_available($value='', $column='id', $table='')
setcookie('FROM_UID', $uid, [ 'expires'=> time()+31536000, 'path'=> '/', 'domain'=> $_SERVER['HTTP_HOST'], 'secure'=> Wrong\Start\Env::$e->IS_SECURE, 'httponly'=> false, 'samesite'=> Wrong\Start\Env::$e->IS_SECURE ? 'None' :'Lax']) or setcookie('FROM_UID' $_SERVER['HTTP_HOST']
ModelsInterface интерфейс управления моделями