pdox icon indicating copy to clipboard operation
pdox copied to clipboard

a useful new function

Open shaobingme opened this issue 3 years ago • 2 comments

Suggest to add a new function public function getValue($name) { $query = $this->get(); return isset($query[$name])?$query[$name]:false; }

shaobingme avatar Oct 08 '21 15:10 shaobingme

Hi @shaobingme , Thanks for your suggestion. We might think to add that functionality in next release. I note that.

Thanks.

izniburak avatar Oct 09 '21 17:10 izniburak

I made a slight change:

public function getValue(string $field) 
{ 
        $query = $this->select($field)->get('array');
        return $query[$field] ?? null;
 }

simp-lee avatar Jun 20 '22 15:06 simp-lee