src/Radius.php
public function getAttributesToSend($type = null)
    {
        if (is_array($this->attributesToSend)) {
            if ($type == null) {
                return $this->attributesToSend;
            } else {
                foreach($this->attributesToSend as $i => $attr) {
                    if (is_array($attr)) {
                        $tmp = $attr[0];
                    } else {
                        $tmp = $attr;
                    }
                    if ($type == ord(substr($tmp, 0, 1))) {
                        return $this->decodeAttribute(substr($tmp, 2), $type);
                    }
                }
                return null;
            }
        }

        return array();
    }
public function getAttributesToSend($type = null)
    {
        if (is_array($this->attributesToSend)) {
            if ($type == null) {
                return $this->attributesToSend;
            } else {
                foreach($this->attributesToSend as $i => $attr) {
                    if (is_array($attr)) {
                        $tmp = $attr[0];
                    } else {
                        $tmp = $attr;
                    }
                    if ($type == ord(substr($tmp, 0, 1))) {
                        return $this->decodeAttribute(substr($tmp, 2), $type);
                    }
                }
                return null;
            }
        }

        return array();
    }
public function getAttributesToSend ( $ type = null ) { if ( is_array ( $ this -> attributesToSend ) ) { if ( $ type == null ) { return $ this -> attributesToSend ; } else { foreach ( $ this -> attributesToSend as $ i => $ attr ) { if ( is_array ( $ attr ) ) { $ tmp = $ attr [ 0 ] ; } else { $ tmp = $ attr ; } if ( $ type == ord ( substr ( $ tmp , 0 , 1 ) ) ) { return $ this -> decodeAttribute ( substr ( $ tmp , 2 ) , $ type ) ; } } return null ; } } return array ( ) ; }
Get one or all set attributes to send

@param int|null $type  RADIUS attribute type, or null for all
@return mixed array of attributes to send, or null if specific attribute not found, or
Get one or all set attributes to send