PHP Class Gitlab\Model\Project

Inheritance: extends Gitlab\Model\AbstractModel
ファイルを表示 Open project: m4tthumphrey/php-gitlab-api Class Usage Examples

Protected Properties

Property Type Description
$properties array

Public Methods

Method Description
__construct ( integer $id = null, Gitlab\Client $client = null )
addHook ( string $url, array $events = [] ) : Gitlab\Model\ProjectHook
addKey ( string $title, string $key ) : Gitlab\Model\Key
addLabel ( string $name, string $color ) : Gitlab\Model\Label
addMember ( integer $user_id, integer $access_level ) : Gitlab\Model\User
archive ( ) : Project
blob ( string $sha, string $filepath ) : string
branch ( string $branch_name ) : Branch
branches ( ) : Branch[]
closeIssue ( integer $id, string $comment = null ) : Gitlab\Model\Issue
closeMergeRequest ( integer $id ) : Gitlab\Model\MergeRequest
commit ( string $sha ) : Gitlab\Model\Commit
commitComments ( string $ref, integer $page, integer $per_page = Api::PER_PAGE ) : Gitlab\Model\Commit[]
commits ( integer $page, integer $per_page = Api::PER_PAGE, string $ref_name = null ) : Gitlab\Model\Commit[]
compare ( string $from, string $to ) : Gitlab\Model\Comparison
contributors ( ) : array
create ( Gitlab\Client $client, string $name, array $params = [] ) : Project
createBranch ( string $name, string $ref ) : Branch
createCommitComment ( string $ref, string $note, array $params = [] ) : Gitlab\Model\CommitNote
createFile ( string $file_path, string $content, string $branch_name, string $commit_message ) : Gitlab\Model\File
createForUser ( integer $user_id, Gitlab\Client $client, string $name, array $params = [] ) : Project
createForkRelation ( integer $id ) : Project
createIssue ( string $title, array $params = [] ) : Gitlab\Model\Issue
createMergeRequest ( string $source, string $target, string $title, integer $assignee = null, string $description = null ) : Gitlab\Model\MergeRequest
createMilestone ( string $title, array $params = [] ) : Gitlab\Model\Milestone
createSnippet ( string $title, string $filename, string $code, string $lifetime = null ) : Gitlab\Model\Snippet
deleteBranch ( string $name ) : boolean
deleteFile ( string $file_path, string $branch_name, string $commit_message ) : boolean
diff ( string $sha ) : string
disableKey ( string $key_id ) : boolean
enableKey ( string $key_id ) : boolean
events ( integer $page = 1, integer $per_page = Api::PER_PAGE ) : Gitlab\Model\Event[]
forkFrom ( integer $id ) : Project
forkTo ( integer $id ) : Project
fromArray ( Gitlab\Client $client, array $data ) : Project
getFile ( $sha, $filepath ) : array
hook ( integer $id ) : Gitlab\Model\ProjectHook
hooks ( integer $page = 1, integer $per_page = Api::PER_PAGE ) : Gitlab\Model\ProjectHook[]
issue ( integer $id ) : Gitlab\Model\Issue
issues ( integer $page = 1, integer $per_page = Api::PER_PAGE ) : Gitlab\Model\Issue[]
key ( integer $key_id ) : Gitlab\Model\Key
keys ( ) : Gitlab\Model\Key[]
labels ( ) : Gitlab\Model\Label[]
member ( integer $user_id ) : Gitlab\Model\User
members ( string $username_query = null ) : Gitlab\Model\User[]
mergeMergeRequest ( integer $id ) : Gitlab\Model\MergeRequest
mergeRequest ( integer $id ) : Gitlab\Model\MergeRequest
mergeRequests ( integer $page = 1, integer $per_page = Api::PER_PAGE, string $state = MergeRequests::STATE_ALL ) : Gitlab\Model\MergeRequest[]
milestone ( integer $id ) : Gitlab\Model\Milestone
milestoneIssues ( integer $id ) : Gitlab\Model\Issue[]
milestones ( integer $page = 1, integer $per_page = Api::PER_PAGE ) : Gitlab\Model\Milestone[]
openIssue ( integer $id ) : Gitlab\Model\Issue
openMergeRequest ( integer $id ) : Gitlab\Model\MergeRequest
protectBranch ( string $branch_name, boolean $devPush = false, boolean $devMerge = false ) : Branch
remove ( ) : boolean
removeForkRelation ( ) : boolean
removeHook ( integer $hook_id ) : boolean
removeKey ( string $key_id ) : boolean
removeLabel ( string $name ) : boolean
removeMember ( integer $user_id ) : boolean
removeService ( string $service_name ) : boolean
removeSnippet ( integer $id ) : boolean
saveMember ( integer $user_id, integer $access_level ) : Gitlab\Model\User
setService ( string $service_name, array $params = [] ) : boolean
show ( ) : Project
snippet ( integer $id ) : Gitlab\Model\Snippet
snippetContent ( integer $id ) : Gitlab\Model\Snippet
snippets ( ) : Gitlab\Model\Snippet[]
tags ( ) : Gitlab\Model\Tag[]
transfer ( integer $group_id ) : Gitlab\Model\Group
tree ( array $params = [] ) : Gitlab\Model\Node[]
unarchive ( ) : Project
unprotectBranch ( string $branch_name ) : Branch
update ( array $params ) : Project
updateFile ( string $file_path, string $content, string $branch_name, string $commit_message ) : Gitlab\Model\File
updateHook ( integer $hook_id, array $params ) : mixed
updateIssue ( integer $id, array $params ) : Gitlab\Model\Issue
updateLabel ( string $name, array $params ) : Gitlab\Model\Label
updateMergeRequest ( integer $id, array $params ) : Gitlab\Model\MergeRequest
updateMilestone ( integer $id, array $params ) : Gitlab\Model\Milestone
updateSnippet ( integer $id, array $params ) : Gitlab\Model\Snippet

