-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from Taluu/change-interface
Fixes #17 : Add a ChangeInterface
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
* @author Baptiste Clavié <[email protected]> | ||
* @author Rémy Gazelot <[email protected]> | ||
*/ | ||
abstract class AbstractChange | ||
abstract class AbstractChange implements ChangeInterface | ||
{ | ||
/** old state */ | ||
private $old; | ||
|
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* This file is part of the Totem package | ||
* | ||
* For the full copyright and license information, please view the LICENSE file | ||
* that was distributed with this source code. | ||
* | ||
* @copyright Baptiste Clavié <[email protected]> | ||
* @license http://www.opensource.org/licenses/MIT-License MIT License | ||
*/ | ||
|
||
namespace Totem; | ||
|
||
/** | ||
* Represent a change in a data, with both values (before and after it was modified) | ||
* | ||
* @author Baptiste Clavié <[email protected]> | ||
*/ | ||
interface ChangeInterface | ||
{ | ||
/** @return mixed the data before it was changed */ | ||
public function getOld(); | ||
|
||
/** @return mixed the data after it was changed */ | ||
public function getNew(); | ||
} | ||
|