Upload::__construct
アップローダーを作成し、エラーメッセージを読み込みます
説明
public Upload::__construct( [ string $languageCode = null ] )
file_error_message.phpからエラーメッセージを読み込みます(設定を参照)。初期設定は、アップロードディレクトリなし、最大ファイルサイズ2MB、ファイル形式jpg、jpeg、png、gifです。
引数
| 名前 | データ型 | デフォルト | 備考 |
|---|---|---|---|
| $languageCode | string | null | 言語コード。指定するとconfig/{languageCode}/file_error_message.phpを使います |
例
Controller
use Fegg\Tool\Upload;
$upload = new Upload();
// English error messages from config/en/file_error_message.php
$upload = new Upload('en');