public function destroy($useMasterKey = false)
    {
        if (!$this->objectId)
        {
            return;
        }
        $sessionToken = null;
        if (AVUser::getCurrentUser())
        {
            $sessionToken = AVUser::getCurrentUser()->getSessionToken();
        }
        AVClient::_request('DELETE', '/classes/' . $this->className . '/' . $this->objectId, $sessionToken, null,
            $useMasterKey);
    }
public function destroy($useMasterKey = false)
    {
        if (!$this->objectId)
        {
            return;
        }
        $sessionToken = null;
        if (AVUser::getCurrentUser())
        {
            $sessionToken = AVUser::getCurrentUser()->getSessionToken();
        }
        AVClient::_request('DELETE', '/classes/' . $this->className . '/' . $this->objectId, $sessionToken, null,
            $useMasterKey);
    }
public function destroy ( $ useMasterKey = false ) { if ( ! $ this -> objectId ) { return ; } $ sessionToken = null ; if ( AVUser :: getCurrentUser ( ) ) { $ sessionToken = AVUser :: getCurrentUser ( ) -> getSessionToken ( ) ; } AVClient :: _request ( 'DELETE' , '/classes/' . $ this -> className . '/' . $ this -> objectId , $ sessionToken , null , $ useMasterKey ) ; }
Delete the object from Avos.

@param bool $useMasterKey Whether to use the master key.

@return null
Delete the object from Avos .