*
* @return QnA_Answer found response or null
*/
- static function getByNotice($notice)
+ static function getByNotice(Notice $notice)
{
$answer = self::getKV('uri', $notice->uri);
if (empty($answer)) {
return Notice::getKV('uri', $this->uri);
}
- static function fromNotice($notice)
+ static function fromNotice(Notice $notice)
{
return QnA_Answer::getKV('uri', $notice->uri);
}
);
}
- static function toHTML($profile, $question, $answer)
+ static function toHTML(Profile $profile, $question, $answer)
{
$notice = $question->getNotice();
*
* @return Notice saved notice
*/
- static function saveNew($profile, $question, $text, $options = null)
+ static function saveNew(Profile $profile, $question, $text, array $options = array())
{
- if (empty($options)) {
- $options = array();
- }
-
$answer = new QnA_Answer();
$answer->id = UUID::gen();
$answer->profile_id = $profile->id;
array('id' => $answer->id)
);
- common_log(LOG_DEBUG, "Saving answer: $answer->id, $answer->uri");
+ common_debug("Saving answer: $answer->id, $answer->uri");
$answer->insert();
$content = sprintf(