mirror of
https://we.phorge.it/source/phorge.git
synced 2025-03-08 10:24:48 +01:00
Rename Lisk internal getProperties() methods to avoid collisions
Summary:
See some discussion here:
24a6eeb8d8 (commitcomment-7334892)
The `protected $properties;` storage parameter added to `ProjectColumn` is shadowed by `getProperties()` in the base class.
Although this works correctly for me, it's ambiguous and worth fixing. Make the base class methods explicit.
Test Plan: Used `grep` to find callers for both methods and renamed them.
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: epriestley
Differential Revision: https://secure.phabricator.com/D10210
This commit is contained in:
parent
2b909fb3a1
commit
448020a573
1 changed files with 6 additions and 6 deletions
|
@ -855,7 +855,7 @@ abstract class LiskDAO {
|
|||
*
|
||||
* @task info
|
||||
*/
|
||||
protected function getProperties() {
|
||||
protected function getAllLiskProperties() {
|
||||
static $properties = null;
|
||||
if (!isset($properties)) {
|
||||
$class = new ReflectionClass(get_class($this));
|
||||
|
@ -893,7 +893,7 @@ abstract class LiskDAO {
|
|||
protected function checkProperty($property) {
|
||||
static $properties = null;
|
||||
if ($properties === null) {
|
||||
$properties = $this->getProperties();
|
||||
$properties = $this->getAllLiskProperties();
|
||||
}
|
||||
|
||||
$property = strtolower($property);
|
||||
|
@ -980,9 +980,9 @@ abstract class LiskDAO {
|
|||
*
|
||||
* @task info
|
||||
*/
|
||||
protected function getPropertyValues() {
|
||||
protected function getAllLiskPropertyValues() {
|
||||
$map = array();
|
||||
foreach ($this->getProperties() as $p) {
|
||||
foreach ($this->getAllLiskProperties() as $p) {
|
||||
// We may receive a warning here for properties we've implicitly added
|
||||
// through configuration; squelch it.
|
||||
$map[$p] = @$this->$p;
|
||||
|
@ -1070,7 +1070,7 @@ abstract class LiskDAO {
|
|||
$this->isEphemeralCheck();
|
||||
|
||||
$this->willSaveObject();
|
||||
$data = $this->getPropertyValues();
|
||||
$data = $this->getAllLiskPropertyValues();
|
||||
$this->willWriteData($data);
|
||||
|
||||
$map = array();
|
||||
|
@ -1139,7 +1139,7 @@ abstract class LiskDAO {
|
|||
*/
|
||||
protected function insertRecordIntoDatabase($mode) {
|
||||
$this->willSaveObject();
|
||||
$data = $this->getPropertyValues();
|
||||
$data = $this->getAllLiskPropertyValues();
|
||||
|
||||
$conn = $this->establishConnection('w');
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue