b151957f9b05e1ad8f9f73e1e92b30e130f30d5c
3 class ExternalStoreForTesting
{
15 * Fetch data from given URL
16 * @param string $url An url of the form FOO://cluster/id or FOO://cluster/id/itemid.
19 public function fetchFromURL( $url ) {
20 // Based on ExternalStoreDB
21 $path = explode( '/', $url );
24 if ( isset( $path[4] ) ) {
30 if ( !isset( $this->data
[$cluster][$id] ) ) {
34 if ( $itemID !== false
35 && is_array( $this->data
[$cluster][$id] )
36 && isset( $this->data
[$cluster][$id][$itemID] )
38 return $this->data
[$cluster][$id][$itemID];
41 return $this->data
[$cluster][$id];