From ac89ccd27ccd781b0e8c7534f41838c1c6a7050a Mon Sep 17 00:00:00 2001 From: Silvio Date: Fri, 30 Jul 2010 18:23:15 -0300 Subject: Adding methodName() to IsisConnector --- classes/IsisConnector.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'classes') diff --git a/classes/IsisConnector.php b/classes/IsisConnector.php index ff686da..277412d 100644 --- a/classes/IsisConnector.php +++ b/classes/IsisConnector.php @@ -330,6 +330,17 @@ class IsisConnector { return isset($field['map']['type']) ? $field['map']['type'] : FALSE; } + /** + * Guess a method name from a type. + * + * @param string $type Mapping type + * @return string Method name + */ + static function methodName($type) + { + return 'import'. ucfirst($type); + } + /** * Check on an ISIS schema whether a field has a map. * -- cgit v1.2.3