Ejemplo n.º 1
0
 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');
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 public function generateImage($config = null)
 {
     $captcha = new \KCAPTCHA();
     Session::set(self::KEYSTRING_KEY, $captcha->getKeyString());
     die;
 }
Ejemplo n.º 4
0
 public function addToCart(Product $product)
 {
     Session::set('product', $product->getPk());
 }