Method Details

__construct() public method

public __construct ( integer $id = null, Gitlab\Client $client = null )
$id integer
$client Gitlab\Client

addHook() public method

public addHook ( string $url, array $events = [] ) : Gitlab\Model\ProjectHook
$url string
$events array
return Gitlab\Model\ProjectHook

addKey() public method

public addKey ( string $title, string $key ) : Gitlab\Model\Key
$title string
$key string
return Gitlab\Model\Key

addLabel() public method

public addLabel ( string $name, string $color ) : Gitlab\Model\Label
$name string
$color string
return Gitlab\Model\Label

addMember() public method

public addMember ( integer $user_id, integer $access_level ) : Gitlab\Model\User
$user_id integer
$access_level integer
return Gitlab\Model\User

archive() public method

public archive ( ) : Project
return Project

blob() public method

public blob ( string $sha, string $filepath ) : string
$sha string
$filepath string
return string

branch() public method

public branch ( string $branch_name ) : Branch
$branch_name string
return Branch

branches() public method

public branches ( ) : Branch[]
return Branch[]

closeIssue() public method

public closeIssue ( integer $id, string $comment = null ) : Gitlab\Model\Issue
$id integer
$comment string
return Gitlab\Model\Issue

closeMergeRequest() public method

public closeMergeRequest ( integer $id ) : Gitlab\Model\MergeRequest
$id integer
return Gitlab\Model\MergeRequest

commit() public method

public commit ( string $sha ) : Gitlab\Model\Commit
$sha string
return Gitlab\Model\Commit

commitComments() public method

public commitComments ( string $ref, integer $page, integer $per_page = Api::PER_PAGE ) : Gitlab\Model\Commit[]
$ref string
$page integer
$per_page integer
return Gitlab\Model\Commit[]

commits() public method

public commits ( integer $page, integer $per_page = Api::PER_PAGE, string $ref_name = null ) : Gitlab\Model\Commit[]
$page integer
$per_page integer
$ref_name string
return Gitlab\Model\Commit[]

compare() public method

public compare ( string $from, string $to ) : Gitlab\Model\Comparison
$from string
$to string
return Gitlab\Model\Comparison

contributors() public method

public contributors ( ) : array
return array

create() public static method

public static create ( Gitlab\Client $client, string $name, array $params = [] ) : Project
$client Gitlab\Client
$name string
$params array
return Project

createBranch() public method

public createBranch ( string $name, string $ref ) : Branch
$name string
$ref string
return Branch

createCommitComment() public method

public createCommitComment ( string $ref, string $note, array $params = [] ) : Gitlab\Model\CommitNote
$ref string
$note string
$params array
return Gitlab\Model\CommitNote

createFile() public method

