drmq16019 2013-07-03 18:52
浏览 47
已采纳

Symfony 2.3添加Google API

I used this before Symfony2 and Google API integration

I had a question about this, when I use the classmap in compser.json I am able to get to the Google_Client class, however I am unable to use any other classes.

For example I want to use the Goole_YoutubeService. I have...

$client = new \Google_Client();
$youtube = new \Google_YoutubeService($client);

When I do this my code recognizes Google_Client(), but cannot find the Google_YoutubeService().

Am I missing something to get this to work?

This is my composer.json

{
    "name": "symfony/framework-standard-edition",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" },
        "classmap": ["vendor/google/google-api-php-client/src","vendor/google/google-api-php-clien‌​t/src/contrib"]

},
"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.3.*",
    "doctrine/orm": "~2.2,>=2.2.3",
    "doctrine/doctrine-bundle": "1.2.*",
    "twig/extensions": "1.0.*",
    "symfony/assetic-bundle": "2.3.*",
    "symfony/swiftmailer-bundle": "2.3.*",
    "symfony/monolog-bundle": "2.3.*",
    "sensio/distribution-bundle": "2.3.*",
    "sensio/framework-extra-bundle": "2.3.*",
    "sensio/generator-bundle": "2.3.*",
    "google/google-api-php-client": "1.0.0"

},
"require-dev": {
    "phpunit/phpunit": "3.7.*",
    "phake/phake": "1.*"
},
"scripts": {
    "post-install-cmd": [
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
    ],
    "post-update-cmd": [
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
    ]
},
"config": {
    "bin-dir": "bin"
},
"minimum-stability": "alpha",
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "branch-alias": {
        "dev-master": "2.2-dev"
    }
},
"repositories": [
{
    "type": "package",
    "package": {
        "name": "google/google-api-php-client",
        "version": "1.0.0",
        "source": {
            "type": "svn",
            "url": "http://google-api-php-client.googlecode.com/svn",
            "reference": "trunk"
        }
    }
}
]
}
  • 写回答

1条回答 默认 最新

  • duanlidi1051 2013-08-06 15:31
    关注

    Try Google_YouTubeService - uppercase YouTube - it will work

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 汇编语言除法溢出问题
  • ¥65 C++实现删除N个数据列表共有的元素
  • ¥15 Visual Studio问题
  • ¥15 state显示变量是字符串形式,但是仍然红色,无法引用,并显示类型不匹配
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