コード例 #1
0
ファイル: Locator.php プロジェクト: scorp7mix/try.t4
 public static function getLocation()
 {
     if (null == Session::get('location')) {
         $app = \T4\Mvc\Application::getInstance();
         Session::set('location', $app->extensions->sxgeo->getLocation($app->request->ip));
     }
     return Session::get('location');
 }
コード例 #2
0
ファイル: StoreCart.php プロジェクト: barricade86/rampage
 public function addToCart(Product $product)
 {
     if (!array_key_exists(self::$sessionProductsListVar, $_SESSION)) {
         $collection = new Collection();
     } else {
         $collection = Session::get(self::$sessionProductsListVar);
     }
     $collection->append($product);
     Session::set(self::$sessionProductsListVar, $collection);
 }
コード例 #3
0
ファイル: Extension.php プロジェクト: pr-of-it/t4
 public function generateImage($config = null)
 {
     $captcha = new \KCAPTCHA();
     Session::set(self::KEYSTRING_KEY, $captcha->getKeyString());
     die;
 }
コード例 #4
0
ファイル: Cart.php プロジェクト: barricade86/rampage
 public function addToCart(Product $product)
 {
     Session::set('product', $product->getPk());
 }