Horde_Push_Factory_Push::_parseKolab PHP Method

_parseKolab() private method

Parse the content of a Kolab object into a Horde_Push element.
private _parseKolab ( string $argument, array $conf ) : Horde_Push
$argument string A single command line argument (without the scheme argument).
$conf array The configuration.
return Horde_Push The element to be pushed.
    private function _parseKolab($argument, $conf)
    {
        if (!interface_exists('Horde_Kolab_Storage')) {
            throw new Horde_Push_Exception('The Horde_Kolab_Storage package is missing!');
        }
        $elements = explode('/', $argument);
        $id = array_pop($elements);
        $path = join('/', $elements);
        $factory = new Horde_Kolab_Storage_Factory($conf['kolab']);
        return $this->_createFromData($factory->create()->getData($path, 'note')->getObject($id));
    }