Overview

Namespaces

  • Contentstack
    • Error
    • Result
    • Stack
      • ContentType
        • BaseQuery
        • Entry
        • Query
    • Utility
  • None

Classes

  • Contentstack\Contentstack
  • Contentstack\Result\Result
  • Contentstack\Stack\ContentType\BaseQuery\BaseQuery
  • Contentstack\Stack\ContentType\ContentType
  • Contentstack\Stack\ContentType\Entry\Entry
  • Contentstack\Stack\ContentType\Query\Query
  • Contentstack\Stack\Stack

Exceptions

  • Contentstack\Error\CSException

Functions

  • addBoolean
  • comparision
  • contains
  • Contentstack\Utility\debug
  • Contentstack\Utility\generateQuery
  • Contentstack\Utility\generateQueryParams
  • Contentstack\Utility\getDomain
  • Contentstack\Utility\getLastActivites
  • Contentstack\Utility\headers
  • Contentstack\Utility\isEmpty
  • Contentstack\Utility\isKeySet
  • Contentstack\Utility\request
  • Contentstack\Utility\URL
  • Contentstack\Utility\validateInput
  • Contentstack\Utility\wrapResult
  • createError
  • existence
  • getFunctionName
  • language
  • logical
  • pagination
  • projection
  • references
  • regexp
  • search
  • sorting
  • tags
  • Overview
  • Namespace
  • Class
 1: <?php
 2: /*
 3:  * Dependency loading
 4:  * */
 5: 
 6: namespace Contentstack\Stack\ContentType\Query;
 7: 
 8: use Contentstack\Stack\ContentType\BaseQuery\BaseQuery;
 9: use Contentstack\Utility;
10: 
11: require_once __DIR__."/base_query.php";
12: require_once __DIR__."/../utility.php";
13: 
14: class Query extends BaseQuery {
15:     var $operation;
16:     var $_query;
17: 
18:     /*
19:      * Query
20:      * Query Class to initalize your Query
21:      * @param
22:      * */
23:     public function __construct($contentType = '') {
24:         $this->_query = array();
25:         parent::__construct($contentType, $this);
26:     }
27: 
28:     /*
29:      * find
30:      * Get all entries based on the specified subquery
31:      * */
32:     public function find() {
33:         $this->operation = __FUNCTION__;
34:         return Utility\request($this);
35:     }
36: 
37:     /*
38:      * findOne
39:      * Get single entry based on the specified subquery
40:      * */
41:     public function findOne() {
42:         $this->operation = __FUNCTION__;
43:         $this->_query['limit'] = 1;
44:         return Utility\request($this);
45:     }
46: }
API documentation generated by ApiGen