WordPress\ORM\BaseModel::all PHP Method

all() public static method

Return EVERY instance of this model from the database, with NO filtering.
public static all ( ) : array
return array
    public static function all()
    {
        global $wpdb;
        // Get the table name
        $table = static::get_table();
        // Get the items
        $results = $wpdb->get_results("SELECT * FROM `{$table}`");
        foreach ($results as $index => $result) {
            $results[$index] = static::create((array) $result);
        }
        return $results;
    }