public function getPClasses($eid, $country, $type = null)
    {
        if (!is_int($country)) {
            throw new Klarna_ArgumentNotSetException('country');
        }

        $tmp = false;
        if (!is_array($this->pclasses)) {
            return;
        }

        $tmp = array();
        foreach ($this->pclasses as $eid => $pclasses) {
            $tmp[$eid] = array();

            foreach ($pclasses as $pclass) {
                if (!$pclass->isValid()) {
                    continue; //Pclass invalid, skip it.
                }
                if ($pclass->getEid() === $eid
                    && $pclass->getCountry() === $country
                    && ($pclass->getType() === $type || $type === null)
                ) {
                    $tmp[$eid][$pclass->getId()] = $pclass;
                }
            }
        }

        return $tmp;
    }
public function getPClasses($eid, $country, $type = null)
    {
        if (!is_int($country)) {
            throw new Klarna_ArgumentNotSetException('country');
        }

        $tmp = false;
        if (!is_array($this->pclasses)) {
            return;
        }

        $tmp = array();
        foreach ($this->pclasses as $eid => $pclasses) {
            $tmp[$eid] = array();

            foreach ($pclasses as $pclass) {
                if (!$pclass->isValid()) {
                    continue; //Pclass invalid, skip it.
                }
                if ($pclass->getEid() === $eid
                    && $pclass->getCountry() === $country
                    && ($pclass->getType() === $type || $type === null)
                ) {
                    $tmp[$eid][$pclass->getId()] = $pclass;
                }
            }
        }

        return $tmp;
    }
public function getPClasses ( $ eid , $ country , $ type = null ) { if ( ! is_int ( $ country ) ) { throw new Klarna_ArgumentNotSetException ( 'country' ) ; } $ tmp = false ; if ( ! is_array ( $ this -> pclasses ) ) { return ; } $ tmp = array ( ) ; foreach ( $ this -> pclasses as $ eid => $ pclasses ) { $ tmp [ $ eid ] = array ( ) ; foreach ( $ pclasses as $ pclass ) { if ( ! $ pclass -> isValid ( ) ) { continue ; //Pclass invalid, skip it. } if ( $ pclass -> getEid ( ) === $ eid && $ pclass -> getCountry ( ) === $ country && ( $ pclass -> getType ( ) === $ type || $ type === null ) ) { $ tmp [ $ eid ] [ $ pclass -> getId ( ) ] = $ pclass ; } } } return $ tmp ; }
Returns an array of KlarnaPClasses, keyed with pclass ID.
If type is specified, only that type will be returned.

<b>Types available</b>:<br>
{@link KlarnaPClass::ACCOUNT}<br>
{@link KlarnaPClass::CAMPAIGN}<br>
{@link KlarnaPClass::SPECIAL}<br>
{@link KlarnaPClass::DELAY}<br>
{@link KlarnaPClass::MOBILE}<br>

@param int $eid     Merchant ID.
@param int $country {@link KlarnaCountry Country} constant.
@param int $type    PClass type identifier.

@throws KlarnaException
@return array An array of {@link KlarnaPClass PClasses}.
Returns an array of KlarnaPClasses keyed with pclass ID . If type is specified only that type will be returned .