Output complex, flexible, AJAX/RESTful data structures.

Overview

Fractal

Latest Version Software License The PHP League Tests Coverage Status Quality Score Total Downloads

Fractal provides a presentation and transformation layer for complex data output, the like found in RESTful APIs, and works really well with JSON. Think of this as a view layer for your JSON/YAML/etc.

When building an API it is common for people to just grab stuff from the database and pass it to json_encode(). This might be passable for "trivial" APIs but if they are in use by the public, or used by mobile applications then this will quickly lead to inconsistent output.

Goals

  • Create a protective shield between source data and output, so schema changes do not affect users
  • Systematic type-casting of data, to avoid foreach()ing through and (bool)ing everything
  • Include (a.k.a embedding, nesting or side-loading) relationships for complex data structures
  • Work with standards like HAL and JSON-API but also allow custom serialization
  • Support the pagination of data results, for small and large data sets alike
  • Generally ease the subtle complexities of outputting data in a non-trivial API

This package is compliant with PSR-1, PSR-2 and PSR-4. If you notice compliance oversights, please send a patch via pull request.

Install

Via Composer

$ composer require league/fractal

Requirements

The following versions of PHP are supported by this version.

  • PHP 5.4
  • PHP 5.5
  • PHP 5.6
  • PHP 7.0
  • PHP 7.1
  • PHP 7.2
  • HHVM

Documentation

Fractal has full documentation, powered by Jekyll.

Contribute to this documentation in the gh-pages branch.

Todo

  • add HAL serializers

Testing

