{"repo":"johnbillion/args","free":true,"listed":false,"github":"https://github.com/johnbillion/args","clone":"git clone https://github.com/johnbillion/args.git","description":"Array arguments made bearable","language":"PHP","stars":118,"topics":["wordpress","phpstan","strict-types"],"license":"GPL-2.0","category":"self-hosted-apps","readme_excerpt":"Args Many functions and methods in WordPress accept arguments as an associative array which your IDE or code editor cannot autocomplete like it does for individual function parameters. This library provides well-documented classes which represent many of the associative array parameters used throughout WordPress. Using them at the point where you populate the arguments means you get autocompletion and intellisense in your code editor, and strict typing thanks to typed properties. Comprehensive types and constraints for PHPStan are also included. Current status Last updated for WordPress 7.0. Requirements PHP 8.0+ Installation Changes in version 2 In Args version 2.0 and higher: Many arguments have had their type strictness increased for added type safety. The Base class which is implemented by all of the Args classes no longer implements ArrayAccess , Countable , or IteratorAggregate . See this issue for further information. PHP 8.0+ is now required. Usage Usage with a class constructor: Usage with a procedural function parameter: Meta queries, tax queries, and date queries The query classes in WordPress support variously meta query , tax query , and date query arguments. These are fully supported and you can construct them in a structured and strongly typed way. Creating a meta query argument: Creating a tax query argument: Creating a date query argument: Nested queries are supported: Alternatively you can construct a complete query object by calling the fromArray() static m","default_branch":null,"files":null,"tree":[],"storefront":"/r/johnbillion","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/johnbillion/args/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}