Changeset 3039311
- Timestamp:
- 02/21/2024 03:52:07 PM (2 years ago)
- Location:
- appful-app
- Files:
-
- 8 added
- 7 deleted
- 21 edited
- 299 copied
-
tags/3.1.22 (copied) (copied from appful-app/trunk)
-
tags/3.1.22/appful-app.php (copied) (copied from appful-app/trunk/appful-app.php) (1 diff)
-
tags/3.1.22/appful.log (copied) (copied from appful-app/trunk/appful.log)
-
tags/3.1.22/frontend/scripts/user.js (copied) (copied from appful-app/trunk/frontend/scripts/user.js)
-
tags/3.1.22/frontend/styles/style.css (copied) (copied from appful-app/trunk/frontend/styles/style.css)
-
tags/3.1.22/frontend/templates/appful_menu_page.html.twig (copied) (copied from appful-app/trunk/frontend/templates/appful_menu_page.html.twig)
-
tags/3.1.22/includes/api/Api.php (copied) (copied from appful-app/trunk/includes/api/Api.php)
-
tags/3.1.22/includes/api/Endpoints.php (copied) (copied from appful-app/trunk/includes/api/Endpoints.php) (1 diff)
-
tags/3.1.22/includes/api/ReqHandler.php (copied) (copied from appful-app/trunk/includes/api/ReqHandler.php) (2 diffs)
-
tags/3.1.22/includes/api/Rewrites.php (copied) (copied from appful-app/trunk/includes/api/Rewrites.php)
-
tags/3.1.22/includes/api/client/BackendClient.php (copied) (copied from appful-app/trunk/includes/api/client/BackendClient.php)
-
tags/3.1.22/includes/api/client/SelfClient.php (copied) (copied from appful-app/trunk/includes/api/client/SelfClient.php)
-
tags/3.1.22/includes/api/dtos/BlogHooksDto.php (copied) (copied from appful-app/trunk/includes/api/dtos/BlogHooksDto.php) (1 diff)
-
tags/3.1.22/includes/api/dtos/BlogInfoDto.php (copied) (copied from appful-app/trunk/includes/api/dtos/BlogInfoDto.php) (1 diff)
-
tags/3.1.22/includes/api/dtos/BlogSettingsDto.php (added)
-
tags/3.1.22/includes/api/dtos/BlogStatsDto.php (copied) (copied from appful-app/trunk/includes/api/dtos/BlogStatsDto.php)
-
tags/3.1.22/includes/api/dtos/PageContentDto.php (copied) (copied from appful-app/trunk/includes/api/dtos/PageContentDto.php)
-
tags/3.1.22/includes/api/dtos/PageDto.php (copied) (copied from appful-app/trunk/includes/api/dtos/PageDto.php)
-
tags/3.1.22/includes/api/dtos/PostDto.php (copied) (copied from appful-app/trunk/includes/api/dtos/PostDto.php)
-
tags/3.1.22/includes/api/dtos/RoleDto.php (copied) (copied from appful-app/trunk/includes/api/dtos/RoleDto.php)
-
tags/3.1.22/includes/api/dtos/SyncItemDto.php (copied) (copied from appful-app/trunk/includes/api/dtos/SyncItemDto.php)
-
tags/3.1.22/includes/api/dtos/UserDto.php (copied) (copied from appful-app/trunk/includes/api/dtos/UserDto.php)
-
tags/3.1.22/includes/api/dtos/UserRoleDto.php (copied) (copied from appful-app/trunk/includes/api/dtos/UserRoleDto.php)
-
tags/3.1.22/includes/api/dtos/app (copied) (copied from appful-app/trunk/includes/api/dtos/app)
-
tags/3.1.22/includes/api/handlers/AndroidAssetLinkRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/AndroidAssetLinkRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/AppleAppSiteAssociationRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/AppleAppSiteAssociationRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/AttachmentSyncRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/AttachmentSyncRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/AuthenticateUserRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/AuthenticateUserRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/CategorySyncRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/CategorySyncRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/ClearLogRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/ClearLogRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/CommentSyncRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/CommentSyncRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/CreateCommentRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/CreateCommentRequestHandler.php) (3 diffs)
-
tags/3.1.22/includes/api/handlers/GetAttachmentsRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/GetAttachmentsRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/GetCategoriesRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/GetCategoriesRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/GetCommentsRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/GetCommentsRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/GetPageContentsRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/GetPageContentsRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/GetPagesRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/GetPagesRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/GetPostContentsRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/GetPostContentsRequestHandler.php) (1 diff)
-
tags/3.1.22/includes/api/handlers/GetPostsRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/GetPostsRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/GetRolesRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/GetRolesRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/GetTagsRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/GetTagsRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/GetUsersRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/GetUsersRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/InfoRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/InfoRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/LogRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/LogRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/PageSyncRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/PageSyncRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/PostSyncRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/PostSyncRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/PullLocalPageContentRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/PullLocalPageContentRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/PullLocalPostContentRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/PullLocalPostContentRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/RoleSyncRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/RoleSyncRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/SavePostSyncBatchSizeHandler.php (added)
-
tags/3.1.22/includes/api/handlers/SyncRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/SyncRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/TagSyncRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/TagSyncRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/UserSyncRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/UserSyncRequestHandler.php)
-
tags/3.1.22/includes/api/handlers/page (copied) (copied from appful-app/trunk/includes/api/handlers/page)
-
tags/3.1.22/includes/api/handlers/page/GetPageContentRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/page/GetPageContentRequestHandler.php)
-
tags/3.1.22/includes/api/mapper/AppAdBannerMapper.php (copied) (copied from appful-app/trunk/includes/api/mapper/AppAdBannerMapper.php)
-
tags/3.1.22/includes/api/mapper/BlogHooksMapper.php (copied) (copied from appful-app/trunk/includes/api/mapper/BlogHooksMapper.php)
-
tags/3.1.22/includes/api/mapper/BlogInfoMapper.php (copied) (copied from appful-app/trunk/includes/api/mapper/BlogInfoMapper.php) (1 diff)
-
tags/3.1.22/includes/api/mapper/BlogStatsMapper.php (copied) (copied from appful-app/trunk/includes/api/mapper/BlogStatsMapper.php)
-
tags/3.1.22/includes/api/mapper/PageContentMapper.php (copied) (copied from appful-app/trunk/includes/api/mapper/PageContentMapper.php)
-
tags/3.1.22/includes/api/mapper/PageMapper.php (copied) (copied from appful-app/trunk/includes/api/mapper/PageMapper.php)
-
tags/3.1.22/includes/api/mapper/PostMapper.php (copied) (copied from appful-app/trunk/includes/api/mapper/PostMapper.php)
-
tags/3.1.22/includes/api/mapper/RoleMapper.php (copied) (copied from appful-app/trunk/includes/api/mapper/RoleMapper.php)
-
tags/3.1.22/includes/api/mapper/SyncItemMapper.php (copied) (copied from appful-app/trunk/includes/api/mapper/SyncItemMapper.php)
-
tags/3.1.22/includes/api/mapper/UserMapper.php (copied) (copied from appful-app/trunk/includes/api/mapper/UserMapper.php)
-
tags/3.1.22/includes/api/mapper/UserRoleMapper.php (copied) (copied from appful-app/trunk/includes/api/mapper/UserRoleMapper.php)
-
tags/3.1.22/includes/api/reponses/BackendResponse.php (deleted)
-
tags/3.1.22/includes/api/reponses/HttpResponse.php (copied) (copied from appful-app/trunk/includes/api/reponses/HttpResponse.php)
-
tags/3.1.22/includes/api/requests/BackendRequest.php (deleted)
-
tags/3.1.22/includes/api/requests/HttpRequest.php (copied) (copied from appful-app/trunk/includes/api/requests/HttpRequest.php)
-
tags/3.1.22/includes/custom_taxonomies/AppfulTaxonomies.php (copied) (copied from appful-app/trunk/includes/custom_taxonomies/AppfulTaxonomies.php)
-
tags/3.1.22/includes/domain/AuthenticateRequest.php (copied) (copied from appful-app/trunk/includes/domain/AuthenticateRequest.php)
-
tags/3.1.22/includes/domain/BlogHooks.php (copied) (copied from appful-app/trunk/includes/domain/BlogHooks.php)
-
tags/3.1.22/includes/domain/BlogInfo.php (copied) (copied from appful-app/trunk/includes/domain/BlogInfo.php) (1 diff)
-
tags/3.1.22/includes/domain/BlogSettings.php (added)
-
tags/3.1.22/includes/domain/BlogStats.php (copied) (copied from appful-app/trunk/includes/domain/BlogStats.php)
-
tags/3.1.22/includes/domain/CreateCommentRequest.php (copied) (copied from appful-app/trunk/includes/domain/CreateCommentRequest.php)
-
tags/3.1.22/includes/domain/Page.php (copied) (copied from appful-app/trunk/includes/domain/Page.php)
-
tags/3.1.22/includes/domain/PageContent.php (copied) (copied from appful-app/trunk/includes/domain/PageContent.php)
-
tags/3.1.22/includes/domain/Post.php (copied) (copied from appful-app/trunk/includes/domain/Post.php)
-
tags/3.1.22/includes/domain/PostContent.php (copied) (copied from appful-app/trunk/includes/domain/PostContent.php)
-
tags/3.1.22/includes/domain/Role.php (copied) (copied from appful-app/trunk/includes/domain/Role.php)
-
tags/3.1.22/includes/domain/SyncItem.php (copied) (copied from appful-app/trunk/includes/domain/SyncItem.php)
-
tags/3.1.22/includes/domain/User.php (copied) (copied from appful-app/trunk/includes/domain/User.php)
-
tags/3.1.22/includes/domain/UserRole.php (copied) (copied from appful-app/trunk/includes/domain/UserRole.php)
-
tags/3.1.22/includes/domain/app (copied) (copied from appful-app/trunk/includes/domain/app)
-
tags/3.1.22/includes/helper/ClientTokenManager.php (copied) (copied from appful-app/trunk/includes/helper/ClientTokenManager.php)
-
tags/3.1.22/includes/helper/Constants.php (copied) (copied from appful-app/trunk/includes/helper/Constants.php) (1 diff)
-
tags/3.1.22/includes/helper/Logger.php (copied) (copied from appful-app/trunk/includes/helper/Logger.php)
-
tags/3.1.22/includes/helper/LoggerLevel.php (copied) (copied from appful-app/trunk/includes/helper/LoggerLevel.php)
-
tags/3.1.22/includes/hooks/ActivationHook.php (copied) (copied from appful-app/trunk/includes/hooks/ActivationHook.php)
-
tags/3.1.22/includes/hooks/AppSettingsHook.php (copied) (copied from appful-app/trunk/includes/hooks/AppSettingsHook.php)
-
tags/3.1.22/includes/hooks/AttachmentHook.php (copied) (copied from appful-app/trunk/includes/hooks/AttachmentHook.php)
-
tags/3.1.22/includes/hooks/CommentHook.php (copied) (copied from appful-app/trunk/includes/hooks/CommentHook.php)
-
tags/3.1.22/includes/hooks/Hooks.php (copied) (copied from appful-app/trunk/includes/hooks/Hooks.php)
-
tags/3.1.22/includes/hooks/PageHook.php (copied) (copied from appful-app/trunk/includes/hooks/PageHook.php)
-
tags/3.1.22/includes/hooks/PostHook.php (copied) (copied from appful-app/trunk/includes/hooks/PostHook.php)
-
tags/3.1.22/includes/hooks/SessionHook.php (copied) (copied from appful-app/trunk/includes/hooks/SessionHook.php)
-
tags/3.1.22/includes/hooks/TaxonomyHook.php (copied) (copied from appful-app/trunk/includes/hooks/TaxonomyHook.php)
-
tags/3.1.22/includes/hooks/UserHook.php (copied) (copied from appful-app/trunk/includes/hooks/UserHook.php)
-
tags/3.1.22/includes/main/AppfulPlugin.php (copied) (copied from appful-app/trunk/includes/main/AppfulPlugin.php)
-
tags/3.1.22/includes/menu/Menu.php (copied) (copied from appful-app/trunk/includes/menu/Menu.php)
-
tags/3.1.22/includes/use_cases/AttachmentDeleteUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/AttachmentDeleteUseCase.php)
-
tags/3.1.22/includes/use_cases/AttachmentSaveUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/AttachmentSaveUseCase.php)
-
tags/3.1.22/includes/use_cases/AuthenticateUserUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/AuthenticateUserUseCase.php)
-
tags/3.1.22/includes/use_cases/CategoryDeleteUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/CategoryDeleteUseCase.php)
-
tags/3.1.22/includes/use_cases/CategorySaveUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/CategorySaveUseCase.php)
-
tags/3.1.22/includes/use_cases/ClearLogsUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/ClearLogsUseCase.php)
-
tags/3.1.22/includes/use_cases/CommentDeleteUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/CommentDeleteUseCase.php)
-
tags/3.1.22/includes/use_cases/CommentSaveUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/CommentSaveUseCase.php)
-
tags/3.1.22/includes/use_cases/CreateCommentUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/CreateCommentUseCase.php)
-
tags/3.1.22/includes/use_cases/DeleteSessionUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/DeleteSessionUseCase.php)
-
tags/3.1.22/includes/use_cases/GetAttachmentSyncDataUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetAttachmentSyncDataUseCase.php)
-
tags/3.1.22/includes/use_cases/GetBlogInfoUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetBlogInfoUseCase.php)
-
tags/3.1.22/includes/use_cases/GetCategorySyncDataUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetCategorySyncDataUseCase.php)
-
tags/3.1.22/includes/use_cases/GetCommentSyncDataUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetCommentSyncDataUseCase.php)
-
tags/3.1.22/includes/use_cases/GetLocalPostContentByIdUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetLocalPostContentByIdUseCase.php)
-
tags/3.1.22/includes/use_cases/GetPageSyncDataUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetPageSyncDataUseCase.php)
-
tags/3.1.22/includes/use_cases/GetPagesByIdUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetPagesByIdUseCase.php)
-
tags/3.1.22/includes/use_cases/GetPostContentsByIdUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetPostContentsByIdUseCase.php)
-
tags/3.1.22/includes/use_cases/GetPostSyncDataUseCase.php (deleted)
-
tags/3.1.22/includes/use_cases/GetRoleSyncDataUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetRoleSyncDataUseCase.php)
-
tags/3.1.22/includes/use_cases/GetRolesByIdUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetRolesByIdUseCase.php)
-
tags/3.1.22/includes/use_cases/GetTagSyncDataUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetTagSyncDataUseCase.php)
-
tags/3.1.22/includes/use_cases/GetUserSyncDataUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetUserSyncDataUseCase.php)
-
tags/3.1.22/includes/use_cases/IsLoggedInUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/IsLoggedInUseCase.php)
-
tags/3.1.22/includes/use_cases/LogoutUserUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/LogoutUserUseCase.php)
-
tags/3.1.22/includes/use_cases/PageDeleteUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/PageDeleteUseCase.php)
-
tags/3.1.22/includes/use_cases/PageSaveUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/PageSaveUseCase.php)
-
tags/3.1.22/includes/use_cases/PostDeleteUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/PostDeleteUseCase.php)
-
tags/3.1.22/includes/use_cases/PostSaveUseCase.php (deleted)
-
tags/3.1.22/includes/use_cases/PullLocalPostContentUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/PullLocalPostContentUseCase.php)
-
tags/3.1.22/includes/use_cases/RegisterBlogUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/RegisterBlogUseCase.php)
-
tags/3.1.22/includes/use_cases/SendAttachmentChunkSyncUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SendAttachmentChunkSyncUseCase.php)
-
tags/3.1.22/includes/use_cases/SendCategoryChunkSyncUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SendCategoryChunkSyncUseCase.php)
-
tags/3.1.22/includes/use_cases/SendCommentChunkSyncUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SendCommentChunkSyncUseCase.php)
-
tags/3.1.22/includes/use_cases/SendPageChunkSyncUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SendPageChunkSyncUseCase.php)
-
tags/3.1.22/includes/use_cases/SendPostChunkSyncUseCase.php (deleted)
-
tags/3.1.22/includes/use_cases/SendRoleChunkSyncUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SendRoleChunkSyncUseCase.php)
-
tags/3.1.22/includes/use_cases/SendTagChunkSyncUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SendTagChunkSyncUseCase.php)
-
tags/3.1.22/includes/use_cases/SendUserChunkSyncUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SendUserChunkSyncUseCase.php)
-
tags/3.1.22/includes/use_cases/SyncAllUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SyncAllUseCase.php)
-
tags/3.1.22/includes/use_cases/SyncAttachmentsUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SyncAttachmentsUseCase.php)
-
tags/3.1.22/includes/use_cases/SyncCategoriesUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SyncCategoriesUseCase.php)
-
tags/3.1.22/includes/use_cases/SyncCommentsUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SyncCommentsUseCase.php)
-
tags/3.1.22/includes/use_cases/SyncPagesUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SyncPagesUseCase.php)
-
tags/3.1.22/includes/use_cases/SyncPostsUseCase.php (deleted)
-
tags/3.1.22/includes/use_cases/SyncRolesUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SyncRolesUseCase.php)
-
tags/3.1.22/includes/use_cases/SyncTagsUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SyncTagsUseCase.php)
-
tags/3.1.22/includes/use_cases/SyncUsersUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SyncUsersUseCase.php)
-
tags/3.1.22/includes/use_cases/TagDeleteUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/TagDeleteUseCase.php)
-
tags/3.1.22/includes/use_cases/TagSaveUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/TagSaveUseCase.php)
-
tags/3.1.22/includes/use_cases/UseCaseManager.php (copied) (copied from appful-app/trunk/includes/use_cases/UseCaseManager.php)
-
tags/3.1.22/includes/use_cases/UserDeleteUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/UserDeleteUseCase.php)
-
tags/3.1.22/includes/use_cases/UserSaveUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/UserSaveUseCase.php)
-
tags/3.1.22/includes/use_cases/app_settings (copied) (copied from appful-app/trunk/includes/use_cases/app_settings)
-
tags/3.1.22/includes/use_cases/page (copied) (copied from appful-app/trunk/includes/use_cases/page)
-
tags/3.1.22/includes/use_cases/page/GetPageContentsByIdUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/page/GetPageContentsByIdUseCase.php)
-
tags/3.1.22/includes/use_cases/page/PullLocalPageContentUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/page/PullLocalPageContentUseCase.php)
-
tags/3.1.22/includes/use_cases/post (copied) (copied from appful-app/trunk/includes/use_cases/post)
-
tags/3.1.22/includes/use_cases/post/PostUseCaseManager.php (modified) (1 diff)
-
tags/3.1.22/includes/use_cases/post/SavePostSyncBatchSizeUseCase.php (added)
-
tags/3.1.22/includes/use_cases/post/SyncPostsUseCase.php (modified) (1 diff)
-
tags/3.1.22/includes/use_cases/post/SyncTaxonomyPostsUseCase.php (modified) (1 diff)
-
tags/3.1.22/includes/wp/WPAttachmentManager.php (copied) (copied from appful-app/trunk/includes/wp/WPAttachmentManager.php)
-
tags/3.1.22/includes/wp/WPBlogManager.php (copied) (copied from appful-app/trunk/includes/wp/WPBlogManager.php) (1 diff)
-
tags/3.1.22/includes/wp/WPCategoryManager.php (copied) (copied from appful-app/trunk/includes/wp/WPCategoryManager.php)
-
tags/3.1.22/includes/wp/WPCommentDatabaseManager.php (copied) (copied from appful-app/trunk/includes/wp/WPCommentDatabaseManager.php)
-
tags/3.1.22/includes/wp/WPCommentManager.php (copied) (copied from appful-app/trunk/includes/wp/WPCommentManager.php)
-
tags/3.1.22/includes/wp/WPOptionsManager.php (copied) (copied from appful-app/trunk/includes/wp/WPOptionsManager.php) (1 diff)
-
tags/3.1.22/includes/wp/WPPageManager.php (copied) (copied from appful-app/trunk/includes/wp/WPPageManager.php)
-
tags/3.1.22/includes/wp/WPPostDatabaseManager.php (copied) (copied from appful-app/trunk/includes/wp/WPPostDatabaseManager.php)
-
tags/3.1.22/includes/wp/WPPostManager.php (copied) (copied from appful-app/trunk/includes/wp/WPPostManager.php)
-
tags/3.1.22/includes/wp/WPRoleManager.php (copied) (copied from appful-app/trunk/includes/wp/WPRoleManager.php)
-
tags/3.1.22/includes/wp/WPTagManager.php (copied) (copied from appful-app/trunk/includes/wp/WPTagManager.php)
-
tags/3.1.22/includes/wp/WPUserDatabaseManager.php (copied) (copied from appful-app/trunk/includes/wp/WPUserDatabaseManager.php)
-
tags/3.1.22/includes/wp/WPUserManager.php (copied) (copied from appful-app/trunk/includes/wp/WPUserManager.php)
-
tags/3.1.22/includes/wp/mapper/AttachmentMapper.php (copied) (copied from appful-app/trunk/includes/wp/mapper/AttachmentMapper.php)
-
tags/3.1.22/includes/wp/mapper/PageMapper.php (copied) (copied from appful-app/trunk/includes/wp/mapper/PageMapper.php)
-
tags/3.1.22/includes/wp/mapper/PostMapper.php (copied) (copied from appful-app/trunk/includes/wp/mapper/PostMapper.php)
-
tags/3.1.22/includes/wp/mapper/UserMapper.php (copied) (copied from appful-app/trunk/includes/wp/mapper/UserMapper.php)
-
tags/3.1.22/includes/wp/plugins/LanguageHelper.php (copied) (copied from appful-app/trunk/includes/wp/plugins/LanguageHelper.php)
-
tags/3.1.22/includes/wp/plugins/RoleHelper.php (copied) (copied from appful-app/trunk/includes/wp/plugins/RoleHelper.php)
-
tags/3.1.22/lib/.gitignore (deleted)
-
tags/3.1.22/lib/vendor/autoload.php (copied) (copied from appful-app/trunk/lib/vendor/autoload.php)
-
tags/3.1.22/lib/vendor/bin (copied) (copied from appful-app/trunk/lib/vendor/bin)
-
tags/3.1.22/lib/vendor/composer/ClassLoader.php (copied) (copied from appful-app/trunk/lib/vendor/composer/ClassLoader.php)
-
tags/3.1.22/lib/vendor/composer/autoload_classmap.php (copied) (copied from appful-app/trunk/lib/vendor/composer/autoload_classmap.php) (5 diffs)
-
tags/3.1.22/lib/vendor/composer/autoload_files.php (copied) (copied from appful-app/trunk/lib/vendor/composer/autoload_files.php)
-
tags/3.1.22/lib/vendor/composer/autoload_psr4.php (copied) (copied from appful-app/trunk/lib/vendor/composer/autoload_psr4.php)
-
tags/3.1.22/lib/vendor/composer/autoload_real.php (copied) (copied from appful-app/trunk/lib/vendor/composer/autoload_real.php)
-
tags/3.1.22/lib/vendor/composer/autoload_static.php (copied) (copied from appful-app/trunk/lib/vendor/composer/autoload_static.php) (5 diffs)
-
tags/3.1.22/lib/vendor/composer/installed.json (copied) (copied from appful-app/trunk/lib/vendor/composer/installed.json)
-
tags/3.1.22/lib/vendor/composer/installed.php (copied) (copied from appful-app/trunk/lib/vendor/composer/installed.php)
-
tags/3.1.22/lib/vendor/composer/platform_check.php (copied) (copied from appful-app/trunk/lib/vendor/composer/platform_check.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/CHANGELOG.md (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/CHANGELOG.md)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/README.md (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/README.md)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/UPGRADING.md (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/UPGRADING.md)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/composer.json (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/composer.json)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/Client.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/Client.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/ClientInterface.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/ClientInterface.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/HandlerStack.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/HandlerStack.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/MessageFormatter.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/MessageFormatter.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/Middleware.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/Middleware.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/RequestOptions.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/RequestOptions.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/TransferStats.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/TransferStats.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/Utils.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/Utils.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/functions.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/functions.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/guzzle/src/functions_include.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/guzzle/src/functions_include.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/CHANGELOG.md (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/CHANGELOG.md)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/README.md (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/README.md)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/composer.json (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/composer.json)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/AggregateException.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/AggregateException.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/CancellationException.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/CancellationException.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/Coroutine.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/Coroutine.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/Create.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/Create.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/Each.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/Each.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/EachPromise.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/EachPromise.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/FulfilledPromise.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/FulfilledPromise.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/Is.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/Is.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/Promise.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/Promise.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/PromiseInterface.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/PromiseInterface.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/PromisorInterface.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/PromisorInterface.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/RejectedPromise.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/RejectedPromise.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/RejectionException.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/RejectionException.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/TaskQueue.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/TaskQueue.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/TaskQueueInterface.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/TaskQueueInterface.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/promises/src/Utils.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/promises/src/Utils.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/CHANGELOG.md (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/CHANGELOG.md)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/README.md (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/README.md)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/composer.json (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/composer.json)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/AppendStream.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/AppendStream.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/BufferStream.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/BufferStream.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/FnStream.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/FnStream.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/Header.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/Header.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/HttpFactory.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/HttpFactory.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/InflateStream.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/InflateStream.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/LazyOpenStream.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/LazyOpenStream.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/Message.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/Message.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/MessageTrait.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/MessageTrait.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/MimeType.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/MimeType.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/MultipartStream.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/MultipartStream.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/PumpStream.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/PumpStream.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/Query.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/Query.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/Request.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/Request.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/Response.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/Response.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/Rfc7230.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/Rfc7230.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/ServerRequest.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/ServerRequest.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/Stream.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/Stream.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/StreamWrapper.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/StreamWrapper.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/Uri.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/Uri.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/UriNormalizer.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/UriNormalizer.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/UriResolver.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/UriResolver.php)
-
tags/3.1.22/lib/vendor/guzzlehttp/psr7/src/Utils.php (copied) (copied from appful-app/trunk/lib/vendor/guzzlehttp/psr7/src/Utils.php)
-
tags/3.1.22/lib/vendor/psr/http-client/CHANGELOG.md (copied) (copied from appful-app/trunk/lib/vendor/psr/http-client/CHANGELOG.md)
-
tags/3.1.22/lib/vendor/psr/http-client/README.md (copied) (copied from appful-app/trunk/lib/vendor/psr/http-client/README.md)
-
tags/3.1.22/lib/vendor/psr/http-client/composer.json (copied) (copied from appful-app/trunk/lib/vendor/psr/http-client/composer.json)
-
tags/3.1.22/lib/vendor/psr/http-factory/README.md (copied) (copied from appful-app/trunk/lib/vendor/psr/http-factory/README.md)
-
tags/3.1.22/lib/vendor/psr/http-factory/composer.json (copied) (copied from appful-app/trunk/lib/vendor/psr/http-factory/composer.json)
-
tags/3.1.22/lib/vendor/psr/http-message/README.md (copied) (copied from appful-app/trunk/lib/vendor/psr/http-message/README.md)
-
tags/3.1.22/lib/vendor/psr/http-message/composer.json (copied) (copied from appful-app/trunk/lib/vendor/psr/http-message/composer.json)
-
tags/3.1.22/lib/vendor/psr/http-message/src/MessageInterface.php (copied) (copied from appful-app/trunk/lib/vendor/psr/http-message/src/MessageInterface.php)
-
tags/3.1.22/lib/vendor/psr/http-message/src/RequestInterface.php (copied) (copied from appful-app/trunk/lib/vendor/psr/http-message/src/RequestInterface.php)
-
tags/3.1.22/lib/vendor/psr/http-message/src/ResponseInterface.php (copied) (copied from appful-app/trunk/lib/vendor/psr/http-message/src/ResponseInterface.php)
-
tags/3.1.22/lib/vendor/psr/http-message/src/ServerRequestInterface.php (copied) (copied from appful-app/trunk/lib/vendor/psr/http-message/src/ServerRequestInterface.php)
-
tags/3.1.22/lib/vendor/psr/http-message/src/StreamInterface.php (copied) (copied from appful-app/trunk/lib/vendor/psr/http-message/src/StreamInterface.php)
-
tags/3.1.22/lib/vendor/psr/http-message/src/UploadedFileInterface.php (copied) (copied from appful-app/trunk/lib/vendor/psr/http-message/src/UploadedFileInterface.php)
-
tags/3.1.22/lib/vendor/psr/http-message/src/UriInterface.php (copied) (copied from appful-app/trunk/lib/vendor/psr/http-message/src/UriInterface.php)
-
tags/3.1.22/lib/vendor/symfony/deprecation-contracts/composer.json (copied) (copied from appful-app/trunk/lib/vendor/symfony/deprecation-contracts/composer.json)
-
tags/3.1.22/lib/vendor/symfony/deprecation-contracts/function.php (copied) (copied from appful-app/trunk/lib/vendor/symfony/deprecation-contracts/function.php)
-
tags/3.1.22/lib/vendor/symfony/polyfill-ctype/LICENSE (copied) (copied from appful-app/trunk/lib/vendor/symfony/polyfill-ctype/LICENSE)
-
tags/3.1.22/lib/vendor/symfony/polyfill-ctype/composer.json (copied) (copied from appful-app/trunk/lib/vendor/symfony/polyfill-ctype/composer.json)
-
tags/3.1.22/lib/vendor/symfony/polyfill-mbstring/LICENSE (copied) (copied from appful-app/trunk/lib/vendor/symfony/polyfill-mbstring/LICENSE)
-
tags/3.1.22/lib/vendor/symfony/polyfill-mbstring/Mbstring.php (copied) (copied from appful-app/trunk/lib/vendor/symfony/polyfill-mbstring/Mbstring.php)
-
tags/3.1.22/lib/vendor/symfony/polyfill-mbstring/bootstrap.php (copied) (copied from appful-app/trunk/lib/vendor/symfony/polyfill-mbstring/bootstrap.php)
-
tags/3.1.22/lib/vendor/symfony/polyfill-mbstring/bootstrap80.php (copied) (copied from appful-app/trunk/lib/vendor/symfony/polyfill-mbstring/bootstrap80.php)
-
tags/3.1.22/lib/vendor/symfony/polyfill-mbstring/composer.json (copied) (copied from appful-app/trunk/lib/vendor/symfony/polyfill-mbstring/composer.json)
-
tags/3.1.22/lib/vendor/twig/twig/CHANGELOG (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/CHANGELOG)
-
tags/3.1.22/lib/vendor/twig/twig/LICENSE (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/LICENSE)
-
tags/3.1.22/lib/vendor/twig/twig/composer.json (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/composer.json)
-
tags/3.1.22/lib/vendor/twig/twig/src/Compiler.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/Compiler.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/Environment.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/Environment.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/ExpressionParser.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/ExpressionParser.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/Extension/CoreExtension.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/Extension/CoreExtension.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/Extension/ExtensionInterface.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/Extension/ExtensionInterface.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/Extension/GlobalsInterface.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/Extension/GlobalsInterface.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/ExtensionSet.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/ExtensionSet.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/Lexer.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/Lexer.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/Loader/FilesystemLoader.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/Loader/FilesystemLoader.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/Node/Expression/ArrayExpression.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/Node/Expression/ArrayExpression.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/Node/Expression/CallExpression.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/Node/Expression/CallExpression.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/Node/IfNode.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/Node/IfNode.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/Token.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/Token.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/TwigFilter.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/TwigFilter.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/TwigFunction.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/TwigFunction.php)
-
tags/3.1.22/lib/vendor/twig/twig/src/TwigTest.php (copied) (copied from appful-app/trunk/lib/vendor/twig/twig/src/TwigTest.php)
-
tags/3.1.22/readme.txt (copied) (copied from appful-app/trunk/readme.txt) (1 diff)
-
trunk/appful-app.php (modified) (1 diff)
-
trunk/includes/api/Endpoints.php (modified) (1 diff)
-
trunk/includes/api/ReqHandler.php (modified) (2 diffs)
-
trunk/includes/api/dtos/BlogHooksDto.php (modified) (1 diff)
-
trunk/includes/api/dtos/BlogInfoDto.php (modified) (1 diff)
-
trunk/includes/api/dtos/BlogSettingsDto.php (added)
-
trunk/includes/api/handlers/CreateCommentRequestHandler.php (modified) (3 diffs)
-
trunk/includes/api/handlers/GetPostContentsRequestHandler.php (modified) (1 diff)
-
trunk/includes/api/handlers/SavePostSyncBatchSizeHandler.php (added)
-
trunk/includes/api/mapper/BlogInfoMapper.php (modified) (1 diff)
-
trunk/includes/domain/BlogInfo.php (modified) (1 diff)
-
trunk/includes/domain/BlogSettings.php (added)
-
trunk/includes/helper/Constants.php (modified) (1 diff)
-
trunk/includes/use_cases/post/PostUseCaseManager.php (modified) (1 diff)
-
trunk/includes/use_cases/post/SavePostSyncBatchSizeUseCase.php (added)
-
trunk/includes/use_cases/post/SyncPostsUseCase.php (modified) (1 diff)
-
trunk/includes/use_cases/post/SyncTaxonomyPostsUseCase.php (modified) (1 diff)
-
trunk/includes/wp/WPBlogManager.php (modified) (1 diff)
-
trunk/includes/wp/WPOptionsManager.php (modified) (1 diff)
-
trunk/lib/vendor/composer/autoload_classmap.php (modified) (5 diffs)
-
trunk/lib/vendor/composer/autoload_static.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
appful-app/tags/3.1.22/appful-app.php
r3028218 r3039311 12 12 * Plugin URI: https://appful.io 13 13 * Description: Appful® is the number 1 plugin for turning your WordPress Content into a native, beautiful app on iOS & Android in under 5 minutes. 14 * Version: 3.1.2 114 * Version: 3.1.22 15 15 * Requires at least: 5.8 16 16 * Requires PHP: 7.4 -
appful-app/tags/3.1.22/includes/api/Endpoints.php
r2978062 r3039311 4 4 5 5 class Endpoints { 6 public static string $INFO = "info";7 public static string $LOGS = "logs";6 public static string $INFO = "info"; 7 public static string $LOGS = "logs"; 8 8 9 public static string $CLEAR_LOGS = "clear-logs";9 public static string $SAVE_POST_SYNC_BATCH_SIZE = "save-post-sync-batch-size"; 10 10 11 public static string $SYNC = "sync"; 12 public static string $SYNC_POSTS = "sync-post"; 11 public static string $CLEAR_LOGS = "clear-logs"; 13 12 14 public static string $SYNC_PAGES = "sync-page"; 15 public static string $SYNC_COMMENTS = "sync-comment"; 16 public static string $SYNC_TAGS = "sync-tag"; 17 public static string $SYNC_ROLES = "sync-role"; 18 public static string $SYNC_USERS = "sync-user"; 19 public static string $SYNC_ATTACHMENTS = "sync-attachment"; 20 public static string $SYNC_CATEGORIES = "sync-category"; 13 public static string $SYNC = "sync"; 14 public static string $SYNC_POSTS = "sync-post"; 21 15 22 public static string $GET_ATTACHMENTS = "get-attachment"; 23 public static string $GET_COMMENTS = "get-comment"; 24 public static string $GET_CATEGORIES = "get-category"; 25 public static string $GET_POSTS = "get-post"; 26 public static string $GET_PAGES = "get-page"; 27 public static string $GET_POST_CONTENTS = "get-post-content"; 28 public static string $GET_PAGE_CONTENTS = "get-page-content"; 29 public static string $GET_POST_CONTENT_LOCAL = "get-post-content-local"; 30 public static string $GET_PAGE_CONTENT_LOCAL = "get-page-content-local"; 31 public static string $GET_USERS = "get-user"; 32 public static string $GET_TAGS = "get-tag"; 33 public static string $GET_ROLES = "get-role"; 16 public static string $SYNC_PAGES = "sync-page"; 17 public static string $SYNC_COMMENTS = "sync-comment"; 18 public static string $SYNC_TAGS = "sync-tag"; 19 public static string $SYNC_ROLES = "sync-role"; 20 public static string $SYNC_USERS = "sync-user"; 21 public static string $SYNC_ATTACHMENTS = "sync-attachment"; 22 public static string $SYNC_CATEGORIES = "sync-category"; 34 23 35 public static string $ASSET_LINKS = "android-asset-links"; 36 public static string $SITE_ASSOCIATION = "apple-app-site-association"; 24 public static string $GET_ATTACHMENTS = "get-attachment"; 25 public static string $GET_COMMENTS = "get-comment"; 26 public static string $GET_CATEGORIES = "get-category"; 27 public static string $GET_POSTS = "get-post"; 28 public static string $GET_PAGES = "get-page"; 29 public static string $GET_POST_CONTENTS = "get-post-content"; 30 public static string $GET_PAGE_CONTENTS = "get-page-content"; 31 public static string $GET_POST_CONTENT_LOCAL = "get-post-content-local"; 32 public static string $GET_PAGE_CONTENT_LOCAL = "get-page-content-local"; 33 public static string $GET_USERS = "get-user"; 34 public static string $GET_TAGS = "get-tag"; 35 public static string $GET_ROLES = "get-role"; 36 37 public static string $ASSET_LINKS = "android-asset-links"; 38 public static string $SITE_ASSOCIATION = "apple-app-site-association"; 37 39 38 40 39 public static string $HOOK = "/appful/api";40 public static string $CREATE_COMMENT_HOOK = "create-comment";41 public static string $AUTHENTICATE_USER_HOOK = "authenticate-user";42 public static string $GET_PAGE_CONTENT_HOOK = "get-page-content-hook";41 public static string $HOOK = "/appful/api"; 42 public static string $CREATE_COMMENT_HOOK = "create-comment"; 43 public static string $AUTHENTICATE_USER_HOOK = "authenticate-user"; 44 public static string $GET_PAGE_CONTENT_HOOK = "get-page-content-hook"; 43 45 } -
appful-app/tags/3.1.22/includes/api/ReqHandler.php
r3027388 r3039311 30 30 use AppfulPlugin\Api\Handlers\RequestHandler; 31 31 use AppfulPlugin\Api\Handlers\RoleSyncRequestHandler; 32 use AppfulPlugin\Api\Handlers\SavePostSyncBatchSizeHandler; 32 33 use AppfulPlugin\Api\Handlers\SyncRequestHandler; 33 34 use AppfulPlugin\Api\Handlers\TagSyncRequestHandler; … … 39 40 40 41 class ReqHandler { 41 private array $request_handlers;42 private array $request_handlers; 42 43 43 public function __construct( UseCaseManager $use_case_manager ) { 44 $this->request_handlers = [ 45 new AndroidAssetLinkRequestHandler( $use_case_manager->get_android_asset_link_use_case() ), 46 new AppleAppSiteAssociationRequestHandler( $use_case_manager->get_apple_app_site_association_use_case() ), 47 new LogRequestHandler( $use_case_manager->get_logs_use_case() ), 48 new InfoRequestHandler( $use_case_manager->get_blog_info_use_case() ), 49 new PostSyncRequestHandler( $use_case_manager->posts()->get_sync_posts_use_case() ), 50 new GetPostsRequestHandler( $use_case_manager->get_posts_by_id_use_case() ), 51 new CategorySyncRequestHandler( $use_case_manager->sync_categories_use_case() ), 52 new GetCategoriesRequestHandler( $use_case_manager->get_categories_by_id_use_case() ), 53 new TagSyncRequestHandler( $use_case_manager->sync_tags_use_case() ), 54 new GetTagsRequestHandler( $use_case_manager->get_tags_by_id_use_case() ), 55 new GetAttachmentsRequestHandler( $use_case_manager->get_attachments_by_id_use_case() ), 56 new AttachmentSyncRequestHandler( $use_case_manager->sync_attachments_use_case() ), 57 new SyncRequestHandler( $use_case_manager->sync_all_use_case() ), 58 new GetCommentsRequestHandler( $use_case_manager->get_comments_by_id_use_case() ), 59 new CommentSyncRequestHandler( $use_case_manager->sync_comments_use_case() ), 60 new UserSyncRequestHandler( $use_case_manager->sync_users_use_case() ), 61 new GetUsersRequestHandler( $use_case_manager->get_users_by_id_use_case() ), 62 new GetPostContentsRequestHandler( $use_case_manager->get_post_contents_by_id_use_case() ), 63 new ClearLogRequestHandler( $use_case_manager->get_clear_logs_use_case() ), 64 new AuthenticateUserRequestHandler( $use_case_manager->get_authenticate_user_use_case() ), 65 new PullLocalPostContentRequestHandler( $use_case_manager->get_get_local_post_content_by_id_use_case() ), 66 new CreateCommentRequestHandler( $use_case_manager->create_comment_use_case() ), 67 new GetRolesRequestHandler( $use_case_manager->get_roles_by_id_use_case() ), 68 new RoleSyncRequestHandler( $use_case_manager->sync_roles_use_case() ), 69 new GetPagesRequestHandler( $use_case_manager->get_pages_by_id_use_case() ), 70 new PageSyncRequestHandler( $use_case_manager->sync_pages_use_case() ), 71 new GetPageContentsRequestHandler( $use_case_manager->pages()->get_page_contents_by_id_use_case() ), 72 new PullLocalPageContentRequestHandler( $use_case_manager->pages()->get_local_page_content_by_id_use_case() ), 73 new GetPageContentRequestHandler( $use_case_manager->pages()->get_page_contents_by_id_use_case() ), 74 ]; 75 } 44 public function __construct( UseCaseManager $use_case_manager ) { 45 $this->request_handlers = [ 46 new AndroidAssetLinkRequestHandler( $use_case_manager->get_android_asset_link_use_case() ), 47 new AppleAppSiteAssociationRequestHandler( $use_case_manager->get_apple_app_site_association_use_case() ), 48 new LogRequestHandler( $use_case_manager->get_logs_use_case() ), 49 new InfoRequestHandler( $use_case_manager->get_blog_info_use_case() ), 50 new PostSyncRequestHandler( $use_case_manager->posts()->get_sync_posts_use_case() ), 51 new GetPostsRequestHandler( $use_case_manager->get_posts_by_id_use_case() ), 52 new CategorySyncRequestHandler( $use_case_manager->sync_categories_use_case() ), 53 new GetCategoriesRequestHandler( $use_case_manager->get_categories_by_id_use_case() ), 54 new TagSyncRequestHandler( $use_case_manager->sync_tags_use_case() ), 55 new GetTagsRequestHandler( $use_case_manager->get_tags_by_id_use_case() ), 56 new GetAttachmentsRequestHandler( $use_case_manager->get_attachments_by_id_use_case() ), 57 new AttachmentSyncRequestHandler( $use_case_manager->sync_attachments_use_case() ), 58 new SyncRequestHandler( $use_case_manager->sync_all_use_case() ), 59 new GetCommentsRequestHandler( $use_case_manager->get_comments_by_id_use_case() ), 60 new CommentSyncRequestHandler( $use_case_manager->sync_comments_use_case() ), 61 new UserSyncRequestHandler( $use_case_manager->sync_users_use_case() ), 62 new GetUsersRequestHandler( $use_case_manager->get_users_by_id_use_case() ), 63 new GetPostContentsRequestHandler( $use_case_manager->get_post_contents_by_id_use_case() ), 64 new ClearLogRequestHandler( $use_case_manager->get_clear_logs_use_case() ), 65 new AuthenticateUserRequestHandler( $use_case_manager->get_authenticate_user_use_case() ), 66 new PullLocalPostContentRequestHandler( $use_case_manager->get_get_local_post_content_by_id_use_case() ), 67 new CreateCommentRequestHandler( $use_case_manager->create_comment_use_case() ), 68 new GetRolesRequestHandler( $use_case_manager->get_roles_by_id_use_case() ), 69 new RoleSyncRequestHandler( $use_case_manager->sync_roles_use_case() ), 70 new GetPagesRequestHandler( $use_case_manager->get_pages_by_id_use_case() ), 71 new PageSyncRequestHandler( $use_case_manager->sync_pages_use_case() ), 72 new GetPageContentsRequestHandler( $use_case_manager->pages()->get_page_contents_by_id_use_case() ), 73 new PullLocalPageContentRequestHandler( $use_case_manager->pages()->get_local_page_content_by_id_use_case() ), 74 new GetPageContentRequestHandler( $use_case_manager->pages()->get_page_contents_by_id_use_case() ), 75 new SavePostSyncBatchSizeHandler( $use_case_manager->posts()->get_save_post_sync_batch_size_use_case() ) 76 ]; 77 } 76 78 77 public function handle_request( PluginRequest $request ): PluginResponse {78 foreach ( $this->request_handlers as $request_handler ) {79 if ( $request_handler instanceof RequestHandler ) {80 if ( $request_handler->can_handle_request( $request ) ) {81 return $request_handler->handle_request( $request );82 }83 }84 }79 public function handle_request( PluginRequest $request ): PluginResponse { 80 foreach ( $this->request_handlers as $request_handler ) { 81 if ( $request_handler instanceof RequestHandler ) { 82 if ( $request_handler->can_handle_request( $request ) ) { 83 return $request_handler->handle_request( $request ); 84 } 85 } 86 } 85 87 86 Logger::error( "Did not find handler for action: " . $request->get_action() );88 Logger::error( "Did not find handler for action: " . $request->get_action() ); 87 89 88 return PluginResponse::plugin_response()->status( 404 );89 }90 return PluginResponse::plugin_response()->status( 404 ); 91 } 90 92 } -
appful-app/tags/3.1.22/includes/api/dtos/BlogHooksDto.php
r2978062 r3039311 4 4 5 5 class BlogHooksDto { 6 public ?string $create_comment;7 public ?string $authenticate_user;8 public ?string $get_page_content;6 public ?string $create_comment; 7 public ?string $authenticate_user; 8 public ?string $get_page_content; 9 9 10 public function __construct(11 ?string $create_comment,12 ?string $authenticate_user,13 ?string $get_page_content14 ) {15 $this->create_comment = $create_comment;16 $this->authenticate_user = $authenticate_user;17 $this->get_page_content = $get_page_content;18 }10 public function __construct( 11 ?string $create_comment, 12 ?string $authenticate_user, 13 ?string $get_page_content 14 ) { 15 $this->create_comment = $create_comment; 16 $this->authenticate_user = $authenticate_user; 17 $this->get_page_content = $get_page_content; 18 } 19 19 } -
appful-app/tags/3.1.22/includes/api/dtos/BlogInfoDto.php
r3019874 r3039311 4 4 5 5 class BlogInfoDto { 6 public string $hostname; 7 public string $site_url; 8 public array $languages; 9 public string $token; 10 public ?BlogHooksDto $hooks; 11 public string $version; 12 public ?BlogStatsDto $stats; 6 public string $hostname; 7 public string $site_url; 8 public array $languages; 9 public string $token; 10 public ?BlogHooksDto $hooks; 11 public string $version; 12 public ?BlogStatsDto $stats; 13 public ?BlogSettingsDto $settings; 13 14 14 public function __construct( string $hostname, string $site_url, array $languages, string $token, ?BlogHooksDto $hooks, string $version, ?BlogStatsDto $stats ) { 15 $this->hostname = $hostname; 16 $this->site_url = $site_url; 17 $this->languages = $languages; 18 $this->token = $token; 19 $this->hooks = $hooks; 20 $this->version = $version; 21 $this->stats = $stats; 22 } 15 public function __construct( string $hostname, string $site_url, array $languages, string $token, ?BlogHooksDto $hooks, string $version, ?BlogStatsDto $stats, ?BlogSettingsDto $settings ) { 16 $this->hostname = $hostname; 17 $this->site_url = $site_url; 18 $this->languages = $languages; 19 $this->token = $token; 20 $this->hooks = $hooks; 21 $this->version = $version; 22 $this->stats = $stats; 23 $this->settings = $settings; 24 } 23 25 } -
appful-app/tags/3.1.22/includes/api/handlers/CreateCommentRequestHandler.php
r3018629 r3039311 12 12 13 13 class CreateCommentRequestHandler implements RequestHandler { 14 private CreateCommentUseCase $create_comment_use_case;14 private CreateCommentUseCase $create_comment_use_case; 15 15 16 public function __construct(16 public function __construct( 17 17 CreateCommentUseCase $create_comment_use_case 18 ) {19 $this->create_comment_use_case = $create_comment_use_case;20 }18 ) { 19 $this->create_comment_use_case = $create_comment_use_case; 20 } 21 21 22 public function can_handle_request( PluginRequest $request ): bool {23 return $request->get_action() == Endpoints::$CREATE_COMMENT_HOOK;24 }22 public function can_handle_request( PluginRequest $request ): bool { 23 return $request->get_action() == Endpoints::$CREATE_COMMENT_HOOK; 24 } 25 25 26 26 public function handle_request( PluginRequest $request ): PluginResponse { … … 31 31 32 32 // required fields 33 if ( !isset($data["username"], $data["email"], $data["content"], $data["post_id"])) {33 if ( ! isset( $data["username"], $data["email"], $data["content"], $data["post_id"] ) ) { 34 34 Logger::error( "Some parameters for create comment are missing" ); 35 35 36 return PluginResponse::plugin_response()->status( 400 ); // Bad Request 36 37 } 37 38 38 39 // sanitize fields 39 $username = sanitize_text_field( $data["username"] );40 $email = sanitize_text_field( $data["email"] );41 $content = sanitize_text_field( $data["content"] );42 $post_id = intval($data["post_id"]);40 $username = sanitize_text_field( $data["username"] ); 41 $email = sanitize_text_field( $data["email"] ); 42 $content = sanitize_text_field( $data["content"] ); 43 $post_id = intval( $data["post_id"] ); 43 44 44 45 // optional field 45 $parent_id = isset( $data["parent_id"]) ? intval($data["parent_id"]) : null;46 $parent_id = isset( $data["parent_id"] ) ? intval( $data["parent_id"] ) : null; 46 47 47 48 $request = new CreateCommentRequest( $username, $email, $content, $post_id, $parent_id ); … … 50 51 if ( $comment == null ) { 51 52 Logger::error( "Creating comment failed" ); 53 52 54 return PluginResponse::plugin_response()->status( 503 ); 53 55 } 54 56 55 $comment_dto = CommentMapper::to_dto( $comment);57 $comment_dto = CommentMapper::to_dto( $comment ); 56 58 57 59 return PluginResponse::plugin_response()->body( $comment_dto ); -
appful-app/tags/3.1.22/includes/api/handlers/GetPostContentsRequestHandler.php
r3018629 r3039311 12 12 13 13 class GetPostContentsRequestHandler implements RequestHandler { 14 private GetPostContentsByIdUseCase $get_post_contents_by_id_use_case;14 private GetPostContentsByIdUseCase $get_post_contents_by_id_use_case; 15 15 16 public function __construct(17 GetPostContentsByIdUseCase $get_post_contents_by_id_use_case18 ) {19 $this->get_post_contents_by_id_use_case = $get_post_contents_by_id_use_case;20 }16 public function __construct( 17 GetPostContentsByIdUseCase $get_post_contents_by_id_use_case 18 ) { 19 $this->get_post_contents_by_id_use_case = $get_post_contents_by_id_use_case; 20 } 21 21 22 public function can_handle_request( PluginRequest $request ): bool {23 return $request->get_action() == Endpoints::$GET_POST_CONTENTS;24 }22 public function can_handle_request( PluginRequest $request ): bool { 23 return $request->get_action() == Endpoints::$GET_POST_CONTENTS; 24 } 25 25 26 public function handle_request( PluginRequest $request ): PluginResponse {27 Logger::debug( "Found handler for Appful request" );26 public function handle_request( PluginRequest $request ): PluginResponse { 27 Logger::debug( "Found handler for Appful request" ); 28 28 29 // Because there could be a huge amount of posts, increase the timeout to 10min30 set_time_limit( 60 * 10 );29 // Because there could be a huge amount of posts, increase the timeout to 10min 30 set_time_limit( 60 * 10 ); 31 31 32 if ( ! isset( $_GET['ids'] ) ) {33 return PluginResponse::plugin_response()->status( 400 );34 }32 if ( ! isset( $_GET['ids'] ) ) { 33 return PluginResponse::plugin_response()->status( 400 ); 34 } 35 35 36 $cleanedIds = sanitize_text_field( $_GET['ids'] );37 $ids = array_map(38 function ( $id ) {39 return absint( $id );40 },41 explode( ",", $cleanedIds )42 );36 $cleanedIds = sanitize_text_field( $_GET['ids'] ); 37 $ids = array_map( 38 function ( $id ) { 39 return absint( $id ); 40 }, 41 explode( ",", $cleanedIds ) 42 ); 43 43 44 Logger::debug( "Sending post contents for ids " . json_encode( $ids ) );44 Logger::debug( "Sending post contents for ids " . json_encode( $ids ) ); 45 45 46 $postContents = $this->get_post_contents_by_id_use_case->invoke( $ids );46 $postContents = $this->get_post_contents_by_id_use_case->invoke( $ids ); 47 47 48 $post_content_dtos = array_map(49 function ( PostContent $post_content ) {50 return PostContentMapper::to_dto( $post_content );51 },52 $postContents53 );48 $post_content_dtos = array_map( 49 function ( PostContent $post_content ) { 50 return PostContentMapper::to_dto( $post_content ); 51 }, 52 $postContents 53 ); 54 54 55 return PluginResponse::plugin_response()->body( $post_content_dtos );56 }55 return PluginResponse::plugin_response()->body( $post_content_dtos ); 56 } 57 57 } -
appful-app/tags/3.1.22/includes/api/mapper/BlogInfoMapper.php
r3028218 r3039311 7 7 8 8 class BlogInfoMapper { 9 public static function to_dto( BlogInfo $blog_info ): BlogInfoDto {10 if ( $blog_info->get_stats() == null ) {11 $stats = null;12 } else {13 $stats = BlogStatsMapper::to_dto( $blog_info->get_stats() );14 }9 public static function to_dto( BlogInfo $blog_info ): BlogInfoDto { 10 if ( $blog_info->get_stats() == null ) { 11 $stats = null; 12 } else { 13 $stats = BlogStatsMapper::to_dto( $blog_info->get_stats() ); 14 } 15 15 16 if($blog_info->get_hooks() == null) {17 $hooks = null;18 } else {19 $hooks = BlogHooksMapper::to_dto( $blog_info->get_hooks() );20 }16 if ( $blog_info->get_hooks() == null ) { 17 $hooks = null; 18 } else { 19 $hooks = BlogHooksMapper::to_dto( $blog_info->get_hooks() ); 20 } 21 21 22 return new BlogInfoDto( 23 $blog_info->get_hostname(), 24 $blog_info->get_site_url(), 25 $blog_info->get_languages(), 26 $blog_info->get_token(), 27 $hooks, 28 "3.1.21", 29 $stats 30 ); 31 } 22 if ( $blog_info->get_settings() == null ) { 23 $settings = null; 24 } else { 25 $settings = BlogSettingsMapper::to_dto( $blog_info->get_settings() ); 26 } 27 28 return new BlogInfoDto( 29 $blog_info->get_hostname(), 30 $blog_info->get_site_url(), 31 $blog_info->get_languages(), 32 $blog_info->get_token(), 33 $hooks, 34 "3.1.22", 35 $stats, 36 $settings 37 ); 38 } 32 39 } -
appful-app/tags/3.1.22/includes/domain/BlogInfo.php
r3019874 r3039311 4 4 5 5 class BlogInfo { 6 private string $hostname = ""; 7 private string $site_url = ""; 8 private array $languages = []; 9 private string $token = ""; 10 private ?BlogHooks $hooks = null; 11 private ?BlogStats $stats = null; 6 private string $hostname = ""; 7 private string $site_url = ""; 8 private array $languages = []; 9 private string $token = ""; 10 private ?BlogHooks $hooks = null; 11 private ?BlogStats $stats = null; 12 private ?BlogSettings $settings = null; 12 13 13 public static function blog_info( 14 string $hostname = "", 15 string $site_url = "", 16 array $languages = [], 17 string $token = "", 18 ?BlogHooks $hooks = null, 19 ?BlogStats $stats = null 20 ): BlogInfo { 21 return ( new BlogInfo() ) 22 ->hostname( $hostname ) 23 ->site_url( $site_url ) 24 ->languages( $languages ) 25 ->token( $token ) 26 ->hooks( $hooks ) 27 ->stats( $stats ); 28 } 14 private function __construct() { 15 } 29 16 30 public function languages( array $languages ): BlogInfo { 31 $this->languages = $languages; 17 public static function blog_info(): BlogInfo { 18 return new BlogInfo(); 19 } 32 20 33 return $this; 34 } 21 public function languages( array $languages ): BlogInfo { 22 $this->languages = $languages; 35 23 36 public function site_url( string $site_url ): BlogInfo { 37 $this->site_url = $site_url; 24 return $this; 25 } 38 26 39 return $this; 40 } 27 public function settings( ?BlogSettings $settings ): BlogInfo { 28 $this->settings = $settings; 41 29 42 public function hostname( string $hostname ): BlogInfo { 43 $this->hostname = $hostname; 30 return $this; 31 } 44 32 45 return $this; 46 } 33 public function site_url( string $site_url ): BlogInfo { 34 $this->site_url = $site_url; 47 35 48 public function token( string $token ): BlogInfo { 49 $this->token = $token; 36 return $this; 37 } 50 38 51 return $this; 52 } 39 public function hostname( string $hostname ): BlogInfo { 40 $this->hostname = $hostname; 53 41 54 public function hooks( ?BlogHooks $hooks ): BlogInfo { 55 $this->hooks = $hooks; 42 return $this; 43 } 56 44 57 return $this; 58 } 45 public function token( string $token ): BlogInfo { 46 $this->token = $token; 59 47 60 public function stats( ?BlogStats $stats ): BlogInfo { 61 $this->stats = $stats; 48 return $this; 49 } 62 50 63 return $this; 64 } 51 public function hooks( ?BlogHooks $hooks ): BlogInfo { 52 $this->hooks = $hooks; 65 53 66 public function get_site_url(): string { 67 return $this->site_url; 68 } 54 return $this; 55 } 69 56 70 public function get_languages(): array { 71 return $this->languages; 72 } 57 public function stats( ?BlogStats $stats ): BlogInfo { 58 $this->stats = $stats; 73 59 74 public function get_hostname(): string { 75 return $this->hostname; 76 } 60 return $this; 61 } 77 62 78 public function get_token(): string {79 return $this->token;80 }63 public function get_site_url(): string { 64 return $this->site_url; 65 } 81 66 82 public function get_hooks(): ?BlogHooks{83 return $this->hooks;84 }67 public function get_languages(): array { 68 return $this->languages; 69 } 85 70 86 public function get_stats(): ?BlogStats { 87 return $this->stats; 88 } 71 public function get_hostname(): string { 72 return $this->hostname; 73 } 74 75 public function get_token(): string { 76 return $this->token; 77 } 78 79 public function get_hooks(): ?BlogHooks { 80 return $this->hooks; 81 } 82 83 public function get_stats(): ?BlogStats { 84 return $this->stats; 85 } 86 87 public function get_settings(): ?BlogSettings { 88 return $this->settings; 89 } 89 90 } -
appful-app/tags/3.1.22/includes/helper/Constants.php
r3027388 r3039311 4 4 5 5 class Constants { 6 public static bool $APPFUL_DEBUG = false;6 public static bool $APPFUL_DEBUG = false; 7 7 8 public static string $PLUGIN_ROOT_DIR = "/appful-app";9 public static string $PLUGIN_ROOT_FILE = "/appful-app.php";8 public static string $PLUGIN_ROOT_DIR = "/appful-app"; 9 public static string $PLUGIN_ROOT_FILE = "/appful-app.php"; 10 10 11 public static string $APPFUL_SESSION_ID_KEY = "appful-app_session_id";12 public static string $APPFUL_USERNAME_KEY = "appful-app_username";13 public static string $APPFUL_BLOG_ID_KEY = "appful-app_blog_id";11 public static string $APPFUL_SESSION_ID_KEY = "appful-app_session_id"; 12 public static string $APPFUL_USERNAME_KEY = "appful-app_username"; 13 public static string $APPFUL_BLOG_ID_KEY = "appful-app_blog_id"; 14 14 15 public static string $APPFUL_CLIENT_SESSION_KEY = "appful-app_client_token_id"; 16 public static string $APPFUL_LAST_ERROR_KEY = "appful-app_last_error"; 17 public static string $APPFUL_APPLE_APP_SITE_ASSOCIATION = "appful-app_apple_app_site_association"; 18 public static string $APPFUL_ANDROID_ASSET_LINK = "appful-app_android_asset_link"; 15 public static string $APPFUL_CLIENT_SESSION_KEY = "appful-app_client_token_id"; 16 public static string $APPFUL_LAST_ERROR_KEY = "appful-app_last_error"; 17 public static string $APPFUL_APPLE_APP_SITE_ASSOCIATION = "appful-app_apple_app_site_association"; 18 public static string $APPFUL_ANDROID_ASSET_LINK = "appful-app_android_asset_link"; 19 public static string $APPFUL_POST_SYNC_BATCH_SIZE_KEY = "appful-app_post_sync_batch_size"; 19 20 20 public static string $APPFUL_TERM_IMAGE_META_KEY = "appful-app_term_image";21 public static string $APPFUL_TERM_IMAGE_META_KEY = "appful-app_term_image"; 21 22 22 public static string $APPFUL_TAXONOMY_NAME = "appful";23 public static string $APPFUL_TAXONOMY_PUSH_TERM_NAME = "Don't send notification";24 public static string $APPFUL_TAXONOMY_PUSH_TERM_SLUG = "push";23 public static string $APPFUL_TAXONOMY_NAME = "appful"; 24 public static string $APPFUL_TAXONOMY_PUSH_TERM_NAME = "Don't send notification"; 25 public static string $APPFUL_TAXONOMY_PUSH_TERM_SLUG = "push"; 25 26 26 27 public static string $APPFUL_API_URL = "https://api.wordpress.appful.io"; 27 28 28 public static string $BLOG_PATH = "/blogs";29 public static string $APPFUL_USER_PATH = "/appfulUsers";30 public static string $USER_PATH = "/users";31 public static string $POST_PATH = "/posts";32 public static string $APP_SETTINGS_PATH = "/app/settings";33 public static string $PAGE_PATH = "/pages";34 public static string $COMMENT_PATH = "/comments";35 public static string $ATTACHMENT_PATH = "/attachments";36 public static string $TAXONOMY_PATH = "/taxonomies";37 public static string $ROLE_PATH = "/roles";29 public static string $BLOG_PATH = "/blogs"; 30 public static string $APPFUL_USER_PATH = "/appfulUsers"; 31 public static string $USER_PATH = "/users"; 32 public static string $POST_PATH = "/posts"; 33 public static string $APP_SETTINGS_PATH = "/app/settings"; 34 public static string $PAGE_PATH = "/pages"; 35 public static string $COMMENT_PATH = "/comments"; 36 public static string $ATTACHMENT_PATH = "/attachments"; 37 public static string $TAXONOMY_PATH = "/taxonomies"; 38 public static string $ROLE_PATH = "/roles"; 38 39 39 public static string $API_VERSION_1 = "/v1";40 public static string $API_VERSION_1 = "/v1"; 40 41 41 public static int $POST_SYNC_CHUNK_SIZE = 70;42 public static int $PAGE_SYNC_CHUNK_SIZE = 10;43 public static int $COMMENT_SYNC_CHUNK_SIZE = 100;44 public static int $ATTACHMENT_SYNC_CHUNK_SIZE = 200;45 public static int $USER_SYNC_CHUNK_SIZE = 50;46 public static int $CATEGORY_SYNC_CHUNK_SIZE = 50;47 public static int $TAG_SYNC_CHUNK_SIZE = 50;48 public static int $ROLE_SYNC_CHUNK_SIZE = 50;42 public static int $POST_SYNC_CHUNK_SIZE = 10; 43 public static int $PAGE_SYNC_CHUNK_SIZE = 5; 44 public static int $COMMENT_SYNC_CHUNK_SIZE = 15; 45 public static int $ATTACHMENT_SYNC_CHUNK_SIZE = 50; 46 public static int $USER_SYNC_CHUNK_SIZE = 15; 47 public static int $CATEGORY_SYNC_CHUNK_SIZE = 15; 48 public static int $TAG_SYNC_CHUNK_SIZE = 15; 49 public static int $ROLE_SYNC_CHUNK_SIZE = 15; 49 50 } -
appful-app/tags/3.1.22/includes/use_cases/post/PostUseCaseManager.php
r3027388 r3039311 6 6 7 7 class PostUseCaseManager { 8 private GetTaxonomyPostSyncItemsUseCase $get_taxonomy_post_sync_items_use_case;9 private GetPostSyncItemsUseCase $get_post_sync_data_use_case;10 private GetPostSyncItemUseCase $get_post_sync_item_use_case;8 private GetTaxonomyPostSyncItemsUseCase $get_taxonomy_post_sync_items_use_case; 9 private GetPostSyncItemsUseCase $get_post_sync_data_use_case; 10 private GetPostSyncItemUseCase $get_post_sync_item_use_case; 11 11 12 private SendPostChunkSyncUseCase $send_post_chunk_sync_use_case;13 private SendPostSyncUseCase $send_post_sync_use_case;12 private SendPostChunkSyncUseCase $send_post_chunk_sync_use_case; 13 private SendPostSyncUseCase $send_post_sync_use_case; 14 14 15 private SyncTaxonomyPostsUseCase $sync_taxonomy_posts_use_case;16 private SyncPostsUseCase $sync_posts_use_case;17 private SyncPostUseCase $sync_post_use_case;15 private SyncTaxonomyPostsUseCase $sync_taxonomy_posts_use_case; 16 private SyncPostsUseCase $sync_posts_use_case; 17 private SyncPostUseCase $sync_post_use_case; 18 18 19 public function __construct( BackendClient $backend_client ) { 20 $this->get_post_sync_item_use_case = new GetPostSyncItemUseCase(); 21 $this->get_post_sync_data_use_case = new GetPostSyncItemsUseCase(); 22 $this->get_taxonomy_post_sync_items_use_case = new GetTaxonomyPostSyncItemsUseCase(); 19 private GetPostSyncBatchSizeUseCase $get_post_sync_batch_size_use_case; 20 private SavePostSyncBatchSizeUseCase $save_post_sync_batch_size_use_case; 23 21 24 $this->send_post_chunk_sync_use_case = new SendPostChunkSyncUseCase( $backend_client ); 25 $this->send_post_sync_use_case = new SendPostSyncUseCase( $backend_client ); 22 public function __construct( BackendClient $backend_client ) { 23 $this->get_post_sync_batch_size_use_case = new GetPostSyncBatchSizeUseCase(); 24 $this->save_post_sync_batch_size_use_case = new SavePostSyncBatchSizeUseCase(); 26 25 27 $this->sync_posts_use_case = new SyncPostsUseCase( $this->get_post_sync_data_use_case, $this->send_post_chunk_sync_use_case ); 28 $this->sync_post_use_case = new SyncPostUseCase( $this->get_post_sync_item_use_case, $this->send_post_sync_use_case ); 29 $this->sync_taxonomy_posts_use_case = new SyncTaxonomyPostsUseCase( $this->get_taxonomy_post_sync_items_use_case, $this->send_post_chunk_sync_use_case ); 30 } 26 $this->get_post_sync_item_use_case = new GetPostSyncItemUseCase(); 27 $this->get_post_sync_data_use_case = new GetPostSyncItemsUseCase(); 28 $this->get_taxonomy_post_sync_items_use_case = new GetTaxonomyPostSyncItemsUseCase(); 31 29 32 public function get_sync_post_use_case(): SyncPostUseCase { 33 return $this->sync_post_use_case; 34 } 30 $this->send_post_chunk_sync_use_case = new SendPostChunkSyncUseCase( $backend_client ); 31 $this->send_post_sync_use_case = new SendPostSyncUseCase( $backend_client ); 35 32 36 public function get_sync_posts_use_case(): SyncPostsUseCase { 37 return $this->sync_posts_use_case; 38 } 33 $this->sync_posts_use_case = new SyncPostsUseCase( $this->get_post_sync_data_use_case, $this->send_post_chunk_sync_use_case, $this->get_post_sync_batch_size_use_case ); 34 $this->sync_post_use_case = new SyncPostUseCase( $this->get_post_sync_item_use_case, $this->send_post_sync_use_case ); 35 $this->sync_taxonomy_posts_use_case = new SyncTaxonomyPostsUseCase( $this->get_taxonomy_post_sync_items_use_case, $this->send_post_chunk_sync_use_case, $this->get_post_sync_batch_size_use_case ); 36 } 39 37 40 public function get_sync_taxonomy_posts_use_case(): SyncTaxonomyPostsUseCase { 41 return $this->sync_taxonomy_posts_use_case; 42 } 38 public function get_sync_post_use_case(): SyncPostUseCase { 39 return $this->sync_post_use_case; 40 } 41 42 public function get_sync_posts_use_case(): SyncPostsUseCase { 43 return $this->sync_posts_use_case; 44 } 45 46 public function get_sync_taxonomy_posts_use_case(): SyncTaxonomyPostsUseCase { 47 return $this->sync_taxonomy_posts_use_case; 48 } 49 50 public function get_post_sync_batch_size_use_case(): GetPostSyncBatchSizeUseCase { 51 return $this->get_post_sync_batch_size_use_case; 52 } 53 54 public function get_save_post_sync_batch_size_use_case(): SavePostSyncBatchSizeUseCase { 55 return $this->save_post_sync_batch_size_use_case; 56 } 43 57 } -
appful-app/tags/3.1.22/includes/use_cases/post/SyncPostsUseCase.php
r3027388 r3039311 4 4 5 5 use AppfulPlugin\Domain\SyncChunk; 6 use AppfulPlugin\Helper\Constants;7 6 use AppfulPlugin\Wp\WPPostManager; 8 7 9 8 class SyncPostsUseCase { 10 private GetPostSyncItemsUseCase $get_post_sync_data_use_case; 11 private SendPostChunkSyncUseCase $send_post_chunk_sync_use_case; 9 private GetPostSyncItemsUseCase $get_post_sync_data_use_case; 10 private SendPostChunkSyncUseCase $send_post_chunk_sync_use_case; 11 private GetPostSyncBatchSizeUseCase $get_post_sync_batch_size_use_case; 12 12 13 public function __construct( 14 GetPostSyncItemsUseCase $get_post_sync_data_use_case, 15 SendPostChunkSyncUseCase $send_post_chunk_sync_use_case 16 ) { 17 $this->get_post_sync_data_use_case = $get_post_sync_data_use_case; 18 $this->send_post_chunk_sync_use_case = $send_post_chunk_sync_use_case; 19 } 13 public function __construct( 14 GetPostSyncItemsUseCase $get_post_sync_data_use_case, 15 SendPostChunkSyncUseCase $send_post_chunk_sync_use_case, 16 GetPostSyncBatchSizeUseCase $get_post_sync_batch_size_use_case 17 ) { 18 $this->get_post_sync_data_use_case = $get_post_sync_data_use_case; 19 $this->send_post_chunk_sync_use_case = $send_post_chunk_sync_use_case; 20 $this->get_post_sync_batch_size_use_case = $get_post_sync_batch_size_use_case; 21 } 20 22 21 public function invoke() {22 $sync_id = uniqid();23 $batch_size = WPPostManager::get_post_count();24 $chunk_size = Constants::$POST_SYNC_CHUNK_SIZE;23 public function invoke() { 24 $sync_id = uniqid(); 25 $batch_size = WPPostManager::get_post_count(); 26 $chunk_size = $this->get_post_sync_batch_size_use_case->invoke(); 25 27 26 $chunk = 0;27 while ( true ) {28 $post_sync_items = $this->get_post_sync_data_use_case->invoke($chunk * $chunk_size, $chunk_size);28 $chunk = 0; 29 while ( true ) { 30 $post_sync_items = $this->get_post_sync_data_use_case->invoke( $chunk * $chunk_size, $chunk_size ); 29 31 30 $this->send_post_chunk_sync_use_case->invoke(31 SyncChunk::syncChunk()32 ->batch_id( $sync_id )33 ->chunk_size( $chunk_size )34 ->batch_size( $batch_size )35 ->chunk_items( $post_sync_items )36 );32 $this->send_post_chunk_sync_use_case->invoke( 33 SyncChunk::syncChunk() 34 ->batch_id( $sync_id ) 35 ->chunk_size( $chunk_size ) 36 ->batch_size( $batch_size ) 37 ->chunk_items( $post_sync_items ) 38 ); 37 39 38 $chunk ++;40 $chunk ++; 39 41 40 if ( count( $post_sync_items ) < $chunk_size ) {41 break;42 }43 }44 }42 if ( count( $post_sync_items ) < $chunk_size ) { 43 break; 44 } 45 } 46 } 45 47 } -
appful-app/tags/3.1.22/includes/use_cases/post/SyncTaxonomyPostsUseCase.php
r3027388 r3039311 4 4 5 5 use AppfulPlugin\Domain\SyncChunk; 6 use AppfulPlugin\Helper\Constants;7 6 use AppfulPlugin\Wp\WPPostManager; 8 7 9 8 class SyncTaxonomyPostsUseCase { 10 private GetTaxonomyPostSyncItemsUseCase $get_taxonomy_post_sync_items_use_case; 11 private SendPostChunkSyncUseCase $send_post_chunk_sync_use_case; 9 private GetTaxonomyPostSyncItemsUseCase $get_taxonomy_post_sync_items_use_case; 10 private SendPostChunkSyncUseCase $send_post_chunk_sync_use_case; 11 private GetPostSyncBatchSizeUseCase $get_post_sync_batch_size_use_case; 12 12 13 public function __construct( 14 GetTaxonomyPostSyncItemsUseCase $get_taxonomy_post_sync_items_use_case, 15 SendPostChunkSyncUseCase $send_post_chunk_sync_use_case 16 ) { 17 $this->get_taxonomy_post_sync_items_use_case = $get_taxonomy_post_sync_items_use_case; 18 $this->send_post_chunk_sync_use_case = $send_post_chunk_sync_use_case; 19 } 13 public function __construct( 14 GetTaxonomyPostSyncItemsUseCase $get_taxonomy_post_sync_items_use_case, 15 SendPostChunkSyncUseCase $send_post_chunk_sync_use_case, 16 GetPostSyncBatchSizeUseCase $get_post_sync_batch_size_use_case 17 ) { 18 $this->get_taxonomy_post_sync_items_use_case = $get_taxonomy_post_sync_items_use_case; 19 $this->send_post_chunk_sync_use_case = $send_post_chunk_sync_use_case; 20 $this->get_post_sync_batch_size_use_case = $get_post_sync_batch_size_use_case; 21 } 20 22 21 public function invoke( string $taxonomy, string $term_slug ) {22 $sync_id = uniqid();23 $batch_size = WPPostManager::get_taxonomy_post_count( $taxonomy, $term_slug );24 $chunk_size = Constants::$POST_SYNC_CHUNK_SIZE;23 public function invoke( string $taxonomy, string $term_slug ) { 24 $sync_id = uniqid(); 25 $batch_size = WPPostManager::get_taxonomy_post_count( $taxonomy, $term_slug ); 26 $chunk_size = $this->get_post_sync_batch_size_use_case->invoke(); 25 27 26 $chunk = 0;27 while ( true ) {28 $post_sync_items = $this->get_taxonomy_post_sync_items_use_case->invoke( $taxonomy, $term_slug, $chunk * $chunk_size, $chunk_size );28 $chunk = 0; 29 while ( true ) { 30 $post_sync_items = $this->get_taxonomy_post_sync_items_use_case->invoke( $taxonomy, $term_slug, $chunk * $chunk_size, $chunk_size ); 29 31 30 $this->send_post_chunk_sync_use_case->invoke(31 SyncChunk::syncChunk()32 ->batch_id( $sync_id )33 ->chunk_size( $chunk_size )34 ->batch_size( $batch_size )35 ->chunk_items( $post_sync_items )36 );32 $this->send_post_chunk_sync_use_case->invoke( 33 SyncChunk::syncChunk() 34 ->batch_id( $sync_id ) 35 ->chunk_size( $chunk_size ) 36 ->batch_size( $batch_size ) 37 ->chunk_items( $post_sync_items ) 38 ); 37 39 38 $chunk ++;40 $chunk ++; 39 41 40 if ( count( $post_sync_items ) < $chunk_size ) {41 break;42 }43 }44 }42 if ( count( $post_sync_items ) < $chunk_size ) { 43 break; 44 } 45 } 46 } 45 47 } -
appful-app/tags/3.1.22/includes/wp/WPBlogManager.php
r3019874 r3039311 6 6 use AppfulPlugin\Domain\BlogHooks; 7 7 use AppfulPlugin\Domain\BlogInfo; 8 use AppfulPlugin\Domain\BlogSettings; 8 9 use AppfulPlugin\Domain\BlogStats; 9 10 use AppfulPlugin\Helper\ClientTokenManager; 11 use AppfulPlugin\UseCases\Post\GetPostSyncBatchSizeUseCase; 10 12 use AppfulPlugin\Wp\Plugins\LanguageHelper; 11 13 12 14 class WPBlogManager { 13 public static function get_blog_info(): BlogInfo { 14 return BlogInfo::blog_info() 15 ->hostname( self::get_hostname() ) 16 ->site_url( self::get_site_url() ) 17 ->languages( self::get_languages() ) 18 ->token( ClientTokenManager::getToken() ?? ClientTokenManager::createSession() ) 19 ->hooks( self::get_hooks() ) 20 ->stats( self::get_stats() ); 21 } 15 public static function get_blog_info(): BlogInfo { 16 return BlogInfo::blog_info() 17 ->hostname( self::get_hostname() ) 18 ->site_url( self::get_site_url() ) 19 ->languages( self::get_languages() ) 20 ->token( ClientTokenManager::getToken() ?? ClientTokenManager::createSession() ) 21 ->hooks( self::get_hooks() ) 22 ->stats( self::get_stats() ) 23 ->settings( self::get_settings() ); 24 } 22 25 23 private static function get_hooks(): BlogHooks {24 return BlogHooks::init()25 ->create_comment( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$CREATE_COMMENT_HOOK )26 ->authenticate_user( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$AUTHENTICATE_USER_HOOK )27 ->get_page_content( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$GET_PAGE_CONTENT_HOOK );28 }26 private static function get_hooks(): BlogHooks { 27 return BlogHooks::init() 28 ->create_comment( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$CREATE_COMMENT_HOOK ) 29 ->authenticate_user( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$AUTHENTICATE_USER_HOOK ) 30 ->get_page_content( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$GET_PAGE_CONTENT_HOOK ); 31 } 29 32 30 private static function get_stats(): BlogStats {31 return BlogStats::init()32 ->attachment_count( WPAttachmentManager::get_attachment_count() )33 ->post_count( WPPostManager::get_post_count() )34 ->user_count( WPUserManager::get_user_count() )35 ->page_count( WPPageManager::get_page_count() )36 ->comment_count( WPCommentManager::get_comment_count() );37 }33 private static function get_stats(): BlogStats { 34 return BlogStats::init() 35 ->attachment_count( WPAttachmentManager::get_attachment_count() ) 36 ->post_count( WPPostManager::get_post_count() ) 37 ->user_count( WPUserManager::get_user_count() ) 38 ->page_count( WPPageManager::get_page_count() ) 39 ->comment_count( WPCommentManager::get_comment_count() ); 40 } 38 41 39 private static function get_hostname(): string { 40 $siteUrl = self::get_site_url(); 42 private static function get_settings(): BlogSettings { 43 return BlogSettings::init() 44 ->post_sync_batch_size( ( new GetPostSyncBatchSizeUseCase() )->invoke() ); 45 } 41 46 42 return parse_url( $siteUrl, PHP_URL_HOST ); 43 } 47 private static function get_hostname(): string { 48 $siteUrl = self::get_site_url(); 44 49 45 private static function get_site_url(): string { 46 return get_site_url(); 47 } 50 return parse_url( $siteUrl, PHP_URL_HOST ); 51 } 48 52 49 private static function get_languages(): array{50 return LanguageHelper::get_languages();51 }53 private static function get_site_url(): string { 54 return get_site_url(); 55 } 52 56 53 public static function get_blog_language(): string { 54 return substr( get_bloginfo( "language" ), 0, 2 ) ?? ""; 55 } 57 private static function get_languages(): array { 58 return LanguageHelper::get_languages(); 59 } 60 61 public static function get_blog_language(): string { 62 return substr( get_bloginfo( "language" ), 0, 2 ) ?? ""; 63 } 56 64 } -
appful-app/tags/3.1.22/includes/wp/WPOptionsManager.php
r2936340 r3039311 6 6 7 7 class WPOptionsManager { 8 private static function save_option( string $key, ?string $value ): bool {9 if ( $value == null ) {10 return delete_option( $key );11 }8 private static function save_option( string $key, ?string $value ): bool { 9 if ( $value == null ) { 10 return delete_option( $key ); 11 } 12 12 13 $current_value = get_option( $key, null );14 if ( $current_value != null ) {15 return update_option( $key, $value );16 } else {17 return add_option( $key, $value );18 }19 }13 $current_value = get_option( $key, null ); 14 if ( $current_value != null ) { 15 return update_option( $key, $value ); 16 } else { 17 return add_option( $key, $value ); 18 } 19 } 20 20 21 private static function get_option( string $key, $default = null ) {22 return get_option( $key, $default );23 }21 private static function get_option( string $key, $default = null ) { 22 return get_option( $key, $default ); 23 } 24 24 25 public static function save_app_site_association( string $value ) {26 self::save_option( Constants::$APPFUL_APPLE_APP_SITE_ASSOCIATION, $value );27 }25 public static function save_app_site_association( string $value ) { 26 self::save_option( Constants::$APPFUL_APPLE_APP_SITE_ASSOCIATION, $value ); 27 } 28 28 29 public static function get_apple_app_site_association(): ?string {30 return self::get_option( Constants::$APPFUL_APPLE_APP_SITE_ASSOCIATION );31 }29 public static function get_apple_app_site_association(): ?string { 30 return self::get_option( Constants::$APPFUL_APPLE_APP_SITE_ASSOCIATION ); 31 } 32 32 33 public static function delete_app_site_association(): void {34 self::save_option( Constants::$APPFUL_APPLE_APP_SITE_ASSOCIATION, null );35 }33 public static function delete_app_site_association(): void { 34 self::save_option( Constants::$APPFUL_APPLE_APP_SITE_ASSOCIATION, null ); 35 } 36 36 37 public static function save_asset_link( string $value ) {38 self::save_option( Constants::$APPFUL_ANDROID_ASSET_LINK, $value );39 }37 public static function save_asset_link( string $value ) { 38 self::save_option( Constants::$APPFUL_ANDROID_ASSET_LINK, $value ); 39 } 40 40 41 public static function get_android_asset_link(): ?string {42 return self::get_option( Constants::$APPFUL_ANDROID_ASSET_LINK );43 }41 public static function get_android_asset_link(): ?string { 42 return self::get_option( Constants::$APPFUL_ANDROID_ASSET_LINK ); 43 } 44 44 45 public static function delete_asset_link(): void {46 self::save_option( Constants::$APPFUL_ANDROID_ASSET_LINK, null );47 }45 public static function delete_asset_link(): void { 46 self::save_option( Constants::$APPFUL_ANDROID_ASSET_LINK, null ); 47 } 48 48 49 public static function save_session_id( string $session_id ): void {50 self::save_option( Constants::$APPFUL_SESSION_ID_KEY, $session_id );51 }49 public static function save_session_id( string $session_id ): void { 50 self::save_option( Constants::$APPFUL_SESSION_ID_KEY, $session_id ); 51 } 52 52 53 public static function get_session_id(): ?string {54 return self::get_option( Constants::$APPFUL_SESSION_ID_KEY );55 }53 public static function get_session_id(): ?string { 54 return self::get_option( Constants::$APPFUL_SESSION_ID_KEY ); 55 } 56 56 57 public static function delete_session_id(): void {58 self::save_option( Constants::$APPFUL_SESSION_ID_KEY, null );59 }57 public static function delete_session_id(): void { 58 self::save_option( Constants::$APPFUL_SESSION_ID_KEY, null ); 59 } 60 60 61 public static function save_username( string $username ): void {62 self::save_option( Constants::$APPFUL_USERNAME_KEY, $username );63 }61 public static function save_username( string $username ): void { 62 self::save_option( Constants::$APPFUL_USERNAME_KEY, $username ); 63 } 64 64 65 public static function get_username(): ?string {66 return self::get_option( Constants::$APPFUL_USERNAME_KEY );67 }65 public static function get_username(): ?string { 66 return self::get_option( Constants::$APPFUL_USERNAME_KEY ); 67 } 68 68 69 public static function delete_username(): void {70 self::save_option( Constants::$APPFUL_USERNAME_KEY, null );71 }69 public static function delete_username(): void { 70 self::save_option( Constants::$APPFUL_USERNAME_KEY, null ); 71 } 72 72 73 public static function save_blog_id( string $blog_id ): void {74 self::save_option( Constants::$APPFUL_BLOG_ID_KEY, $blog_id );75 }73 public static function save_blog_id( string $blog_id ): void { 74 self::save_option( Constants::$APPFUL_BLOG_ID_KEY, $blog_id ); 75 } 76 76 77 public static function get_blog_id(): ?string {78 return self::get_option( Constants::$APPFUL_BLOG_ID_KEY );79 }77 public static function get_blog_id(): ?string { 78 return self::get_option( Constants::$APPFUL_BLOG_ID_KEY ); 79 } 80 80 81 public static function delete_blog_id(): void {82 self::save_option( Constants::$APPFUL_BLOG_ID_KEY, null );83 }81 public static function delete_blog_id(): void { 82 self::save_option( Constants::$APPFUL_BLOG_ID_KEY, null ); 83 } 84 84 85 public static function save_client_token( string $client_session ): void {86 self::save_option( Constants::$APPFUL_CLIENT_SESSION_KEY, $client_session );87 }85 public static function save_client_token( string $client_session ): void { 86 self::save_option( Constants::$APPFUL_CLIENT_SESSION_KEY, $client_session ); 87 } 88 88 89 public static function get_client_token(): ?string {90 return self::get_option( Constants::$APPFUL_CLIENT_SESSION_KEY );91 }89 public static function get_client_token(): ?string { 90 return self::get_option( Constants::$APPFUL_CLIENT_SESSION_KEY ); 91 } 92 92 93 public static function delete_client_token(): void {94 self::save_option( Constants::$APPFUL_CLIENT_SESSION_KEY, null );95 }93 public static function delete_client_token(): void { 94 self::save_option( Constants::$APPFUL_CLIENT_SESSION_KEY, null ); 95 } 96 96 97 public static function save_last_sync_error( string $error ): void {98 self::save_option( Constants::$APPFUL_LAST_ERROR_KEY, $error );99 }97 public static function save_last_sync_error( string $error ): void { 98 self::save_option( Constants::$APPFUL_LAST_ERROR_KEY, $error ); 99 } 100 100 101 public static function get_last_sync_error(): ?string {102 return self::get_option( Constants::$APPFUL_LAST_ERROR_KEY );103 }101 public static function get_last_sync_error(): ?string { 102 return self::get_option( Constants::$APPFUL_LAST_ERROR_KEY ); 103 } 104 104 105 public static function delete_last_sync_error(): void {106 self::save_option( Constants::$APPFUL_LAST_ERROR_KEY, null );107 }105 public static function delete_last_sync_error(): void { 106 self::save_option( Constants::$APPFUL_LAST_ERROR_KEY, null ); 107 } 108 108 109 public static function clean() { 110 self::delete_session_id(); 111 self::delete_blog_id(); 112 self::delete_username(); 113 self::delete_app_site_association(); 114 self::delete_asset_link(); 115 self::delete_client_token(); 116 } 109 public static function save_post_sync_batch_size( int $size ): void { 110 self::save_option( Constants::$APPFUL_POST_SYNC_BATCH_SIZE_KEY, $size ); 111 } 112 113 public static function get_post_sync_batch_size(): ?int { 114 return self::get_option( Constants::$APPFUL_POST_SYNC_BATCH_SIZE_KEY ); 115 } 116 117 public static function delete_post_sync_batch_size(): void { 118 self::save_option( Constants::$APPFUL_POST_SYNC_BATCH_SIZE_KEY, null ); 119 } 120 121 public static function clean() { 122 self::delete_session_id(); 123 self::delete_blog_id(); 124 self::delete_username(); 125 self::delete_app_site_association(); 126 self::delete_asset_link(); 127 self::delete_client_token(); 128 self::delete_post_sync_batch_size(); 129 } 117 130 } -
appful-app/tags/3.1.22/lib/vendor/composer/autoload_classmap.php
r3027388 r3039311 14 14 'AppfulPlugin\\Api\\Dtos\\BlogHooksDto' => $baseDir . '/../includes/api/dtos/BlogHooksDto.php', 15 15 'AppfulPlugin\\Api\\Dtos\\BlogInfoDto' => $baseDir . '/../includes/api/dtos/BlogInfoDto.php', 16 'AppfulPlugin\\Api\\Dtos\\BlogSettingsDto' => $baseDir . '/../includes/api/dtos/BlogSettingsDto.php', 16 17 'AppfulPlugin\\Api\\Dtos\\BlogStatsDto' => $baseDir . '/../includes/api/dtos/BlogStatsDto.php', 17 18 'AppfulPlugin\\Api\\Dtos\\CategoryDto' => $baseDir . '/../includes/api/dtos/CategoryDto.php', … … 56 57 'AppfulPlugin\\Api\\Handlers\\RequestHandler' => $baseDir . '/../includes/api/handlers/RequestHandler.php', 57 58 'AppfulPlugin\\Api\\Handlers\\RoleSyncRequestHandler' => $baseDir . '/../includes/api/handlers/RoleSyncRequestHandler.php', 59 'AppfulPlugin\\Api\\Handlers\\SavePostSyncBatchSizeHandler' => $baseDir . '/../includes/api/handlers/SavePostSyncBatchSizeHandler.php', 58 60 'AppfulPlugin\\Api\\Handlers\\SyncRequestHandler' => $baseDir . '/../includes/api/handlers/SyncRequestHandler.php', 59 61 'AppfulPlugin\\Api\\Handlers\\TagSyncRequestHandler' => $baseDir . '/../includes/api/handlers/TagSyncRequestHandler.php', … … 63 65 'AppfulPlugin\\Api\\Mapper\\BlogHooksMapper' => $baseDir . '/../includes/api/mapper/BlogHooksMapper.php', 64 66 'AppfulPlugin\\Api\\Mapper\\BlogInfoMapper' => $baseDir . '/../includes/api/mapper/BlogInfoMapper.php', 67 'AppfulPlugin\\Api\\Mapper\\BlogSettingsMapper' => $baseDir . '/../includes/api/mapper/BlogSettingsMapper.php', 65 68 'AppfulPlugin\\Api\\Mapper\\BlogStatsMapper' => $baseDir . '/../includes/api/mapper/BlogStatsMapper.php', 66 69 'AppfulPlugin\\Api\\Mapper\\CategoryMapper' => $baseDir . '/../includes/api/mapper/CategoryMapper.php', … … 88 91 'AppfulPlugin\\Domain\\BlogHooks' => $baseDir . '/../includes/domain/BlogHooks.php', 89 92 'AppfulPlugin\\Domain\\BlogInfo' => $baseDir . '/../includes/domain/BlogInfo.php', 93 'AppfulPlugin\\Domain\\BlogSettings' => $baseDir . '/../includes/domain/BlogSettings.php', 90 94 'AppfulPlugin\\Domain\\BlogStats' => $baseDir . '/../includes/domain/BlogStats.php', 91 95 'AppfulPlugin\\Domain\\Category' => $baseDir . '/../includes/domain/Category.php', … … 166 170 'AppfulPlugin\\UseCases\\Page\\PullLocalPageContentUseCase' => $baseDir . '/../includes/use_cases/page/PullLocalPageContentUseCase.php', 167 171 'AppfulPlugin\\UseCases\\PostDeleteUseCase' => $baseDir . '/../includes/use_cases/PostDeleteUseCase.php', 172 'AppfulPlugin\\UseCases\\Post\\GetPostSyncBatchSizeUseCase' => $baseDir . '/../includes/use_cases/post/GetPostSyncBatchSizeUseCase.php', 168 173 'AppfulPlugin\\UseCases\\Post\\GetPostSyncItemUseCase' => $baseDir . '/../includes/use_cases/post/GetPostSyncItemUseCase.php', 169 174 'AppfulPlugin\\UseCases\\Post\\GetPostSyncItemsUseCase' => $baseDir . '/../includes/use_cases/post/GetPostSyncItemsUseCase.php', 170 175 'AppfulPlugin\\UseCases\\Post\\GetTaxonomyPostSyncItemsUseCase' => $baseDir . '/../includes/use_cases/post/GetTaxonomyPostSyncItemsUseCase.php', 171 176 'AppfulPlugin\\UseCases\\Post\\PostUseCaseManager' => $baseDir . '/../includes/use_cases/post/PostUseCaseManager.php', 177 'AppfulPlugin\\UseCases\\Post\\SavePostSyncBatchSizeUseCase' => $baseDir . '/../includes/use_cases/post/SavePostSyncBatchSizeUseCase.php', 172 178 'AppfulPlugin\\UseCases\\Post\\SendPostChunkSyncUseCase' => $baseDir . '/../includes/use_cases/post/SendPostChunkSyncUseCase.php', 173 179 'AppfulPlugin\\UseCases\\Post\\SendPostSyncUseCase' => $baseDir . '/../includes/use_cases/post/SendPostSyncUseCase.php', -
appful-app/tags/3.1.22/lib/vendor/composer/autoload_static.php
r3027388 r3039311 211 211 'AppfulPlugin\\Api\\Dtos\\BlogHooksDto' => __DIR__ . '/../..' . '/../includes/api/dtos/BlogHooksDto.php', 212 212 'AppfulPlugin\\Api\\Dtos\\BlogInfoDto' => __DIR__ . '/../..' . '/../includes/api/dtos/BlogInfoDto.php', 213 'AppfulPlugin\\Api\\Dtos\\BlogSettingsDto' => __DIR__ . '/../..' . '/../includes/api/dtos/BlogSettingsDto.php', 213 214 'AppfulPlugin\\Api\\Dtos\\BlogStatsDto' => __DIR__ . '/../..' . '/../includes/api/dtos/BlogStatsDto.php', 214 215 'AppfulPlugin\\Api\\Dtos\\CategoryDto' => __DIR__ . '/../..' . '/../includes/api/dtos/CategoryDto.php', … … 253 254 'AppfulPlugin\\Api\\Handlers\\RequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/RequestHandler.php', 254 255 'AppfulPlugin\\Api\\Handlers\\RoleSyncRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/RoleSyncRequestHandler.php', 256 'AppfulPlugin\\Api\\Handlers\\SavePostSyncBatchSizeHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/SavePostSyncBatchSizeHandler.php', 255 257 'AppfulPlugin\\Api\\Handlers\\SyncRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/SyncRequestHandler.php', 256 258 'AppfulPlugin\\Api\\Handlers\\TagSyncRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/TagSyncRequestHandler.php', … … 260 262 'AppfulPlugin\\Api\\Mapper\\BlogHooksMapper' => __DIR__ . '/../..' . '/../includes/api/mapper/BlogHooksMapper.php', 261 263 'AppfulPlugin\\Api\\Mapper\\BlogInfoMapper' => __DIR__ . '/../..' . '/../includes/api/mapper/BlogInfoMapper.php', 264 'AppfulPlugin\\Api\\Mapper\\BlogSettingsMapper' => __DIR__ . '/../..' . '/../includes/api/mapper/BlogSettingsMapper.php', 262 265 'AppfulPlugin\\Api\\Mapper\\BlogStatsMapper' => __DIR__ . '/../..' . '/../includes/api/mapper/BlogStatsMapper.php', 263 266 'AppfulPlugin\\Api\\Mapper\\CategoryMapper' => __DIR__ . '/../..' . '/../includes/api/mapper/CategoryMapper.php', … … 285 288 'AppfulPlugin\\Domain\\BlogHooks' => __DIR__ . '/../..' . '/../includes/domain/BlogHooks.php', 286 289 'AppfulPlugin\\Domain\\BlogInfo' => __DIR__ . '/../..' . '/../includes/domain/BlogInfo.php', 290 'AppfulPlugin\\Domain\\BlogSettings' => __DIR__ . '/../..' . '/../includes/domain/BlogSettings.php', 287 291 'AppfulPlugin\\Domain\\BlogStats' => __DIR__ . '/../..' . '/../includes/domain/BlogStats.php', 288 292 'AppfulPlugin\\Domain\\Category' => __DIR__ . '/../..' . '/../includes/domain/Category.php', … … 363 367 'AppfulPlugin\\UseCases\\Page\\PullLocalPageContentUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/page/PullLocalPageContentUseCase.php', 364 368 'AppfulPlugin\\UseCases\\PostDeleteUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/PostDeleteUseCase.php', 369 'AppfulPlugin\\UseCases\\Post\\GetPostSyncBatchSizeUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/GetPostSyncBatchSizeUseCase.php', 365 370 'AppfulPlugin\\UseCases\\Post\\GetPostSyncItemUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/GetPostSyncItemUseCase.php', 366 371 'AppfulPlugin\\UseCases\\Post\\GetPostSyncItemsUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/GetPostSyncItemsUseCase.php', 367 372 'AppfulPlugin\\UseCases\\Post\\GetTaxonomyPostSyncItemsUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/GetTaxonomyPostSyncItemsUseCase.php', 368 373 'AppfulPlugin\\UseCases\\Post\\PostUseCaseManager' => __DIR__ . '/../..' . '/../includes/use_cases/post/PostUseCaseManager.php', 374 'AppfulPlugin\\UseCases\\Post\\SavePostSyncBatchSizeUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/SavePostSyncBatchSizeUseCase.php', 369 375 'AppfulPlugin\\UseCases\\Post\\SendPostChunkSyncUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/SendPostChunkSyncUseCase.php', 370 376 'AppfulPlugin\\UseCases\\Post\\SendPostSyncUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/SendPostSyncUseCase.php', -
appful-app/tags/3.1.22/readme.txt
r3028218 r3039311 6 6 Tested up to: 6.4 7 7 Requires PHP: 7.4 8 Stable tag: 3.1.2 18 Stable tag: 3.1.22 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
appful-app/trunk/appful-app.php
r3028218 r3039311 12 12 * Plugin URI: https://appful.io 13 13 * Description: Appful® is the number 1 plugin for turning your WordPress Content into a native, beautiful app on iOS & Android in under 5 minutes. 14 * Version: 3.1.2 114 * Version: 3.1.22 15 15 * Requires at least: 5.8 16 16 * Requires PHP: 7.4 -
appful-app/trunk/includes/api/Endpoints.php
r2978062 r3039311 4 4 5 5 class Endpoints { 6 public static string $INFO = "info";7 public static string $LOGS = "logs";6 public static string $INFO = "info"; 7 public static string $LOGS = "logs"; 8 8 9 public static string $CLEAR_LOGS = "clear-logs";9 public static string $SAVE_POST_SYNC_BATCH_SIZE = "save-post-sync-batch-size"; 10 10 11 public static string $SYNC = "sync"; 12 public static string $SYNC_POSTS = "sync-post"; 11 public static string $CLEAR_LOGS = "clear-logs"; 13 12 14 public static string $SYNC_PAGES = "sync-page"; 15 public static string $SYNC_COMMENTS = "sync-comment"; 16 public static string $SYNC_TAGS = "sync-tag"; 17 public static string $SYNC_ROLES = "sync-role"; 18 public static string $SYNC_USERS = "sync-user"; 19 public static string $SYNC_ATTACHMENTS = "sync-attachment"; 20 public static string $SYNC_CATEGORIES = "sync-category"; 13 public static string $SYNC = "sync"; 14 public static string $SYNC_POSTS = "sync-post"; 21 15 22 public static string $GET_ATTACHMENTS = "get-attachment"; 23 public static string $GET_COMMENTS = "get-comment"; 24 public static string $GET_CATEGORIES = "get-category"; 25 public static string $GET_POSTS = "get-post"; 26 public static string $GET_PAGES = "get-page"; 27 public static string $GET_POST_CONTENTS = "get-post-content"; 28 public static string $GET_PAGE_CONTENTS = "get-page-content"; 29 public static string $GET_POST_CONTENT_LOCAL = "get-post-content-local"; 30 public static string $GET_PAGE_CONTENT_LOCAL = "get-page-content-local"; 31 public static string $GET_USERS = "get-user"; 32 public static string $GET_TAGS = "get-tag"; 33 public static string $GET_ROLES = "get-role"; 16 public static string $SYNC_PAGES = "sync-page"; 17 public static string $SYNC_COMMENTS = "sync-comment"; 18 public static string $SYNC_TAGS = "sync-tag"; 19 public static string $SYNC_ROLES = "sync-role"; 20 public static string $SYNC_USERS = "sync-user"; 21 public static string $SYNC_ATTACHMENTS = "sync-attachment"; 22 public static string $SYNC_CATEGORIES = "sync-category"; 34 23 35 public static string $ASSET_LINKS = "android-asset-links"; 36 public static string $SITE_ASSOCIATION = "apple-app-site-association"; 24 public static string $GET_ATTACHMENTS = "get-attachment"; 25 public static string $GET_COMMENTS = "get-comment"; 26 public static string $GET_CATEGORIES = "get-category"; 27 public static string $GET_POSTS = "get-post"; 28 public static string $GET_PAGES = "get-page"; 29 public static string $GET_POST_CONTENTS = "get-post-content"; 30 public static string $GET_PAGE_CONTENTS = "get-page-content"; 31 public static string $GET_POST_CONTENT_LOCAL = "get-post-content-local"; 32 public static string $GET_PAGE_CONTENT_LOCAL = "get-page-content-local"; 33 public static string $GET_USERS = "get-user"; 34 public static string $GET_TAGS = "get-tag"; 35 public static string $GET_ROLES = "get-role"; 36 37 public static string $ASSET_LINKS = "android-asset-links"; 38 public static string $SITE_ASSOCIATION = "apple-app-site-association"; 37 39 38 40 39 public static string $HOOK = "/appful/api";40 public static string $CREATE_COMMENT_HOOK = "create-comment";41 public static string $AUTHENTICATE_USER_HOOK = "authenticate-user";42 public static string $GET_PAGE_CONTENT_HOOK = "get-page-content-hook";41 public static string $HOOK = "/appful/api"; 42 public static string $CREATE_COMMENT_HOOK = "create-comment"; 43 public static string $AUTHENTICATE_USER_HOOK = "authenticate-user"; 44 public static string $GET_PAGE_CONTENT_HOOK = "get-page-content-hook"; 43 45 } -
appful-app/trunk/includes/api/ReqHandler.php
r3027388 r3039311 30 30 use AppfulPlugin\Api\Handlers\RequestHandler; 31 31 use AppfulPlugin\Api\Handlers\RoleSyncRequestHandler; 32 use AppfulPlugin\Api\Handlers\SavePostSyncBatchSizeHandler; 32 33 use AppfulPlugin\Api\Handlers\SyncRequestHandler; 33 34 use AppfulPlugin\Api\Handlers\TagSyncRequestHandler; … … 39 40 40 41 class ReqHandler { 41 private array $request_handlers;42 private array $request_handlers; 42 43 43 public function __construct( UseCaseManager $use_case_manager ) { 44 $this->request_handlers = [ 45 new AndroidAssetLinkRequestHandler( $use_case_manager->get_android_asset_link_use_case() ), 46 new AppleAppSiteAssociationRequestHandler( $use_case_manager->get_apple_app_site_association_use_case() ), 47 new LogRequestHandler( $use_case_manager->get_logs_use_case() ), 48 new InfoRequestHandler( $use_case_manager->get_blog_info_use_case() ), 49 new PostSyncRequestHandler( $use_case_manager->posts()->get_sync_posts_use_case() ), 50 new GetPostsRequestHandler( $use_case_manager->get_posts_by_id_use_case() ), 51 new CategorySyncRequestHandler( $use_case_manager->sync_categories_use_case() ), 52 new GetCategoriesRequestHandler( $use_case_manager->get_categories_by_id_use_case() ), 53 new TagSyncRequestHandler( $use_case_manager->sync_tags_use_case() ), 54 new GetTagsRequestHandler( $use_case_manager->get_tags_by_id_use_case() ), 55 new GetAttachmentsRequestHandler( $use_case_manager->get_attachments_by_id_use_case() ), 56 new AttachmentSyncRequestHandler( $use_case_manager->sync_attachments_use_case() ), 57 new SyncRequestHandler( $use_case_manager->sync_all_use_case() ), 58 new GetCommentsRequestHandler( $use_case_manager->get_comments_by_id_use_case() ), 59 new CommentSyncRequestHandler( $use_case_manager->sync_comments_use_case() ), 60 new UserSyncRequestHandler( $use_case_manager->sync_users_use_case() ), 61 new GetUsersRequestHandler( $use_case_manager->get_users_by_id_use_case() ), 62 new GetPostContentsRequestHandler( $use_case_manager->get_post_contents_by_id_use_case() ), 63 new ClearLogRequestHandler( $use_case_manager->get_clear_logs_use_case() ), 64 new AuthenticateUserRequestHandler( $use_case_manager->get_authenticate_user_use_case() ), 65 new PullLocalPostContentRequestHandler( $use_case_manager->get_get_local_post_content_by_id_use_case() ), 66 new CreateCommentRequestHandler( $use_case_manager->create_comment_use_case() ), 67 new GetRolesRequestHandler( $use_case_manager->get_roles_by_id_use_case() ), 68 new RoleSyncRequestHandler( $use_case_manager->sync_roles_use_case() ), 69 new GetPagesRequestHandler( $use_case_manager->get_pages_by_id_use_case() ), 70 new PageSyncRequestHandler( $use_case_manager->sync_pages_use_case() ), 71 new GetPageContentsRequestHandler( $use_case_manager->pages()->get_page_contents_by_id_use_case() ), 72 new PullLocalPageContentRequestHandler( $use_case_manager->pages()->get_local_page_content_by_id_use_case() ), 73 new GetPageContentRequestHandler( $use_case_manager->pages()->get_page_contents_by_id_use_case() ), 74 ]; 75 } 44 public function __construct( UseCaseManager $use_case_manager ) { 45 $this->request_handlers = [ 46 new AndroidAssetLinkRequestHandler( $use_case_manager->get_android_asset_link_use_case() ), 47 new AppleAppSiteAssociationRequestHandler( $use_case_manager->get_apple_app_site_association_use_case() ), 48 new LogRequestHandler( $use_case_manager->get_logs_use_case() ), 49 new InfoRequestHandler( $use_case_manager->get_blog_info_use_case() ), 50 new PostSyncRequestHandler( $use_case_manager->posts()->get_sync_posts_use_case() ), 51 new GetPostsRequestHandler( $use_case_manager->get_posts_by_id_use_case() ), 52 new CategorySyncRequestHandler( $use_case_manager->sync_categories_use_case() ), 53 new GetCategoriesRequestHandler( $use_case_manager->get_categories_by_id_use_case() ), 54 new TagSyncRequestHandler( $use_case_manager->sync_tags_use_case() ), 55 new GetTagsRequestHandler( $use_case_manager->get_tags_by_id_use_case() ), 56 new GetAttachmentsRequestHandler( $use_case_manager->get_attachments_by_id_use_case() ), 57 new AttachmentSyncRequestHandler( $use_case_manager->sync_attachments_use_case() ), 58 new SyncRequestHandler( $use_case_manager->sync_all_use_case() ), 59 new GetCommentsRequestHandler( $use_case_manager->get_comments_by_id_use_case() ), 60 new CommentSyncRequestHandler( $use_case_manager->sync_comments_use_case() ), 61 new UserSyncRequestHandler( $use_case_manager->sync_users_use_case() ), 62 new GetUsersRequestHandler( $use_case_manager->get_users_by_id_use_case() ), 63 new GetPostContentsRequestHandler( $use_case_manager->get_post_contents_by_id_use_case() ), 64 new ClearLogRequestHandler( $use_case_manager->get_clear_logs_use_case() ), 65 new AuthenticateUserRequestHandler( $use_case_manager->get_authenticate_user_use_case() ), 66 new PullLocalPostContentRequestHandler( $use_case_manager->get_get_local_post_content_by_id_use_case() ), 67 new CreateCommentRequestHandler( $use_case_manager->create_comment_use_case() ), 68 new GetRolesRequestHandler( $use_case_manager->get_roles_by_id_use_case() ), 69 new RoleSyncRequestHandler( $use_case_manager->sync_roles_use_case() ), 70 new GetPagesRequestHandler( $use_case_manager->get_pages_by_id_use_case() ), 71 new PageSyncRequestHandler( $use_case_manager->sync_pages_use_case() ), 72 new GetPageContentsRequestHandler( $use_case_manager->pages()->get_page_contents_by_id_use_case() ), 73 new PullLocalPageContentRequestHandler( $use_case_manager->pages()->get_local_page_content_by_id_use_case() ), 74 new GetPageContentRequestHandler( $use_case_manager->pages()->get_page_contents_by_id_use_case() ), 75 new SavePostSyncBatchSizeHandler( $use_case_manager->posts()->get_save_post_sync_batch_size_use_case() ) 76 ]; 77 } 76 78 77 public function handle_request( PluginRequest $request ): PluginResponse {78 foreach ( $this->request_handlers as $request_handler ) {79 if ( $request_handler instanceof RequestHandler ) {80 if ( $request_handler->can_handle_request( $request ) ) {81 return $request_handler->handle_request( $request );82 }83 }84 }79 public function handle_request( PluginRequest $request ): PluginResponse { 80 foreach ( $this->request_handlers as $request_handler ) { 81 if ( $request_handler instanceof RequestHandler ) { 82 if ( $request_handler->can_handle_request( $request ) ) { 83 return $request_handler->handle_request( $request ); 84 } 85 } 86 } 85 87 86 Logger::error( "Did not find handler for action: " . $request->get_action() );88 Logger::error( "Did not find handler for action: " . $request->get_action() ); 87 89 88 return PluginResponse::plugin_response()->status( 404 );89 }90 return PluginResponse::plugin_response()->status( 404 ); 91 } 90 92 } -
appful-app/trunk/includes/api/dtos/BlogHooksDto.php
r2978062 r3039311 4 4 5 5 class BlogHooksDto { 6 public ?string $create_comment;7 public ?string $authenticate_user;8 public ?string $get_page_content;6 public ?string $create_comment; 7 public ?string $authenticate_user; 8 public ?string $get_page_content; 9 9 10 public function __construct(11 ?string $create_comment,12 ?string $authenticate_user,13 ?string $get_page_content14 ) {15 $this->create_comment = $create_comment;16 $this->authenticate_user = $authenticate_user;17 $this->get_page_content = $get_page_content;18 }10 public function __construct( 11 ?string $create_comment, 12 ?string $authenticate_user, 13 ?string $get_page_content 14 ) { 15 $this->create_comment = $create_comment; 16 $this->authenticate_user = $authenticate_user; 17 $this->get_page_content = $get_page_content; 18 } 19 19 } -
appful-app/trunk/includes/api/dtos/BlogInfoDto.php
r3019874 r3039311 4 4 5 5 class BlogInfoDto { 6 public string $hostname; 7 public string $site_url; 8 public array $languages; 9 public string $token; 10 public ?BlogHooksDto $hooks; 11 public string $version; 12 public ?BlogStatsDto $stats; 6 public string $hostname; 7 public string $site_url; 8 public array $languages; 9 public string $token; 10 public ?BlogHooksDto $hooks; 11 public string $version; 12 public ?BlogStatsDto $stats; 13 public ?BlogSettingsDto $settings; 13 14 14 public function __construct( string $hostname, string $site_url, array $languages, string $token, ?BlogHooksDto $hooks, string $version, ?BlogStatsDto $stats ) { 15 $this->hostname = $hostname; 16 $this->site_url = $site_url; 17 $this->languages = $languages; 18 $this->token = $token; 19 $this->hooks = $hooks; 20 $this->version = $version; 21 $this->stats = $stats; 22 } 15 public function __construct( string $hostname, string $site_url, array $languages, string $token, ?BlogHooksDto $hooks, string $version, ?BlogStatsDto $stats, ?BlogSettingsDto $settings ) { 16 $this->hostname = $hostname; 17 $this->site_url = $site_url; 18 $this->languages = $languages; 19 $this->token = $token; 20 $this->hooks = $hooks; 21 $this->version = $version; 22 $this->stats = $stats; 23 $this->settings = $settings; 24 } 23 25 } -
appful-app/trunk/includes/api/handlers/CreateCommentRequestHandler.php
r3018629 r3039311 12 12 13 13 class CreateCommentRequestHandler implements RequestHandler { 14 private CreateCommentUseCase $create_comment_use_case;14 private CreateCommentUseCase $create_comment_use_case; 15 15 16 public function __construct(16 public function __construct( 17 17 CreateCommentUseCase $create_comment_use_case 18 ) {19 $this->create_comment_use_case = $create_comment_use_case;20 }18 ) { 19 $this->create_comment_use_case = $create_comment_use_case; 20 } 21 21 22 public function can_handle_request( PluginRequest $request ): bool {23 return $request->get_action() == Endpoints::$CREATE_COMMENT_HOOK;24 }22 public function can_handle_request( PluginRequest $request ): bool { 23 return $request->get_action() == Endpoints::$CREATE_COMMENT_HOOK; 24 } 25 25 26 26 public function handle_request( PluginRequest $request ): PluginResponse { … … 31 31 32 32 // required fields 33 if ( !isset($data["username"], $data["email"], $data["content"], $data["post_id"])) {33 if ( ! isset( $data["username"], $data["email"], $data["content"], $data["post_id"] ) ) { 34 34 Logger::error( "Some parameters for create comment are missing" ); 35 35 36 return PluginResponse::plugin_response()->status( 400 ); // Bad Request 36 37 } 37 38 38 39 // sanitize fields 39 $username = sanitize_text_field( $data["username"] );40 $email = sanitize_text_field( $data["email"] );41 $content = sanitize_text_field( $data["content"] );42 $post_id = intval($data["post_id"]);40 $username = sanitize_text_field( $data["username"] ); 41 $email = sanitize_text_field( $data["email"] ); 42 $content = sanitize_text_field( $data["content"] ); 43 $post_id = intval( $data["post_id"] ); 43 44 44 45 // optional field 45 $parent_id = isset( $data["parent_id"]) ? intval($data["parent_id"]) : null;46 $parent_id = isset( $data["parent_id"] ) ? intval( $data["parent_id"] ) : null; 46 47 47 48 $request = new CreateCommentRequest( $username, $email, $content, $post_id, $parent_id ); … … 50 51 if ( $comment == null ) { 51 52 Logger::error( "Creating comment failed" ); 53 52 54 return PluginResponse::plugin_response()->status( 503 ); 53 55 } 54 56 55 $comment_dto = CommentMapper::to_dto( $comment);57 $comment_dto = CommentMapper::to_dto( $comment ); 56 58 57 59 return PluginResponse::plugin_response()->body( $comment_dto ); -
appful-app/trunk/includes/api/handlers/GetPostContentsRequestHandler.php
r3018629 r3039311 12 12 13 13 class GetPostContentsRequestHandler implements RequestHandler { 14 private GetPostContentsByIdUseCase $get_post_contents_by_id_use_case;14 private GetPostContentsByIdUseCase $get_post_contents_by_id_use_case; 15 15 16 public function __construct(17 GetPostContentsByIdUseCase $get_post_contents_by_id_use_case18 ) {19 $this->get_post_contents_by_id_use_case = $get_post_contents_by_id_use_case;20 }16 public function __construct( 17 GetPostContentsByIdUseCase $get_post_contents_by_id_use_case 18 ) { 19 $this->get_post_contents_by_id_use_case = $get_post_contents_by_id_use_case; 20 } 21 21 22 public function can_handle_request( PluginRequest $request ): bool {23 return $request->get_action() == Endpoints::$GET_POST_CONTENTS;24 }22 public function can_handle_request( PluginRequest $request ): bool { 23 return $request->get_action() == Endpoints::$GET_POST_CONTENTS; 24 } 25 25 26 public function handle_request( PluginRequest $request ): PluginResponse {27 Logger::debug( "Found handler for Appful request" );26 public function handle_request( PluginRequest $request ): PluginResponse { 27 Logger::debug( "Found handler for Appful request" ); 28 28 29 // Because there could be a huge amount of posts, increase the timeout to 10min30 set_time_limit( 60 * 10 );29 // Because there could be a huge amount of posts, increase the timeout to 10min 30 set_time_limit( 60 * 10 ); 31 31 32 if ( ! isset( $_GET['ids'] ) ) {33 return PluginResponse::plugin_response()->status( 400 );34 }32 if ( ! isset( $_GET['ids'] ) ) { 33 return PluginResponse::plugin_response()->status( 400 ); 34 } 35 35 36 $cleanedIds = sanitize_text_field( $_GET['ids'] );37 $ids = array_map(38 function ( $id ) {39 return absint( $id );40 },41 explode( ",", $cleanedIds )42 );36 $cleanedIds = sanitize_text_field( $_GET['ids'] ); 37 $ids = array_map( 38 function ( $id ) { 39 return absint( $id ); 40 }, 41 explode( ",", $cleanedIds ) 42 ); 43 43 44 Logger::debug( "Sending post contents for ids " . json_encode( $ids ) );44 Logger::debug( "Sending post contents for ids " . json_encode( $ids ) ); 45 45 46 $postContents = $this->get_post_contents_by_id_use_case->invoke( $ids );46 $postContents = $this->get_post_contents_by_id_use_case->invoke( $ids ); 47 47 48 $post_content_dtos = array_map(49 function ( PostContent $post_content ) {50 return PostContentMapper::to_dto( $post_content );51 },52 $postContents53 );48 $post_content_dtos = array_map( 49 function ( PostContent $post_content ) { 50 return PostContentMapper::to_dto( $post_content ); 51 }, 52 $postContents 53 ); 54 54 55 return PluginResponse::plugin_response()->body( $post_content_dtos );56 }55 return PluginResponse::plugin_response()->body( $post_content_dtos ); 56 } 57 57 } -
appful-app/trunk/includes/api/mapper/BlogInfoMapper.php
r3028218 r3039311 7 7 8 8 class BlogInfoMapper { 9 public static function to_dto( BlogInfo $blog_info ): BlogInfoDto {10 if ( $blog_info->get_stats() == null ) {11 $stats = null;12 } else {13 $stats = BlogStatsMapper::to_dto( $blog_info->get_stats() );14 }9 public static function to_dto( BlogInfo $blog_info ): BlogInfoDto { 10 if ( $blog_info->get_stats() == null ) { 11 $stats = null; 12 } else { 13 $stats = BlogStatsMapper::to_dto( $blog_info->get_stats() ); 14 } 15 15 16 if($blog_info->get_hooks() == null) {17 $hooks = null;18 } else {19 $hooks = BlogHooksMapper::to_dto( $blog_info->get_hooks() );20 }16 if ( $blog_info->get_hooks() == null ) { 17 $hooks = null; 18 } else { 19 $hooks = BlogHooksMapper::to_dto( $blog_info->get_hooks() ); 20 } 21 21 22 return new BlogInfoDto( 23 $blog_info->get_hostname(), 24 $blog_info->get_site_url(), 25 $blog_info->get_languages(), 26 $blog_info->get_token(), 27 $hooks, 28 "3.1.21", 29 $stats 30 ); 31 } 22 if ( $blog_info->get_settings() == null ) { 23 $settings = null; 24 } else { 25 $settings = BlogSettingsMapper::to_dto( $blog_info->get_settings() ); 26 } 27 28 return new BlogInfoDto( 29 $blog_info->get_hostname(), 30 $blog_info->get_site_url(), 31 $blog_info->get_languages(), 32 $blog_info->get_token(), 33 $hooks, 34 "3.1.22", 35 $stats, 36 $settings 37 ); 38 } 32 39 } -
appful-app/trunk/includes/domain/BlogInfo.php
r3019874 r3039311 4 4 5 5 class BlogInfo { 6 private string $hostname = ""; 7 private string $site_url = ""; 8 private array $languages = []; 9 private string $token = ""; 10 private ?BlogHooks $hooks = null; 11 private ?BlogStats $stats = null; 6 private string $hostname = ""; 7 private string $site_url = ""; 8 private array $languages = []; 9 private string $token = ""; 10 private ?BlogHooks $hooks = null; 11 private ?BlogStats $stats = null; 12 private ?BlogSettings $settings = null; 12 13 13 public static function blog_info( 14 string $hostname = "", 15 string $site_url = "", 16 array $languages = [], 17 string $token = "", 18 ?BlogHooks $hooks = null, 19 ?BlogStats $stats = null 20 ): BlogInfo { 21 return ( new BlogInfo() ) 22 ->hostname( $hostname ) 23 ->site_url( $site_url ) 24 ->languages( $languages ) 25 ->token( $token ) 26 ->hooks( $hooks ) 27 ->stats( $stats ); 28 } 14 private function __construct() { 15 } 29 16 30 public function languages( array $languages ): BlogInfo { 31 $this->languages = $languages; 17 public static function blog_info(): BlogInfo { 18 return new BlogInfo(); 19 } 32 20 33 return $this; 34 } 21 public function languages( array $languages ): BlogInfo { 22 $this->languages = $languages; 35 23 36 public function site_url( string $site_url ): BlogInfo { 37 $this->site_url = $site_url; 24 return $this; 25 } 38 26 39 return $this; 40 } 27 public function settings( ?BlogSettings $settings ): BlogInfo { 28 $this->settings = $settings; 41 29 42 public function hostname( string $hostname ): BlogInfo { 43 $this->hostname = $hostname; 30 return $this; 31 } 44 32 45 return $this; 46 } 33 public function site_url( string $site_url ): BlogInfo { 34 $this->site_url = $site_url; 47 35 48 public function token( string $token ): BlogInfo { 49 $this->token = $token; 36 return $this; 37 } 50 38 51 return $this; 52 } 39 public function hostname( string $hostname ): BlogInfo { 40 $this->hostname = $hostname; 53 41 54 public function hooks( ?BlogHooks $hooks ): BlogInfo { 55 $this->hooks = $hooks; 42 return $this; 43 } 56 44 57 return $this; 58 } 45 public function token( string $token ): BlogInfo { 46 $this->token = $token; 59 47 60 public function stats( ?BlogStats $stats ): BlogInfo { 61 $this->stats = $stats; 48 return $this; 49 } 62 50 63 return $this; 64 } 51 public function hooks( ?BlogHooks $hooks ): BlogInfo { 52 $this->hooks = $hooks; 65 53 66 public function get_site_url(): string { 67 return $this->site_url; 68 } 54 return $this; 55 } 69 56 70 public function get_languages(): array { 71 return $this->languages; 72 } 57 public function stats( ?BlogStats $stats ): BlogInfo { 58 $this->stats = $stats; 73 59 74 public function get_hostname(): string { 75 return $this->hostname; 76 } 60 return $this; 61 } 77 62 78 public function get_token(): string {79 return $this->token;80 }63 public function get_site_url(): string { 64 return $this->site_url; 65 } 81 66 82 public function get_hooks(): ?BlogHooks{83 return $this->hooks;84 }67 public function get_languages(): array { 68 return $this->languages; 69 } 85 70 86 public function get_stats(): ?BlogStats { 87 return $this->stats; 88 } 71 public function get_hostname(): string { 72 return $this->hostname; 73 } 74 75 public function get_token(): string { 76 return $this->token; 77 } 78 79 public function get_hooks(): ?BlogHooks { 80 return $this->hooks; 81 } 82 83 public function get_stats(): ?BlogStats { 84 return $this->stats; 85 } 86 87 public function get_settings(): ?BlogSettings { 88 return $this->settings; 89 } 89 90 } -
appful-app/trunk/includes/helper/Constants.php
r3027388 r3039311 4 4 5 5 class Constants { 6 public static bool $APPFUL_DEBUG = false;6 public static bool $APPFUL_DEBUG = false; 7 7 8 public static string $PLUGIN_ROOT_DIR = "/appful-app";9 public static string $PLUGIN_ROOT_FILE = "/appful-app.php";8 public static string $PLUGIN_ROOT_DIR = "/appful-app"; 9 public static string $PLUGIN_ROOT_FILE = "/appful-app.php"; 10 10 11 public static string $APPFUL_SESSION_ID_KEY = "appful-app_session_id";12 public static string $APPFUL_USERNAME_KEY = "appful-app_username";13 public static string $APPFUL_BLOG_ID_KEY = "appful-app_blog_id";11 public static string $APPFUL_SESSION_ID_KEY = "appful-app_session_id"; 12 public static string $APPFUL_USERNAME_KEY = "appful-app_username"; 13 public static string $APPFUL_BLOG_ID_KEY = "appful-app_blog_id"; 14 14 15 public static string $APPFUL_CLIENT_SESSION_KEY = "appful-app_client_token_id"; 16 public static string $APPFUL_LAST_ERROR_KEY = "appful-app_last_error"; 17 public static string $APPFUL_APPLE_APP_SITE_ASSOCIATION = "appful-app_apple_app_site_association"; 18 public static string $APPFUL_ANDROID_ASSET_LINK = "appful-app_android_asset_link"; 15 public static string $APPFUL_CLIENT_SESSION_KEY = "appful-app_client_token_id"; 16 public static string $APPFUL_LAST_ERROR_KEY = "appful-app_last_error"; 17 public static string $APPFUL_APPLE_APP_SITE_ASSOCIATION = "appful-app_apple_app_site_association"; 18 public static string $APPFUL_ANDROID_ASSET_LINK = "appful-app_android_asset_link"; 19 public static string $APPFUL_POST_SYNC_BATCH_SIZE_KEY = "appful-app_post_sync_batch_size"; 19 20 20 public static string $APPFUL_TERM_IMAGE_META_KEY = "appful-app_term_image";21 public static string $APPFUL_TERM_IMAGE_META_KEY = "appful-app_term_image"; 21 22 22 public static string $APPFUL_TAXONOMY_NAME = "appful";23 public static string $APPFUL_TAXONOMY_PUSH_TERM_NAME = "Don't send notification";24 public static string $APPFUL_TAXONOMY_PUSH_TERM_SLUG = "push";23 public static string $APPFUL_TAXONOMY_NAME = "appful"; 24 public static string $APPFUL_TAXONOMY_PUSH_TERM_NAME = "Don't send notification"; 25 public static string $APPFUL_TAXONOMY_PUSH_TERM_SLUG = "push"; 25 26 26 27 public static string $APPFUL_API_URL = "https://api.wordpress.appful.io"; 27 28 28 public static string $BLOG_PATH = "/blogs";29 public static string $APPFUL_USER_PATH = "/appfulUsers";30 public static string $USER_PATH = "/users";31 public static string $POST_PATH = "/posts";32 public static string $APP_SETTINGS_PATH = "/app/settings";33 public static string $PAGE_PATH = "/pages";34 public static string $COMMENT_PATH = "/comments";35 public static string $ATTACHMENT_PATH = "/attachments";36 public static string $TAXONOMY_PATH = "/taxonomies";37 public static string $ROLE_PATH = "/roles";29 public static string $BLOG_PATH = "/blogs"; 30 public static string $APPFUL_USER_PATH = "/appfulUsers"; 31 public static string $USER_PATH = "/users"; 32 public static string $POST_PATH = "/posts"; 33 public static string $APP_SETTINGS_PATH = "/app/settings"; 34 public static string $PAGE_PATH = "/pages"; 35 public static string $COMMENT_PATH = "/comments"; 36 public static string $ATTACHMENT_PATH = "/attachments"; 37 public static string $TAXONOMY_PATH = "/taxonomies"; 38 public static string $ROLE_PATH = "/roles"; 38 39 39 public static string $API_VERSION_1 = "/v1";40 public static string $API_VERSION_1 = "/v1"; 40 41 41 public static int $POST_SYNC_CHUNK_SIZE = 70;42 public static int $PAGE_SYNC_CHUNK_SIZE = 10;43 public static int $COMMENT_SYNC_CHUNK_SIZE = 100;44 public static int $ATTACHMENT_SYNC_CHUNK_SIZE = 200;45 public static int $USER_SYNC_CHUNK_SIZE = 50;46 public static int $CATEGORY_SYNC_CHUNK_SIZE = 50;47 public static int $TAG_SYNC_CHUNK_SIZE = 50;48 public static int $ROLE_SYNC_CHUNK_SIZE = 50;42 public static int $POST_SYNC_CHUNK_SIZE = 10; 43 public static int $PAGE_SYNC_CHUNK_SIZE = 5; 44 public static int $COMMENT_SYNC_CHUNK_SIZE = 15; 45 public static int $ATTACHMENT_SYNC_CHUNK_SIZE = 50; 46 public static int $USER_SYNC_CHUNK_SIZE = 15; 47 public static int $CATEGORY_SYNC_CHUNK_SIZE = 15; 48 public static int $TAG_SYNC_CHUNK_SIZE = 15; 49 public static int $ROLE_SYNC_CHUNK_SIZE = 15; 49 50 } -
appful-app/trunk/includes/use_cases/post/PostUseCaseManager.php
r3027388 r3039311 6 6 7 7 class PostUseCaseManager { 8 private GetTaxonomyPostSyncItemsUseCase $get_taxonomy_post_sync_items_use_case;9 private GetPostSyncItemsUseCase $get_post_sync_data_use_case;10 private GetPostSyncItemUseCase $get_post_sync_item_use_case;8 private GetTaxonomyPostSyncItemsUseCase $get_taxonomy_post_sync_items_use_case; 9 private GetPostSyncItemsUseCase $get_post_sync_data_use_case; 10 private GetPostSyncItemUseCase $get_post_sync_item_use_case; 11 11 12 private SendPostChunkSyncUseCase $send_post_chunk_sync_use_case;13 private SendPostSyncUseCase $send_post_sync_use_case;12 private SendPostChunkSyncUseCase $send_post_chunk_sync_use_case; 13 private SendPostSyncUseCase $send_post_sync_use_case; 14 14 15 private SyncTaxonomyPostsUseCase $sync_taxonomy_posts_use_case;16 private SyncPostsUseCase $sync_posts_use_case;17 private SyncPostUseCase $sync_post_use_case;15 private SyncTaxonomyPostsUseCase $sync_taxonomy_posts_use_case; 16 private SyncPostsUseCase $sync_posts_use_case; 17 private SyncPostUseCase $sync_post_use_case; 18 18 19 public function __construct( BackendClient $backend_client ) { 20 $this->get_post_sync_item_use_case = new GetPostSyncItemUseCase(); 21 $this->get_post_sync_data_use_case = new GetPostSyncItemsUseCase(); 22 $this->get_taxonomy_post_sync_items_use_case = new GetTaxonomyPostSyncItemsUseCase(); 19 private GetPostSyncBatchSizeUseCase $get_post_sync_batch_size_use_case; 20 private SavePostSyncBatchSizeUseCase $save_post_sync_batch_size_use_case; 23 21 24 $this->send_post_chunk_sync_use_case = new SendPostChunkSyncUseCase( $backend_client ); 25 $this->send_post_sync_use_case = new SendPostSyncUseCase( $backend_client ); 22 public function __construct( BackendClient $backend_client ) { 23 $this->get_post_sync_batch_size_use_case = new GetPostSyncBatchSizeUseCase(); 24 $this->save_post_sync_batch_size_use_case = new SavePostSyncBatchSizeUseCase(); 26 25 27 $this->sync_posts_use_case = new SyncPostsUseCase( $this->get_post_sync_data_use_case, $this->send_post_chunk_sync_use_case ); 28 $this->sync_post_use_case = new SyncPostUseCase( $this->get_post_sync_item_use_case, $this->send_post_sync_use_case ); 29 $this->sync_taxonomy_posts_use_case = new SyncTaxonomyPostsUseCase( $this->get_taxonomy_post_sync_items_use_case, $this->send_post_chunk_sync_use_case ); 30 } 26 $this->get_post_sync_item_use_case = new GetPostSyncItemUseCase(); 27 $this->get_post_sync_data_use_case = new GetPostSyncItemsUseCase(); 28 $this->get_taxonomy_post_sync_items_use_case = new GetTaxonomyPostSyncItemsUseCase(); 31 29 32 public function get_sync_post_use_case(): SyncPostUseCase { 33 return $this->sync_post_use_case; 34 } 30 $this->send_post_chunk_sync_use_case = new SendPostChunkSyncUseCase( $backend_client ); 31 $this->send_post_sync_use_case = new SendPostSyncUseCase( $backend_client ); 35 32 36 public function get_sync_posts_use_case(): SyncPostsUseCase { 37 return $this->sync_posts_use_case; 38 } 33 $this->sync_posts_use_case = new SyncPostsUseCase( $this->get_post_sync_data_use_case, $this->send_post_chunk_sync_use_case, $this->get_post_sync_batch_size_use_case ); 34 $this->sync_post_use_case = new SyncPostUseCase( $this->get_post_sync_item_use_case, $this->send_post_sync_use_case ); 35 $this->sync_taxonomy_posts_use_case = new SyncTaxonomyPostsUseCase( $this->get_taxonomy_post_sync_items_use_case, $this->send_post_chunk_sync_use_case, $this->get_post_sync_batch_size_use_case ); 36 } 39 37 40 public function get_sync_taxonomy_posts_use_case(): SyncTaxonomyPostsUseCase { 41 return $this->sync_taxonomy_posts_use_case; 42 } 38 public function get_sync_post_use_case(): SyncPostUseCase { 39 return $this->sync_post_use_case; 40 } 41 42 public function get_sync_posts_use_case(): SyncPostsUseCase { 43 return $this->sync_posts_use_case; 44 } 45 46 public function get_sync_taxonomy_posts_use_case(): SyncTaxonomyPostsUseCase { 47 return $this->sync_taxonomy_posts_use_case; 48 } 49 50 public function get_post_sync_batch_size_use_case(): GetPostSyncBatchSizeUseCase { 51 return $this->get_post_sync_batch_size_use_case; 52 } 53 54 public function get_save_post_sync_batch_size_use_case(): SavePostSyncBatchSizeUseCase { 55 return $this->save_post_sync_batch_size_use_case; 56 } 43 57 } -
appful-app/trunk/includes/use_cases/post/SyncPostsUseCase.php
r3027388 r3039311 4 4 5 5 use AppfulPlugin\Domain\SyncChunk; 6 use AppfulPlugin\Helper\Constants;7 6 use AppfulPlugin\Wp\WPPostManager; 8 7 9 8 class SyncPostsUseCase { 10 private GetPostSyncItemsUseCase $get_post_sync_data_use_case; 11 private SendPostChunkSyncUseCase $send_post_chunk_sync_use_case; 9 private GetPostSyncItemsUseCase $get_post_sync_data_use_case; 10 private SendPostChunkSyncUseCase $send_post_chunk_sync_use_case; 11 private GetPostSyncBatchSizeUseCase $get_post_sync_batch_size_use_case; 12 12 13 public function __construct( 14 GetPostSyncItemsUseCase $get_post_sync_data_use_case, 15 SendPostChunkSyncUseCase $send_post_chunk_sync_use_case 16 ) { 17 $this->get_post_sync_data_use_case = $get_post_sync_data_use_case; 18 $this->send_post_chunk_sync_use_case = $send_post_chunk_sync_use_case; 19 } 13 public function __construct( 14 GetPostSyncItemsUseCase $get_post_sync_data_use_case, 15 SendPostChunkSyncUseCase $send_post_chunk_sync_use_case, 16 GetPostSyncBatchSizeUseCase $get_post_sync_batch_size_use_case 17 ) { 18 $this->get_post_sync_data_use_case = $get_post_sync_data_use_case; 19 $this->send_post_chunk_sync_use_case = $send_post_chunk_sync_use_case; 20 $this->get_post_sync_batch_size_use_case = $get_post_sync_batch_size_use_case; 21 } 20 22 21 public function invoke() {22 $sync_id = uniqid();23 $batch_size = WPPostManager::get_post_count();24 $chunk_size = Constants::$POST_SYNC_CHUNK_SIZE;23 public function invoke() { 24 $sync_id = uniqid(); 25 $batch_size = WPPostManager::get_post_count(); 26 $chunk_size = $this->get_post_sync_batch_size_use_case->invoke(); 25 27 26 $chunk = 0;27 while ( true ) {28 $post_sync_items = $this->get_post_sync_data_use_case->invoke($chunk * $chunk_size, $chunk_size);28 $chunk = 0; 29 while ( true ) { 30 $post_sync_items = $this->get_post_sync_data_use_case->invoke( $chunk * $chunk_size, $chunk_size ); 29 31 30 $this->send_post_chunk_sync_use_case->invoke(31 SyncChunk::syncChunk()32 ->batch_id( $sync_id )33 ->chunk_size( $chunk_size )34 ->batch_size( $batch_size )35 ->chunk_items( $post_sync_items )36 );32 $this->send_post_chunk_sync_use_case->invoke( 33 SyncChunk::syncChunk() 34 ->batch_id( $sync_id ) 35 ->chunk_size( $chunk_size ) 36 ->batch_size( $batch_size ) 37 ->chunk_items( $post_sync_items ) 38 ); 37 39 38 $chunk ++;40 $chunk ++; 39 41 40 if ( count( $post_sync_items ) < $chunk_size ) {41 break;42 }43 }44 }42 if ( count( $post_sync_items ) < $chunk_size ) { 43 break; 44 } 45 } 46 } 45 47 } -
appful-app/trunk/includes/use_cases/post/SyncTaxonomyPostsUseCase.php
r3027388 r3039311 4 4 5 5 use AppfulPlugin\Domain\SyncChunk; 6 use AppfulPlugin\Helper\Constants;7 6 use AppfulPlugin\Wp\WPPostManager; 8 7 9 8 class SyncTaxonomyPostsUseCase { 10 private GetTaxonomyPostSyncItemsUseCase $get_taxonomy_post_sync_items_use_case; 11 private SendPostChunkSyncUseCase $send_post_chunk_sync_use_case; 9 private GetTaxonomyPostSyncItemsUseCase $get_taxonomy_post_sync_items_use_case; 10 private SendPostChunkSyncUseCase $send_post_chunk_sync_use_case; 11 private GetPostSyncBatchSizeUseCase $get_post_sync_batch_size_use_case; 12 12 13 public function __construct( 14 GetTaxonomyPostSyncItemsUseCase $get_taxonomy_post_sync_items_use_case, 15 SendPostChunkSyncUseCase $send_post_chunk_sync_use_case 16 ) { 17 $this->get_taxonomy_post_sync_items_use_case = $get_taxonomy_post_sync_items_use_case; 18 $this->send_post_chunk_sync_use_case = $send_post_chunk_sync_use_case; 19 } 13 public function __construct( 14 GetTaxonomyPostSyncItemsUseCase $get_taxonomy_post_sync_items_use_case, 15 SendPostChunkSyncUseCase $send_post_chunk_sync_use_case, 16 GetPostSyncBatchSizeUseCase $get_post_sync_batch_size_use_case 17 ) { 18 $this->get_taxonomy_post_sync_items_use_case = $get_taxonomy_post_sync_items_use_case; 19 $this->send_post_chunk_sync_use_case = $send_post_chunk_sync_use_case; 20 $this->get_post_sync_batch_size_use_case = $get_post_sync_batch_size_use_case; 21 } 20 22 21 public function invoke( string $taxonomy, string $term_slug ) {22 $sync_id = uniqid();23 $batch_size = WPPostManager::get_taxonomy_post_count( $taxonomy, $term_slug );24 $chunk_size = Constants::$POST_SYNC_CHUNK_SIZE;23 public function invoke( string $taxonomy, string $term_slug ) { 24 $sync_id = uniqid(); 25 $batch_size = WPPostManager::get_taxonomy_post_count( $taxonomy, $term_slug ); 26 $chunk_size = $this->get_post_sync_batch_size_use_case->invoke(); 25 27 26 $chunk = 0;27 while ( true ) {28 $post_sync_items = $this->get_taxonomy_post_sync_items_use_case->invoke( $taxonomy, $term_slug, $chunk * $chunk_size, $chunk_size );28 $chunk = 0; 29 while ( true ) { 30 $post_sync_items = $this->get_taxonomy_post_sync_items_use_case->invoke( $taxonomy, $term_slug, $chunk * $chunk_size, $chunk_size ); 29 31 30 $this->send_post_chunk_sync_use_case->invoke(31 SyncChunk::syncChunk()32 ->batch_id( $sync_id )33 ->chunk_size( $chunk_size )34 ->batch_size( $batch_size )35 ->chunk_items( $post_sync_items )36 );32 $this->send_post_chunk_sync_use_case->invoke( 33 SyncChunk::syncChunk() 34 ->batch_id( $sync_id ) 35 ->chunk_size( $chunk_size ) 36 ->batch_size( $batch_size ) 37 ->chunk_items( $post_sync_items ) 38 ); 37 39 38 $chunk ++;40 $chunk ++; 39 41 40 if ( count( $post_sync_items ) < $chunk_size ) {41 break;42 }43 }44 }42 if ( count( $post_sync_items ) < $chunk_size ) { 43 break; 44 } 45 } 46 } 45 47 } -
appful-app/trunk/includes/wp/WPBlogManager.php
r3019874 r3039311 6 6 use AppfulPlugin\Domain\BlogHooks; 7 7 use AppfulPlugin\Domain\BlogInfo; 8 use AppfulPlugin\Domain\BlogSettings; 8 9 use AppfulPlugin\Domain\BlogStats; 9 10 use AppfulPlugin\Helper\ClientTokenManager; 11 use AppfulPlugin\UseCases\Post\GetPostSyncBatchSizeUseCase; 10 12 use AppfulPlugin\Wp\Plugins\LanguageHelper; 11 13 12 14 class WPBlogManager { 13 public static function get_blog_info(): BlogInfo { 14 return BlogInfo::blog_info() 15 ->hostname( self::get_hostname() ) 16 ->site_url( self::get_site_url() ) 17 ->languages( self::get_languages() ) 18 ->token( ClientTokenManager::getToken() ?? ClientTokenManager::createSession() ) 19 ->hooks( self::get_hooks() ) 20 ->stats( self::get_stats() ); 21 } 15 public static function get_blog_info(): BlogInfo { 16 return BlogInfo::blog_info() 17 ->hostname( self::get_hostname() ) 18 ->site_url( self::get_site_url() ) 19 ->languages( self::get_languages() ) 20 ->token( ClientTokenManager::getToken() ?? ClientTokenManager::createSession() ) 21 ->hooks( self::get_hooks() ) 22 ->stats( self::get_stats() ) 23 ->settings( self::get_settings() ); 24 } 22 25 23 private static function get_hooks(): BlogHooks {24 return BlogHooks::init()25 ->create_comment( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$CREATE_COMMENT_HOOK )26 ->authenticate_user( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$AUTHENTICATE_USER_HOOK )27 ->get_page_content( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$GET_PAGE_CONTENT_HOOK );28 }26 private static function get_hooks(): BlogHooks { 27 return BlogHooks::init() 28 ->create_comment( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$CREATE_COMMENT_HOOK ) 29 ->authenticate_user( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$AUTHENTICATE_USER_HOOK ) 30 ->get_page_content( self::get_site_url() . Endpoints::$HOOK . "/" . Endpoints::$GET_PAGE_CONTENT_HOOK ); 31 } 29 32 30 private static function get_stats(): BlogStats {31 return BlogStats::init()32 ->attachment_count( WPAttachmentManager::get_attachment_count() )33 ->post_count( WPPostManager::get_post_count() )34 ->user_count( WPUserManager::get_user_count() )35 ->page_count( WPPageManager::get_page_count() )36 ->comment_count( WPCommentManager::get_comment_count() );37 }33 private static function get_stats(): BlogStats { 34 return BlogStats::init() 35 ->attachment_count( WPAttachmentManager::get_attachment_count() ) 36 ->post_count( WPPostManager::get_post_count() ) 37 ->user_count( WPUserManager::get_user_count() ) 38 ->page_count( WPPageManager::get_page_count() ) 39 ->comment_count( WPCommentManager::get_comment_count() ); 40 } 38 41 39 private static function get_hostname(): string { 40 $siteUrl = self::get_site_url(); 42 private static function get_settings(): BlogSettings { 43 return BlogSettings::init() 44 ->post_sync_batch_size( ( new GetPostSyncBatchSizeUseCase() )->invoke() ); 45 } 41 46 42 return parse_url( $siteUrl, PHP_URL_HOST ); 43 } 47 private static function get_hostname(): string { 48 $siteUrl = self::get_site_url(); 44 49 45 private static function get_site_url(): string { 46 return get_site_url(); 47 } 50 return parse_url( $siteUrl, PHP_URL_HOST ); 51 } 48 52 49 private static function get_languages(): array{50 return LanguageHelper::get_languages();51 }53 private static function get_site_url(): string { 54 return get_site_url(); 55 } 52 56 53 public static function get_blog_language(): string { 54 return substr( get_bloginfo( "language" ), 0, 2 ) ?? ""; 55 } 57 private static function get_languages(): array { 58 return LanguageHelper::get_languages(); 59 } 60 61 public static function get_blog_language(): string { 62 return substr( get_bloginfo( "language" ), 0, 2 ) ?? ""; 63 } 56 64 } -
appful-app/trunk/includes/wp/WPOptionsManager.php
r2936340 r3039311 6 6 7 7 class WPOptionsManager { 8 private static function save_option( string $key, ?string $value ): bool {9 if ( $value == null ) {10 return delete_option( $key );11 }8 private static function save_option( string $key, ?string $value ): bool { 9 if ( $value == null ) { 10 return delete_option( $key ); 11 } 12 12 13 $current_value = get_option( $key, null );14 if ( $current_value != null ) {15 return update_option( $key, $value );16 } else {17 return add_option( $key, $value );18 }19 }13 $current_value = get_option( $key, null ); 14 if ( $current_value != null ) { 15 return update_option( $key, $value ); 16 } else { 17 return add_option( $key, $value ); 18 } 19 } 20 20 21 private static function get_option( string $key, $default = null ) {22 return get_option( $key, $default );23 }21 private static function get_option( string $key, $default = null ) { 22 return get_option( $key, $default ); 23 } 24 24 25 public static function save_app_site_association( string $value ) {26 self::save_option( Constants::$APPFUL_APPLE_APP_SITE_ASSOCIATION, $value );27 }25 public static function save_app_site_association( string $value ) { 26 self::save_option( Constants::$APPFUL_APPLE_APP_SITE_ASSOCIATION, $value ); 27 } 28 28 29 public static function get_apple_app_site_association(): ?string {30 return self::get_option( Constants::$APPFUL_APPLE_APP_SITE_ASSOCIATION );31 }29 public static function get_apple_app_site_association(): ?string { 30 return self::get_option( Constants::$APPFUL_APPLE_APP_SITE_ASSOCIATION ); 31 } 32 32 33 public static function delete_app_site_association(): void {34 self::save_option( Constants::$APPFUL_APPLE_APP_SITE_ASSOCIATION, null );35 }33 public static function delete_app_site_association(): void { 34 self::save_option( Constants::$APPFUL_APPLE_APP_SITE_ASSOCIATION, null ); 35 } 36 36 37 public static function save_asset_link( string $value ) {38 self::save_option( Constants::$APPFUL_ANDROID_ASSET_LINK, $value );39 }37 public static function save_asset_link( string $value ) { 38 self::save_option( Constants::$APPFUL_ANDROID_ASSET_LINK, $value ); 39 } 40 40 41 public static function get_android_asset_link(): ?string {42 return self::get_option( Constants::$APPFUL_ANDROID_ASSET_LINK );43 }41 public static function get_android_asset_link(): ?string { 42 return self::get_option( Constants::$APPFUL_ANDROID_ASSET_LINK ); 43 } 44 44 45 public static function delete_asset_link(): void {46 self::save_option( Constants::$APPFUL_ANDROID_ASSET_LINK, null );47 }45 public static function delete_asset_link(): void { 46 self::save_option( Constants::$APPFUL_ANDROID_ASSET_LINK, null ); 47 } 48 48 49 public static function save_session_id( string $session_id ): void {50 self::save_option( Constants::$APPFUL_SESSION_ID_KEY, $session_id );51 }49 public static function save_session_id( string $session_id ): void { 50 self::save_option( Constants::$APPFUL_SESSION_ID_KEY, $session_id ); 51 } 52 52 53 public static function get_session_id(): ?string {54 return self::get_option( Constants::$APPFUL_SESSION_ID_KEY );55 }53 public static function get_session_id(): ?string { 54 return self::get_option( Constants::$APPFUL_SESSION_ID_KEY ); 55 } 56 56 57 public static function delete_session_id(): void {58 self::save_option( Constants::$APPFUL_SESSION_ID_KEY, null );59 }57 public static function delete_session_id(): void { 58 self::save_option( Constants::$APPFUL_SESSION_ID_KEY, null ); 59 } 60 60 61 public static function save_username( string $username ): void {62 self::save_option( Constants::$APPFUL_USERNAME_KEY, $username );63 }61 public static function save_username( string $username ): void { 62 self::save_option( Constants::$APPFUL_USERNAME_KEY, $username ); 63 } 64 64 65 public static function get_username(): ?string {66 return self::get_option( Constants::$APPFUL_USERNAME_KEY );67 }65 public static function get_username(): ?string { 66 return self::get_option( Constants::$APPFUL_USERNAME_KEY ); 67 } 68 68 69 public static function delete_username(): void {70 self::save_option( Constants::$APPFUL_USERNAME_KEY, null );71 }69 public static function delete_username(): void { 70 self::save_option( Constants::$APPFUL_USERNAME_KEY, null ); 71 } 72 72 73 public static function save_blog_id( string $blog_id ): void {74 self::save_option( Constants::$APPFUL_BLOG_ID_KEY, $blog_id );75 }73 public static function save_blog_id( string $blog_id ): void { 74 self::save_option( Constants::$APPFUL_BLOG_ID_KEY, $blog_id ); 75 } 76 76 77 public static function get_blog_id(): ?string {78 return self::get_option( Constants::$APPFUL_BLOG_ID_KEY );79 }77 public static function get_blog_id(): ?string { 78 return self::get_option( Constants::$APPFUL_BLOG_ID_KEY ); 79 } 80 80 81 public static function delete_blog_id(): void {82 self::save_option( Constants::$APPFUL_BLOG_ID_KEY, null );83 }81 public static function delete_blog_id(): void { 82 self::save_option( Constants::$APPFUL_BLOG_ID_KEY, null ); 83 } 84 84 85 public static function save_client_token( string $client_session ): void {86 self::save_option( Constants::$APPFUL_CLIENT_SESSION_KEY, $client_session );87 }85 public static function save_client_token( string $client_session ): void { 86 self::save_option( Constants::$APPFUL_CLIENT_SESSION_KEY, $client_session ); 87 } 88 88 89 public static function get_client_token(): ?string {90 return self::get_option( Constants::$APPFUL_CLIENT_SESSION_KEY );91 }89 public static function get_client_token(): ?string { 90 return self::get_option( Constants::$APPFUL_CLIENT_SESSION_KEY ); 91 } 92 92 93 public static function delete_client_token(): void {94 self::save_option( Constants::$APPFUL_CLIENT_SESSION_KEY, null );95 }93 public static function delete_client_token(): void { 94 self::save_option( Constants::$APPFUL_CLIENT_SESSION_KEY, null ); 95 } 96 96 97 public static function save_last_sync_error( string $error ): void {98 self::save_option( Constants::$APPFUL_LAST_ERROR_KEY, $error );99 }97 public static function save_last_sync_error( string $error ): void { 98 self::save_option( Constants::$APPFUL_LAST_ERROR_KEY, $error ); 99 } 100 100 101 public static function get_last_sync_error(): ?string {102 return self::get_option( Constants::$APPFUL_LAST_ERROR_KEY );103 }101 public static function get_last_sync_error(): ?string { 102 return self::get_option( Constants::$APPFUL_LAST_ERROR_KEY ); 103 } 104 104 105 public static function delete_last_sync_error(): void {106 self::save_option( Constants::$APPFUL_LAST_ERROR_KEY, null );107 }105 public static function delete_last_sync_error(): void { 106 self::save_option( Constants::$APPFUL_LAST_ERROR_KEY, null ); 107 } 108 108 109 public static function clean() { 110 self::delete_session_id(); 111 self::delete_blog_id(); 112 self::delete_username(); 113 self::delete_app_site_association(); 114 self::delete_asset_link(); 115 self::delete_client_token(); 116 } 109 public static function save_post_sync_batch_size( int $size ): void { 110 self::save_option( Constants::$APPFUL_POST_SYNC_BATCH_SIZE_KEY, $size ); 111 } 112 113 public static function get_post_sync_batch_size(): ?int { 114 return self::get_option( Constants::$APPFUL_POST_SYNC_BATCH_SIZE_KEY ); 115 } 116 117 public static function delete_post_sync_batch_size(): void { 118 self::save_option( Constants::$APPFUL_POST_SYNC_BATCH_SIZE_KEY, null ); 119 } 120 121 public static function clean() { 122 self::delete_session_id(); 123 self::delete_blog_id(); 124 self::delete_username(); 125 self::delete_app_site_association(); 126 self::delete_asset_link(); 127 self::delete_client_token(); 128 self::delete_post_sync_batch_size(); 129 } 117 130 } -
appful-app/trunk/lib/vendor/composer/autoload_classmap.php
r3027388 r3039311 14 14 'AppfulPlugin\\Api\\Dtos\\BlogHooksDto' => $baseDir . '/../includes/api/dtos/BlogHooksDto.php', 15 15 'AppfulPlugin\\Api\\Dtos\\BlogInfoDto' => $baseDir . '/../includes/api/dtos/BlogInfoDto.php', 16 'AppfulPlugin\\Api\\Dtos\\BlogSettingsDto' => $baseDir . '/../includes/api/dtos/BlogSettingsDto.php', 16 17 'AppfulPlugin\\Api\\Dtos\\BlogStatsDto' => $baseDir . '/../includes/api/dtos/BlogStatsDto.php', 17 18 'AppfulPlugin\\Api\\Dtos\\CategoryDto' => $baseDir . '/../includes/api/dtos/CategoryDto.php', … … 56 57 'AppfulPlugin\\Api\\Handlers\\RequestHandler' => $baseDir . '/../includes/api/handlers/RequestHandler.php', 57 58 'AppfulPlugin\\Api\\Handlers\\RoleSyncRequestHandler' => $baseDir . '/../includes/api/handlers/RoleSyncRequestHandler.php', 59 'AppfulPlugin\\Api\\Handlers\\SavePostSyncBatchSizeHandler' => $baseDir . '/../includes/api/handlers/SavePostSyncBatchSizeHandler.php', 58 60 'AppfulPlugin\\Api\\Handlers\\SyncRequestHandler' => $baseDir . '/../includes/api/handlers/SyncRequestHandler.php', 59 61 'AppfulPlugin\\Api\\Handlers\\TagSyncRequestHandler' => $baseDir . '/../includes/api/handlers/TagSyncRequestHandler.php', … … 63 65 'AppfulPlugin\\Api\\Mapper\\BlogHooksMapper' => $baseDir . '/../includes/api/mapper/BlogHooksMapper.php', 64 66 'AppfulPlugin\\Api\\Mapper\\BlogInfoMapper' => $baseDir . '/../includes/api/mapper/BlogInfoMapper.php', 67 'AppfulPlugin\\Api\\Mapper\\BlogSettingsMapper' => $baseDir . '/../includes/api/mapper/BlogSettingsMapper.php', 65 68 'AppfulPlugin\\Api\\Mapper\\BlogStatsMapper' => $baseDir . '/../includes/api/mapper/BlogStatsMapper.php', 66 69 'AppfulPlugin\\Api\\Mapper\\CategoryMapper' => $baseDir . '/../includes/api/mapper/CategoryMapper.php', … … 88 91 'AppfulPlugin\\Domain\\BlogHooks' => $baseDir . '/../includes/domain/BlogHooks.php', 89 92 'AppfulPlugin\\Domain\\BlogInfo' => $baseDir . '/../includes/domain/BlogInfo.php', 93 'AppfulPlugin\\Domain\\BlogSettings' => $baseDir . '/../includes/domain/BlogSettings.php', 90 94 'AppfulPlugin\\Domain\\BlogStats' => $baseDir . '/../includes/domain/BlogStats.php', 91 95 'AppfulPlugin\\Domain\\Category' => $baseDir . '/../includes/domain/Category.php', … … 166 170 'AppfulPlugin\\UseCases\\Page\\PullLocalPageContentUseCase' => $baseDir . '/../includes/use_cases/page/PullLocalPageContentUseCase.php', 167 171 'AppfulPlugin\\UseCases\\PostDeleteUseCase' => $baseDir . '/../includes/use_cases/PostDeleteUseCase.php', 172 'AppfulPlugin\\UseCases\\Post\\GetPostSyncBatchSizeUseCase' => $baseDir . '/../includes/use_cases/post/GetPostSyncBatchSizeUseCase.php', 168 173 'AppfulPlugin\\UseCases\\Post\\GetPostSyncItemUseCase' => $baseDir . '/../includes/use_cases/post/GetPostSyncItemUseCase.php', 169 174 'AppfulPlugin\\UseCases\\Post\\GetPostSyncItemsUseCase' => $baseDir . '/../includes/use_cases/post/GetPostSyncItemsUseCase.php', 170 175 'AppfulPlugin\\UseCases\\Post\\GetTaxonomyPostSyncItemsUseCase' => $baseDir . '/../includes/use_cases/post/GetTaxonomyPostSyncItemsUseCase.php', 171 176 'AppfulPlugin\\UseCases\\Post\\PostUseCaseManager' => $baseDir . '/../includes/use_cases/post/PostUseCaseManager.php', 177 'AppfulPlugin\\UseCases\\Post\\SavePostSyncBatchSizeUseCase' => $baseDir . '/../includes/use_cases/post/SavePostSyncBatchSizeUseCase.php', 172 178 'AppfulPlugin\\UseCases\\Post\\SendPostChunkSyncUseCase' => $baseDir . '/../includes/use_cases/post/SendPostChunkSyncUseCase.php', 173 179 'AppfulPlugin\\UseCases\\Post\\SendPostSyncUseCase' => $baseDir . '/../includes/use_cases/post/SendPostSyncUseCase.php', -
appful-app/trunk/lib/vendor/composer/autoload_static.php
r3027388 r3039311 211 211 'AppfulPlugin\\Api\\Dtos\\BlogHooksDto' => __DIR__ . '/../..' . '/../includes/api/dtos/BlogHooksDto.php', 212 212 'AppfulPlugin\\Api\\Dtos\\BlogInfoDto' => __DIR__ . '/../..' . '/../includes/api/dtos/BlogInfoDto.php', 213 'AppfulPlugin\\Api\\Dtos\\BlogSettingsDto' => __DIR__ . '/../..' . '/../includes/api/dtos/BlogSettingsDto.php', 213 214 'AppfulPlugin\\Api\\Dtos\\BlogStatsDto' => __DIR__ . '/../..' . '/../includes/api/dtos/BlogStatsDto.php', 214 215 'AppfulPlugin\\Api\\Dtos\\CategoryDto' => __DIR__ . '/../..' . '/../includes/api/dtos/CategoryDto.php', … … 253 254 'AppfulPlugin\\Api\\Handlers\\RequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/RequestHandler.php', 254 255 'AppfulPlugin\\Api\\Handlers\\RoleSyncRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/RoleSyncRequestHandler.php', 256 'AppfulPlugin\\Api\\Handlers\\SavePostSyncBatchSizeHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/SavePostSyncBatchSizeHandler.php', 255 257 'AppfulPlugin\\Api\\Handlers\\SyncRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/SyncRequestHandler.php', 256 258 'AppfulPlugin\\Api\\Handlers\\TagSyncRequestHandler' => __DIR__ . '/../..' . '/../includes/api/handlers/TagSyncRequestHandler.php', … … 260 262 'AppfulPlugin\\Api\\Mapper\\BlogHooksMapper' => __DIR__ . '/../..' . '/../includes/api/mapper/BlogHooksMapper.php', 261 263 'AppfulPlugin\\Api\\Mapper\\BlogInfoMapper' => __DIR__ . '/../..' . '/../includes/api/mapper/BlogInfoMapper.php', 264 'AppfulPlugin\\Api\\Mapper\\BlogSettingsMapper' => __DIR__ . '/../..' . '/../includes/api/mapper/BlogSettingsMapper.php', 262 265 'AppfulPlugin\\Api\\Mapper\\BlogStatsMapper' => __DIR__ . '/../..' . '/../includes/api/mapper/BlogStatsMapper.php', 263 266 'AppfulPlugin\\Api\\Mapper\\CategoryMapper' => __DIR__ . '/../..' . '/../includes/api/mapper/CategoryMapper.php', … … 285 288 'AppfulPlugin\\Domain\\BlogHooks' => __DIR__ . '/../..' . '/../includes/domain/BlogHooks.php', 286 289 'AppfulPlugin\\Domain\\BlogInfo' => __DIR__ . '/../..' . '/../includes/domain/BlogInfo.php', 290 'AppfulPlugin\\Domain\\BlogSettings' => __DIR__ . '/../..' . '/../includes/domain/BlogSettings.php', 287 291 'AppfulPlugin\\Domain\\BlogStats' => __DIR__ . '/../..' . '/../includes/domain/BlogStats.php', 288 292 'AppfulPlugin\\Domain\\Category' => __DIR__ . '/../..' . '/../includes/domain/Category.php', … … 363 367 'AppfulPlugin\\UseCases\\Page\\PullLocalPageContentUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/page/PullLocalPageContentUseCase.php', 364 368 'AppfulPlugin\\UseCases\\PostDeleteUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/PostDeleteUseCase.php', 369 'AppfulPlugin\\UseCases\\Post\\GetPostSyncBatchSizeUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/GetPostSyncBatchSizeUseCase.php', 365 370 'AppfulPlugin\\UseCases\\Post\\GetPostSyncItemUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/GetPostSyncItemUseCase.php', 366 371 'AppfulPlugin\\UseCases\\Post\\GetPostSyncItemsUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/GetPostSyncItemsUseCase.php', 367 372 'AppfulPlugin\\UseCases\\Post\\GetTaxonomyPostSyncItemsUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/GetTaxonomyPostSyncItemsUseCase.php', 368 373 'AppfulPlugin\\UseCases\\Post\\PostUseCaseManager' => __DIR__ . '/../..' . '/../includes/use_cases/post/PostUseCaseManager.php', 374 'AppfulPlugin\\UseCases\\Post\\SavePostSyncBatchSizeUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/SavePostSyncBatchSizeUseCase.php', 369 375 'AppfulPlugin\\UseCases\\Post\\SendPostChunkSyncUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/SendPostChunkSyncUseCase.php', 370 376 'AppfulPlugin\\UseCases\\Post\\SendPostSyncUseCase' => __DIR__ . '/../..' . '/../includes/use_cases/post/SendPostSyncUseCase.php', -
appful-app/trunk/readme.txt
r3028218 r3039311 6 6 Tested up to: 6.4 7 7 Requires PHP: 7.4 8 Stable tag: 3.1.2 18 Stable tag: 3.1.22 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.