/** * Gets a new instance of the Method class. * * @param string The name or instance of the Method to link to * @return Method */ public static function forge($method = 'default') { if (is_string($method)) { $set = \Method::instance($method) and $method = $set; } if ($method instanceof Method_Template) { if ($method->template(false) != null) { throw new \DomainException('Form instance already exists, cannot be recreated. Use instance() instead of forge() to retrieve the existing instance.'); } } return new static($method); }