ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSCourseMemberConnector Class Reference

Connector for course member ressource. More...

+ Inheritance diagram for ilECSCourseMemberConnector:
+ Collaboration diagram for ilECSCourseMemberConnector:

Public Member Functions

 __construct (ilECSSetting $settings=null)
 Constructor.
 getCourseMember ($course_member_id, $a_details=false)
 Get single directory tree.
- Public Member Functions inherited from ilECSConnector
 addHeader ($a_name, $a_value)
 Add Header.
 getHeader ()
 setHeader ($a_header_strings)
 getServer ()
 Get current server setting.
 addAuth ($a_post, $a_target_mid)
 Add auth resource.
 getAuth ($a_hash)
 get auth resource
 getEventQueues ()
 get event queue
 readEventFifo ($a_delete=false)
 Read event fifo.
 getResourceList ($a_path)
 getResource ($a_path, $a_econtent_id, $a_details_only=false)
 Get resources from ECS server.
 addResource ($a_path, $a_post)
 Add resource.
 updateResource ($a_path, $a_econtent_id, $a_post_string)
 update resource
 deleteResource ($a_path, $a_econtent_id)
 Delete resource.
 getMemberships ($a_mid=0)
 public

Additional Inherited Members

- Data Fields inherited from ilECSConnector
const HTTP_CODE_CREATED = 201
const HTTP_CODE_OK = 200
const HTTP_CODE_NOT_FOUND = 404
const HEADER_MEMBERSHIPS = 'X-EcsReceiverMemberships'
const HEADER_COMMUNITIES = 'X-EcsReceiverCommunities'
- Protected Member Functions inherited from ilECSConnector
 prepareConnection ()
 prepare connection
 call ()
 call peer
- Static Protected Member Functions inherited from ilECSConnector
static _fetchEContentIdFromHeader ($a_header)
 fetch new econtent id from location header
- Protected Attributes inherited from ilECSConnector
 $path_postfix = ''
 $settings
 $header_strings = array()

Detailed Description

Connector for course member ressource.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e $Id$

Definition at line 13 of file class.ilECSCourseMemberConnector.php.

Constructor & Destructor Documentation

ilECSCourseMemberConnector::__construct ( ilECSSetting  $settings = null)

Constructor.

Parameters
ilECSSetting$settings

Reimplemented from ilECSConnector.

Definition at line 20 of file class.ilECSCourseMemberConnector.php.

References ilECSConnector\$settings.

{
parent::__construct($settings);
}

Member Function Documentation

ilECSCourseMemberConnector::getCourseMember (   $course_member_id,
  $a_details = false 
)

Get single directory tree.

Returns
array an array of ecs cms directory tree entries

Definition at line 30 of file class.ilECSCourseMemberConnector.php.

References $GLOBALS, $res, ilECSConnector\addHeader(), ilECSConnector\call(), ilECSConnector\getHeader(), ilECSConnector\prepareConnection(), and ilECSConnector\setHeader().

{
$this->path_postfix = '/campusconnect/course_members/'. (int) $course_member_id;
if($a_details and $course_member_id)
{
$this->path_postfix .= '/details';
}
try {
$this->setHeader(array());
if($a_details)
{
$this->addHeader('Accept', 'application/json');
}
else
{
#$this->addHeader('Accept', 'text/uri-list');
}
$this->curl->setOpt(CURLOPT_HTTPHEADER, $this->getHeader());
$res = $this->call();
if(substr($res, 0, 4) == 'http')
{
$json = file_get_contents($res);
$ecs_result = new ilECSResult($json);
}
else
{
$ecs_result = new ilECSResult($res);
}
// Return ECSEContentDetails for details switch
if($a_details)
{
include_once './Services/WebServices/ECS/classes/class.ilECSEContentDetails.php';
$details = new ilECSEContentDetails();
$GLOBALS['ilLog']->write(print_r($res,true));
$details->loadFromJson($ecs_result->getResult());
return $details;
}
return $ecs_result->getResult();
}
{
throw new ilECSConnectorException('Error calling ECS service: '.$e->getMessage());
}
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: