Example #1
0
 public static function search($schema = NULL, $orderBy = NULL)
 {
     if (!$schema) {
         $schema = new StdClass();
     }
     if (!$orderBy) {
         $orderBy = array("integer\\/id" => 'ASC');
     }
     $results = JsonStore::schemaSearch('Idea', $schema, $orderBy);
     foreach ($results as $idx => $result) {
         if ($cached = JsonStore::cached('Idea', $result->id)) {
             $results[$idx] = $cached;
             continue;
         }
         $results[$idx] = JsonStore . setCached('Idea', $result->id, new Idea($result));
     }
     return $results;
 }