This file contains hidden or 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
<?php | |
namespace DesignPatterns\Creational\AbstractFactory; | |
/** | |
* In this case, the abstract factory is a contract for creating some components | |
* for the web. There are two ways of rendering text: HTML and JSON | |
*/ | |
abstract class AbstractFactory | |
{ |
This file contains hidden or 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
<?php | |
foreach ($nominals as $nominal) { | |
for ($i = 1; $i <= $nominal['code_count']; $i++) { | |
$code = new Code(); | |
$code->setShop($shop); | |
$code->setCode($this->GenerateData($codeLength, $codeType, $codePrefix)); | |
$code->setPincode($this->GenerateData($pincodeLength, $pincodeType)); | |
$code->setCodeLiveCikle($codeLiveCikle); | |
$code->setMinDateActivity($minDateActivity); |
This file contains hidden or 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
1) download php source from official site (example: wget -O php-5.3.29.tar.gz http://us.php.net/get/php-5.3.29.tar.gz/from/this/mirror) | |
2) extract to you folder (extract php-X-X-X.tar.gz to your folder) | |
3) cd to folder (move to php folder) | |
4) ./configure --with-apxs2=/usr/bin/apxs (add your custome configuration) | |
./configure --with-apxs2=/usr/bin/apxs --cache-file=/home/andersen/php-5.3.29 --with-config-file-path=/home/andersen/php-5.3.29/etc --with-config-file-scan-dir=/home/andersen/php-5.3.29/var/db --disable-all --enable-phar --enable-session --enable-short-tags --enable-tokenizer --with-pcre-regex --with-zlib=/usr --enable-pdo --enable-cli --enable-opcache --enable-dom --enable-libxml --enable-simplexml --enable-xml --enable-xmlreader --enable-xmlwriter --with-xsl --with-libxml-dir=/usr --enable-soap --enable-session --with-iconv --enable-hash --enable-debug --enable-bcmath --with-bz2=/usr --enable-calendar --enable-ctype --enable-dom --enable-fileinfo --with-libdir=lib/x86_64-linux-gnu --with-mysql=m |
This file contains hidden or 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
1) | |
echo "alias php='/usr/bin/< youre php version php7.1>'" >> ~/.bashrc && source ~/.bashrc | |
restart computer | |
2)(https://tecadmin.net/switch-between-multiple-php-version-on-ubuntu/) | |
$ sudo a2dismod php5.6 | |
$ sudo a2enmod php7.1 | |
$ sudo service apache2 restart | |
$ sudo update-alternatives --set php /usr/bin/php7.1 |
This file contains hidden or 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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
This file contains hidden or 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
https://askubuntu.com/questions/831262/how-to-install-pgadmin-4-in-desktop-mode-on-ubuntu |
This file contains hidden or 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
<?php | |
namespace MainBundle\Controller\Customer; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
/** | |
* Class SitemapController |
This file contains hidden or 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
<?php | |
$site = "https://api.telegram.org/bot".$token; | |
$params = [ | |
'chat_id' => '@'.$chanelId, | |
'text' => $text, | |
'parse_mode' => $parse_mode, | |
]; | |
$options = array( |
This file contains hidden or 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
<?php | |
foreach ($content['result'] as $item) { | |
$i++; | |
$category = new Category(); | |
$category->setCategoryID($item['categoryID']); | |
$category->setParentID($item['parentID']); | |
$category->setRealcat($item['realcat']); | |
$category->setName($item['name']); | |
$app['orm.em']->persist($category); |
This file contains hidden or 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
https://gist.github.com/danvbe/4476697 | |
реКапча - https://www.cloudways.com/blog/add-recaptcha-to-symfony-3-forms/ |