This repository has been archived by the owner on Jan 24, 2020. It is now read-only.
-
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.
Updated with latest changes from doctrine/DoctrineModule
- Loading branch information
1 parent
c2ba08c
commit 20667a1
Showing
8 changed files
with
415 additions
and
213 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ZendTest\Doctrine\Hydrator\Assets; | ||
|
||
class ByValueDifferentiatorEntity | ||
{ | ||
/** | ||
* @var int | ||
*/ | ||
protected $id; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $field; | ||
|
||
public function setId($id) | ||
{ | ||
$this->id = $id; | ||
} | ||
|
||
public function getId() | ||
{ | ||
return $this->id; | ||
} | ||
|
||
public function setField($field, $modifyValue = true) | ||
{ | ||
// Modify the value to illustrate the difference between by value and by reference | ||
if ($modifyValue) { | ||
$this->field = "From setter: $field"; | ||
} else { | ||
$this->field = $field; | ||
} | ||
} | ||
|
||
public function getField($modifyValue = true) | ||
{ | ||
// Modify the value to illustrate the difference between by value and by reference | ||
if ($modifyValue) { | ||
return "From getter: $this->field"; | ||
} else { | ||
return $this->field; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.