Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
www.humitest.fr
/
htdocs
/
vendor
/
vich
/
uploader-bundle
/
Injector
/
/srv/data/web/vhosts/www.humitest.fr/htdocs/vendor/vich/uploader-bundle/Injector/FileInjector.php
<?php namespace Vich\UploaderBundle\Injector; use Symfony\Component\HttpFoundation\File\File; use Vich\UploaderBundle\Mapping\PropertyMapping; use Vich\UploaderBundle\Storage\StorageInterface; /** * FileInjector. * * @author Dustin Dobervich <ddobervich@gmail.com> */ class FileInjector implements FileInjectorInterface { /** * @var StorageInterface */ protected $storage; public function __construct(StorageInterface $storage) { $this->storage = $storage; } public function injectFile($obj, PropertyMapping $mapping): void { $path = $this->storage->resolvePath($obj, $mapping->getFilePropertyName()); if (null !== $path) { $mapping->setFile($obj, new File($path, false)); } } }