List stashes and return the results

@param string $options Takes options applicable to the git log command.

@return mixed
355201
public function listStash($options = null)
    {
        $this->arguments[] = 'list';
        if ($options) {
            $this->arguments[] = $options;
        }
        return $this->run();
    }
403191
protected function getPdoOptions(array $options)
    {
        $result = $this->pdoDefaultOptions;

        foreach ($options as $k => $v)
        {
            $result[$k] = $v;
        }

        return $result;
    }
1078620
public function getContents(array $options=array()){
		$options['quality']=isset($options['quality'])?$options['quality']:80;
		ob_start();
		@imagejpeg($this->resource,null,$options['quality']);
		return ob_get_clean();
	}
612499
public function getList(array $options = array())
    {
        $uri = $this->buildListResourceUri($this->listId);
        $response = $this->makeApiRequest($uri, $options);
        return $response->list;
    }
322005
public function last(array $options = []) {
        if ($order = $this->getOrderBy()) {
            $this->_orderBy = [];

            foreach ($order as $field => $dir) {
                if ($dir === 'asc') {
                    $dir = 'desc';
                } else if ($dir === 'desc') {
                    $dir = 'asc';
                }

                if (is_numeric($field)) {
                    $this->orderBy($dir);
                } else {
                    $this->orderBy($field, $dir);
                }
            }
        } else {
            $this->orderBy($this->getRepository()->getPrimaryKey(), 'desc');
        }

        return $this->limit(1)->find('first', $options);
    }
700136
public static function browseByUser($options = [])
    {
        $find = $options['user']->roles();
        $total = $find->count();

        if (!empty($options['order'])) {
            foreach ($options['order'] as $field => $direction) {

                $find = $find->orderBy($field, $direction);
            }
        }

        if (!empty($options['offset'])) {
            $find = $find->skip($options['offset']);
        }

        if (!empty($options['limit'])) {
            $find = $find->take($options['limit']);
        }

        return [
            'total'  => $total,
            'offset' => empty($options['offset']) ? 0 : $options['offset'],
            'limit'  => empty($options['limit']) ? 0 : $options['limit'],
            'data'   => $find->get(),
        ];
    }
475925
public function getChoices(Options $options)
    {
        /** @var array $tree */
        $tree = $options['tree'];

        $choices = [];

        foreach ($tree as $item) {
            if ($options['current'] && $options['current']->getId() === $item->getId()) {
                continue;
            }

            if (null !== $item->getParent()) {
                continue;
            }

            $choices[sprintf('%s', $item->getName())] = $item->getId();

            $this->childWalker($item, $options, $choices);
        }

        return $choices;
    }
289772
public function getCollections($options = [])
    {
        $list = [];
        foreach ($this->db->listCollections($options) as $coll) {
            $list[] = $coll->getName();
        }

        return $list;
    }
1126226
public static function browse($options = [])
    {
        $find = new Role();
        $fillable = $find->fillable;

        $total = $find->count();

        if (!empty($options['order'])) {
            foreach ($options['order'] as $field => $direction) {
                if (in_array($field, $fillable)) {
                    $find = $find->orderBy($field, $direction);
                }
                $find = $find->orderBy('id', 'DESC');
            }
        }

        if (!empty($options['offset'])) {
            $find = $find->skip($options['offset']);
        }

        if (!empty($options['limit'])) {
            $find = $find->take($options['limit']);
        }

        return [
            'total'  => $total,
            'offset' => empty($options['offset']) ? 0 : $options['offset'],
            'limit'  => empty($options['limit']) ? 0 : $options['limit'],
            'data'   => $find->get(),
        ];
    }
565554
protected function optionsToRaw(array $options)
    {
        $collections = [];

        foreach ($options as $lang => $labels) {
            $finalWithTranslations = [];
            foreach ($labels as $label) {
                if ($label->isPlain) {
                    $collections[$label->value] = $label->text;
                } else {
                    $collections[$label->lang][$label->value] = $label->text;
                }
            }
        }

        $finals = [];

        foreach ($collections as $value => $collection) {
            $finals[$value] = is_array($collection) ? (object) $collection : $collection;
        }

        return (object) $finals;
    }
