public static function new_class($name, $extends_class = null) { $content = "<?php class {$name}"; if (!empty($extends_class)) { $content .= " extends {$extends_class}"; } $content .= ' {}'; Generate_Task::$content = $content; }
public static function add_after($where, $to_add) { Generate_Task::$content = str_replace($where, $where . $to_add, Generate_Task::$content); }