insert_id or bool for the state */ public function save( bool $reset = true ); /** * Use this method to delete a given item from this Module. * * @since 0.6.0 * * @param int|\WP_Post|string $item What are we deleting * * @return bool|\WP_Error */ public static function delete( $item ); /** * Use this method to fetch all items created from a given module. * * @since 0.6.0 * * @param array $args Overwrite the default arguments used to fetch the items. * * @return bool|\WP_Error */ public static function fetch( array $args = [] ): array; /** * Resets all the data on this module. * * @since 0.6.0 * * @return self */ public function reset(): Interface_Module; /** * Use this method to generate all the needed data. * * @since 0.6.0 * @since 0.6.2 Added the $force parameter. * * @param bool $force Whether to force the regeneration of the data. * * @return self */ public function generate( bool $force = false ): Interface_Module; /** * A method to make it easier to debug which variables will be actually saved. * * @param 0.6.0 * * @return array */ public function get_values(): array; /** * A method to get the data for a given key. * * @param string $key * * @return array|null */ public function get( string $key ): ?object; /** * A method to get the value for a given key. * * @param string $key * * @return mixed */ public function get_value( string $key ); /** * Determines if a value is set for a given key. * * @param string $key * * @return bool */ public function has_value( string $key ): bool; }