List of subcategories

@param array $query
@return array|string
@throws \GuzzleHttp\Exception\GuzzleException
489714
public function getList(array $query = [])
    {
        $list = $this->pagination(
            self::DOMUSERP_API_OPERACIONAL . '/categorias/' . $this->categoryId . '/subcategorias',
            $query
        );

        return $list;
    }
41972
public static function find(array $query)
    {
        if (isset($query['semester']) &&
            $query['semester'] instanceof Semester) {
            $query['semester'] = $query['semester']->daisyFormat();
        }
        $csis = Client::get("courseSegment", $query);
        return array_map(function ($data) { return new self($data); }, $csis);
    }
1300059
private function applyFilters(array $query) : array
    {
        $documentPersister = $this->dm->getUnitOfWork()->getDocumentPersister($this->class->name);

        $query = $documentPersister->addDiscriminatorToPreparedQuery($query);
        $query = $documentPersister->addFilterToPreparedQuery($query);

        return $query;
    }
777862
protected function getQueryInfos($query)
    {
        $type = strtolower(substr($query, 0, 6));

        switch ($type) {
            case 'select':
                $pattern = '/SELECT\s((.|\n)*)\sFROM\s(?P<table>[a-zA-Z_]*)($|(.*)$)/i';
                break;

            case 'insert':
                $pattern = '/INSERT(\s+)INTO(\s+)(?P<table>[a-zA-Z_]*)(\s*)(.*)/i';
                break;

            case 'update':
                $pattern = '/UPDATE(\s+)(?P<table>[a-zA-Z_]*)(\s*)(.*)/i';
                break;

            case 'delete':
                $pattern = '/DELETE(\s+)FROM(\s+)(?P<table>[a-zA-Z_]*)(\s*)(.*)/i';
                break;

            default:
                $type = 'other';
                $pattern = false;
        }

        if ($pattern && preg_match($pattern, $query, $matches)) {
            return array($type, $matches['table']);
        }

        return array($type, '__unknown');
    }
425137
public function allArray(Query $query = null) {
		$iterator = $this->getIterator();
		$array = $iterator->all($query);
		$array = $this->forgeEntity($array);
		return $array;
	}
880987
public static function fix_cat_wp_quirk( $query ) {
		if ( isset($query->query) && isset($query->query['category'])
				&& !isset($query->query['cat']) ) {
			$query->set('cat', $query->query['category']);
			unset($query->query['category']);
		}
		return $query;
	}
79261
public function getResults($query)
    {
        $parameters = [];

        if (is_object($query) && $query instanceof SearchQuery) {
            $query = $query->toArray();
        }

        if (is_array($query)) {
            $collection = new Collection($query);

            $query = $collection->pull('query', '');

            $parameters = $collection->toArray();
        }

        return $this->index->search($query, $parameters);
    }
434699
public function executeRows(string $query): array
  {
    $result = $this->query($query);
    if ($this->haveFetchAll)
    {
      $ret = $result->fetch_all(MYSQLI_ASSOC);
    }
    else
    {
      $ret = [];
      while (($row = $result->fetch_assoc()))
      {
        $ret[] = $row;
      }
    }
    $result->free();

    if ($this->mysqli->more_results()) $this->mysqli->next_result();

    return $ret;
  }
1237070
public function getSubCategories($category)
    {
        $ds = DIRECTORY_SEPARATOR;
        $categoryPath = str_replace('/', $ds, $category);

        $basePath = app_path().$ds.'lablog'.$ds;

        $path = $basePath.$categoryPath;

        if (!$this->exists($category)) {
            return array();
        }

        $categories = $this->fs->directories($path);

        $allCategories = array();

        foreach ($categories as $category) {
            $cat = str_replace($basePath, '', $category);
            $allCategories[] = $this->getCategory($cat);
        }

        return $allCategories;
    }
1238281
public function current(array $query = array())
    {
        if(!$this->request)
            throw new \Exedra\Exception\InvalidArgumentException('Http Request does not exist.');

        $uri = $this->request->getUri();

        if(count($query) > 0)
        {
            // append query to uri
            if($uri->getQuery())
                $query = http_build_query($query);
            else
                $query = '?' . http_build_query($query);
        }
        else
        {
            $query = '';
        }

        return $this->request->getUri().$query;
    }
300441
public function getSortColumns(array $query = [])
    {
        $current_sort_by = $this->getSortColumn($query);

        // sort by
        $sort_by = [];
        foreach (self::$sort_by_column as $column => $info) {
            $sort_by[] = [
                'name' => $info['name'],
                'title' => $info['title'],
                'current' => $current_sort_by == $column,
                'link' => '?'.http_build_query(
                    array_merge($query, ['sort_by' => $column])
                ),
            ];
        }

        return $sort_by;
    }
414835
public function getList(array $query = [])
    {
        $resource = self::$BASE_URI . '/' . $this->cityId . '/bairros/' . $this->neighborhoodId . '/logradouro';
        $list = $this->pagination($resource);

        return $list;
    }
17746
public function search($query)
    {
        $searchProviders = [];

        foreach ($this->searchProviders as $searchProvider) {
            if (!$searchProvider instanceof SearchProviderInterface) {
                continue;
            }

            $role = $searchProvider->getRole();
            if ($role && !$this->authorizationChecker->isGranted($role)) {
                continue;
            }

            $searchProviders[] = $searchProvider;
        }

        $explodedQuery = explode(':', $query);
        if (count($explodedQuery) > 1) {
            $keySearchProviders = [];
            $keyWord = strtolower(array_shift($explodedQuery));

            foreach ($searchProviders as $searchProvider) {
                $searchKey = $searchProvider->getSearchKey();
                if ($searchKey === $keyWord) {
                    $keySearchProviders[] = $searchProvider;
                }
            }

            if (count($keySearchProviders)) {
                $searchProviders = $keySearchProviders;
                $query = trim(implode(':', $explodedQuery));
            }
        }

        $results = [];
        foreach ($searchProviders as $searchProvider) {
            $searchResults = $searchProvider->search($query);
            foreach ($searchResults as $searchResult) {
                $results[] = $searchResult->toArray();
            }
        }

        return $results;
    }
88852
public function search($query)
    {
        $this->logger->debug('Category:search:', [$query]);
        if (!Tools::isGoodString($query)) {
            $this->logger->error('Category::search: invalid query');
            return [];
        }
        $this->setGeneratorSearch($query, self::CATEGORY_NAMESPACE);
        return $this->getCategoryinfoResponse();
    }
28570
public function toArray($query)
    {
        $nodes = $this->xpath->query((string) $query);
        if ($nodes->length) {
            $result = array();
            foreach ($nodes as $node) {
                $result[] = json_decode(
                    json_encode(
                        simplexml_load_string(
                            $this->dom->saveXML($node)
                        )
                    ),
                    true
                );
            }
            return $result;
        }
        return null;
    }
343867
public function lists($page = 1, $query = null, array $params = [])
    {
        $this->listPage = $page;
        $this->listQuery = $query;
        $this->listParams = $params;

        return $this->getList();
    }
717536
public function getArrays($query)
    {
        $this->statement = $this->db->query($query);
        if ($this->statement) {
            $result =  $this->statement->fetchAll(\PDO::FETCH_ASSOC);
            if ($result) {
                return $result;
            }
        }
        return false;
    }