3 class ExternalStoreForTesting
{
11 // gzip string below generated with gzdeflate( 'AAAABBAAA' )
12 '12345' => "sttttr\002\022\000",
17 * Fetch data from given URL
18 * @param string $url An url of the form FOO://cluster/id or FOO://cluster/id/itemid.
21 public function fetchFromURL( $url ) {
22 // Based on ExternalStoreDB
23 $path = explode( '/', $url );
26 if ( isset( $path[4] ) ) {
32 if ( !isset( $this->data
[$cluster][$id] ) ) {
36 if ( $itemID !== false
37 && is_array( $this->data
[$cluster][$id] )
38 && isset( $this->data
[$cluster][$id][$itemID] )
40 return $this->data
[$cluster][$id][$itemID];
43 return $this->data
[$cluster][$id];