delete() публичный Метод

Deletes an identity
public delete ( string $identity ) : mixed
$identity string
Результат mixed
Пример #1
0
 /**
  * @dataProvider deleteProvider
  * @covers Datasift_Account_Identity::delete
  */
 public function testDelete($identityId, $apiResult, $expectedResult)
 {
     $identity = new DataSift_Account_Identity($this->_user);
     DataSift_MockApiClient::setResponse($apiResult);
     if (isset($expectedResult['error'])) {
         $this->setExpectedException('DataSift_Exception_APIError');
     }
     $result = $identity->delete($identityId);
     $this->assertEquals($expectedResult, $result);
 }
Пример #2
0
    echo "\nUpdating limit...\n";
    $res = $limit->update($id, $service, 10000);
    echo $res['id'] . " - " . $res['service'] . " - " . $res['total_allowance'] . " - " . $res['analyze_queries'] . "\n";
    unset($res);
    echo "\nDeleting limit...\n";
    $res = $limit->delete($id, $service);
    if ($res === true) {
        echo "Deleted\n";
    }
    unset($res);
    echo "\nDeleting token...\n";
    $res = $token->delete($id, 'facebook');
    if ($res === true) {
        echo "Deleted\n";
    }
    unset($res);
    echo "\nDeleting identity...\n";
    $res = $identity->delete($id);
    if ($res === true) {
        echo "Deleted\n";
    }
    unset($res);
    echo "\nGetting identities...\n";
    $res = $identity->getAll();
    foreach ($res['identities'] as $r) {
        echo $r['id'] . " - " . $r['label'] . "\n";
    }
    unset($res);
} catch (Exception $e) {
    print_r($e->getMessage());
}