PHP code example of ayacoo / ayacoo-soundcloud

1. Go to this page and download the library: Download ayacoo/ayacoo-soundcloud 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/ */

    

ayacoo / ayacoo-soundcloud example snippets




namespace Vendor\ExtName\EventListener;

use Ayacoo\AyacooSoundcloud\Event\ModifySoundcloudOutputEvent;

class SoundcloudOutputEventListener
{
    public function __invoke(ModifySoundcloudOutputEvent $event): void
    {
        $output = $event->getOutput();
        $output = str_replace('src', 'data-src', $output);
        $event->setOutput($output);
    }
}