[英]How to use rackspace php-opencloud with Laravel 4
I'm trying to use the php-opencloud library with Laravel 4 (it's my first time with it, I'm a bit intimidated...) 我正在尝试使用带有Laravel 4的php-opencloud库 (这是我第一次使用它,我有点害怕......)
I have added this to my composer.json, tried a composer update, which downloaded the lib correctly, but what's next? 我已经将它添加到我的composer.json中,尝试了一个作曲家更新,它正确地下载了lib,但下一步是什么? How can I autoload it?
我怎么能自动加载它?
"repositories": {
"php-opencloud": {
"type": "package",
"package": {
"name": "rackspace/php-opencloud",
"version": "1.4.1",
"source": {
"url": "https://github.com/rackspace/php-opencloud.git",
"type": "git",
"reference": "origin/master"
}
}
}
}
Most of the packages you install via Composer make use of autoloading: 您通过Composer安装的大多数软件包都使用自动加载:
That is basically just including a single file in your bootstrap and you're ready to go: 这基本上只是在你的引导程序中包含一个文件,你准备好了:
require 'vendor/autoload.php';
That is relative to the location where you placed your composer.json
file. 这与您放置
composer.json
文件的位置有关。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.