public function registerPlugin($plugin)
    {
        if ($plugin instanceof IOrmPlugin) {
            $this->plugins[] = $plugin;
        } elseif (is_string($plugin) && $this->iocContainer) {
            $this->plugins[] = $this->iocContainer->get($plugin);
        } else {
            throw InvalidArgumentException::format(
                'Invalid plugin supplied to %s: ioc container must be available to resolve class',
                __METHOD__
            );
        }
    }
public function registerPlugin($plugin)
    {
        if ($plugin instanceof IOrmPlugin) {
            $this->plugins[] = $plugin;
        } elseif (is_string($plugin) && $this->iocContainer) {
            $this->plugins[] = $this->iocContainer->get($plugin);
        } else {
            throw InvalidArgumentException::format(
                'Invalid plugin supplied to %s: ioc container must be available to resolve class',
                __METHOD__
            );
        }
    }
public function registerPlugin ( $ plugin ) { if ( $ plugin instanceof IOrmPlugin ) { $ this -> plugins [ ] = $ plugin ; } elseif ( is_string ( $ plugin ) && $ this -> iocContainer ) { $ this -> plugins [ ] = $ this -> iocContainer -> get ( $ plugin ) ; } else { throw InvalidArgumentException :: format ( 'Invalid plugin supplied to %s: ioc container must be available to resolve class' , __METHOD__ ) ; } }
Registers the supplied orm plugin.

@param IOrmPlugin|string $plugin

@return void
@throws InvalidArgumentException
Registers the supplied orm plugin .