public function getComponents($component = null)
    {
        if (is_null($component)) {
            return $this->components;
        }

        $this->validateComponentExists($component);

        return $this->components[$component];
    }
public function getComponents($component = null)
    {
        if (is_null($component)) {
            return $this->components;
        }

        $this->validateComponentExists($component);

        return $this->components[$component];
    }
public function getComponents ( $ component = null ) { if ( is_null ( $ component ) ) { return $ this -> components ; } $ this -> validateComponentExists ( $ component ) ; return $ this -> components [ $ component ] ; }
Returns an array of all components in the distinguished name.

If a component name is given ('cn', 'dc' for example) then
the values of that component will be returned.

@param string|null $component The component to retrieve values of

@return array
Returns an array of all components in the distinguished name .