Possible Magento garbage collection & cleanup

Branko over at activecodeline.com found some interesting methods that are not even used in the current 1.2.1.2 release of Magento. You can find them in lib/Varien/Object.php, Is it possibly garbage collection/cleanup for 3rd modules in the future? :?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 
<?php
 
/**
 * Enter description here...
 *
 * @param string $field
 * @return boolean
 */
public function isDirty($field=null)
{
	if (empty($this->_dirty)) {
		return false;
	}
	if (is_null($field)) {
		return true;
	}
	return isset($this->_dirty[$field]);
}
 
/**
 * Enter description here...
 *
 * @param string $field
 * @param boolean $flag
 * @return Varien_Object
 */
public function flagDirty($field, $flag=true)
{
	if (is_null($field)) {
		foreach ($this->getData() as $field=>$value) {
			$this->flagDirty($field, $flag);
		}
	} else {
		if ($flag) {
			$this->_dirty[$field] = true;
		} else {
			unset($this->_dirty[$field]);
		}
	}
	return $this;
}
 
?>

:arrow: Magento isDirty | ActiveCodeline.

Possibly Related Posts:


This entry was posted in Magento Commerce and tagged , , , . Bookmark the permalink.
  • http://father.diyhoward.com/fathers-day-poems-fathers-day-poemsscrapbook-pagesglitter/ Father’s Day » Blog Archive » Fathers Day Poems Fathers Day Poems Scrapbook Pages

    [...] Possible Magento garbage collection & cleanup | molotov.bliss [...]

  • http://www.yourebaysniper.com ebay sniper

    ebay sniper…

    I found your site on yahoo while searching for this very topic! Do you mind if I take a photo from this blog?…

blog comments powered by Disqus