ive a little Problem. My Java App convert it's modal object to json (using GSON Library).

This is just fine, but i have to get it back into a modal in PHP. Now ive created a modal (in my case it's for example GeoLocation) which have several getters and setters.

Example:

    
    class GeoLocation {

        private $cellTowerId;
        private $dateCreated;
        private $dateModified;
        private $geoLocationId;
        private $geoLocationLatitude;
        private $geoLocationLongitude;
        private $geoLocationName;
        private $geoLocationStatus;
        private $geoLocationTime;
        private $isSynch;
        private $geoLocationAccuracy;
        private $geoLocationAltitude;
        private $geoLocationBearing;
        private $geoLocationProvider;
        private $geoLocationSpeed;
        private $geoStreet;
        private $geoPostalCode;
        private $geoLocality;
        private $geoCountryName;
        private $geoCountryCode;
        private $geoFeatureName;
        private $geoPhone;

        public function getCellTowerId() {
            return $this->cellTowerId;
        }

        public function getDateCreated() {
            return $this->dateCreated;
        }

        public function getDateModified() {
            return $this->dateModified;
        }

        public function getGeoLocationId() {
            return $this->geoLocationId;
        }

        public function getGeoLocationLatitude() {
            return $this->geoLocationLatitude;
        }

        public function getGeoLocationLongitude() {
            return $this->geoLocationLongitude;
        }

        public function getGeoLocationName() {
            return $this->geoLocationName;
        }

    // and many more...
    }

Now ive a loader class which processes the json and should re-create the object, as soon as the set<Varname>() method exists. This is what ive done. Is there any "security problem" so far or any way to improve it?

    
    public function process() {
        foreach (parent::getData() as $key) {
            try {
                $geolocation = new GeoLocation();
                foreach ($key as $keyName => $keyValue) {
                    if (method_exists($geolocation, "set" . ucfirst($keyName))) {
                        call_user_func(array($geolocation, "set" . ucfirst($keyName)), $keyValue);
                    }
                }
            } catch (Exception $ex) {
                echo $ex->getMessage();
            }
        }
    }


Since the class methods are always synchronized with the java classes, the getter and setter methods should always exist. Is there maybe a way doing the getters and setters dynamically using the json? 

If there are json data which have no methods like setJSONDataOfEvilStuff() then its not neccessary so far.

Thanks