コード例 #1
0
ファイル: Site.php プロジェクト: rolice/speedy
 public static function detect($site)
 {
     return (string) (int) $site == $site ? Site::getById((int) $site) : Site::find($site);
 }
コード例 #2
0
ファイル: Calculation.php プロジェクト: rolice/speedy
 protected function mapCountries()
 {
     foreach (static::CountryMapping as $index => $expected) {
         if (!$this->{$expected}) {
             $site = Site::getById($this->{static::SiteMapping[$index]});
             if ($site instanceof Site) {
                 $this->{static::CountryMapping[$index]} = $site->countryId;
             }
         }
     }
 }