private static function populateObject($output, $source) {
        $source = json_decode(json_encode($source), true);

        foreach($source as $key => $value) {
            $method = self::createMethodNames($key);

            // Changed method_exists() to is_callable() because of the magic functions
            // @source: http://php.net/manual/en/function.method-exists.php
            if(is_callable([$output, $method])) {
                call_user_func([$output, $method], $value);
            }
        }

        return $output;
    }