Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHP deprecations on Doctrine_Record_Filter subclasses #144

Merged
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions lib/Doctrine/Record/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
*/
abstract class Doctrine_Record_Filter
{
/**
* @var Doctrine_Table|null
*/
protected $_table;

public function setTable(Doctrine_Table $table)
Expand All @@ -56,7 +59,7 @@ public function init()
*
* @return Doctrine_Record the given record
*
* @thrown Doctrine_Exception when this way is not available
* @throws Doctrine_Exception when this way is not available
*/
abstract public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value);

Expand All @@ -67,7 +70,7 @@ abstract public function filterSet(Doctrine_Record $record, $propertyOrRelation,
*
* @return mixed
*
* @thrown Doctrine_Exception when this way is not available
* @throws Doctrine_Exception when this way is not available
*/
abstract public function filterGet(Doctrine_Record $record, $propertyOrRelation);
}
18 changes: 0 additions & 18 deletions lib/Doctrine/Record/Filter/Compound.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,6 @@ public function init()
}
}

/**
* Provides a way for setting property or relation value to the given record.
*
* @param string $propertyOrRelation
*
* @return Doctrine_Record the given record
*
* @thrown Doctrine_Record_UnknownPropertyException when this way is not available
*/
public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value)
{
foreach ($this->_aliases as $alias) {
Expand All @@ -89,15 +80,6 @@ public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value)
throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record)));
}

/**
* Provides a way for getting property or relation value from the given record.
*
* @param string $propertyOrRelation
*
* @return mixed
*
* @thrown Doctrine_Record_UnknownPropertyException when this way is not available
*/
public function filterGet(Doctrine_Record $record, $propertyOrRelation)
{
foreach ($this->_aliases as $alias) {
Expand Down
10 changes: 0 additions & 10 deletions lib/Doctrine/Record/Filter/Standard.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,11 @@
*/
class Doctrine_Record_Filter_Standard extends Doctrine_Record_Filter
{
/**
* @param string $propertyOrRelation
*
* @thrown Doctrine_Record_UnknownPropertyException
*/
public function filterSet(Doctrine_Record $record, $propertyOrRelation, $value)
{
throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record)));
}

/**
* @param string $propertyOrRelation
*
* @thrown Doctrine_Record_UnknownPropertyException
*/
public function filterGet(Doctrine_Record $record, $propertyOrRelation)
{
throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record)));
Expand Down
Loading