MongoHybrid\Client::lpush PHP Method

lpush() public method

Add item to a value (left)
public lpush ( string $collection, string $key, mixed $value ) : integer
$collection string @param string $collection
$key string
$value mixed
return integer
    public function lpush($collection, $key, $value)
    {
        $list = $this->getKey($collection, $key, []);
        array_unshift($list, $value);
        $this->setKey($collection, $key, $list);
        return count($list);
    }