public createFile ( string $file_path, string $content, string $branch_name, string $commit_message ) : Gitlab\Model\File
$file_path string
$content string
$branch_name string
$commit_message string
return Gitlab\Model\File

createForUser() public static method

public static createForUser ( integer $user_id, Gitlab\Client $client, string $name, array $params = [] ) : Project
$user_id integer
$client Gitlab\Client
$name string
$params array
return Project

createForkRelation() public method

public createForkRelation ( integer $id ) : Project
$id integer
return Project

createIssue() public method

public createIssue ( string $title, array $params = [] ) : Gitlab\Model\Issue
$title string
$params array
return Gitlab\Model\Issue

createMergeRequest() public method

public createMergeRequest ( string $source, string $target, string $title, integer $assignee = null, string $description = null ) : Gitlab\Model\MergeRequest
$source string
$target string
$title string
$assignee integer
$description string
return Gitlab\Model\MergeRequest

createMilestone() public method

public createMilestone ( string $title, array $params = [] ) : Gitlab\Model\Milestone
$title string
$params array
return Gitlab\Model\Milestone

createSnippet() public method

public createSnippet ( string $title, string $filename, string $code, string $lifetime = null ) : Gitlab\Model\Snippet
$title string
$filename string
$code string
$lifetime string
return Gitlab\Model\Snippet

deleteBranch() public method

public deleteBranch ( string $name ) : boolean
$name string
return boolean

deleteFile() public method

public deleteFile ( string $file_path, string $branch_name, string $commit_message ) : boolean
$file_path string
$branch_name string
$commit_message string
return boolean

diff() public method

public diff ( string $sha ) : string
$sha string
return string

disableKey() public method

public disableKey ( string $key_id ) : boolean
$key_id string
return boolean

enableKey() public method

public enableKey ( string $key_id ) : boolean
$key_id string
return boolean

events() public method

public events ( integer $page = 1, integer $per_page = Api::PER_PAGE ) : Gitlab\Model\Event[]
$page integer
$per_page integer
return Gitlab\Model\Event[]

forkFrom() public method

public forkFrom ( integer $id ) : Project
$id integer
return Project

forkTo() public method

public forkTo ( integer $id ) : Project
$id integer
return Project

fromArray() public static method

public static fromArray ( Gitlab\Client $client, array $data ) : Project
$client Gitlab\Client
$data array
return Project

getFile() public method

public getFile ( $sha, $filepath ) : array
$sha
$filepath
return array

hook() public method

public hook ( integer $id ) : Gitlab\Model\ProjectHook
$id integer
return Gitlab\Model\ProjectHook

hooks() public method

public hooks ( integer $page = 1, integer $per_page = Api::PER_PAGE ) : Gitlab\Model\ProjectHook[]
$page integer
$per_page integer
return Gitlab\Model\ProjectHook[]

issue() public method

public issue ( integer $id ) : Gitlab\Model\Issue
$id integer
return Gitlab\Model\Issue

issues() public method

public issues ( integer $page = 1, integer $per_page = Api::PER_PAGE ) : Gitlab\Model\Issue[]
$page integer
$per_page integer
return Gitlab\Model\Issue[]

key() public method

public key ( integer $key_id ) : Gitlab\Model\Key
$key_id integer
return Gitlab\Model\Key

keys() public method

public keys ( ) : Gitlab\Model\Key[]
return Gitlab\Model\Key[]

labels() public method

public labels ( ) : Gitlab\Model\Label[]
return Gitlab\Model\Label[]

member() public method

public member ( integer $user_id ) : Gitlab\Model\User
$user_id integer
return Gitlab\Model\User

members() public method

public members ( string $username_query = null ) : Gitlab\Model\User[]
$username_query string
return Gitlab\Model\User[]

mergeMergeRequest() public method

public mergeMergeRequest ( integer $id ) : Gitlab\Model\MergeRequest
$id integer
return Gitlab\Model\MergeRequest

mergeRequest() public method

public mergeRequest ( integer $id ) : Gitlab\Model\MergeRequest
$id integer
return Gitlab\Model\MergeRequest

mergeRequests() public method

public mergeRequests ( integer $page = 1, integer $per_page = Api::PER_PAGE, string $state = MergeRequests::STATE_ALL ) : Gitlab\Model\MergeRequest[]
$page integer
$per_page integer
$state string
return Gitlab\Model\MergeRequest[]

milestone() public method

public milestone ( integer $id ) : Gitlab\Model\Milestone
$id integer
return Gitlab\Model\Milestone

milestoneIssues() public method

public milestoneIssues ( integer $id ) : Gitlab\Model\Issue[]
$id integer
return Gitlab\Model\Issue[]

milestones() public method

public milestones ( integer $page = 1, integer $per_page = Api::PER_PAGE ) : Gitlab\Model\Milestone[]
$page integer
$per_page integer
return Gitlab\Model\Milestone[]

openIssue() public method

public openIssue ( integer $id ) : Gitlab\Model\Issue
$id integer
return Gitlab\Model\Issue

openMergeRequest() public method

public openMergeRequest ( integer $id ) : Gitlab\Model\MergeRequest
$id integer
return Gitlab\Model\MergeRequest

protectBranch() public method

public protectBranch ( string $branch_name, boolean $devPush = false, boolean $devMerge = false ) : Branch
$branch_name string
$devPush boolean
$devMerge boolean
return Branch

remove() public method

public remove ( ) : boolean
return boolean

removeForkRelation() public method

public removeForkRelation ( ) : boolean
return boolean

removeHook() public method

public removeHook ( integer $hook_id ) : boolean
$hook_id integer
return boolean

removeKey() public method

public removeKey ( string $key_id ) : boolean
$key_id string
return boolean

removeLabel() public method

public removeLabel ( string $name ) : boolean
$name string
return boolean

removeMember() public method

public removeMember ( integer $user_id ) : boolean
$user_id integer
return boolean

removeService() public method

public removeService ( string $service_name ) : boolean
$service_name string
return boolean

removeSnippet() public method

public removeSnippet ( integer $id ) : boolean
$id integer
return boolean

saveMember() public method

public saveMember ( integer $user_id, integer $access_level ) : Gitlab\Model\User
$user_id integer
$access_level integer
return Gitlab\Model\User

setService() public method

public setService ( string $service_name, array $params = [] ) : boolean
$service_name string
$params array
return boolean

show() public method

public show ( ) : Project
return Project

snippet() public method

public snippet ( integer $id ) : Gitlab\Model\Snippet
$id integer
return Gitlab\Model\Snippet

snippetContent() public method

public snippetContent ( integer $id ) : Gitlab\Model\Snippet
$id integer
return Gitlab\Model\Snippet

snippets() public method

public snippets ( ) : Gitlab\Model\Snippet[]
return Gitlab\Model\Snippet[]

tags() public method

public tags ( ) : Gitlab\Model\Tag[]
return Gitlab\Model\Tag[]

transfer() public method

public transfer ( integer $group_id ) : Gitlab\Model\Group
$group_id integer
return Gitlab\Model\Group

tree() public method

public tree ( array $params = [] ) : Gitlab\Model\Node[]
$params array
return Gitlab\Model\Node[]

unarchive() public method

public unarchive ( ) : Project
return Project

unprotectBranch() public method

public unprotectBranch ( string $branch_name ) : Branch
$branch_name string
return Branch

update() public method

public update ( array $params ) : Project
$params array
return Project

updateFile() public method

public updateFile ( string $file_path, string $content, string $branch_name, string $commit_message ) : Gitlab\Model\File
$file_path string
$content string
$branch_name string
$commit_message string
return Gitlab\Model\File

updateHook() public method

public updateHook ( integer $hook_id, array $params ) : mixed
$hook_id integer
$params array
return mixed

updateIssue() public method

public updateIssue ( integer $id, array $params ) : Gitlab\Model\Issue
$id integer
$params array
return Gitlab\Model\Issue

updateLabel() public method

public updateLabel ( string $name, array $params ) : Gitlab\Model\Label
$name string
$params array
return Gitlab\Model\Label

updateMergeRequest() public method

public updateMergeRequest ( integer $id, array $params ) : Gitlab\Model\MergeRequest
$id integer
$params array
return Gitlab\Model\MergeRequest

updateMilestone() public method

public updateMilestone ( integer $id, array $params ) : Gitlab\Model\Milestone
$id integer
$params array
return Gitlab\Model\Milestone

updateSnippet() public method

public updateSnippet ( integer $id, array $params ) : Gitlab\Model\Snippet
$id integer
$params array
return Gitlab\Model\Snippet

Property Details

$properties protected_oe static_oe property

protected static array $properties
return array