初始提交,未完全测试
This commit is contained in:
28
template/source/ClassPathSourceFactory.py
Normal file
28
template/source/ClassPathSourceFactory.py
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python3.9
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
JFinal ClassPathSourceFactory - Class Path Source Factory
|
||||
"""
|
||||
|
||||
from .ISourceFactory import ISourceFactory
|
||||
|
||||
class ClassPathSourceFactory(ISourceFactory):
|
||||
"""Class path source factory for template loading"""
|
||||
|
||||
def get_source(self, base_template_path: str, fileName: str, encoding: str):
|
||||
"""
|
||||
Get class path source
|
||||
|
||||
Args:
|
||||
base_template_path: Base template path
|
||||
fileName: File name
|
||||
encoding: Encoding
|
||||
|
||||
Returns:
|
||||
Class path source object
|
||||
"""
|
||||
from .ClassPathSource import ClassPathSource
|
||||
return ClassPathSource(base_template_path, fileName, encoding)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return "ClassPathSourceFactory()"
|
||||
Reference in New Issue
Block a user