Classes/Service/AssociationsApiService.php
public function getFunctionariesFromAssociation($aid, $apiServiceFilterContext = null)
    {
        $apiServiceFilterContext = $this->checkApiServiceFilterContext($apiServiceFilterContext, $aid);

        $url = $this->getBaseApiUrl() . '/associations/' . $aid . '/functionaries';

        $params = null;

        $xml = $this->queryXml($url, $apiServiceFilterContext);

        $this->checkValidContext($xml->list[self::CO_XML_ATTRIBUT_VALID_CONTEXT]);

        $filterParamters = $apiServiceFilterContext->getParametersArray();

        for ($i = 0; $i < count($xml->list->functionaries->functionary); $i++) {
            $functionaryChildEntry = $xml->list->functionaries->functionary[$i];

            if (isset($filterParamters['f_role']) && preg_match('/(' . $filterParamters['f_role'] . ')/', $functionaryChildEntry['role']) == 0) {
                unset($xml->list->functionaries->functionary[$i]);
                $i--;
            } else {
                $functionaryChildEntry->addAttribute('associationid', $aid);
            }
        }

        return $xml->list;
    }
public function getFunctionariesFromAssociation($aid, $apiServiceFilterContext = null)
    {
        $apiServiceFilterContext = $this->checkApiServiceFilterContext($apiServiceFilterContext, $aid);

        $url = $this->getBaseApiUrl() . '/associations/' . $aid . '/functionaries';

        $params = null;

        $xml = $this->queryXml($url, $apiServiceFilterContext);

        $this->checkValidContext($xml->list[self::CO_XML_ATTRIBUT_VALID_CONTEXT]);

        $filterParamters = $apiServiceFilterContext->getParametersArray();

        for ($i = 0; $i < count($xml->list->functionaries->functionary); $i++) {
            $functionaryChildEntry = $xml->list->functionaries->functionary[$i];

            if (isset($filterParamters['f_role']) && preg_match('/(' . $filterParamters['f_role'] . ')/', $functionaryChildEntry['role']) == 0) {
                unset($xml->list->functionaries->functionary[$i]);
                $i--;
            } else {
                $functionaryChildEntry->addAttribute('associationid', $aid);
            }
        }

        return $xml->list;
    }
public function getFunctionariesFromAssociation ( $ aid , $ apiServiceFilterContext = null ) { $ apiServiceFilterContext = $ this -> checkApiServiceFilterContext ( $ apiServiceFilterContext , $ aid ) ; $ url = $ this -> getBaseApiUrl ( ) . '/associations/' . $ aid . '/functionaries' ; $ params = null ; $ xml = $ this -> queryXml ( $ url , $ apiServiceFilterContext ) ; $ this -> checkValidContext ( $ xml -> list [ self :: CO_XML_ATTRIBUT_VALID_CONTEXT ] ) ; $ filterParamters = $ apiServiceFilterContext -> getParametersArray ( ) ; for ( $ i = 0 ; $ i < count ( $ xml -> list -> functionaries -> functionary ) ; $ i ++ ) { $ functionaryChildEntry = $ xml -> list -> functionaries -> functionary [ $ i ] ; if ( isset ( $ filterParamters [ 'f_role' ] ) && preg_match ( '/(' . $ filterParamters [ 'f_role' ] . ')/' , $ functionaryChildEntry [ 'role' ] ) == 0 ) { unset ( $ xml -> list -> functionaries -> functionary [ $ i ] ) ; $ i -- ; } else { $ functionaryChildEntry -> addAttribute ( 'associationid' , $ aid ) ; } } return $ xml -> list ; }
return a list of functionaries from a association

@param string association id
@param \RGU\Dvoconnector\Service\ApiServiceFilterContext $apiServiceFilterContext

@return \SimpleXMLElement XML data
return a list of functionaries from a association