src/Module/Aerospike.php
public function grabValueFromAerospike($key)
    {
        $akey = $this->buildKey($key);

        $status = $this->aerospike->get($akey, $data);
        if ($status != \Aerospike::OK) {
            $this->fail(
                strtr(
                    "[:errno:] Unable to grab ':key:' from the database: :error:",
                    [
                        ':errno:' => $this->aerospike->errorno(),
                        ':key:'   => $key,
                        ':error:' => $this->aerospike->error()
                    ]
                )
            );
        }

        $this->debugSection('Value', $data['bins']['value']);

        return $data['bins']['value'];
    }
public function grabValueFromAerospike($key)
    {
        $akey = $this->buildKey($key);

        $status = $this->aerospike->get($akey, $data);
        if ($status != \Aerospike::OK) {
            $this->fail(
                strtr(
                    "[:errno:] Unable to grab ':key:' from the database: :error:",
                    [
                        ':errno:' => $this->aerospike->errorno(),
                        ':key:'   => $key,
                        ':error:' => $this->aerospike->error()
                    ]
                )
            );
        }

        $this->debugSection('Value', $data['bins']['value']);

        return $data['bins']['value'];
    }
public function grabValueFromAerospike ( $ key ) { $ akey = $ this -> buildKey ( $ key ) ; $ status = $ this -> aerospike -> get ( $ akey , $ data ) ; if ( $ status != \ Aerospike :: OK ) { $ this -> fail ( strtr ( "[:errno:] Unable to grab ':key:' from the database: :error:" , [ ':errno:' => $ this -> aerospike -> errorno ( ) , ':key:' => $ key , ':error:' => $ this -> aerospike -> error ( ) ] ) ) ; } $ this -> debugSection ( 'Value' , $ data [ 'bins' ] [ 'value' ] ) ; return $ data [ 'bins' ] [ 'value' ] ; }
Grabs value from Aerospike by key.

Example:

```php
<?php
$users_count = $I->grabValueFromAerospike('users_count');
?>
```

@param $key
@return mixed
Grabs value from Aerospike by key .