Skip to content

Commit

Permalink
Added caching for RedBeanPHP Bean Export plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabor committed Sep 17, 2011
1 parent 927ea47 commit 7a48a55
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions RedBean/Plugin/BeanExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,25 @@ public function loadSchema() {
}
$this->tables = $tables;
}

/**
*Returs a serialized representation of the schema
*
*@return string $serialized serialized representation
*/
public function getSchema() {
return serialize($this->tables);
}

/**
* Loads a schema from a string (containing serialized export of schema)
*
* @param string $schema
*/
public function loadSchemaFromString($schema) {
$this->tables = unserialize($schema);
}


/**
* Exports a collection of beans
Expand Down

0 comments on commit 7a48a55

Please sign in to comment.