public function parseLimitation(array $limitation)
    {
        if (!array_key_exists('_identifier', $limitation)) {
            throw new Exceptions\Parser("Missing '_identifier' attribute for Limitation.");
        }

        $limitationObject = $this->getLimitationByIdentifier($limitation['_identifier']);

        if (!isset($limitation['values']['ref']) || !is_array($limitation['values']['ref'])) {
            throw new Exceptions\Parser('Invalid format for limitation values in Limitation.');
        }

        $limitationValues = array();
        foreach ($limitation['values']['ref'] as $limitationValue) {
            if (!array_key_exists('_href', $limitationValue)) {
                throw new Exceptions\Parser('Invalid format for limitation values in Limitation.');
            }

            $limitationValues[] = $limitationValue['_href'];
        }

        $limitationObject->limitationValues = $limitationValues;

        return $limitationObject;
    }
public function parseLimitation(array $limitation)
    {
        if (!array_key_exists('_identifier', $limitation)) {
            throw new Exceptions\Parser("Missing '_identifier' attribute for Limitation.");
        }

        $limitationObject = $this->getLimitationByIdentifier($limitation['_identifier']);

        if (!isset($limitation['values']['ref']) || !is_array($limitation['values']['ref'])) {
            throw new Exceptions\Parser('Invalid format for limitation values in Limitation.');
        }

        $limitationValues = array();
        foreach ($limitation['values']['ref'] as $limitationValue) {
            if (!array_key_exists('_href', $limitationValue)) {
                throw new Exceptions\Parser('Invalid format for limitation values in Limitation.');
            }

            $limitationValues[] = $limitationValue['_href'];
        }

        $limitationObject->limitationValues = $limitationValues;

        return $limitationObject;
    }
public function parseLimitation ( array $ limitation ) { if ( ! array_key_exists ( '_identifier' , $ limitation ) ) { throw new Exceptions \ Parser ( "Missing '_identifier' attribute for Limitation." ) ; } $ limitationObject = $ this -> getLimitationByIdentifier ( $ limitation [ '_identifier' ] ) ; if ( ! isset ( $ limitation [ 'values' ] [ 'ref' ] ) || ! is_array ( $ limitation [ 'values' ] [ 'ref' ] ) ) { throw new Exceptions \ Parser ( 'Invalid format for limitation values in Limitation.' ) ; } $ limitationValues = array ( ) ; foreach ( $ limitation [ 'values' ] [ 'ref' ] as $ limitationValue ) { if ( ! array_key_exists ( '_href' , $ limitationValue ) ) { throw new Exceptions \ Parser ( 'Invalid format for limitation values in Limitation.' ) ; } $ limitationValues [ ] = $ limitationValue [ '_href' ] ; } $ limitationObject -> limitationValues = $ limitationValues ; return $ limitationObject ; }
Parses the input structure to Limitation object.

@param array $limitation

@return \eZ\Publish\API\Repository\Values\User\Limitation
Parses the input structure to Limitation object .