public function findByKey($rule){

            $r = [];

            foreach($this->data as $k=>$v){
                if($rule($k)){
                    $r[] = $this->{$k};
                }
            }

            return $r;

        }
public function findByKey($rule){

            $r = [];

            foreach($this->data as $k=>$v){
                if($rule($k)){
                    $r[] = $this->{$k};
                }
            }

            return $r;

        }
public function findByKey ( $ rule ) { $ r = [ ] ; foreach ( $ this -> data as $ k => $ v ) { if ( $ rule ( $ k ) ) { $ r [ ] = $ this -> { $ k } ; } } return $ r ; }
Find something by the key

@param Callable $rule

@return array
Find something by the key