PHP code example of mihaildev / yii2-view-replacer
1. Go to this page and download the library: Download mihaildev/yii2-view-replacer 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/ */
mihaildev / yii2-view-replacer example snippets
class Bootstrap implements BootstrapInterface
{
/**
* Bootstrap method to be called during application bootstrap stage.
* @param Application $app the application currently running
*/
public function bootstrap($app)
{
ViewReplacer::replace('@app/some/path', '@app/to/path');
ViewReplacer::replace([
'@app/some/path' => '@app/to/path',
'@app/some/path' => [
'@app/to/path',
'@app/to/path'
]
]);
}
}