コード例 #1
0
ファイル: ParseBaseController.php プロジェクト: malimu/baas
 /**
  * @param $keys
  * @return array
  */
 public function select($keys)
 {
     if (!is_null($keys)) {
         // get the keys from the url
         $keys = explode(',', $keys);
         // validate that these keys are exists in database
         $keys = array_intersect($keys, $this->columns);
         // some fields must always returned back
         $keys = array_merge($keys, array($this->object->getKeyName(), $this->object->getCreatedAtColumn(), $this->object->getUpdatedAtColumn()));
         // make sure we return unique values
         return array_unique($keys);
     }
     return array('*');
 }