string, 'label' => string, 'applies_to' => string[], 'evaluate' => callable( $left, $right ): bool ]. */ public static function register( array $definition ) { if ( empty( $definition['id'] ) || ! is_callable( $definition['evaluate'] ?? null ) ) { throw new \InvalidArgumentException( 'Operator_Registry::register() requires an id and an evaluate callable.' ); } self::$operators[ $definition['id'] ] = $definition; } public static function get( $id ) { return self::$operators[ $id ] ?? null; } public static function all() { return array_values( self::$operators ); } }