Aerospike\LDT\LList::find PHP Method

find() public method

Atomic elements (integer, string) will be directly compared. In complex types (array) the value of a key named 'key' is used for comparison. An optional UDF filter function can be applied to the elements found. The filter function returns nil to filter out the element, otherwise it may transform the element before returning it.
public find ( integer | string $value, array &$elements, string | null $module = null, string | null $function = null, array $args = [] ) : integer
$value integer | string
$elements array matched
$module string | null the name of the UDF module containing the optional filter function
$function string | null name of the UDF filter function to apply
$args array optional arguments for the filter function, passed as a map to the filter function
return integer status code of the operation
    public function find($value, &$elements, $module = null, $function = null, array $args = array())
    {
        if (!is_string($value) && !is_int($value) && !is_array($value)) {
            $this->errorno = self::ERR_INPUT_PARAM;
            $this->error = self::MSG_TYPE_NOT_SUPPORTED;
            return $this->errorno;
        }
        $elements = array();
        if (!is_null($module) && !is_null($function)) {
            $status = $this->client->apply($this->key, 'llist', 'find', array($this->bin, $value, $module, $function, $args), $elements);
        } else {
            $status = $this->client->apply($this->key, 'llist', 'find', array($this->bin, $value), $elements);
        }
        $this->processStatusCode($status);
        return $this->errorno;
    }