Arbit - project tracking

Arbit - project tracking

API documentation :: Docs For Class arbitCouchDbFaqQuestionFacade

Faq::Facade::arbitCouchDbFaqQuestionFacade

Class arbitCouchDbFaqQuestionFacade

Question facade defining all methods required to access question related data in the backend.

Question facade defining all methods required to access question related data in the backend.

Implements interfaces:

arbitCouchDbFacadeBase
   |
   --arbitCouchDbFaqQuestionFacade
Author(s):
Version:   $Revision: 1236 $
License:   GPL

Inherited Member Variables

From arbitCouchDbFacadeBase
protected arbitCouchDbFacadeBase::$connected
protected arbitCouchDbFacadeBase::$manager

Method Summary

public mixed createQuestion( $text )
Create a new question Create a new question with the given name. if there already is a question with the given name.
public void deleteQuestion( $id )
Delete a question Delete the question with the given ID permanently from the backend.
public array getQuestionData( $question )
Get question data
public array getQuestionsFromCategory( [ $category = null] )
Get array of questions Returns an array with questions. path, to select a subtree of sections to fetch. under the node /foo/bar you would pass array( 'foo', 'bar' ) to the method.
public array getUnansweredQuestions( )
Get array of unanswered questions Returns an array with all questions which do not have an answer yet.
public void updateQuestionData( $question , $data )
Update stored information for the given question The array with the information to update may any number of the common keys, and only the given keys will be updated in the storage backend.

Inherited Methods

From arbitCouchDbFacadeBase
public void arbitCouchDbFacadeBase::__construct()
Constructor The constructor ensures the correct configuration for the conenction by connecting on the first request to on of the facde classes.

Methods

createQuestion

mixed createQuestion( string $text )

Create a new question Create a new question with the given name. if there already is a question with the given name.

Create a new question Create a new question with the given name. An exception will be thrown if there already is a question with the given name. The ID generated by the backend in some way is returned for later reference. The type of the identifier depends on the backend, no assumptions should be made here.

Parameters:
Name Type Description
$text string
Implementation of:
Method Description
arbitFaqQuestionFacade::createQuestion() Create a new question Create a new question with the given name. if there already is a question with the given name.

deleteQuestion

void deleteQuestion( string $id )

Delete a question Delete the question with the given ID permanently from the backend.

Delete a question Delete the question with the given ID permanently from the backend.

Parameters:
Name Type Description
$id string
Implementation of:
Method Description
arbitFaqQuestionFacade::deleteQuestion() Delete a question Delete the question with the given ID permanently from the backend.

getQuestionData

array getQuestionData( string $question )

Get question data

Get question data Get data for the given question id. The data should be returned as an array, and should contain the following keys:

  • question
  • answer
  • category
  • revisions

Parameters:
Name Type Description
$question string
Implementation of:
Method Description
arbitFaqQuestionFacade::getQuestionData() Get question data

getQuestionsFromCategory

array getQuestionsFromCategory( [array $category = null] )

Get array of questions Returns an array with questions. path, to select a subtree of sections to fetch. under the node /foo/bar you would pass array( 'foo', 'bar' ) to the method.

Get array of questions Returns an array with questions. You may optionally specify the category path, to select a subtree of sections to fetch. To fetch the questions under the node /foo/bar you would pass array( 'foo', 'bar' ) to the method.

Parameters:
Name Type Description
$category array
Implementation of:
Method Description
arbitFaqQuestionFacade::getQuestionsFromCategory() Get array of questions Returns an array with questions. path, to select a subtree of sections to fetch. under the node /foo/bar you would pass array( 'foo', 'bar' ) to the method.

getUnansweredQuestions

array getUnansweredQuestions( )

Get array of unanswered questions Returns an array with all questions which do not have an answer yet.

Get array of unanswered questions Returns an array with all questions which do not have an answer yet.

Implementation of:
Method Description
arbitFaqQuestionFacade::getUnansweredQuestions() Get array of unanswered questions Returns an array with all questions which do not have an answer yet.

updateQuestionData

void updateQuestionData( string $question , array $data )

Update stored information for the given question The array with the information to update may any number of the common keys, and only the given keys will be updated in the storage backend.

Update stored information for the given question The array with the information to update may any number of the common keys, and only the given keys will be updated in the storage backend.

Parameters:
Name Type Description
$question string
$data array
Implementation of:
Method Description
arbitFaqQuestionFacade::updateQuestionData() Update stored information for the given question The array with the information to update may any number of the common keys, and only the given keys will be updated in the storage backend.
Documentation generated on Mon, 05 Apr 2010 14:02:14 +0200 by phpDocumentor 1.4.3