PHP code example of magebit / vsbridge-static-content-procesor

1. Go to this page and download the library: Download magebit/vsbridge-static-content-procesor 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/ */

    

magebit / vsbridge-static-content-procesor example snippets



use Magebit\StaticContentProcessor\Helper\Resolver;

/**
 * @package MyPackage\MyModule
 */
class MyModule
{
    /**
     * @var \Magebit\StaticContentProcessor\Helper\Resolver
     */
    protected $resolver;

    /**
     * @param Resolver $resolver
     */
    public function __construct(Resolver $resolver)
    {
        $this->resolver = $resolver;
    }

    /**
     * Does some content processing
     * @return string
     */
    public function example()
    {
        // This will convert urls and media urls to vsf urls according to the configuration
        return $this->resolver->resolve($this->getSomeStaticContent());
    }
}