src/Vatsimphp/Result/ResultContainer.php
public function search($objectType, $query = [])
    {
        $results = [];
        if ($this->isSearchable($objectType)) {
            foreach ($this->get($objectType) as $line) {
                foreach ($query as $field => $needle) {
                    if (isset($line[$field])) {
                        if (stripos($line[$field], $needle) !== false) {
                            $results[] = $line;
                        }
                    }
                }
            }
        }

        return new Iterator($results);
    }
public function search($objectType, $query = [])
    {
        $results = [];
        if ($this->isSearchable($objectType)) {
            foreach ($this->get($objectType) as $line) {
                foreach ($query as $field => $needle) {
                    if (isset($line[$field])) {
                        if (stripos($line[$field], $needle) !== false) {
                            $results[] = $line;
                        }
                    }
                }
            }
        }

        return new Iterator($results);
    }
public function search ( $ objectType , $ query = [ ] ) { $ results = [ ] ; if ( $ this -> isSearchable ( $ objectType ) ) { foreach ( $ this -> get ( $ objectType ) as $ line ) { foreach ( $ query as $ field => $ needle ) { if ( isset ( $ line [ $ field ] ) ) { if ( stripos ( $ line [ $ field ] , $ needle ) !== false ) { $ results [ ] = $ line ; } } } } } return new Iterator ( $ results ) ; }
Base search functionality.

@param string $objectType
@param array  $query

@return \Vatsimphp\Filter\Iterator
Base search functionality .