public function dataStore($name)
    {
        if (gettype($name) == "string") {
            if (!isset($this->dataStores[$name])) {
                $this->dataStores[$name] = new DataStore;
            }
            return $this->dataStores[$name];
        } else {
            //$name's type is different from string
            //return everything for further process
            return $name;
        }
    }
public function dataStore($name)
    {
        if (gettype($name) == "string") {
            if (!isset($this->dataStores[$name])) {
                $this->dataStores[$name] = new DataStore;
            }
            return $this->dataStores[$name];
        } else {
            //$name's type is different from string
            //return everything for further process
            return $name;
        }
    }
public function dataStore ( $ name ) { if ( gettype ( $ name ) == "string" ) { if ( ! isset ( $ this -> dataStores [ $ name ] ) ) { $ this -> dataStores [ $ name ] = new DataStore ; } return $ this -> dataStores [ $ name ] ; } else { //$name's type is different from string //return everything for further process return $ name ; } }
Get the data store with a name, if not found, create a new one

@param string $name The name of data store

@return DataStore The datastore object
Get the data store with a name if not found create a new one