Gumbo_Interface_Map
Map Interface
The Map is responsible for creating a reference from a source (internal) key to a foreign (external) key. The Source Key is important to the Mapper Class. The Foreign Key is from some outside source. Every Source Key must have a Foreign Key reference.
The best example to use would be to map HTML Form Input data to the private properties of a class. The Source Key would be the name of the private property. The Foreign Key would be the name of the HTML Form Field. A Mapper Class will use the generated Map to process the information. The Map only holds the appropriate key references.
Author(s): |
Michael Luster <mluster79@yahoo.com> |
License: | New BSD License |
Copyright: | Copyright (c) 2007, iBayou, Michael Luster |
Link: | http://sourceforge.net/projects/phpgumbo |
Version: | 0.0.1 |
Interface Methods
Adds a foreign key reference to a source key
Parameter(s):
- (string) $source_key
- (string) $foreign_key
[ Top ]
Returns all the keys as an associative array where key=>source_key, val=>foreign_key
[ Top ]
Returns the foreign key reference to the source key
Parameter(s):
- (string) $source_key
- precondition:
isKey ($source_key)
[ Top ]public string getKey ( string $foreign_key ) [line 75]Returns the source key referenced by the foreign key
Parameter(s):
- (string) $foreign_key
- precondition:
isForeignKey ($foreign_key)
[ Top ]public bool isForeignKey ( string $foreign_key ) [line 103]Returns if the foreign key exists
Parameter(s):
- (string) $foreign_key
[ Top ]public bool isKey ( string $source_key ) [line 96]Returns if the source key exists
Parameter(s):
- (string) $source_key
[ Top ]public void remove ( string $source_key ) [line 58]Removes the foreign key reference to a source key
Parameter(s):
- (string) $source_key
[ Top ]empty key references
[ Top ]