forked from doctrine/doctrine1
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(Record/Filter): Improve the code readability
Filters had been touched during the work on the support for PHP 8. I had cleaned this part, but the code was not ready to merge. * Add proof that every element of the code of Record Filter works as it should. It keeps the current behaviour, even if it seems a bug. * Fix the code structure of the test and the code.
- Loading branch information
Showing
7 changed files
with
536 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,14 @@ | |
* @author Konsta Vesterinen <[email protected]> | ||
*/ | ||
class Doctrine_Record_UnknownPropertyException extends Doctrine_Record_Exception | ||
{ } | ||
{ | ||
public static function createFromRecordAndProperty(Doctrine_Record $record, $propertyOrRelation) | ||
{ | ||
$message = sprintf('Unknown record property / related component "%s" on "%s"', | ||
$propertyOrRelation, | ||
get_class($record) | ||
); | ||
|
||
return new Doctrine_Record_UnknownPropertyException($message); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.