1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 17:52:43 +01:00
phorge-phorge/src/applications/search/storage/PhabricatorSearchQuery.php

37 lines
786 B
PHP
Raw Normal View History

<?php
2011-09-14 17:02:31 +02:00
/**
* @group search
*/
final class PhabricatorSearchQuery extends PhabricatorSearchDAO {
protected $query;
protected $parameters = array();
protected $queryKey;
public function getConfiguration() {
return array(
self::CONFIG_SERIALIZATION => array(
'parameters' => self::SERIALIZATION_JSON,
),
) + parent::getConfiguration();
}
public function setParameter($parameter, $value) {
$this->parameters[$parameter] = $value;
return $this;
}
public function getParameter($parameter, $default = null) {
return idx($this->parameters, $parameter, $default);
}
public function save() {
if (!$this->getQueryKey()) {
$this->setQueryKey(Filesystem::readRandomCharacters(12));
}
return parent::save();
}
}