public static function getNetworkFromCore(Core $core)
 {
     if (get_class($core) == Network::getClassName()) {
         return $core;
     } elseif (get_class($core) == Site::getClassName()) {
         return $core->getNetwork();
     } else {
         return $core->getSite()->getNetwork();
     }
 }
示例#2
0
 public function getSite($siteId, $siteKey)
 {
     return Site::init($this, $siteId, $siteKey);
 }