...
- create the "
TemplateCommentParser
" class, that: - 0.2h- would accept path to template as constructor argument
- the "
parse
" method would return associative array of results
- add support for data types in the class: - 0.5h
- "string" - any string
- "boolean" - true (when "yes"), false (when "no"), exception otherwise
- "integer" - as-as, when a positive integer, exception otherwise
- "category_path" - would split value by "||" and trim each each element
- define supported settings and their data types as class properties - 0.3h
- when template doesn't exist throw an exception - 0.1h
- when no meta comment found, then return an empty array - 0.1h
- when meta comment found: - 0.3h
- if it's one line long, then return an empty array
- if it's invalid XML, then throw an exception
- when unsupported setting found, then throw an exception
- when supported setting found, but it has value unknown format, then throw an exception
- return parsing result
- delete "
kThemesHelper::parseTemplateMetaInfo
" in favor of using "TemplateCommentParser::parse
" method - 0.5h
Quote: 2h*1.4=3h
Related Discussions
...