Welcome to mirror list, hosted at ThFree Co, Russian Federation.

RP_InxIvalPair.class.php « packet « src « prods « irodsphp « 3rdparty « files_external « apps - github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ac56bc93df8cf67a8cd77638c49efd32a732df33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

require_once(dirname(__FILE__) . "/../autoload.inc.php");
class RP_InxIvalPair extends RODSPacket
{
    public function __construct($iiLen = 0, array $inx = array(), array $ivalue = array())
    {
        $packlets = array("iiLen" => $iiLen, 'inx' => $inx, 'ivalue' => $ivalue);
        parent::__construct("InxIvalPair_PI", $packlets);
    }

    public function fromAssocArray($array)
    {
        if (!empty($array)) {
            $this->packlets["iiLen"] = count($array);
            $this->packlets["inx"] = array_keys($array);
            $this->packlets["ivalue"] = array_values($array);
        } else {
            $this->packlets["iiLen"] = 0;
            $this->packlets["inx"] = array();
            $this->packlets["ivalue"] = array();
        }
    }

}

?>