当前位置: 首页>>代码示例>>PHP>>正文


PHP Api::create方法代码示例

本文整理汇总了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')));
 }
开发者ID:smarcet,项目名称:openstackid,代码行数:10,代码来源:ApiSeeder.php

示例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);
 }
开发者ID:keboola,项目名称:generic-extractor,代码行数:10,代码来源:Configuration.php

示例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')));
 }
开发者ID:smarcet,项目名称:openstackid,代码行数:12,代码来源:TestSeeder.php


注:本文中的Api::create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。