PHP Class app\models\Project

Inheritance: extends Illuminate\Database\Eloquent\Model
Show file Open project: meolu/walle-web Class Usage Examples

Public Properties

Property Type Description
$CONF
$LEVEL

Public Methods

Method Description
afterDelete ( ) 添加数据删除事件afterDelete
afterSave ( boolean $insert, array $changedAttributes ) 添加数据保存事件afterSave
attributeLabels ( )
behaviors ( )
getAnsibleHostsFile ( integer $projectId ) : string 获取当前进程配置的ansible hosts文件路径
getAnsibleStatus ( ) : boolean 获取当前进程配置的ansible状态
getConf ( $id = null ) : string | ActiveQuery 获取当前进程的项目配置
getDeployFromDir ( ) : string 拼接宿主机的仓库目录 {deploy_from}/{env}/{project}
getDeployPackagePath ( $version ) : string 获取 ansible 宿主机tar文件路径
getDeployWorkspace ( $version ) : string 拼接宿主机的部署隔离工作空间 {deploy_from}/{env}/{project}-YYmmdd-HHiiss
getGitProjectName ( $gitUrl ) : mixed 根据git地址获取项目名字
getHosts ( ) 获取当前进程配置的目标机器host列表
getReleaseVersionDir ( $version = '' ) : string 拼接目标机要发布的目录 {release_library}/{project}/{version}
getReleaseVersionPackage ( string $version = '' ) : string 拼接目标机要发布的打包文件路径 {release_library}/{project}/{version}.tar.gz
getSvnDeployBranchFromDir ( string $branchName = 'trunk' ) : string 拼接宿主机的SVN仓库目录(带branches/tags目录)
getTargetWorkspace ( ) : string 获取目标机要发布的目录 {webroot}
rules ( )
tableName ( )

Method Details

afterDelete() public method

添加数据删除事件afterDelete
Author: wushuiyong
public afterDelete ( )

afterSave() public method

添加数据保存事件afterSave
Author: wushuiyong
public afterSave ( boolean $insert, array $changedAttributes )
$insert boolean
$changedAttributes array

attributeLabels() public method

public attributeLabels ( )

behaviors() public method

public behaviors ( )

getAnsibleHostsFile() public static method

{ansible_hosts.dir}/project_{projectId}
public static getAnsibleHostsFile ( integer $projectId ) : string
$projectId integer 可以传入指定的id
return string

getAnsibleStatus() public static method

获取当前进程配置的ansible状态
public static getAnsibleStatus ( ) : boolean
return boolean

getConf() public static method

获取当前进程的项目配置
public static getConf ( $id = null ) : string | ActiveQuery
$id
return string | yii\db\ActiveQuery

getDeployFromDir() public static method

拼接宿主机的仓库目录 {deploy_from}/{env}/{project}
public static getDeployFromDir ( ) : string
return string

getDeployPackagePath() public static method

{deploy_from}/{env}/{project}-YYmmdd-HHiiss.tar.gz
public static getDeployPackagePath ( $version ) : string
$version
return string

getDeployWorkspace() public static method

拼接宿主机的部署隔离工作空间 {deploy_from}/{env}/{project}-YYmmdd-HHiiss
public static getDeployWorkspace ( $version ) : string
return string

getGitProjectName() public static method

根据git地址获取项目名字
public static getGitProjectName ( $gitUrl ) : mixed
$gitUrl
return mixed

getHosts() public static method

获取当前进程配置的目标机器host列表
public static getHosts ( )

getReleaseVersionDir() public static method

拼接目标机要发布的目录 {release_library}/{project}/{version}
public static getReleaseVersionDir ( $version = '' ) : string
$version
return string

getReleaseVersionPackage() public static method

拼接目标机要发布的打包文件路径 {release_library}/{project}/{version}.tar.gz
public static getReleaseVersionPackage ( string $version = '' ) : string
$version string
return string

getSvnDeployBranchFromDir() public static method

拼接宿主机的SVN仓库目录(带branches/tags目录)
public static getSvnDeployBranchFromDir ( string $branchName = 'trunk' ) : string
$branchName string
return string

getTargetWorkspace() public static method

获取目标机要发布的目录 {webroot}
public static getTargetWorkspace ( ) : string
return string

rules() public method

public rules ( )

tableName() public static method

public static tableName ( )

Property Details

$CONF public static property

public static $CONF

$LEVEL public static property

public static $LEVEL