Page MenuHomePhorge

Tasks.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

Tasks.php

<?php
/**
* Syncroton
*
* @package Model
* @license http://www.tine20.org/licenses/lgpl.html LGPL Version 3
* @copyright Copyright (c) 2009-2012 Metaways Infosystems GmbH (http://www.metaways.de)
* @author Lars Kneschke <l.kneschke@metaways.de>
*/
/**
* class to handle ActiveSync Sync command
*
* @package Model
*/
class Syncroton_Data_Tasks extends Syncroton_Data_AData
{
public function appendXML(DOMElement $_domParrent, $_collectionData, $_serverId)
{
$_domParrent->ownerDocument->documentElement->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:Tasks', 'uri:Tasks');
}
public function createEntry($_folderId, SimpleXMLElement $_entry)
{
#$xmlData = $_entry->children('uri:Contacts');
$id = sha1(mt_rand(). microtime());
self::$entries[$id] = array(
# 'FirstName' => (string)$xmlData->FirstName,
# 'LastName' => (string)$xmlData->LastName
);
return $id;
}
protected function _initData()
{
/**
* used by unit tests only to simulated added folders
*/
Syncroton_Data_AData::$folders[get_class($this)] = array(
'tasksFolderId' => array(
'folderId' => 'tasksFolderId',
'parentId' => null,
'displayName' => 'Default Tasks Folder',
'type' => Syncroton_Command_FolderSync::FOLDERTYPE_TASK
)
);
/**
* used by unit tests only to simulated added folders
*/
Syncroton_Data_AData::$entries[get_class($this)] = array(
'tasksFolderId' => array(
'contact1' => array(
'FirstName' => 'Lars',
'LastName' => 'Kneschke'
),
'contact2' => array(
'FirstName' => 'Cornelius',
'LastName' => 'Weiß'
)
)
);
}
}

File Metadata

Mime Type
text/x-php
Expires
Thu, Jul 9, 12:46 AM (19 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1052372
Default Alt Text
Tasks.php (1 KB)

Event Timeline