ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSDirectoryTreeConnector Class Reference
+ Inheritance diagram for ilECSDirectoryTreeConnector:
+ Collaboration diagram for ilECSDirectoryTreeConnector:

Public Member Functions

 __construct (ilECSSetting $settings=null)
 Constructor.
 getDirectoryTrees ($a_mid=0)
 Get directory tree ilLog $ilLog.
 getDirectoryTree ($tree_id)
 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

Constructor & Destructor Documentation

ilECSDirectoryTreeConnector::__construct ( ilECSSetting  $settings = null)

Constructor.

Parameters
ilECSSetting$settings

Reimplemented from ilECSConnector.

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

References ilECSConnector\$settings.

{
parent::__construct($settings);
}

Member Function Documentation

ilECSDirectoryTreeConnector::getDirectoryTree (   $tree_id)

Get single directory tree.

Returns
array an array of ecs cms directory tree entries

Definition at line 62 of file class.ilECSDirectoryTreeConnector.php.

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

{
$this->path_postfix = '/campusconnect/directory_trees/'. (int) $tree_id;
try {
$this->setHeader(array());
$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 $ecs_result;
}
{
throw new ilECSConnectorException('Error calling ECS service: '.$e->getMessage());
}
}

+ Here is the call graph for this function:

ilECSDirectoryTreeConnector::getDirectoryTrees (   $a_mid = 0)

Get directory tree ilLog $ilLog.

Returns
ilECSResult
Exceptions
ilECSConnectorException

Definition at line 31 of file class.ilECSDirectoryTreeConnector.php.

References $ilLog, $res, ilECSConnector\addHeader(), ilECSConnector\call(), ilECSConnector\getHeader(), ilECSConnector\prepareConnection(), ilECSResult\RESULT_TYPE_URL_LIST, and ilECSConnector\setHeader().

{
global $ilLog;
$this->path_postfix = '/campusconnect/directory_trees';
try {
$this->setHeader(array());
$this->addHeader('Accept', 'text/uri-list');
$this->addHeader('X-EcsQueryStrings', 'all=true');
if($a_mid)
{
$this->addHeader('X-EcsReceiverMemberships', $a_mid);
}
$this->curl->setOpt(CURLOPT_HTTPHEADER, $this->getHeader());
$res = $this->call();
return $ecsResult->getResult();
}
throw new ilECSConnectorException('Error calling ECS service: '.$exc->getMessage());
}
}

+ Here is the call graph for this function:


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