src/Actions/Processors/UrlRewriteCreateProcessor.php 1 location
|
@@ 32-66 (lines=35) @@
|
| 29 |
|
* @link https://github.com/techdivision/import |
| 30 |
|
* @link http://www.techdivision.com |
| 31 |
|
*/ |
| 32 |
|
class UrlRewriteCreateProcessor extends AbstractCreateProcessor |
| 33 |
|
{ |
| 34 |
|
|
| 35 |
|
/** |
| 36 |
|
* Return's the array with the SQL statements that has to be prepared. |
| 37 |
|
* |
| 38 |
|
* @return array The SQL statements to be prepared |
| 39 |
|
* @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements() |
| 40 |
|
*/ |
| 41 |
|
protected function getStatements() |
| 42 |
|
{ |
| 43 |
|
|
| 44 |
|
// load the utility class name |
| 45 |
|
$utilityClassName = $this->getUtilityClassName(); |
| 46 |
|
|
| 47 |
|
// return the array with the SQL statements that has to be prepared |
| 48 |
|
return array( |
| 49 |
|
$utilityClassName::CREATE_URL_REWRITE => $this->getUtilityClass()->find($utilityClassName::CREATE_URL_REWRITE) |
| 50 |
|
); |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
/** |
| 54 |
|
* Persist's the passed row. |
| 55 |
|
* |
| 56 |
|
* @param array $row The row to persist |
| 57 |
|
* @param string|null $name The name of the prepared statement that has to be executed |
| 58 |
|
* |
| 59 |
|
* @return string The last inserted ID |
| 60 |
|
*/ |
| 61 |
|
public function execute($row, $name = null) |
| 62 |
|
{ |
| 63 |
|
parent::execute($row, $name); |
| 64 |
|
return $this->getConnection()->lastInsertId(); |
| 65 |
|
} |
| 66 |
|
} |
| 67 |
|
|
src/Actions/Processors/UrlRewriteUpdateProcessor.php 1 location
|
@@ 34-68 (lines=35) @@
|
| 31 |
|
* @link https://github.com/techdivision/import |
| 32 |
|
* @link http://www.techdivision.com |
| 33 |
|
*/ |
| 34 |
|
class UrlRewriteUpdateProcessor extends AbstractUpdateProcessor |
| 35 |
|
{ |
| 36 |
|
|
| 37 |
|
/** |
| 38 |
|
* Return's the array with the SQL statements that has to be prepared. |
| 39 |
|
* |
| 40 |
|
* @return array The SQL statements to be prepared |
| 41 |
|
* @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements() |
| 42 |
|
*/ |
| 43 |
|
protected function getStatements() |
| 44 |
|
{ |
| 45 |
|
|
| 46 |
|
// load the utility class name |
| 47 |
|
$utilityClassName = $this->getUtilityClassName(); |
| 48 |
|
|
| 49 |
|
// return the array with the SQL statements that has to be prepared |
| 50 |
|
return array( |
| 51 |
|
$utilityClassName::UPDATE_URL_REWRITE => $this->getUtilityClass()->find($utilityClassName::UPDATE_URL_REWRITE) |
| 52 |
|
); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
/** |
| 56 |
|
* Update's the passed row. |
| 57 |
|
* |
| 58 |
|
* @param array $row The row to update |
| 59 |
|
* @param string|null $name The name of the prepared statement that has to be executed |
| 60 |
|
* |
| 61 |
|
* @return string The ID of the updated product |
| 62 |
|
*/ |
| 63 |
|
public function execute($row, $name = null) |
| 64 |
|
{ |
| 65 |
|
parent::execute($row, $name); |
| 66 |
|
return $row[MemberNames::URL_REWRITE_ID]; |
| 67 |
|
} |
| 68 |
|
} |
| 69 |
|
|
src/Actions/Processors/StoreCreateProcessor.php 1 location
|
@@ 32-66 (lines=35) @@
|
| 29 |
|
* @link https://github.com/techdivision/import |
| 30 |
|
* @link http://www.techdivision.com |
| 31 |
|
*/ |
| 32 |
|
class StoreCreateProcessor extends AbstractCreateProcessor |
| 33 |
|
{ |
| 34 |
|
|
| 35 |
|
/** |
| 36 |
|
* Return's the array with the SQL statements that has to be prepared. |
| 37 |
|
* |
| 38 |
|
* @return array The SQL statements to be prepared |
| 39 |
|
* @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements() |
| 40 |
|
*/ |
| 41 |
|
protected function getStatements() |
| 42 |
|
{ |
| 43 |
|
|
| 44 |
|
// load the utility class name |
| 45 |
|
$utilityClassName = $this->getUtilityClassName(); |
| 46 |
|
|
| 47 |
|
// return the array with the SQL statements that has to be prepared |
| 48 |
|
return array( |
| 49 |
|
$utilityClassName::CREATE_STORE => $this->getUtilityClass()->find($utilityClassName::CREATE_STORE) |
| 50 |
|
); |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
/** |
| 54 |
|
* Persist's the passed row. |
| 55 |
|
* |
| 56 |
|
* @param array $row The row to persist |
| 57 |
|
* @param string|null $name The name of the prepared statement that has to be executed |
| 58 |
|
* |
| 59 |
|
* @return string The last inserted ID |
| 60 |
|
*/ |
| 61 |
|
public function execute($row, $name = null) |
| 62 |
|
{ |
| 63 |
|
parent::execute($row, $name); |
| 64 |
|
return $this->getConnection()->lastInsertId(); |
| 65 |
|
} |
| 66 |
|
} |
| 67 |
|
|
src/Actions/Processors/StoreGroupCreateProcessor.php 1 location
|
@@ 32-66 (lines=35) @@
|
| 29 |
|
* @link https://github.com/techdivision/import |
| 30 |
|
* @link http://www.techdivision.com |
| 31 |
|
*/ |
| 32 |
|
class StoreGroupCreateProcessor extends AbstractCreateProcessor |
| 33 |
|
{ |
| 34 |
|
|
| 35 |
|
/** |
| 36 |
|
* Return's the array with the SQL statements that has to be prepared. |
| 37 |
|
* |
| 38 |
|
* @return array The SQL statements to be prepared |
| 39 |
|
* @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements() |
| 40 |
|
*/ |
| 41 |
|
protected function getStatements() |
| 42 |
|
{ |
| 43 |
|
|
| 44 |
|
// load the utility class name |
| 45 |
|
$utilityClassName = $this->getUtilityClassName(); |
| 46 |
|
|
| 47 |
|
// return the array with the SQL statements that has to be prepared |
| 48 |
|
return array( |
| 49 |
|
$utilityClassName::CREATE_STORE_GROUP => $this->getUtilityClass()->find($utilityClassName::CREATE_STORE_GROUP) |
| 50 |
|
); |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
/** |
| 54 |
|
* Persist's the passed row. |
| 55 |
|
* |
| 56 |
|
* @param array $row The row to persist |
| 57 |
|
* @param string|null $name The name of the prepared statement that has to be executed |
| 58 |
|
* |
| 59 |
|
* @return string The last inserted ID |
| 60 |
|
*/ |
| 61 |
|
public function execute($row, $name = null) |
| 62 |
|
{ |
| 63 |
|
parent::execute($row, $name); |
| 64 |
|
return $this->getConnection()->lastInsertId(); |
| 65 |
|
} |
| 66 |
|
} |
| 67 |
|
|
src/Actions/Processors/StoreGroupUpdateProcessor.php 1 location
|
@@ 34-68 (lines=35) @@
|
| 31 |
|
* @link https://github.com/techdivision/import |
| 32 |
|
* @link http://www.techdivision.com |
| 33 |
|
*/ |
| 34 |
|
class StoreGroupUpdateProcessor extends AbstractUpdateProcessor |
| 35 |
|
{ |
| 36 |
|
|
| 37 |
|
/** |
| 38 |
|
* Return's the array with the SQL statements that has to be prepared. |
| 39 |
|
* |
| 40 |
|
* @return array The SQL statements to be prepared |
| 41 |
|
* @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements() |
| 42 |
|
*/ |
| 43 |
|
protected function getStatements() |
| 44 |
|
{ |
| 45 |
|
|
| 46 |
|
// load the utility class name |
| 47 |
|
$utilityClassName = $this->getUtilityClassName(); |
| 48 |
|
|
| 49 |
|
// return the array with the SQL statements that has to be prepared |
| 50 |
|
return array( |
| 51 |
|
$utilityClassName::UPDATE_STORE_GROUP => $this->getUtilityClass()->find($utilityClassName::UPDATE_STORE_GROUP) |
| 52 |
|
); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
/** |
| 56 |
|
* Update's the passed row. |
| 57 |
|
* |
| 58 |
|
* @param array $row The row to update |
| 59 |
|
* @param string|null $name The name of the prepared statement that has to be executed |
| 60 |
|
* |
| 61 |
|
* @return string The ID of the updated store group |
| 62 |
|
*/ |
| 63 |
|
public function execute($row, $name = null) |
| 64 |
|
{ |
| 65 |
|
parent::execute($row, $name); |
| 66 |
|
return $row[MemberNames::GROUP_ID]; |
| 67 |
|
} |
| 68 |
|
} |
| 69 |
|
|
src/Actions/Processors/StoreUpdateProcessor.php 1 location
|
@@ 34-68 (lines=35) @@
|
| 31 |
|
* @link https://github.com/techdivision/import |
| 32 |
|
* @link http://www.techdivision.com |
| 33 |
|
*/ |
| 34 |
|
class StoreUpdateProcessor extends AbstractUpdateProcessor |
| 35 |
|
{ |
| 36 |
|
|
| 37 |
|
/** |
| 38 |
|
* Return's the array with the SQL statements that has to be prepared. |
| 39 |
|
* |
| 40 |
|
* @return array The SQL statements to be prepared |
| 41 |
|
* @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements() |
| 42 |
|
*/ |
| 43 |
|
protected function getStatements() |
| 44 |
|
{ |
| 45 |
|
|
| 46 |
|
// load the utility class name |
| 47 |
|
$utilityClassName = $this->getUtilityClassName(); |
| 48 |
|
|
| 49 |
|
// return the array with the SQL statements that has to be prepared |
| 50 |
|
return array( |
| 51 |
|
$utilityClassName::UPDATE_STORE => $this->getUtilityClass()->find($utilityClassName::UPDATE_STORE) |
| 52 |
|
); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
/** |
| 56 |
|
* Update's the passed row. |
| 57 |
|
* |
| 58 |
|
* @param array $row The row to update |
| 59 |
|
* @param string|null $name The name of the prepared statement that has to be executed |
| 60 |
|
* |
| 61 |
|
* @return string The ID of the updated store |
| 62 |
|
*/ |
| 63 |
|
public function execute($row, $name = null) |
| 64 |
|
{ |
| 65 |
|
parent::execute($row, $name); |
| 66 |
|
return $row[MemberNames::STORE_ID]; |
| 67 |
|
} |
| 68 |
|
} |
| 69 |
|
|
src/Actions/Processors/StoreWebsiteCreateProcessor.php 1 location
|
@@ 32-66 (lines=35) @@
|
| 29 |
|
* @link https://github.com/techdivision/import |
| 30 |
|
* @link http://www.techdivision.com |
| 31 |
|
*/ |
| 32 |
|
class StoreWebsiteCreateProcessor extends AbstractCreateProcessor |
| 33 |
|
{ |
| 34 |
|
|
| 35 |
|
/** |
| 36 |
|
* Return's the array with the SQL statements that has to be prepared. |
| 37 |
|
* |
| 38 |
|
* @return array The SQL statements to be prepared |
| 39 |
|
* @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements() |
| 40 |
|
*/ |
| 41 |
|
protected function getStatements() |
| 42 |
|
{ |
| 43 |
|
|
| 44 |
|
// load the utility class name |
| 45 |
|
$utilityClassName = $this->getUtilityClassName(); |
| 46 |
|
|
| 47 |
|
// return the array with the SQL statements that has to be prepared |
| 48 |
|
return array( |
| 49 |
|
$utilityClassName::CREATE_STORE_WEBSITE => $this->getUtilityClass()->find($utilityClassName::CREATE_STORE_WEBSITE) |
| 50 |
|
); |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
/** |
| 54 |
|
* Persist's the passed row. |
| 55 |
|
* |
| 56 |
|
* @param array $row The row to persist |
| 57 |
|
* @param string|null $name The name of the prepared statement that has to be executed |
| 58 |
|
* |
| 59 |
|
* @return string The last inserted ID |
| 60 |
|
*/ |
| 61 |
|
public function execute($row, $name = null) |
| 62 |
|
{ |
| 63 |
|
parent::execute($row, $name); |
| 64 |
|
return $this->getConnection()->lastInsertId(); |
| 65 |
|
} |
| 66 |
|
} |
| 67 |
|
|
src/Actions/Processors/StoreWebsiteUpdateProcessor.php 1 location
|
@@ 34-68 (lines=35) @@
|
| 31 |
|
* @link https://github.com/techdivision/import |
| 32 |
|
* @link http://www.techdivision.com |
| 33 |
|
*/ |
| 34 |
|
class StoreWebsiteUpdateProcessor extends AbstractUpdateProcessor |
| 35 |
|
{ |
| 36 |
|
|
| 37 |
|
/** |
| 38 |
|
* Return's the array with the SQL statements that has to be prepared. |
| 39 |
|
* |
| 40 |
|
* @return array The SQL statements to be prepared |
| 41 |
|
* @see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements() |
| 42 |
|
*/ |
| 43 |
|
protected function getStatements() |
| 44 |
|
{ |
| 45 |
|
|
| 46 |
|
// load the utility class name |
| 47 |
|
$utilityClassName = $this->getUtilityClassName(); |
| 48 |
|
|
| 49 |
|
// return the array with the SQL statements that has to be prepared |
| 50 |
|
return array( |
| 51 |
|
$utilityClassName::UPDATE_STORE_WEBSITE => $this->getUtilityClass()->find($utilityClassName::UPDATE_STORE_WEBSITE) |
| 52 |
|
); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
/** |
| 56 |
|
* Update's the passed row. |
| 57 |
|
* |
| 58 |
|
* @param array $row The row to update |
| 59 |
|
* @param string|null $name The name of the prepared statement that has to be executed |
| 60 |
|
* |
| 61 |
|
* @return string The ID of the updated store website |
| 62 |
|
*/ |
| 63 |
|
public function execute($row, $name = null) |
| 64 |
|
{ |
| 65 |
|
parent::execute($row, $name); |
| 66 |
|
return $row[MemberNames::WEBSITE_ID]; |
| 67 |
|
} |
| 68 |
|
} |
| 69 |
|
|