PHP Class JiraRestApi\JiraClient

Afficher le fichier Open project: lesstif/php-jira-rest-client Class Usage Examples

Protected Properties

Свойство Type Description
$configuration JiraRestApi\Configuration\ConfigurationInterface Jira Rest API Configuration.
$curl resource CURL instance.
$http_response string HTTP response code.
$json_mapper JsonMapper Json Mapper.
$log Monolog\Logger Monolog instance.

Méthodes publiques

Méthode Description
__construct ( JiraRestApi\Configuration\ConfigurationInterface $configuration = null, Logger $logger = null ) Constructor.
exec ( string $context, string $post_data = null, string $custom_request = null ) : string Execute REST request.
getConfiguration ( ) : JiraRestApi\Configuration\ConfigurationInterface Jira Rest API Configuration.
upload ( string $context, array $filePathArray ) : array File upload.

Méthodes protégées

Méthode Description
authorization ( resource $ch ) Add authorize to curl request.
createUrlByContext ( string $context ) : string Get URL by context.
filterNullVariable ( array $haystack ) : array Serilize only not null field.

Private Methods

Méthode Description
convertLogLevel ( $log_level ) : integer Convert log level.
createUploadHandle ( string $url, string $upload_file ) : resource Create upload handle.

Method Details

__construct() public méthode

Constructor.
public __construct ( JiraRestApi\Configuration\ConfigurationInterface $configuration = null, Logger $logger = null )
$configuration JiraRestApi\Configuration\ConfigurationInterface
$logger Monolog\Logger

authorization() protected méthode

Add authorize to curl request.
protected authorization ( resource $ch )
$ch resource

createUrlByContext() protected méthode

Get URL by context.
protected createUrlByContext ( string $context ) : string
$context string
Résultat string

exec() public méthode

Execute REST request.
public exec ( string $context, string $post_data = null, string $custom_request = null ) : string
$context string Rest API context (ex.:issue, search, etc..)
$post_data string
$custom_request string [PUT|DELETE]
Résultat string

filterNullVariable() protected méthode

Serilize only not null field.
protected filterNullVariable ( array $haystack ) : array
$haystack array
Résultat array

getConfiguration() public méthode

Jira Rest API Configuration.
public getConfiguration ( ) : JiraRestApi\Configuration\ConfigurationInterface
Résultat JiraRestApi\Configuration\ConfigurationInterface

upload() public méthode

File upload.
public upload ( string $context, array $filePathArray ) : array
$context string url context
$filePathArray array upload file path.
Résultat array

Property Details

$configuration protected_oe property

Jira Rest API Configuration.
protected ConfigurationInterface,JiraRestApi\Configuration $configuration
Résultat JiraRestApi\Configuration\ConfigurationInterface

$curl protected_oe property

CURL instance.
protected resource $curl
Résultat resource

$http_response protected_oe property

HTTP response code.
protected string $http_response
Résultat string

$json_mapper protected_oe property

Json Mapper.
protected JsonMapper $json_mapper
Résultat JsonMapper

$log protected_oe property

Monolog instance.
protected Logger,Monolog $log
Résultat Monolog\Logger