98773
private function getCollectionOptionsHash(array $options)
    {
        ksort($options);
        $str = '';
        foreach ($options as $option) {
            if (!$option instanceof  Serializable) {
                // All valid Collection options are BSON serializable
                continue;
            }
            $str .= serialize($option->bsonSerialize());
        }

        return md5($str);
    }
703638
public function listCollections(array $options = [])
    {
        $this->setOptions($options);
        $coll = new Collection($this->client, $this->database);
        $coll->setHeaders($this->getHeaders());
        $rs = $coll->getAll();
        $this->checkResponse($rs);
        $colls = array_get($rs, 'DocumentCollections');
        $list = [];
        if (!empty($colls)) {
            foreach ($colls as $coll) {
                $list[] = array_get($coll, 'id');
            }
        }

        return $list;
    }
283741
public function resources($options = [])
    {
        $url = $this->getBaseUrl();
        $resources = $this->request($url, $options);

        return $resources;
    }
1004529
public function show($stash)
    {
        $stash = $this->normalizeStashName($stash);
        $this->clearAll();
        $this->addCommandName(self::STASH_COMMAND . ' show');
        $this->addCommandSubject($stash);
        return $this->getCommand();
    }
71730
public function get ($options = NULL) {

		// String = view, array = specific fields
		$view = (sizeof($this->fields) === 0) ? $this->view : $this->fields;
		
		return $this->api->read($this->list_name, $this->limit, $this, $view, NULL, $this->options);
	}
1223408
public function getBucketWebsite($bucket, $options = NULL)
    {
        $this->precheckCommon($bucket, NULL, $options, false);
        $options[self::OSS_BUCKET] = $bucket;
        $options[self::OSS_METHOD] = self::OSS_HTTP_GET;
        $options[self::OSS_OBJECT] = '/';
        $options[self::OSS_SUB_RESOURCE] = 'website';
        $response = $this->auth($options);
        $result = new GetWebsiteResult($response);
        return $result->getData();
    }
1076197
public function get($options = []) {
		// get available data types
		if (get_called_class() == 'Object\Data\Types') {
			$types = $this->data;
		} else {
			$types = \Object\Data\Types::getStatic();
		}
		// transform data
		$result = [];
		foreach ($this->data as $k => $v) {
			foreach ($this->columns as $k2 => $v2) {
				if ($this->column_key == $k2) {
					$result[$k][$k2] = $k;
				} else if (!array_key_exists($k2, $v)) {
					$result[$k][$k2] = $v2['default'] ?? $types[$v2['type']]['no_data_type_default'] ?? null;
				} else {
					$result[$k][$k2] = $v[$k2];
				}
			}
		}
		// filtering
		if (!empty($options['where'])) {
			foreach ($result as $k => $v) {
				$found = true;
				foreach ($options['where'] as $k2 => $v2) {
					// todo: add options ad in query
					if (array_key_exists($k2, $v) && $v[$k2] != $v2) {
						$found = false;
						break;
					}
				}
				if (!$found) {
					unset($result[$k]);
				}
			}
		}
		// sorting, if none specified we sort by name if its in columns
		$orderby = null;
		if (isset($options['orderby'])) {
			$orderby = $options['orderby'];
		} else if (isset($this->orderby)) {
			$orderby = $this->orderby;
		} else if (isset($this->columns[$this->column_prefix . 'name'])) {
			$orderby = [$this->column_prefix . 'name' => SORT_ASC];
		}
		if (!empty($orderby)) {
			$method = [];
			foreach ($orderby as $k => $v) {
				$type = $types[$this->columns[$k]['type']]['php_type'];
				if ($type == 'integer' || $type == 'float') {
					$method[$k] = SORT_NUMERIC;
				}
			}
			array_key_sort($result, $orderby, $method);
		}
		// if we have primary key
		$pk = $options['pk'] ?? $this->pk;
		if (!empty($pk)) {
			pk($pk, $result);
		}
		// single row
		if (!empty($options['single_row'])) {
			return current($result);
		}
		return $result;
	}