> */ public function locations(): array; /** * Menus: [{id, name, slug, count}]. * * @return array> */ public function menus(): array; /** * Menu id by id / slug / name (accent- and case-insensitive), or null. * * @param string $ref Reference. */ public function find( string $ref ): ?int; /** * Current snapshot of a menu (exists=false when it is gone). * * @param int $menu_id Menu id. * @return array */ public function read( int $menu_id ): array; /** * Snapshot of a menu that does not exist yet. * * @param string $name Name. * @return array */ public function blank( string $name ): array; /** * Whether two snapshots describe the same stored state (conflict detection). * * @param array $a Snapshot. * @param array $b Snapshot. * @param array $location_keys Theme locations to compare (the ones the change touches). */ public function same( array $a, array $b, array $location_keys = array() ): bool; /** * Makes the store match $target (the current state is $current). Returns the fresh * snapshot as stored. Throws \RuntimeException on failure. * * @param array $current Current snapshot. * @param array $target Target snapshot. * @return array */ public function write( array $current, array $target ): array; /** * Default fields of a NEW item pointing at an object (type/object/object_id/url/extra). * * @param string $object_type product_cat|product|page|post|custom. * @param int $object_id Object id (0 for custom). * @param string $url Custom URL. * @return array */ public function new_item( string $object_type, int $object_id, string $url ): array; }