Файловый менеджер - Редактировать - /home/autoovt/www/DoctrineCollectionFilter.php.tar
Назад
autoovt/www/vendor-old/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php 0000666 00000001424 14772327253 0030310 0 ustar 00 home <?php namespace DeepCopy\Filter\Doctrine; use DeepCopy\Filter\Filter; use DeepCopy\Reflection\ReflectionHelper; /** * @final */ class DoctrineCollectionFilter implements Filter { /** * Copies the object property doctrine collection. * * {@inheritdoc} */ public function apply($object, $property, $objectCopier) { $reflectionProperty = ReflectionHelper::getProperty($object, $property); $reflectionProperty->setAccessible(true); $oldCollection = $reflectionProperty->getValue($object); $newCollection = $oldCollection->map( function ($item) use ($objectCopier) { return $objectCopier($item); } ); $reflectionProperty->setValue($object, $newCollection); } }
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка