Gitlab\Model\Project::create PHP Method

create() public static method

public static create ( Gitlab\Client $client, string $name, array $params = [] ) : Project
$client Gitlab\Client
$name string
$params array
return Project
    public static function create(Client $client, $name, array $params = array())
    {
        $data = $client->api('projects')->create($name, $params);
        return static::fromArray($client, $data);
    }

Usage Example

コード例 #1
0
 /**
  * Create new project from ['gitlab']['project-name']
  * @return boolean
  */
 public function createProject()
 {
     $project = new Project();
     if ($this->idgroup) {
         $project->create($this->client, $this->config['gitlab']['project-name'], array('description' => 'Mikrotik RouterOS backup files.', 'namespace_id' => $this->getGroupID(), 'issues_enabled' => false));
         return $this->checkProjectName();
     }
     $project->create($this->client, $this->config['gitlab']['project-name'], array('description' => 'Mikrotik RouterOS backup files.', 'issues_enabled' => false));
     return $this->checkProjectName();
 }
All Usage Examples Of Gitlab\Model\Project::create