JournalOAI::setSpecToSectionId PHP Method

setSpecToSectionId() public method

Get the journal ID and section ID corresponding to a set specifier.
public setSpecToSectionId ( $setSpec, $journalId = null ) : integer
return integer
    function setSpecToSectionId($setSpec, $journalId = null)
    {
        $tmpArray = preg_split('/:/', $setSpec);
        if (count($tmpArray) == 1) {
            list($journalSpec) = $tmpArray;
            $journalSpec = urldecode($journalSpec);
            $sectionSpec = null;
        } else {
            if (count($tmpArray) == 2) {
                list($journalSpec, $sectionSpec) = $tmpArray;
                $journalSpec = urldecode($journalSpec);
                $sectionSpec = urldecode($sectionSpec);
            } else {
                return array(0, 0);
            }
        }
        return $this->dao->getSetJournalSectionId($journalSpec, $sectionSpec, $this->journalId);
    }