PHP code example of vegas-cmf / assets
1. Go to this page and download the library: Download vegas-cmf/assets 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/ */
vegas-cmf / assets example snippets
namespace App\Shared;
use Vegas\Di\Injector\SharedServiceProviderInterface;
class AssetsManager implements SharedServiceProviderInterface
{
/**
* @return string
*/
public function getName()
{
return 'assets';
}
/**
* @param \Phalcon\DiInterface $di
* @return mixed
*/
public function getProvider(\Phalcon\DiInterface $di)
{
return function() use ($di)
{
return new Vegas\Assets\Manager();
};
}
}
'sharedServices' => [
...
'App\Shared\AssetsManager'
]
shell
php composer.phar update
config.php