예제 #1
0
 /**
  * {@inheritdoc}
  *
  * @param \Versatile\Search\Contracts\Criteria $criteria
  * @return \Versatile\Search\Contracts\Search
  **/
 public function search(CriteriaContract $criteria)
 {
     if ($factory = $this->nearestForClass($criteria->modelClass())) {
         return call_user_func($factory, $criteria);
     }
     throw new OutOfBoundsException('No factory for ' . $criteria->modelClass() . ' found');
 }
예제 #2
0
 /**
  * Return the root model class name, so that types, titles, etc. can be
  * introspected
  *
  * @return string
  **/
 public function modelClass()
 {
     return $this->criteria->modelClass();
 }