This commit is contained in:
Manuel Raynaud
2014-04-11 09:36:43 +02:00
parent 441ac3dc2a
commit b60abb206b
8 changed files with 143 additions and 146 deletions

View File

@@ -30,7 +30,6 @@ use Thelia\Core\Security\Resource\AdminResources;
use Thelia\Form\Cache\CacheFlushForm; use Thelia\Form\Cache\CacheFlushForm;
use Thelia\Form\Exception\FormValidationException; use Thelia\Form\Exception\FormValidationException;
/** /**
* Class CacheController * Class CacheController
* @package Thelia\Controller\Admin * @package Thelia\Controller\Admin

View File

@@ -49,8 +49,8 @@ class BaseFrontController extends BaseController
* Redirect to à route ID related URL * Redirect to à route ID related URL
* *
* @param string $routeId the route ID, as found in Config/Resources/routing/admin.xml * @param string $routeId the route ID, as found in Config/Resources/routing/admin.xml
* @param array $urlParameters the URL parametrs, as a var/value pair array * @param array $urlParameters the URL parametrs, as a var/value pair array
* @param bool $referenceType * @param bool $referenceType
*/ */
public function redirectToRoute($routeId, $urlParameters = array(), $referenceType = Router::ABSOLUTE_PATH) public function redirectToRoute($routeId, $urlParameters = array(), $referenceType = Router::ABSOLUTE_PATH)
{ {
@@ -104,9 +104,9 @@ class BaseFrontController extends BaseController
/** /**
* Render the given template, and returns the result as an Http Response. * Render the given template, and returns the result as an Http Response.
* *
* @param string $templateName the complete template name, with extension * @param string $templateName the complete template name, with extension
* @param array $args the template arguments * @param array $args the template arguments
* @param int $status http code status * @param int $status http code status
* @return \Thelia\Core\HttpFoundation\Response * @return \Thelia\Core\HttpFoundation\Response
*/ */
protected function render($templateName, $args = array(), $status = 200) protected function render($templateName, $args = array(), $status = 200)

View File

@@ -60,9 +60,9 @@ interface ParserInterface
/** /**
* Return the registeted template directories for a givent template type * Return the registeted template directories for a givent template type
* *
* @param unknown $templateType * @param unknown $templateType
* @throws \InvalidArgumentException if the templateType is not defined * @throws \InvalidArgumentException if the templateType is not defined
* @return array: an array of defined templates directories for the given template type * @return array: an array of defined templates directories for the given template type
*/ */
public function getTemplateDirectories($templateType); public function getTemplateDirectories($templateType);

View File

@@ -116,7 +116,7 @@ class SmartyParser extends Smarty implements ParserInterface
/** /**
* Return the registeted template directories for a givent template type * Return the registeted template directories for a givent template type
* *
* @param int $templateType * @param int $templateType
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @return mixed: * @return mixed:
*/ */

View File

@@ -25,7 +25,6 @@ namespace Thelia\Form\Cache;
use Thelia\Form\BaseForm; use Thelia\Form\BaseForm;
/** /**
* Class CacheFlushForm * Class CacheFlushForm
* @package Thelia\Form\Cache * @package Thelia\Form\Cache

View File

@@ -129,7 +129,8 @@ class Tlog Implements LoggerInterface
* *
* @return Tlog a new Tlog instance. * @return Tlog a new Tlog instance.
*/ */
public static function getNewInstance() { public static function getNewInstance()
{
$instance = new Tlog(); $instance = new Tlog();
$instance->init(); $instance->init();

View File

@@ -40,7 +40,7 @@ class Order extends BaseOrder
public function postSave(ConnectionInterface $con = null) public function postSave(ConnectionInterface $con = null)
{ {
if($this->isPaid() && null === $this->getInvoiceDate()) { if ($this->isPaid() && null === $this->getInvoiceDate()) {
$this $this
->setInvoiceDate(time()) ->setInvoiceDate(time())
->save($con); ->save($con);

View File

@@ -27,7 +27,6 @@ use Symfony\Component\Routing\Router;
use Thelia\Core\HttpFoundation\Response; use Thelia\Core\HttpFoundation\Response;
use Thelia\Core\Template\ParserInterface; use Thelia\Core\Template\ParserInterface;
use Thelia\Core\Template\TemplateHelper; use Thelia\Core\Template\TemplateHelper;
use Thelia\Exception\TheliaProcessException;
use Thelia\Model\Order; use Thelia\Model\Order;
use Thelia\Tools\URL; use Thelia\Tools\URL;
@@ -42,7 +41,7 @@ abstract class AbstractPaymentModule extends BaseModule implements PaymentModule
* In many cases, it's necessary to send a form to the payment gateway. On your response you can return this form already * In many cases, it's necessary to send a form to the payment gateway. On your response you can return this form already
* completed, ready to be sent, instead of redirecting. The generateGatewayFormResponse() may help you in this case :) * completed, ready to be sent, instead of redirecting. The generateGatewayFormResponse() may help you in this case :)
* *
* @param Order $order processed order * @param Order $order processed order
* @return null|Response * @return null|Response
*/ */
abstract public function pay(Order $order); abstract public function pay(Order $order);
@@ -57,13 +56,12 @@ abstract class AbstractPaymentModule extends BaseModule implements PaymentModule
*/ */
abstract public function isValidPayment(); abstract public function isValidPayment();
/** /**
* Render the payment gateway template. The module should provide the gateway URL and the form fields names and values. * Render the payment gateway template. The module should provide the gateway URL and the form fields names and values.
* *
* @param Order $order the order * @param Order $order the order
* @param string $gateway_url the payment gateway URL * @param string $gateway_url the payment gateway URL
* @param array $form_data an associative array of form data, that will be rendered as hiddent fields * @param array $form_data an associative array of form data, that will be rendered as hiddent fields
* *
* @return Response the HTTP response. * @return Response the HTTP response.
*/ */
@@ -90,7 +88,7 @@ abstract class AbstractPaymentModule extends BaseModule implements PaymentModule
/** /**
* Return the order payment success page URL * Return the order payment success page URL
* *
* @param int $order_id the order ID * @param int $order_id the order ID
* @return string the order payment success page URL * @return string the order payment success page URL
*/ */
public function getPayementSuccessPageUrl($order_id) public function getPayementSuccessPageUrl($order_id)
@@ -109,8 +107,8 @@ abstract class AbstractPaymentModule extends BaseModule implements PaymentModule
/** /**
* Redirect the customer to the failure payment page. if $message is null, a generic message is displayed. * Redirect the customer to the failure payment page. if $message is null, a generic message is displayed.
* *
* @param int $order_id the order ID * @param int $order_id the order ID
* @param string|null $message an error message. * @param string|null $message an error message.
* *
* @return string the order payment failure page URL * @return string the order payment failure page URL
*/ */