REDROOM
PHP 8.0.30
Path:
Logout
Edit File
Size: 1.66 KB
Close
//home/certprox/template.certproxywizard.com/wp-content/plugins/hostinger-reach/src/Repositories/Repository.php
Text
Base64
<?php namespace Hostinger\Reach\Repositories; use Hostinger\Reach\Admin\Database\DatabaseInterface; use wpdb; if ( ! DEFINED( 'ABSPATH' ) ) { exit; } abstract class Repository implements RepositoryInterface { protected DatabaseInterface $table; protected wpdb $db; public function __construct( wpdb $db ) { $this->db = $db; } abstract public function all( array $where = array() ): array; abstract public function exists( string $id ): bool; abstract public function get( string $id ): array; abstract public function insert( array $fields ): bool; abstract public function update( array $fields ): bool; protected function build_query( array $where = array(), int $limit = 100, int $offset = 0 ): string { $sql = 'SELECT * FROM %i'; $params = array( $this->table->table_name() ); if ( ! empty( $where ) ) { $where_conditions = array(); foreach ( $where as $column => $value ) { if ( is_array( $value ) && isset( $value['operator'], $value['value'] ) ) { $operator = $value['operator']; $where_conditions[] = $column . ' ' . $operator . ' %s'; $params[] = $value['value']; } else { $where_conditions[] = $column . ' = %s'; $params[] = $value; } } $sql .= ' WHERE ' . implode( ' AND ', $where_conditions ); } $sql .= ' LIMIT ' . $limit; if ( $offset ) { $sql .= ' OFFSET ' . $offset; } return $this->db->prepare( $sql, ...$params ); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
CartRepository.php
6.98 KB
lrw-r--r--
2026-06-10 16:30:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ContactListRepository.php
2.13 KB
lrw-r--r--
2026-06-10 16:30:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FormRepository.php
3.49 KB
lrw-r--r--
2026-06-10 16:30:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Repository.php
1.66 KB
lrw-r--r--
2026-06-10 16:30:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
RepositoryInterface.php
380 B
lrw-r--r--
2026-06-10 16:30:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).