protected function loadCredentials()
    {
        $instance = $this->getInstance();
        if ($instance && $instance->exists()) {

            $props = $instance->getPropertiesValues([
                $this->getProperty(self::PROPERTY_LOGIN),
                $this->getProperty(self::PROPERTY_PASSWORD)
            ]);

            $data = [
                self::PROPERTY_LOGIN => (string)current($props[self::PROPERTY_LOGIN]),
                self::PROPERTY_PASSWORD => (string)current($props[self::PROPERTY_PASSWORD]),
            ];
        } else {
            $data = [
                self::PROPERTY_LOGIN => '',
                self::PROPERTY_PASSWORD => '',
            ];
        }

        return $data;
    }
protected function loadCredentials()
    {
        $instance = $this->getInstance();
        if ($instance && $instance->exists()) {

            $props = $instance->getPropertiesValues([
                $this->getProperty(self::PROPERTY_LOGIN),
                $this->getProperty(self::PROPERTY_PASSWORD)
            ]);

            $data = [
                self::PROPERTY_LOGIN => (string)current($props[self::PROPERTY_LOGIN]),
                self::PROPERTY_PASSWORD => (string)current($props[self::PROPERTY_PASSWORD]),
            ];
        } else {
            $data = [
                self::PROPERTY_LOGIN => '',
                self::PROPERTY_PASSWORD => '',
            ];
        }

        return $data;
    }
protected function loadCredentials ( ) { $ instance = $ this -> getInstance ( ) ; if ( $ instance && $ instance -> exists ( ) ) { $ props = $ instance -> getPropertiesValues ( [ $ this -> getProperty ( self :: PROPERTY_LOGIN ) , $ this -> getProperty ( self :: PROPERTY_PASSWORD ) ] ) ; $ data = [ self :: PROPERTY_LOGIN => ( string ) current ( $ props [ self :: PROPERTY_LOGIN ] ) , self :: PROPERTY_PASSWORD => ( string ) current ( $ props [ self :: PROPERTY_PASSWORD ] ) , ] ; } else { $ data = [ self :: PROPERTY_LOGIN => '' , self :: PROPERTY_PASSWORD => '' , ] ; } return $ data ; }
Fetch the credentials for the current resource.

Contains login and password or with null value if empty

@return array
@throws \common_exception_InvalidArgumentType
Fetch the credentials for the current resource .