Example #1
0
 public static function check_value($value, $msg = null)
 {
     if (is_null(self::$instance)) {
         self::$instance = new self();
     }
     BasicEnum::check_val(self::$instance, $value, $msg);
 }
Example #2
0
 /** @brief Defines new count mode.
  *
  * @param $count_mode [in] New count mode to set. Available values are
  *        AfsCount::DOCUMENTS, AfsCount::CLUSTERS or null to rely on
  *        default AFS search engine count mode.
  *
  * @return new up to date instance.
  */
 public function set_count($count_mode, $feed = null)
 {
     $this->check_cluster_initialization();
     if (!is_null($count_mode)) {
         AfsCount::check_value($count_mode, 'Invalid count mode: ');
     }
     $copy = $this->copy();
     is_null($assignment_res = $copy->on_assignment()) ? null : ($copy = $assignment_res);
     $copy->set_parameter('count', $count_mode, $feed);
     return $copy;
 }