This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getVersion() { | |
// por la tilde invertida se puede ejecutar de manera directa el comando. | |
if ($commit = sprintf("%s", `git describe --all --long | cut -d "-" -f 3`)) { | |
return $commit; | |
} else { | |
return "No hay commit"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// $command may have one of the following content: | |
// $command = ["command" => "install"]; # only for install without anything | |
// $command = ['command' => 'require', 'packages' => ['maatwebsite/excel:~2.1.0']]; # for install a specific package | |
// $command = ['command' => 'remove', 'packages' => ['maatwebsite/excel:~2.1.0']]; # for remove a specific package | |
// define directory for extract | |
define('EXTRACT_DIRECTORY', "/your/desired/directory"); | |
//Use the Composer classes | |
use Composer\Console\Application; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace johnitvn\rbacplus\models; | |
use Yii; | |
use yii\base\Model; | |
use yii\rbac\Item; | |
/** | |
* @author John Martin <john.itvn@gmail.com> |