Beispiel #1
0
 /**
  *
  */
 private function registerScopes($loginId)
 {
     $model = DF::model('Authentication.LoginsToScopes');
     $qst = Query::create($model)->where(Caml::eq('loginId', ':loginId'))->toSql();
     $rst = $model->execute($qst, ['loginId' => $loginId])->result();
     if ($rst) {
         foreach ($rst as $row) {
             $this->setScopes($row['scope']);
         }
     }
     return $this;
 }
 /**
  *
  */
 public function get(array $conditions = null, $values = null)
 {
     $qry = Query::create($this);
     $qst = "";
     if ($this->urlQuery) {
         $qry = $qry->parseUrlQuery($this->urlQuery);
     }
     /**
      * Resource level conditions, 
      * i.e.: ../products/33 = the specific product ID==33 is requested. 
      * This can be done via query filters as well. Combining methods return unpredictable results.
      */
     if ($conditions) {
         foreach ($conditions as $caml) {
             $qry = $qry->where($caml);
         }
     }
     $qst = $qry->toSql();
     $rst = parent::execute($qst, $values)->result();
     if ($rst) {
         $rst = $this->foreachInResultset($rst);
     }
     return $rst;
 }