/** * Set notification data to object parameters. * * <code> * $keys = array( * "group_id" => 1, * "points_id" => 2 * ); * * $data = array( * "title" => "......", * "description" => "......", * "activity_text" => "......", * "custom_data" => array(,,,), * "params" => array(,,,), * "image" => "picture.png", * "note" => null, * "published" => 1, * "group_id" => 3, * "points_number" => 100, * "points_title" => 100, * "points_id" => 1 * ); * * $badge = new Gamification\Badge\Badge(\JFactory::getDbo()); * $badge->load($keys); * * $badge->bind($data); * </code> * * @param array $data * @param array $ignored */ public function bind($data, array $ignored = array()) { // Parse custom data of the object if they exists. if (array_key_exists('custom_data', $data) and !in_array('custom_data', $ignored, true)) { $this->custom_data = new Registry($data['custom_data']); unset($data['custom_data']); } parent::bind($data, $ignored); }