예제 #1
0
파일: User.php 프로젝트: markwu/simpleid
 private function toSecureArray($hidden_value = null)
 {
     $mgr = ModuleManager::instance();
     $copy = new ArrayWrapper($this->container);
     $secret_paths = $mgr->invokeAll('secretUserDataPaths');
     if ($secret_paths == null) {
         $secret_paths = array();
     }
     $secret_paths[] = 'uid';
     foreach ($secret_paths as $path) {
         if ($hidden_value) {
             $copy->pathSet($path, $hidden_value);
         } else {
             $copy->pathUnset($path);
         }
     }
     return $copy->toArray();
 }