public function setAllowedGrantTypes($allowedGrantTypes)
    {
        foreach ($allowedGrantTypes as $allowedGrantType) {
            if (!in_array($allowedGrantType, $this->availableGrantTypes)) {
                throw new \Exception('Unknown grant type ' . $allowedGrantType);
            }
        }
        $this->allowedGrantTypes = $allowedGrantTypes;
    }
public function setAllowedGrantTypes($allowedGrantTypes)
    {
        foreach ($allowedGrantTypes as $allowedGrantType) {
            if (!in_array($allowedGrantType, $this->availableGrantTypes)) {
                throw new \Exception('Unknown grant type ' . $allowedGrantType);
            }
        }
        $this->allowedGrantTypes = $allowedGrantTypes;
    }
public function setAllowedGrantTypes ( $ allowedGrantTypes ) { foreach ( $ allowedGrantTypes as $ allowedGrantType ) { if ( ! in_array ( $ allowedGrantType , $ this -> availableGrantTypes ) ) { throw new \ Exception ( 'Unknown grant type ' . $ allowedGrantType ) ; } } $ this -> allowedGrantTypes = $ allowedGrantTypes ; }
Set allowed grant types

@param string[] $allowedGrantTypes
@throws \Exception
Set allowed grant types