Last active
November 24, 2015 07:42
-
-
Save zx1986/9b5ae39ab2eaf49d4291 to your computer and use it in GitHub Desktop.
如何把第三方的 Class 包到 CodeIgniter Libraries 中,方便 CodeIgniter $CI->load->libraries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class PHPList { | |
public function __construct($config = array()) | |
{ | |
if (!empty($config)) | |
{ | |
include_once('phpListRESTApiClient.php'); | |
return new phpListRESTApiClient($config['api_url'], $config['id'], $config['pw']); | |
} | |
else | |
echo 'Need to initial with an array like: $config("api_url" => string, "id" => string, "pw" => string);' | |
} | |
} | |
/* End of file PHPList.php */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
感謝大神賜教!