PHP code example of masilia / clamav-bundle

1. Go to this page and download the library: Download masilia/clamav-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

masilia / clamav-bundle example snippets


    
    
    use Masilia\ClamavBundle\Constraints\Antivirus;
    use Symfony\Component\Form\Extension\Core\Type\FileType;
    use Symfony\Component\Form\FormBuilder;
    
    public function buildForm(FormBuilder $builder, array $options)
    {
        // ...
        $builder->add('file',FileType::class,[
                        'constraints'=>[new Antivirus()]
                    ]);
        // ...
    }
    
    
 php
    $bundles = [
        ...
        new Masilia\ClamavBundle\MasiliaClamavBundle(),
        ...
    ];
    
 bash
TCP   0         0 127.0.0.1:3310            0.0.0.0.*           LISTEN          97/clamd