\\XLite\\Core\\TopMessage::addInfo('The {$targetOneHumanReadableNameLow} has been added'); } } } CODE; macro_file_put_contents($oneViewModelPath, $string); echo 'done' . PHP_EOL; // }}} // {{{ View model form widget $formOnePath = macro_convert_class_name_to_path($formOneClass); echo "\t" . 'form ' . $formOnePath . ' ... '; $formOneClassShort = macro_get_class_short_name($formOneClass); $oneFormCSS = macro_assemble_tpl_name($targetOneSkinDir . '/style.css', $moduleAuthor, $moduleName); $className = strtolower(str_replace('_', '-', $targetOne)); $string = macro_get_class_repo_header($formOnePath) . <<<CODE /** * {$targetHumanReadableName} list search form * * @see ____class_see____ * @since 1.0.0 */ class {$formOneClassShort} extends \\XLite\\View\\Form\\AForm { /** * Register CSS files * * @return array * @see ____func_see____ * @since 1.0.0 */
// Assemble target class name $parts = explode('\\', $decoratedClass); array_shift($parts); $parts = array_values($parts); if (0 == count($parts)) { $parts = array('XLite'); } elseif ('Module' == $parts[0]) { $parts = array_slice($parts, 3); } $targetClass = 'XLite\\Module\\' . $author . '\\' . $module . '\\' . implode('\\', $parts); // Assemble target file path $targetPath = macro_convert_class_name_to_path($targetClass); // Get file content $decoratedClassFull = '\\' . $decoratedClass; $className = array_pop($parts); $content = macro_get_class_repo_header($targetPath) . macro_get_class_header($path) . <<<CODE abstract class {$className} extends {$decoratedClassFull} implements \\XLite\\Base\\IDecorator { } CODE; // Write content macro_file_put_contents($targetPath, $content); echo $targetPath . ' create' . PHP_EOL; die(0); /** * Help */ function macro_help() {