/** * Resolves the $table parameter to a scalar key * * @param string|TableReferenceInstance $table * @return string */ private static function key($table) { global $BASEPATH; if ($table instanceof TableReferenceInstance) { //We only need the class name as our key return $BASEPATH . $table->getClass(); } elseif (!is_string($table)) { throw new \Exception('Invalid key specified'); } return $BASEPATH . $table; }
function __construct(TableReferenceInstance $table) { $class = $table->getClass(); $this->map = $this->getMap($class); }