Skip to content

Commit 6cab604

Browse files
committed
Updated class's static methods docs
1 parent 08cc2c8 commit 6cab604

1 file changed

Lines changed: 32 additions & 3 deletions

File tree

src/Schema/Tables/Contracts/Table.php

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
<?php
2+
/**
3+
* The interface for the table.
4+
*
5+
* @since TBD
6+
*
7+
* @package StellarWP\Schema\Tables\Contracts;
8+
*/
9+
10+
declare( strict_types=1 );
211

312
namespace StellarWP\Schema\Tables\Contracts;
413

@@ -7,12 +16,32 @@
716
use StellarWP\Schema\Collections\Column_Collection;
817
use StellarWP\Schema\Columns\Contracts\Column;
918
use StellarWP\Schema\Indexes\Contracts\Index;
10-
use StellarWP\Schema\Indexes\Primary_Key;
11-
use StellarWP\Schema\Indexes\Unique_Key;
12-
use StellarWP\Schema\Indexes\Classic_Index;
1319
use Exception;
1420
use RuntimeException;
1521

22+
/**
23+
* Class Table
24+
*
25+
* @since TBD
26+
*
27+
* @package StellarWP\Schema\Tables\Contracts;
28+
*
29+
* @method static Generator<array<string, mixed>> get_all( int $batch_size = 50, string $where_clause = '', string $order_by = '' )
30+
* @method static bool|int insert( array $entry )
31+
* @method static bool update_single( array $entry )
32+
* @method static bool upsert( array $entry )
33+
* @method static bool|int insert_many( array $entries )
34+
* @method static bool delete( int $uid, string $column = '' )
35+
* @method static bool|int delete_many( array $ids, string $column = '', string $more_where = '' )
36+
* @method static int get_total_items( array $args = [] )
37+
* @method static bool update_many( array $entries )
38+
* @method static array paginate( array $args, int $per_page = 20, int $page = 1, array $columns = [ '*' ], string $join_table = '', string $join_condition = '', array $selectable_joined_columns = [], string $output = OBJECT )
39+
* @method static mixed[] get_all_by( string $column, $value, string $operator = '=', int $limit = 50 )
40+
* @method static ?mixed get_first_by( string $column, $value )
41+
* @method static ?mixed get_by_id( $id )
42+
* @method static array operators()
43+
* @method static mixed cast_value_based_on_type( string $type, $value )
44+
*/
1645
abstract class Table implements Table_Interface {
1746
use Custom_Table_Query_Methods;
1847

0 commit comments

Comments
 (0)