1

This following is my php library location:

sites/all/libraries/Baidu-Push-SDK-Php

I try to implement hook_libraries_info():

/**
 * Implementation of hook_libraries_info().
 */

function baidu_push_services_libraries_info() {
  $libraries = array();

  $libraries['Baidu-Push-SDK-Php'] = array(
      'name' => 'Baidu Push SDK',
      'vendor url' => 'http://developer.baidu.com/',
      'download url' => 'http://developer.baidu.com/',
      'version arguments' => array(
        'file' => 'change_log',
        'pattern' => '([0-9\.]+)',
        'lines' => 14,
      ),
      'files' => array(
        'php' => array(
          'Channel.class.php',
        ),
      ),
    );

  return $libraries;
}

Then I try to load my library:

$baidu_push = libraries_load("Baidu-Push-SDK-Php");

But It show me:

The <em class="placeholder">BaiduPushSDK</em> library could not be found.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.