1
0
Fork 0
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:
epriestley 2014-08-11 12:24:41 -07:00
parent 2b909fb3a1
commit 448020a573

View file

@ -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');