$ phpunit

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Maintainers

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments
  • Update `JsonApiSerializer` to be compatible with JSON API v1.0

    Update `JsonApiSerializer` to be compatible with JSON API v1.0

    I am using fractal for my API responses, which is consumed by an Ember app and want to have a Serializer that converts to JSON API v1.0 (which will be the default in Ember's future).

    I took a stab at the TODOs listed in #187:

    What we need to do:

    • [x] Add links
    • [x] Add relationships
      • [x] to-one
      • [x] to-many
      • [x] nested relationships
      • [x] empty relationships
    • [x] Always set data as resource key
    • [x] Rename includes to included
    • [x] Included resources should be moved outside the data object
    • [x] All resources should return id, type and attributes

    Additional things to do:

    • [x] Write documentation for the new serializer

    I will try to add the remaining TODOs over this weekend.

    Please provide feedback and mention any other things we need to get done before we can implement JSON APIs with fractal.

    Cheers

    opened by felixkiss 40
  • [Feature Request] Better JSON API Support

    [Feature Request] Better JSON API Support

    Since JSON-API has released their "stable" version 1.0 of the standard we should start implementing it. I know there has been some discussions about adding this but I thinks it would be good to have this in its own issue as well. What can we do to speed up this process?

    What we need to do:

    • [ ] Add links
    • [ ] Add relationships
    • [ ] Always set data as resource key
    • [ ] Rename includes to included
    • [ ] Included resources should be moved outside the data object
    • [ ] All resources should return id, type and attributes

    Please correct the todos if I've messed up. Thanks.

    opened by vinkla 32
  • Pluggable serializer for data output formats

    Pluggable serializer for data output formats

    This is a start to implementing #15. Or at least starts to. Right now, it's just a reimplementation of the current format using an external serializer.

    @philsturgeon Let me know if this is a good direction, or if you have comments, and I can implement a few other serializers...

    enhancement 
    opened by joshuajabbour 32
  • Implementation of configurable serializers.

    Implementation of configurable serializers.

    This is a PR in relation to #24 and #18.

    Seeing as @joshuajabbour doesn't have the time at the moment to continue working on the PR I've had a crack at an implementation and would love some feedback.

    The Implementation

    At its core is the SerializerInterface which has 5 method signatures declared. Each serializer implements these methods to return the data in a format of their desire. Included is a basic ArraySerializer, which returns the data in what I consider an untouched form. Resulting JSON from the ArraySerializer would be:

    {
        "id": 1,
        "name": "Bob",
        "age": 32,
        "embeds": [
            "posts"
        ]
    }
    

    Benefit here is for systems returning pre-keyed data (above would have the user data keyed to user, for example).

    The default used serializer would be the (current) DataArraySerializer which keys the top level data to data.

    {
        "data": {
            "id": 1,
            "name": "Bob",
            "age": 32
        },
        "embeds": [
            "posts"
        ]
    }
    

    The serializer is set on the Manager via the setSerializer method.

    $manager = new League\Fractal\Manager;
    
    $manager->setSerializer(new League\Fractal\Serializer\ArraySerializer);
    

    If no serializer is set the default DataArraySerializer is used.

    Meta Data

    This PR also includes meta data support for resources. Instead of defining a method on transformers I've opted for a (hopefully) better approach by setting the meta data on the resource.

    $user = new User('Bob', '23');
    
    $resource = new League\Fractal\Resource\Item($user, new UserTransformer);
    
    $resource->setMeta(array('token' => 'kan1$isdd098hjasd89hsa#$9q'));
    

    The ArraySerializer simply merges with the top level much like it does with the standard data and the DataArraySerializer would key it to meta and merge to the top level.

    Tests

    I've not done any tests yet merely patched the existing tests that failed due to the new meta data key. Will do tests once some more feedback is received on the approach and implementation.

    Cheers.

    opened by jasonlewis 31
  • Question: Smart Embedding

    Question: Smart Embedding

    I have been looking over your todo list, and was wondering what ideas you had on implementing that feature. In your todo list example you have: ?embed=foo:limit(5):order(something,asc)

    I have messed around with parsing that string into the requestedScopes, into a format something like the following:

    // This is obviously just a prototype
    array(
       'foo' => array(
         'limit' => 5,
         'order' => 'asc'
       ),
       'bar' => array(
         'limit' => 10
       )
    )
    

    I guess I am just having a hard time figuring out how you would get something like, bar's limit into the paginator (if it exists) for that resource, or when/how you'd get the order direction and apply it to foo.

    Hopefully this question makes sense, and hopefully I can actually contribute something to the repo instead of just using it (thanks by the way!)

    opened by hskrasek 31
  • Inline meta

    Inline meta

    It would be great if we could add meta data inline and not only inside meta path.

    ie: { "data":{'a':1,'b':2}, "meta":{'extra':here'}, "iWantExtraHere":"ifThatIsPossible" }

    opened by tzookb 26
  • Return a null resource?

    Return a null resource?

    I've got a resource with a custom transformer. It has some available includes for other resources with custom transformers. Sometimes, those other resources are null. If that child resource is included, I get an error that you can't transform a null value (due to type hinting as in the examples). I can fix that by providing a null default value to the transform() method, and my transform() method can return null, but I then get an exception thrown on an attempted array_merge() call where Fractal tries to merge the return value with another array. How can I avoid this? What's the correct way for me to indicate a child resource is not present (null)?

    opened by troygilbert 21
  • Register transformers once?

    Register transformers once?

    Is it possible to register my transformers once for a given model?

    To work off of your examples in Build APIs you won't hate we are returning from each controller method as so:

    return $this->responseWithItem($place, new PlaceTransformer);
    

    It would be cool if Fractal would already know "hey this is instanceof Place, we have something registered for that", negating the need for me to write new {model}Transformer.

    enhancement 
    opened by RSully 21
  • Laravel - $this->null() returns an empty array instead of empty object

    Laravel - $this->null() returns an empty array instead of empty object

    I'm having a problem with Fractal library. I'm using spatie\laravel-fractal library which is just wrapper for thephpleague/fractal. So...

    I want to return an empty object instead of an empty array.

    public function includeDocumentType(Question $question)
    {
        return $question->documentType
            ? $this->item($question->documentType, new DocumentTypeTransformer)
            : $this->null();
    }
    

    $this->null() always returns [] after generation and I want to return {}. Tbh I want to have 2 functions like $this->nullItem() and $this->nullCollection().

    Does anyone know what's the solution to this problem?

    opened by buglinjo 20
  • Infinite embed protection

    Infinite embed protection

    In one of my projects I have 2 models that are related. Because of where they are used in the API there is a need for them to be able to embed each other.

    The issue is that a client could request ?embed=a.b.a.b.a.b.a.b (continuing), causing the server to do tons of processing. This could lead to some type of denial of service attack.

    opened by RSully 19
  • Adding a PaginatorAdapterInterface

    Adding a PaginatorAdapterInterface

    Just wanted to get some opinions on these changes before I document them and learn how to write unit tests and update the unit tests/add my own.

    This is not a complete pull request, if this is not the proper way for me to do this please let me know. I haven't made many pull requests to projects yet!

    opened by marcaddeo 19
  • How to make output of nested array

    How to make output of nested array

    Hi There,

    I have a group of array below that I would like to transform

    image

    I want the grouping key included,

    
      "success": true,
      "code": "200",
      "message": "OK",
    data: {
        "08 December": {
            [
                id: 1,
                name: 'John',
                status: 'Active'
            ],
            [
                id: 2,
                name: 'John',
                status: 'Active'
            ],
        },
        "09 December": {
            [
                id: 3,
                name: 'John',
                status: 'Active'
            ]
        }
    }
    

    currently, I can only get this without the parent of the array:

    {
        "success": true,
        "code": "200",
        "message": "OK",
        "data": [
            [
                {
                    "id": 6,
                    "status": "Complete",
                    "name": "Vega Punk"
                },
                {
                    "id": 7,
                    "status": "Complete",
                    "name": "Vega Punk"
                }
            ],
            [
                {
                    "id": 8,
                    "status": "Complete",
                    "name": "Vega Punk"
                }
            ]
        ]
    }
    

    here is my code image

    image

    and is it possible to custom the child? currently I just passing the whole array

    I just don't know the keyword how to implement this, I hope you understand

    Thank you.

    opened by sluxzer 0
  • Fix sub relations when resource with modifier is included multiple times

    Fix sub relations when resource with modifier is included multiple times

    When we try to include foo:modifier.bar,foo:modifier.baz, only foo and foo.bar get included, while foo.baz is ignored.

    I believe this change is backward compatible, as I made sure $this->includeParams stays the same for foo:modifier(1).bar,foo:modifier(2).baz

    opened by rogatty 0
  • How to set `includes` for specific `includeItem` in the code for transformer?

    How to set `includes` for specific `includeItem` in the code for transformer?

    Hi all.

    I have transformer with relation for including

    public function includeChild(Parent $parent): Item
    {
        // How can I set `includes` for child transformer here?
        // without request param /parent?include=child.*
    
        return $this->item($parent->child, new ChildTransformer());
    }
    

    Thank you for your help.

    opened by siarheipashkevich 0
  • Update version 0.19.2 -> 0.19.3

    Update version 0.19.2 -> 0.19.3

    Could you please make a bugfix update of the version 0.19.2

    In order to fix this warning in PHP 8.1

    Return type of League\Fractal\Scope::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/league/fractal/src/Scope.php on line 298  
    

    We need to add the mentioned attribute:

    https://github.com/thephpleague/fractal/blob/0.19.2/src/Scope.php#L298

    /**
     * @return array
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return $this->toArray();
    }
    

    There are some breaking changes in 0.20, so I can't just swap the version to the new one.

    opened by beeyev 0
  • Please use SEMVER on this package!

    Please use SEMVER on this package!

    Hi,

    This is an appeal for package maintainers to use semantic versioning on this package.

    The release of v0.20.0 introduces breaking changes on a patch version, this causes a lot of issues for people that relies on semver.

    opened by iget-master 7
Releases(0.20.1)
  • 0.20.1(Apr 11, 2022)

    What's Changed

    • Update supported versions in the readme by @jdreesen in https://github.com/thephpleague/fractal/pull/546
    • Fix supported version in the readme by @jdreesen in https://github.com/thephpleague/fractal/pull/547
    • Move stale config to the correct location by @Nyholm in https://github.com/thephpleague/fractal/pull/548
    • Add static analysis by @matthewtrask in https://github.com/thephpleague/fractal/pull/549
    • allow for null values to be passed to Scope by @matthewtrask in https://github.com/thephpleague/fractal/pull/553
    • Explicitly default TransformerAbstract::currentScope to null since it's not defined in the constructor by @Plastonick in https://github.com/thephpleague/fractal/pull/552

    New Contributors

    • @jdreesen made their first contribution in https://github.com/thephpleague/fractal/pull/546
    • @Plastonick made their first contribution in https://github.com/thephpleague/fractal/pull/552

    Full Changelog: https://github.com/thephpleague/fractal/compare/0.20...0.20.1

    Source code(tar.gz)
    Source code(zip)
  • 0.20(Mar 8, 2022)

    This release moves Fractal up to modern PHP.

    We have dropped support for 5.x with this release. Fractal now supports PHP 7.4 as the lowest PHP version. Should you need to keep using Fractal with PHP 5.x, please use 0.19.2 or lower. We will continue to patch security fixes for 0.19 but all new features and changes will be in the 0.20 release and more going forward. We will aim for a 1.0 release this summer targeting 8.x

    What's Changed

    • Update branch alias to reflect current status by @KorvinSzanto in https://github.com/thephpleague/fractal/pull/516
    • Move to Github Actions by @JustSteveKing in https://github.com/thephpleague/fractal/pull/517
    • Test against php 8.0 by @sergiy-petrov in https://github.com/thephpleague/fractal/pull/520
    • clean up php code sniffer violations and update composer.json to 7.0 by @matthewtrask in https://github.com/thephpleague/fractal/pull/534
    • jsonSerialize fix php8 interface compatibility by @madagon in https://github.com/thephpleague/fractal/pull/527
    • Add support for PHP 8.1 by @annuh in https://github.com/thephpleague/fractal/pull/528
    • Make sure CI is green by @Nyholm in https://github.com/thephpleague/fractal/pull/535
    • Run tests on PHP 8.1 by @Nyholm in https://github.com/thephpleague/fractal/pull/536
    • Clean up CI by @Nyholm in https://github.com/thephpleague/fractal/pull/537
    • Added .editorconfig by @Nyholm in https://github.com/thephpleague/fractal/pull/538
    • Adding phpstan and psalm by @Nyholm in https://github.com/thephpleague/fractal/pull/539
    • Fix issues with PHPStan and Psalm by @Nyholm in https://github.com/thephpleague/fractal/pull/540
    • Support for PHP 81 by @Nyholm in https://github.com/thephpleague/fractal/pull/542
    • Add ResourceInterface::getMeta() by @Nyholm in https://github.com/thephpleague/fractal/pull/541
    • Added baseline for static analyzers by @Nyholm in https://github.com/thephpleague/fractal/pull/543
    • Added PHP 7.4 types by @Nyholm in https://github.com/thephpleague/fractal/pull/544
    • Add stale bot by @Nyholm in https://github.com/thephpleague/fractal/pull/545

    New Contributors

    • @JustSteveKing made their first contribution in https://github.com/thephpleague/fractal/pull/517
    • @sergiy-petrov made their first contribution in https://github.com/thephpleague/fractal/pull/520
    • @madagon made their first contribution in https://github.com/thephpleague/fractal/pull/527
    • @annuh made their first contribution in https://github.com/thephpleague/fractal/pull/528
    • @Nyholm made their first contribution in https://github.com/thephpleague/fractal/pull/535

    Full Changelog: https://github.com/thephpleague/fractal/compare/0.19.2...0.20

    Source code(tar.gz)
    Source code(zip)
  • 0.19.2(Jan 24, 2020)

  • 0.19.1(Jan 24, 2020)

  • 0.19(Jan 24, 2020)

  • 0.18.0(May 10, 2019)

    Enhancements

    • Allow PHPUnit 7+ where available - Thanks @ramsey
    • Changed the paginator to not call $paginator->getPaginate() in PhalconFrameworkPaginatorAdapter constructor - Thanks @niden
    • Output an object for attributes when none are provided instead of an array in JsonApiSerializer - Thanks @BastianHofmann
    • Include meta key for relationships in JsonApiSerializer - Thanks @rawaludin
    • Allow self link to override defaults in JsonApiSerializer - Thanks @biggator
    • Preserve numeric keys when converting Scopes to arrays by using array union instead of array_merge - Thanks @andrewtweber
    • Output an object for links when none are provided instead of an array in ArraySerializer pagination - Thanks @basavind
    • Allow arrays for field lists in $fractal->parseFieldsets() - Thanks @flugger
    • Add links for all available includes to JsonApiSerializer - Thanks @matt-allan
    Source code(tar.gz)
    Source code(zip)
  • 0.17.0(Aug 18, 2017)

    • Add ScopeFactoryInterface and ScopeFactory
    • Add $options parameter to toJson
    • Added Serializer interface to SerializerAbstract
    • Add Primitive resource type, allows to use primitives
    • optimized primitive transformation when transformer is not given
    Source code(tar.gz)
    Source code(zip)
  • 0.16.0(Apr 5, 2017)

    Enhancements:

    • #358 Allow the ability to define meta on each object in collection
    • #362 Add DoctrinePaginatorAdapter to interface with Doctrine pagination
    • Implement sparse fieldset
    Source code(tar.gz)
    Source code(zip)
  • 0.15.0(Jan 17, 2017)

  • 0.14.0(Aug 29, 2016)

    Added

    • null() method for serializing null resource.
    • Adds pagination to JsonApiSerializer
    • Added JSON-API serializer collection links

    Enhancements

    • Fix issue including relationships on collections
    • TransformerAbstract now returns a ResourceInterface
    • getIncludeParams now always return ParamBag
    • cody styling, method naming and docs
    Source code(tar.gz)
    Source code(zip)
  • 0.13.0(Oct 16, 2015)

    Added

    • ->setData(...) and ->setTransformer(...) methods to resources
    • able to set url include parameters with no set variables, ie. include=comments:limit(5|1):new

    Changed

    • Finally, much improved JSON-API support thanks to @felixkiss

    Enhancements

    • Short array syntax throughout
    • Test improvements
    Source code(tar.gz)
    Source code(zip)
  • 0.12.0(Mar 19, 2015)

    Added

    • Added PHP 7.0-dev support.
    • Add the support for Laravel 5 paginator. Issue #153

    Changed

    • Now accessing the default and available includes in Transformers via getters Issue #158

    Removed

    • Dropped PHP 5.3 support. Use v0.11 if you're still stuck on PHP 5.3.
    • Removed getData() and getTransformer() from League\Fractal\Resource\Collection as they were already defined in ResourceAbstract.
    Source code(tar.gz)
    Source code(zip)
  • 0.11.0(Dec 10, 2014)

  • 0.10.0(Oct 17, 2014)

    Features:

    • Added ParamBag to replace the array passed to includes. It implements array access so keep using it as you were, or play with the new methods.

    Bugs:

    • Removed PaginatorInterface::getPaginator() as it was used anymore. Issue #101
    • Manager::createData() argument 1 now hints against ResourceInterface not ResourceAbstract.
    Source code(tar.gz)
    Source code(zip)
  • 0.9.0(Jul 6, 2014)

    Only one change this time around: Splitting Serializer methods for item and collection to be their own thing.

    This was done to fix #71 as well as make life easier for people who want to make items and collections use some different logic. For example, JsonApiSerializer wants even a single item to appear inside an array, meaning we can wrap the data in the item() serializer method to do that, but keep it as an item in case anyone wants to switch to a different serializer.

    See Serializers documentation for more information.

    Source code(tar.gz)
    Source code(zip)
  • 0.8.3(Jun 14, 2014)

  • 0.8.2(Jun 9, 2014)

  • 0.8.1(Jun 5, 2014)

  • 0.8.0(May 29, 2014)

    Features

    • Added Serializers with ArraySerializer, DataArraySerializer (default) and a provisional JsonApiSerializer. (#47).
    • Added ResourceAbstract::setMeta('foo', mixed) to allow custom meta data
    • Replaced Manager::setRequestedScopes() with Manager::parseIncludes('foo,bar') which can be an array or CSV string. It can also take "Smart Syntax" such as Manager::parseIncludes('bars:limit(5|1):order(-something)'), which can come from a URL query param: /foo?include=bars:limit(5|1):order(-something).
    • Made all pagination (paginators and cursors) use meta output logic, so it sits with your custom meta data
    • Moved League\Fractal\Cursor\Cursor and League\Fractal\Cursor\CursorInterface into League\Fractal\Pagination.
    Source code(tar.gz)
    Source code(zip)
  • 0.6.1(Jan 24, 2014)

Owner
The League of Extraordinary Packages
A group of developers who have banded together to build solid, well tested PHP packages using modern coding standards.
The League of Extraordinary Packages
Map nested JSON structures onto PHP classes

JsonMapper - map nested JSON structures onto PHP classes Takes data retrieved from a JSON web service and converts them into nested object and arrays

Christian Weiske 1.4k Dec 30, 2022
JsonMapper - map nested JSON structures onto PHP classes

Takes data retrieved from a JSON web service and converts them into nested object and arrays - using your own model classes.

Netresearch 9 Aug 21, 2022
Flexible serializer encouraging good object design

Serializard Serializard is a library for (un)serialization of data of any complexity. Its main focus is to give user as much flexibility as possible b

Tomasz Kowalczyk 24 May 27, 2022
Library for (de-)serializing data of any complexity (supports JSON, and XML)

jms/serializer Introduction This library allows you to (de-)serialize data of any complexity. Currently, it supports XML and JSON. It also provides yo

Johannes 2.2k Jan 1, 2023
:lipstick: Scalable and durable all-purpose data import library for publishing APIs and SDKs.

Porter Scalable and durable data imports for publishing and consuming APIs Porter is the all-purpose PHP data importer. She fetches data from anywhere

null 594 Jan 1, 2023
Changeset calculator between two states of a data

Totem \\\\//// |.)(.| | || | Changeset calculator between two state of a data \(__)/ Requires PHP 5.4 ; Compatible

Wisembly 75 May 6, 2021
Missing data types for PHP. Highly extendable.

Neverending data validation can be exhausting. Either you have to validate your data over and over again in every function you use it, or you have to rely it has already been validated somewhere else and risk potential problems.

SmartEmailing 82 Nov 11, 2022
Output complex, flexible, AJAX/RESTful data structures.

Fractal Fractal provides a presentation and transformation layer for complex data output, the like found in RESTful APIs, and works really well with J

The League of Extraordinary Packages 3.5k Dec 26, 2022
Laravel Ajax Datatable is a nice laravel admin panel which includes authentication, CRUD and Ajax datatable.

Laravel Ajax Datatable is a nice laravel admin panel which includes authentication, CRUD and Ajax datatable. the datatable is created with laravel & ajax so No need to install another package, yout can do search, sort, paginate and show records per page fastly.

Jumah 3 Oct 3, 2022
A Laravel package to output a specific sql to your favourite debugging tool. The supported log output is Laravel Telescope, Laravel Log, Ray, Clockwork, Laravel Debugbar and your browser.

Laravel showsql A Laravel package to output a specific sql to your favourite debugging tool, your browser or your log file. Use case You often want to

Dieter Coopman 196 Dec 28, 2022
A repository with implementations of different data structures and algorithms using PHP

PHP Data Structures and Algorithms Data structure and Algorithm is always important for any programming language. PHP, being one of the most popular l

Mizanur Rahman 610 Jan 2, 2023
The easiest way to match data structures like JSON/PlainText/XML against readable patterns. Sandbox:

PHP Matcher Library created for testing all kinds of JSON/XML/TXT/Scalar values against patterns. API: PHPMatcher::match($value = '{"foo": "bar"}', $p

Coduo 774 Dec 31, 2022
More Than Just a Cache: Redis Data Structures

More Than Just a Cache: Redis Data Structures Redis is a popular key-value store, commonly used as a cache or message broker service. However, it can

Andy Snell 2 Oct 16, 2021
Tentative Extra Data Structures for php

Teds Introduction Teds is a another collection of data structures. (Tentative Extra Data Structures) Installation This extension requires php 8.0 or n

Tyson Andre 26 Nov 21, 2022
A collection of type-safe functional data structures

lamphpda A collection of type-safe functional data structures Aim The aim of this library is to provide a collection of functional data structures in

Marco Perone 99 Nov 11, 2022
A customisable Laravel Nova card that fetches data through ajax calls.

Ajax Table Card Description A customisable Laravel Nova card that fetches data through ajax calls. Why? To allow displaying certain data on the dashbo

TwentyOne34 Technologies Corp. 4 Mar 8, 2022
A Parser for CSS Files written in PHP. Allows extraction of CSS files into a data structure, manipulation of said structure and output as (optimized) CSS

PHP CSS Parser A Parser for CSS Files written in PHP. Allows extraction of CSS files into a data structure, manipulation of said structure and output

Raphael Schweikert 1.6k Jan 5, 2023
Adds meta data registered via register_meta() to the GraphQL output.

WP GraphQL Meta This plugin is an add-on for the awesome WP GraphQL It builds on top of both WP GraphQL and the REST API. Any meta data you register u

Robert O'Rourke 18 Aug 4, 2021
This project uses dflydev/dot-access-data to provide simple output filtering for cli applications.

FilterViaDotAccessData This project uses dflydev/dot-access-data to provide simple output filtering for applications built with annotated-command / Ro

Consolidation 44 Jul 19, 2022
Map nested JSON structures onto PHP classes

JsonMapper - map nested JSON structures onto PHP classes Takes data retrieved from a JSON web service and converts them into nested object and arrays

Christian Weiske 1.4k Dec 30, 2022