{"id":31241603,"url":"https://github.com/arraypress/wp-object-utils","last_synced_at":"2026-01-20T16:29:46.362Z","repository":{"id":314247179,"uuid":"1053450765","full_name":"arraypress/wp-object-utils","owner":"arraypress","description":"Minimal, memorable object manipulation utilities for WordPress and PHP projects.","archived":false,"fork":false,"pushed_at":"2025-11-22T11:50:35.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-22T13:19:16.969Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arraypress.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-09T13:18:51.000Z","updated_at":"2025-11-22T11:50:38.000Z","dependencies_parsed_at":"2025-09-11T12:35:03.223Z","dependency_job_id":"5071a43e-c951-4fa0-85e4-890e86b19cbd","html_url":"https://github.com/arraypress/wp-object-utils","commit_stats":null,"previous_names":["arraypress/wp-object-utils"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arraypress/wp-object-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-object-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-object-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-object-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-object-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arraypress","download_url":"https://codeload.github.com/arraypress/wp-object-utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-object-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-23T00:10:39.151Z","updated_at":"2026-01-20T16:29:46.357Z","avatar_url":"https://github.com/arraypress.png","language":"PHP","readme":"# WordPress Object Utilities\n\nMinimal, memorable object manipulation utilities for everyday PHP development. Just 5 methods you'll actually use and remember.\n\n## Features\n\n* 🎯 **Focused**: Only the most useful object operations\n* 🧠 **Memorable**: Simple method names you'll remember months later\n* 📝 **Change Tracking**: Compare objects with new data\n* 🔍 **Dot Notation**: Access nested properties easily\n* 🎨 **Clean API**: Intuitive, consistent interface\n\n## Installation\n\n```bash\ncomposer require arraypress/wp-object-utils\n```\n\n## Quick Start\n\n```php\nuse ArrayPress\\ObjectUtils\\Obj;\n\n// Track what changed\n$changes = Obj::changes( $user, $_POST );\n\n// Apply updates\nObj::apply( $user, $changes );\n\n// Get nested values\n$city = Obj::get( $user, 'address.city', 'Unknown' );\n\n// Extract subset\n$public = Obj::pick( $user, [ 'name', 'email' ] );\n\n// Convert to array\n$array = Obj::to_array( $user );\n```\n\n## Methods\n\n### changes()\nCompare an object with new data and get what changed:\n```php\n$user    = (object) [ 'name' =\u003e 'John', 'email' =\u003e 'john@example.com' ];\n$changes = Obj::changes( $user, [ 'name' =\u003e 'John', 'email' =\u003e 'new@example.com' ] );\n// Returns: ['email' =\u003e 'new@example.com']\n```\n\n### apply()\nApply changes to an object (only updates existing properties):\n```php\n$count = Obj::apply( $user, [ 'name' =\u003e 'Jane', 'email' =\u003e 'jane@example.com' ] );\n// Returns: 2 (number of properties updated)\n```\n\n### get()\nGet nested values using dot notation:\n```php\n$data = (object) [ 'user' =\u003e (object) [ 'address' =\u003e [ 'city' =\u003e 'NYC' ] ] ];\n$city = Obj::get( $data, 'user.address.city' );\n// Returns: 'NYC'\n```\n\n### pick()\nExtract specific properties:\n```php\n$user   = (object) [ 'id' =\u003e 1, 'name' =\u003e 'John', 'password' =\u003e 'secret' ];\n$public = Obj::pick( $user, [ 'id', 'name' ] );\n// Returns: (object) ['id' =\u003e 1, 'name' =\u003e 'John']\n```\n\n### to_array()\nConvert object to array:\n```php\n$array = Obj::to_array( $user );        // Public properties only\n$array = Obj::to_array( $user, true );  // Include private/protected\n```\n\n## Requirements\n\n- PHP 7.4+\n- WordPress 5.0+ (optional, works with any PHP project)\n\n## License\n\nGPL-2.0-or-later\n\n## Support\n\n- [Documentation](https://github.com/arraypress/wp-object-utils)\n- [Issue Tracker](https://github.com/arraypress/wp-object-utils/issues)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farraypress%2Fwp-object-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farraypress%2Fwp-object-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farraypress%2Fwp-object-utils/lists"}