Skip to content

Pass document and database to encodeAttribute to mirror decodeAttribute#69

Merged
eldadfux merged 2 commits intomainfrom
feat-adjust-encodeAttribute
Aug 28, 2021
Merged

Pass document and database to encodeAttribute to mirror decodeAttribute#69
eldadfux merged 2 commits intomainfrom
feat-adjust-encodeAttribute

Conversation

@kodumbeats
Copy link
Copy Markdown
Contributor

In #64, we added the ability to pass the document when encoding an attribute:

/**
* Decode Attribute
*
* Passes the attribute $value, and $document context to a predefined filter
* that allow you to manipulate the output format of the given attribute.
*
* @param string $name
* @param mixed $value
* @param Document $document
*
* @return mixed
*/
protected function decodeAttribute(string $name, $value, Document $document)

This PR extends that functionality to encodeAttribute so we can manipulate the document when trying to encode into a database format.

@eldadfux eldadfux merged commit fc6304c into main Aug 28, 2021
@abnegate abnegate deleted the feat-adjust-encodeAttribute branch November 23, 2023 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants