@@ -4860,7 +4860,7 @@ function DSProvider() {
48604860
48614861module . exports = DSProvider ;
48624862
4863- } , { "./async_methods" :61 , "./sync_methods" :81 } ] , 68 :[ function ( require , module , exports ) {
4863+ } , { "./async_methods" :61 , "./sync_methods" :82 } ] , 68 :[ function ( require , module , exports ) {
48644864function errorPrefix ( resourceName ) {
48654865return 'DS.bindAll(scope, expr, ' + resourceName + ', params[, cb]): ' ;
48664866}
@@ -6127,6 +6127,65 @@ function get(resourceName, id, options) {
61276127module . exports = get ;
61286128
61296129} , { } ] , 80 :[ function ( require , module , exports ) {
6130+ function errorPrefix ( resourceName ) {
6131+ return 'DS.getAll(' + resourceName + '[, ids]): ' ;
6132+ }
6133+
6134+ /**
6135+ *@doc method
6136+ *@id DS.sync methods:getAll
6137+ *@name getAll
6138+ *@description
6139+ * Synchronously return all of the resource.
6140+ *
6141+ * ## Signature:
6142+ * ```js
6143+ * DS.getAll(resourceName[, ids])
6144+ * ```
6145+ *
6146+ * ## Example:
6147+ *
6148+ * ```js
6149+ * DS.getAll('document'); // [{ author: 'John Anderson', id: 5 }]
6150+ * ```
6151+ *
6152+ * ## Throws
6153+ *
6154+ * - `{IllegalArgumentError}`
6155+ * - `{NonexistentResourceError}`
6156+ *
6157+ *@param {string } resourceName The resource type, e.g. 'user', 'comment', etc.
6158+ *@param {array } ids Optional list of primary keys to filter the array of results by.
6159+ *
6160+ *@returns {array } The items of the type specified by `resourceName`.
6161+ */
6162+ function getAll ( resourceName , ids ) {
6163+ var DS = this ;
6164+ var IA = DS . errors . IA ;
6165+ var resource ;
6166+ var collection = [ ] ;
6167+
6168+ if ( ! DS . definitions [ resourceName ] ) {
6169+ throw new DS . errors . NER ( errorPrefix ( resourceName ) + resourceName ) ;
6170+ } else if ( arguments . length === 2 && ! DS . utils . isArray ( ids ) ) {
6171+ throw new IA ( errorPrefix ( resourceName , ids ) + 'ids: Must be an array!' ) ;
6172+ }
6173+
6174+ resource = DS . store [ resourceName ] ;
6175+
6176+ if ( DS . utils . isArray ( ids ) ) {
6177+ for ( var i = 0 ; i < ids . length ; i ++ ) {
6178+ collection . push ( resource . index . get ( ids [ i ] ) ) ;
6179+ }
6180+ } else {
6181+ collection = resource . collection . slice ( ) ;
6182+ }
6183+
6184+ return collection ;
6185+ }
6186+
6187+ module . exports = getAll ;
6188+ } , { } ] , 81 :[ function ( require , module , exports ) {
61306189function errorPrefix ( resourceName , id ) {
61316190return 'DS.hasChanges(' + resourceName + ', ' + id + '): ' ;
61326191}
@@ -6191,7 +6250,7 @@ function hasChanges(resourceName, id) {
61916250
61926251module . exports = hasChanges ;
61936252
6194- } , { } ] , 81 :[ function ( require , module , exports ) {
6253+ } , { } ] , 82 :[ function ( require , module , exports ) {
61956254module . exports = {
61966255
61976256/**
@@ -6314,6 +6373,16 @@ module.exports = {
63146373 */
63156374get :require ( './get' ) ,
63166375
6376+ /**
6377+ *@doc method
6378+ *@id DS.sync methods:getAll
6379+ *@name getAll
6380+ *@methodOf DS
6381+ *@description
6382+ * See [DS.getAll](/documentation/api/api/DS.sync methods:getAll).
6383+ */
6384+ getAll :require ( './getAll' ) ,
6385+
63176386/**
63186387 *@doc method
63196388 *@id DS.sync methods:hasChanges
@@ -6405,7 +6474,7 @@ module.exports = {
64056474unlinkInverse :require ( './unlinkInverse' )
64066475} ;
64076476
6408- } , { "./bindAll" :68 , "./bindOne" :69 , "./changeHistory" :70 , "./changes" :71 , "./compute" :72 , "./createInstance" :73 , "./defineResource" :74 , "./digest" :75 , "./eject" :76 , "./ejectAll" :77 , "./filter" :78 , "./get" :79 , "./hasChanges " :80 , "./inject" :82 , "./lastModified" :83 , "./lastSaved" :84 , "./link" :85 , "./linkAll" :86 , "./linkInverse" :87 , "./previous" :88 , "./unlinkInverse" :89 } ] , 82 :[ function ( require , module , exports ) {
6477+ } , { "./bindAll" :68 , "./bindOne" :69 , "./changeHistory" :70 , "./changes" :71 , "./compute" :72 , "./createInstance" :73 , "./defineResource" :74 , "./digest" :75 , "./eject" :76 , "./ejectAll" :77 , "./filter" :78 , "./get" :79 , "./getAll " :80 , "./hasChanges" : 81 , "./ inject" :83 , "./lastModified" :84 , "./lastSaved" :85 , "./link" :86 , "./linkAll" :87 , "./linkInverse" :88 , "./previous" :89 , "./unlinkInverse" :90 } ] , 83 :[ function ( require , module , exports ) {
64096478var observe = require ( '../../../lib/observe-js/observe-js' ) ;
64106479var _compute = require ( './compute' ) . _compute ;
64116480
@@ -6714,7 +6783,7 @@ function inject(resourceName, attrs, options) {
67146783
67156784module . exports = inject ;
67166785
6717- } , { "../../../lib/observe-js/observe-js" :1 , "./compute" :72 } ] , 83 :[ function ( require , module , exports ) {
6786+ } , { "../../../lib/observe-js/observe-js" :1 , "./compute" :72 } ] , 84 :[ function ( require , module , exports ) {
67186787function errorPrefix ( resourceName , id ) {
67196788return 'DS.lastModified(' + resourceName + '[, ' + id + ']): ' ;
67206789}
@@ -6773,7 +6842,7 @@ function lastModified(resourceName, id) {
67736842
67746843module . exports = lastModified ;
67756844
6776- } , { } ] , 84 :[ function ( require , module , exports ) {
6845+ } , { } ] , 85 :[ function ( require , module , exports ) {
67776846function errorPrefix ( resourceName , id ) {
67786847return 'DS.lastSaved(' + resourceName + '[, ' + id + ']): ' ;
67796848}
@@ -6837,7 +6906,7 @@ function lastSaved(resourceName, id) {
68376906
68386907module . exports = lastSaved ;
68396908
6840- } , { } ] , 85 :[ function ( require , module , exports ) {
6909+ } , { } ] , 86 :[ function ( require , module , exports ) {
68416910function errorPrefix ( resourceName ) {
68426911return 'DS.link(' + resourceName + ', id[, relations]): ' ;
68436912}
@@ -6939,7 +7008,7 @@ function link(resourceName, id, relations) {
69397008
69407009module . exports = link ;
69417010
6942- } , { } ] , 86 :[ function ( require , module , exports ) {
7011+ } , { } ] , 87 :[ function ( require , module , exports ) {
69437012function errorPrefix ( resourceName ) {
69447013return 'DS.linkAll(' + resourceName + '[, params][, relations]): ' ;
69457014}
@@ -7056,7 +7125,7 @@ function linkAll(resourceName, params, relations) {
70567125
70577126module . exports = linkAll ;
70587127
7059- } , { } ] , 87 :[ function ( require , module , exports ) {
7128+ } , { } ] , 88 :[ function ( require , module , exports ) {
70607129function errorPrefix ( resourceName ) {
70617130return 'DS.linkInverse(' + resourceName + ', id[, relations]): ' ;
70627131}
@@ -7154,7 +7223,7 @@ function linkInverse(resourceName, id, relations) {
71547223
71557224module . exports = linkInverse ;
71567225
7157- } , { } ] , 88 :[ function ( require , module , exports ) {
7226+ } , { } ] , 89 :[ function ( require , module , exports ) {
71587227function errorPrefix ( resourceName , id ) {
71597228return 'DS.previous(' + resourceName + '[, ' + id + ']): ' ;
71607229}
@@ -7211,7 +7280,7 @@ function previous(resourceName, id) {
72117280
72127281module . exports = previous ;
72137282
7214- } , { } ] , 89 :[ function ( require , module , exports ) {
7283+ } , { } ] , 90 :[ function ( require , module , exports ) {
72157284function errorPrefix ( resourceName ) {
72167285return 'DS.unlinkInverse(' + resourceName + ', id[, relations]): ' ;
72177286}
@@ -7312,7 +7381,7 @@ function unlinkInverse(resourceName, id, relations) {
73127381
73137382module . exports = unlinkInverse ;
73147383
7315- } , { } ] , 90 :[ function ( require , module , exports ) {
7384+ } , { } ] , 91 :[ function ( require , module , exports ) {
73167385/**
73177386 *@doc function
73187387 *@id errors.types:IllegalArgumentError
@@ -7445,7 +7514,7 @@ module.exports = [function () {
74457514} ;
74467515} ] ;
74477516
7448- } , { } ] , 91 :[ function ( require , module , exports ) {
7517+ } , { } ] , 92 :[ function ( require , module , exports ) {
74497518( function ( window , angular , undefined ) {
74507519'use strict' ;
74517520
@@ -7534,7 +7603,7 @@ module.exports = [function () {
75347603
75357604} ) ( window , window . angular ) ;
75367605
7537- } , { "./adapters/http" :54 , "./adapters/localStorage" :55 , "./datastore" :67 , "./errors" :90 , "./utils" :92 } ] , 92 :[ function ( require , module , exports ) {
7606+ } , { "./adapters/http" :54 , "./adapters/localStorage" :55 , "./datastore" :67 , "./errors" :91 , "./utils" :93 } ] , 93 :[ function ( require , module , exports ) {
75387607var DSErrors = require ( './errors' ) ;
75397608
75407609function Events ( target ) {
@@ -7747,4 +7816,4 @@ module.exports = ['$q', function ($q) {
77477816} ;
77487817} ] ;
77497818
7750- } , { "./errors" :90 , "mout/array/contains" :2 , "mout/array/filter" :3 , "mout/array/find" :4 , "mout/array/remove" :9 , "mout/array/slice" :10 , "mout/array/sort" :11 , "mout/array/toLookup" :12 , "mout/lang/isBoolean" :19 , "mout/lang/isEmpty" :20 , "mout/lang/isRegExp" :25 , "mout/object/deepMixIn" :31 , "mout/object/keys" :35 , "mout/object/merge" :36 , "mout/object/mixIn" :37 , "mout/object/pick" :39 , "mout/object/set" :40 , "mout/random/guid" :42 , "mout/string/makePath" :49 , "mout/string/pascalCase" :50 , "mout/string/upperCase" :53 } ] } , { } , [ 91 ] ) ;
7819+ } , { "./errors" :91 , "mout/array/contains" :2 , "mout/array/filter" :3 , "mout/array/find" :4 , "mout/array/remove" :9 , "mout/array/slice" :10 , "mout/array/sort" :11 , "mout/array/toLookup" :12 , "mout/lang/isBoolean" :19 , "mout/lang/isEmpty" :20 , "mout/lang/isRegExp" :25 , "mout/object/deepMixIn" :31 , "mout/object/keys" :35 , "mout/object/merge" :36 , "mout/object/mixIn" :37 , "mout/object/pick" :39 , "mout/object/set" :40 , "mout/random/guid" :42 , "mout/string/makePath" :49 , "mout/string/pascalCase" :50 , "mout/string/upperCase" :53 } ] } , { } , [ 92 ] ) ;