This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .gitignore | |
################### | |
development/ | |
cms/filestore/ | |
apache_pb.gif | |
apache_pb.png | |
apache_pb2.gif | |
apache_pb2.png | |
apache_pb2_ani.gif | |
favicon_.ico |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach ($elements as $elementCode => $elementData) { | |
if ($configuratorService->isCompoundElement($country, $elementCode)) { | |
echo $elementCode . ' is compound<br>'; | |
$scooterElements[$accessoryDescription[$elementData['accessoryType']]][$elementData['description']] = $configuratorService->getCompoundOptions($country, $elementCode); | |
$universesConfigurationNames[$elementData['description']] = $configuratorService->getCompoundDescription($country, $elementCode, $configuratorService->getValues($country, $universSelected, $elementCode)); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'configure' => array( | |
'type' => 'Zend\Mvc\Router\Http\Segment', | |
'options' => array( | |
'route' => '/configure[/:id[/:motor]]', | |
'constraints' => array( | |
'id' => '[0-9]*[a-zA-Z][a-zA-Z0-9_-]*', | |
'motor' => '[0-9]*[a-zA-Z][a-zA-Z0-9_-]*', | |
), | |
'defaults' => array( | |
'controller' => 'Application\Controller\Application', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rowset = $this->tableGateway->select(function (\Zend\Db\Sql\Select $select) use ($pictureSrc, $country) { | |
$select->columns(array('count' => new \Zend\Db\Sql\Expression('COUNT(*)'))); | |
$select->where(array('country_code' => $country, 'picture' => $pictureSrc)); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vmamp@AMP30:/users/cfs00/web> php composer.phar self-update | |
Fatal error: Class 'Phar' not found in /users/cfs00/web/composer.phar on line 13 | |
vmamp@AMP30:/users/cfs00/web> curl -sS https://getcomposer.org/installer | php | |
#!/usr/bin/env php | |
Some settings on your machine make Composer unable to work properly. | |
Make sure that you fix the issues listed below and run this script again: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ----------------------------------------------------------------------- | |
// ... generate the image dinamically: renderScooterAction method | |
// ----------------------------------------------------------------------- | |
ob_start(); | |
/// file.png has the image data | |
ImagePng($imgPng,'/tmp/file.png'); | |
$imageData = ob_get_clean(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function renderScooterAction() | |
{ | |
$contentService = $this->getServiceLocator()->get('ContentService'); | |
$strImagePath = $contentService->getDestinationBase().'/'.$this->getRequest()->getPost()->img; | |
$imgName = explode("/",$this->getRequest()->getPost()->img); | |
list($width, $height, $type, $attr) = getimagesize($strImagePath); | |
$required_memory = Round($width * $height * 24); | |
$new_limit = memory_get_usage() + $required_memory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function renderScooterAction() | |
{ | |
$contentService = $this->getServiceLocator()->get('ContentService'); | |
$strImagePath = $contentService->getDestinationBase().'/'.$this->getRequest()->getPost()->img; | |
$imgName = explode("/",$this->getRequest()->getPost()->img); | |
list($width, $height, $type, $attr) = getimagesize($strImagePath); | |
$required_memory = Round($width * $height * 24); | |
$new_limit = memory_get_usage() + $required_memory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## controller | |
public function renderScooterAction() | |
{ | |
$response = $this->getResponse(); | |
$im = ImageCreateTrueColor(640, 480); | |
$azul = ImageColorAllocate($im, 128, 128, 255); | |
$azul2 = ImageColorAllocate($im, 64, 64, 230); | |
$verde = ImageColorAllocate($im, 0, 64, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_php5.c> | |
EnableMMAP Off | |
EnableSendfile Off | |
###### | |
</IfModule> |