src/EAPPacket.php
public static function identity($identity, $id = null)
    {
        $packet = new self();
        $packet->setId($id);
        $packet->code = self::CODE_RESPONSE;
        $packet->type = self::TYPE_IDENTITY;
        $packet->data = $identity;

        return $packet->__toString();
    }
public static function identity($identity, $id = null)
    {
        $packet = new self();
        $packet->setId($id);
        $packet->code = self::CODE_RESPONSE;
        $packet->type = self::TYPE_IDENTITY;
        $packet->data = $identity;

        return $packet->__toString();
    }
public static function identity ( $ identity , $ id = null ) { $ packet = new self ( ) ; $ packet -> setId ( $ id ) ; $ packet -> code = self :: CODE_RESPONSE ; $ packet -> type = self :: TYPE_IDENTITY ; $ packet -> data = $ identity ; return $ packet -> __toString ( ) ; }
Helper function to generate an EAP Identity packet

@param string $identity  The identity (username) to send in the packet
@param int $id           The packet ID (random if omitted)
@return string An EAP identity packet
Helper function to generate an EAP Identity packet