public function parse() { $my_subject = new Subject($this->return_subject_id()); if (!$my_subject->has_aspect_named('Formatted Address')) { $city = $my_subject->has_aspect_named('city'); // should give us the id, if it exists. if ($city) { $city_aspect = new Aspect($city); $structured_address = $this->aspect_data; $structured_address .= ' ' . $city_aspect->aspect_data; $my_subject->quick_add('Formatted Address', $structured_address); new LogEntry('parsed a new formatted address for subject:' . $my_subject->id); } } }