File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44namespace FileUploader \FilePathProcessor ;
55
66use Cake \Datasource \EntityInterface ;
7- use Cake \I18n \FrozenTime ;
7+ use Cake \I18n \DateTime ;
88use Cake \ORM \Table ;
99use Cake \Utility \Hash ;
1010use Cake \Utility \Text ;
@@ -62,9 +62,9 @@ class CloudProcessor implements FilePathProcessorInterface
6262 protected string $ directory ;
6363
6464 /**
65- * @var \Cake\I18n\FrozenTime The current time
65+ * @var \Cake\I18n\DateTime The current time
6666 */
67- private FrozenTime $ currentTime ;
67+ private DateTime $ currentTime ;
6868
6969 /**
7070 * @var float The current time in milliseconds
@@ -86,7 +86,7 @@ public function __construct(
8686 $ this ->uploadedFile = $ data ;
8787 $ this ->field = $ field ;
8888 $ this ->settings = $ settings ;
89- $ this ->currentTime = new FrozenTime ( null , 'GMT ' );
89+ $ this ->currentTime = new DateTime ( ' now ' , 'GMT ' );
9090 $ this ->currentTimeInMilliseconds = floor (microtime (true ) * 1000 );
9191 usleep (1000 );
9292 }
Original file line number Diff line number Diff line change 55
66use Cake \Core \Configure ;
77use Cake \Datasource \EntityInterface ;
8- use Cake \I18n \FrozenTime ;
8+ use Cake \I18n \DateTime ;
99use Cake \ORM \Table ;
1010use Cake \Utility \Text ;
1111use Psr \Http \Message \UploadedFileInterface ;
@@ -63,9 +63,9 @@ class DefaultProcessor implements FilePathProcessorInterface
6363 protected string $ directory ;
6464
6565 /**
66- * @var \Cake\I18n\FrozenTime The current time
66+ * @var \Cake\I18n\DateTime The current time
6767 */
68- private FrozenTime $ currentTime ;
68+ private DateTime $ currentTime ;
6969
7070 /**
7171 * @var float The current time in milliseconds
@@ -87,7 +87,7 @@ public function __construct(
8787 $ this ->uploadedFile = $ data ;
8888 $ this ->field = $ field ;
8989 $ this ->settings = $ settings ;
90- $ this ->currentTime = new FrozenTime ( null , 'GMT ' );
90+ $ this ->currentTime = new DateTime ( ' now ' , 'GMT ' );
9191 $ this ->currentTimeInMilliseconds = floor (microtime (true ) * 1000 );
9292 usleep (1000 );
9393 }
Original file line number Diff line number Diff line change 1111/**
1212 * Plugin for CakephpImageUploader
1313 */
14- class Plugin extends BasePlugin
14+ class FileUploaderPlugin extends BasePlugin
1515{
1616 /**
1717 * Load all the plugin configuration and bootstrap logic.
Original file line number Diff line number Diff line change 2121 * @property string $origin
2222 * @property array $metadata
2323 * @property string|null $cloud_provider
24- * @property \Cake\I18n\FrozenTime $created
24+ * @property \Cake\I18n\DateTime $created
2525 * @property string $full_path
2626 * @property bool $is_local_file
2727 * @property string $full_filename
You can’t perform that action at this time.
0 commit comments