From 0ba86971e2f2aa545998ff0abb065a71f3951cfd Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 21 Mar 2011 19:58:01 +1300 Subject: [PATCH] API CHANGE: Removed context object - it's a hack. --- model/DataObject.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/model/DataObject.php b/model/DataObject.php index 37ef4c05e..da301ecb8 100755 --- a/model/DataObject.php +++ b/model/DataObject.php @@ -3040,29 +3040,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity return is_numeric( $this->ID ) && $this->ID > 0; } - /** - * Sets a 'context object' that can be used to provide hints about how to process a particular get / get_one request. - * In particular, DataExtensions can use this to amend queries more effectively. - * Care must be taken to unset the context object after you're done with it, otherwise you will have a stale context, - * which could cause horrible bugs. - */ - public static function set_context_obj($obj) { - if($obj && self::$context_obj) user_error("Dataobject::set_context_obj passed " . $obj->class . "." . $obj->ID . " when there is already a context: " . self::$context_obj->class . '.' . self::$context_obj->ID, E_USER_WARNING); - self::$context_obj = $obj; - } - - /** - * Retrieve the current context object. - */ - public static function context_obj() { - return self::$context_obj; - } - - /** - * @ignore - */ - protected static $context_obj = null; - /* * @ignore */