Add installer functionality for WordPress with FTP and database configuration
- Create SQL migration for prompt templates used in article and image generation. - Add migration to change publish interval from days to hours in the sites table. - Implement InstallerController to handle installation requests and validation. - Develop FtpService for FTP connections and file uploads. - Create InstallerService to manage the WordPress installation process, including downloading, extracting, and configuring WordPress. - Add index view for the installer with form inputs for FTP, database, and WordPress admin settings. - Implement progress tracking for the installation process with AJAX polling.
This commit is contained in:
@@ -38,6 +38,14 @@ class Validator
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function email(string $field, mixed $value, string $label = ''): self
|
||||
{
|
||||
if (!empty($value) && !filter_var($value, FILTER_VALIDATE_EMAIL)) {
|
||||
$this->errors[$field] = ($label ?: $field) . ' musi być prawidłowym adresem e-mail.';
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isValid(): bool
|
||||
{
|
||||
return empty($this->errors);
|
||||
|
||||
Reference in New Issue
Block a user