Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/Doctrine/ODM/MongoDB/Types/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,19 @@ public function convertToPHPValue($value)
return $value;
}

/**
* Get the PHP code equivalent to {@see convertToDatabaseValue()}, used in code generator.
* Use variables $value for input and $return for output.
*/
public function closureToMongo(): string
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is not actually used, it could be deprecated but we could decide to use it later in the persistence layer.

{
return '$return = $value;';
}

/**
* Get the PHP code equivalent to {@see convertToPHPValue()}, used in code generator.
* Use variables $value for input and $return for output.
*/
public function closureToPHP(): string
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is used in HydratorFactory. I don't specify it here, as that can change. The IDE/SA can easily find usages of this methods.

{
return '$return = $value;';
Expand Down