Esempio n. 1
0
 /**
  * Create a FieldRangeConstraint object.
  *
  * @see http://docs.marklogic.com/search:search#opt-constraint
  *
  * @param string $name Constraint name.
  * @param string $datatype Constraint datatype.
  * @param string $facet Whether constraint should be faceted ('true' or 'false').
  * @param string $field Field name.
  */
 public function __construct($name, $datatype, $facet = 'true', $field)
 {
     $this->field = (string) $field;
     $this->datatype = (string) $datatype;
     $this->facet = (string) $facet;
     parent::__construct($name);
 }
Esempio n. 2
0
 /**
  * Create a PathRangeConstraint object.
  *
  * @see http://docs.marklogic.com/search:search#opt-constraint
  *
  * @param string $name Constraint name.
  * @param string $datatype Constraint datatype.
  * @param string $facet Whether constraint should be faceted ('true' or 'false').
  * @param string $elem Path expression (e.g., '/publication/my:meta/my:year').
  */
 public function __construct($name, $datatype, $facet = 'true', $path)
 {
     $this->path = (string) $path;
     $this->datatype = (string) $datatype;
     $this->facet = (string) $facet;
     parent::__construct($name);
 }
Esempio n. 3
0
 /**
  * Create a ValueConstraint object.
  *
  * @see http://docs.marklogic.com/search:search#opt-constraint
  *
  * @param string $name Constraint name.
  * @param string $elem Element name.
  * @param string $ns An element namespace.
  * @param string $attr Attribute name.
  * @param string $attrNs An attribute namespace.
  */
 public function __construct($name, $elem, $ns = '', $attr = '', $attrNs = '')
 {
     $this->elem = (string) $elem;
     $this->ns = (string) $ns;
     $this->attr = (string) $attr;
     $this->attrNs = (string) $attrNs;
     parent::__construct($name);
 }
Esempio n. 4
0
 /**
  * Create a RangeConstraint object.
  *
  * @see http://docs.marklogic.com/search:search#opt-constraint
  *
  * @param string $name Constraint name.
  * @param string $datatype Constraint datatype.
  * @param string $facet Whether constraint should be faceted ('true' or 'false').
  * @param string $elem Name of the element.
  * @param string $ns Element namespace.
  * @param string $attr Attribute name.
  * @param string $attrNs An attribute namespace.
  */
 public function __construct($name, $datatype, $facet = 'true', $elem, $ns = '', $attr = '', $attrNs = '')
 {
     $this->elem = (string) $elem;
     $this->ns = (string) $ns;
     $this->attr = (string) $attr;
     $this->attrNs = (string) $attrNs;
     $this->datatype = (string) $datatype;
     $this->facet = (string) $facet;
     $this->buckets = array();
     parent::__construct($name);
 }
 /**
  * Construct an instance of a TraversableOfConstraint.
  *
  * @param AbstractConstraint $valueConstraint
  */
 public function __construct(AbstractConstraint $valueConstraint)
 {
     parent::__construct();
     $this->valueConstraint = $valueConstraint;
 }
Esempio n. 6
0
 /**
  * Create a FieldWordConstraint object.
  *
  * @see http://docs.marklogic.com/search:search#opt-constraint
  *
  * @param string $name Constraint name.
  * @param string $field Field name.
  */
 public function __construct($name, $field)
 {
     $this->field = (string) $field;
     parent::__construct($name);
 }
Esempio n. 7
0
 /**
  * Construct an instance of a InArrayConstraint.
  *
  * @param array $allowed
  */
 public function __construct(array $allowed)
 {
     parent::__construct();
     $this->allowed = $allowed;
 }
Esempio n. 8
0
 /**
  * @return	NotNull
  */
 public function __construct()
 {
     parent::__construct('not null');
 }
Esempio n. 9
0
 public function __construct($columns = null, $name = null)
 {
     parent::__construct($columns);
     $this->name = $name;
 }
Esempio n. 10
0
 /**
  * Create a PropertiesConstraint object.
  *
  * @see http://docs.marklogic.com/search:search#opt-constraint
  *
  * @param string $name Constraint name.
  */
 public function __construct($name)
 {
     parent::__construct($name);
 }