User:Vedmaka/Semantic Query Interface

How to query for page properties?
$sqi = new \SQI\SemanticQueryInterface; $properties = $sqi->from("SomePage")->toArray;

How to search for pages with specific property value?
$pages = $sqi->condition('My property', "Target value")->toArray;

How to get all pages from category?
$pages = $sqi->category("Some category")->toArray;

How to get pages match multiple conditions?
$pages = $sqi->condition('PropA','ValueA') ->condition('PropB','ValueB') ->condition('PropC','ValueC') ->toArray;

How to get specified property value from some page?
$value = $sqi->from('Some page')->printout('Specified property name')->toArray;

How to limit or offset query?
$sqi->category('One category')->category('And another category')->limit(10)->offset(5)->toArray;

How to count result?
$count = $sqi->from('Some page')->count; Note: every result page have special properties included:
 * Categories (array)
 * SubcategoryOf
 * ModificationDate
 * CreationDate
 * LastEditor

Downloads
You can download master branch from github. Please feel free to submit bugs and pull-requests.