1027 lines
32 KiB
PHP
1027 lines
32 KiB
PHP
<?php
|
|
|
|
namespace Codebird;
|
|
|
|
/**
|
|
* A Twitter library in PHP.
|
|
*
|
|
* @package codebird
|
|
* @version 2.4.1
|
|
* @author J.M. <me@mynetx.net>
|
|
* @copyright 2010-2013 J.M. <me@mynetx.net>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
/**
|
|
* Define constants
|
|
*/
|
|
$constants = explode(' ', 'OBJECT ARRAY JSON');
|
|
foreach ($constants as $i => $id) {
|
|
$id = 'CODEBIRD_RETURNFORMAT_' . $id;
|
|
defined($id) or define($id, $i);
|
|
}
|
|
$constants = array(
|
|
'CURLE_SSL_CERTPROBLEM' => 58,
|
|
'CURLE_SSL_CACERT' => 60,
|
|
'CURLE_SSL_CACERT_BADFILE' => 77,
|
|
'CURLE_SSL_CRL_BADFILE' => 82,
|
|
'CURLE_SSL_ISSUER_ERROR' => 83
|
|
);
|
|
foreach ($constants as $id => $i) {
|
|
defined($id) or define($id, $i);
|
|
}
|
|
unset($constants);
|
|
unset($i);
|
|
unset($id);
|
|
|
|
/**
|
|
* A Twitter library in PHP.
|
|
*
|
|
* @package codebird
|
|
* @subpackage codebird-php
|
|
*/
|
|
class Codebird
|
|
{
|
|
/**
|
|
* The current singleton instance
|
|
*/
|
|
private static $_instance = null;
|
|
|
|
/**
|
|
* The OAuth consumer key of yo |