diff --git a/src/components/TextareaCopyable.vue b/src/components/TextareaCopyable.vue index dd964b9d..9bf4e763 100644 --- a/src/components/TextareaCopyable.vue +++ b/src/components/TextareaCopyable.vue @@ -14,6 +14,7 @@ import jsHljs from 'highlight.js/lib/languages/javascript'; import cssHljs from 'highlight.js/lib/languages/css'; import goHljs from 'highlight.js/lib/languages/go'; import pythonHljs from 'highlight.js/lib/languages/python'; +import phpHljs from 'highlight.js/lib/languages/php'; import csharpHljs from 'highlight.js/lib/languages/csharp'; import { Base64 } from 'js-base64'; import { useCopy } from '@/composable/copy'; @@ -53,6 +54,7 @@ hljs.registerLanguage('javascript', jsHljs); hljs.registerLanguage('go', goHljs); hljs.registerLanguage('csharp', csharpHljs); hljs.registerLanguage('python', pythonHljs); +hljs.registerLanguage('php', phpHljs); const { value, language, followHeightOf, copyPlacement, copyMessage, downloadFileName, downloadButtonText } = toRefs(props); const { height } = followHeightOf.value ? useElementSize(followHeightOf) : { height: ref(null) }; diff --git a/src/tools/json-to-php/index.ts b/src/tools/json-to-php/index.ts new file mode 100644 index 00000000..162117b0 --- /dev/null +++ b/src/tools/json-to-php/index.ts @@ -0,0 +1,12 @@ +import { Braces } from '@vicons/tabler'; +import { defineTool } from '../tool'; + +export const tool = defineTool({ + name: 'Json to PHP Code', + path: '/json-to-php', + description: 'Generate PHP Classes from JSON', + keywords: ['json', 'php'], + component: () => import('./json-to-php.vue'), + icon: Braces, + createdAt: new Date('2025-04-21'), +}); diff --git a/src/tools/json-to-php/json-to-php.vue b/src/tools/json-to-php/json-to-php.vue new file mode 100644 index 00000000..3e0fa4a6 --- /dev/null +++ b/src/tools/json-to-php/json-to-php.vue @@ -0,0 +1,117 @@ + + +