本文整理汇总了PHP中Api::create方法的典型用法代码示例。如果您正苦于以下问题:PHP Api::create方法的具体用法?PHP Api::create怎么用?PHP Api::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Api
的用法示例。
在下文中一共展示了Api::create方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
DB::table('oauth2_api_endpoint_api_scope')->delete();
DB::table('oauth2_client_api_scope')->delete();
DB::table('oauth2_api_scope')->delete();
DB::table('oauth2_api')->delete();
$resource_server = ResourceServer::first();
// users
Api::create(array('name' => 'users', 'logo' => null, 'active' => true, 'Description' => 'User Info', 'resource_server_id' => $resource_server->id, 'logo' => asset('img/apis/server.png')));
}
示例2: up
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$resource_server = ResourceServer::first();
if (!$resource_server) {
return;
}
// public clouds
Api::create(array('name' => 'public-clouds', 'logo' => null, 'active' => true, 'Description' => 'Marketplace Public Clouds', 'resource_server_id' => $resource_server->id, 'logo' => asset('img/apis/server.png')));
// private clouds
Api::create(array('name' => 'private-clouds', 'logo' => null, 'active' => true, 'Description' => 'Marketplace Private Clouds', 'resource_server_id' => $resource_server->id, 'logo' => asset('img/apis/server.png')));
// consultants
Api::create(array('name' => 'consultants', 'logo' => null, 'active' => true, 'Description' => 'Marketplace Consultants', 'resource_server_id' => $resource_server->id, 'logo' => asset('img/apis/server.png')));
$this->seedPublicCloudScopes();
$this->seedPrivateCloudScopes();
$this->seedConsultantScopes();
$this->seedPublicCloudsEndpoints();
$this->seedPrivateCloudsEndpoints();
$this->seedConsultantsEndpoints();
}
开发者ID:smarcet,项目名称:openstackid,代码行数:24,代码来源:2015_03_19_190534_insert_marketplace_api_endpoints_scopes.php
示例3: getApi
/**
* @param $config
* @param $authorization
* @return Api
*/
public function getApi($config, $authorization)
{
// TODO check if it exists (have some getter fn in parent Configuration)
return Api::create($this->getYaml('/config.yml', 'parameters', 'api'), $config, $authorization);
}
示例4: seedApis
private function seedApis()
{
$resource_server = ResourceServer::first();
Api::create(array('name' => 'resource-server', 'logo' => null, 'active' => true, 'Description' => 'Resource Server CRUD operations', 'resource_server_id' => $resource_server->id, 'logo' => asset('img/apis/server.png')));
Api::create(array('name' => 'api', 'logo' => null, 'active' => true, 'Description' => 'Api CRUD operations', 'resource_server_id' => $resource_server->id, 'logo' => asset('img/apis/server.png')));
Api::create(array('name' => 'api-endpoint', 'logo' => null, 'active' => true, 'Description' => 'Api Endpoints CRUD operations', 'resource_server_id' => $resource_server->id, 'logo' => asset('img/apis/server.png')));
Api::create(array('name' => 'api-scope', 'logo' => null, 'active' => true, 'Description' => 'Api Scopes CRUD operations', 'resource_server_id' => $resource_server->id, 'logo' => asset('img/apis/server.png')));
Api::create(array('name' => 'users', 'logo' => null, 'active' => true, 'Description' => 'User Info', 'resource_server_id' => $resource_server->id, 'logo' => asset('img/apis/server.png')));
Api::create(array('name' => 'public-clouds', 'logo' => null, 'active' => true, 'Description' => 'Marketplace Public Clouds', 'resource_server_id' => $resource_server->id, 'logo' => asset('img/apis/server.png')));
Api::create(array('name' => 'private-clouds', 'logo' => null, 'active' => true, 'Description' => 'Marketplace Private Clouds', 'resource_server_id' => $resource_server->id, 'logo' => asset('img/apis/server.png')));
Api::create(array('name' => 'consultants', 'logo' => null, 'active' => true, 'Description' => 'Marketplace Consultants', 'resource_server_id' => $resource_server->id, 'logo' => asset('img/apis/server.png')));
}