The most common. For me. Mostly from comments in source code.
Updated with 1.7 code.
/**
<?php | |
/** | |
* Simple MySQL database abstraction class (using PDO). | |
* | |
* @method Database::connect(array $config): Database | |
* @method Database::getInstance(): Database | |
* @method $Database->setConfig($key, $value): void | |
* @method $Database->getConfig(): array | |
* @method $Database->getDBO(): PDO |
<?php | |
/** | |
* Convert a date from french month name to another format | |
* | |
* @param string Date to convert | |
* @param string Format of date to convert | |
* @param string Format for output | |
* @return string | |
* | |
* @php_version >= 5.3 |
/** | |
* Sluggify a string replacing spaces by "-", lowercasing and replacing accents and removing special chars. | |
* | |
* @type {Function} | |
* @return {String} | |
*/ | |
String.prototype.slug = String.prototype.slug || function() { | |
var replace = this.replace(/\s/g, '-'); | |
replace = replace.toLowerCase(); |
<?php | |
/** | |
* Create and read CSV file. | |
* | |
* @example Create CSV from array : | |
* $csv = new Csv; | |
* $csv->setUtf8(true); | |
* $csv->setHeader(['col_1', 'col_2']); | |
* $csv->addRow(['val_1_1', 'val_2_1']); |
<?php | |
$file = dirname(__FILE__) . '/fichier.csv'; | |
$datas = []; | |
// Open the file | |
if(($handle = fopen($file, 'r')) !== false) { | |
$i = 0; | |
$mapping = []; // OPTION 2 only | |
<?php | |
$zip = new ZipArchive; | |
if($zip->open('../fonts/transfonter.org-20160601-124035.zip') === true) { | |
$zip->extractTo('../fonts/Gotham/'); | |
$zip->close(); | |
} |
This wiki is a starting point to teach new git
users how to use such a powerful tool. We will write here every useful command, from cloning to tag checkout. If you find something missing, as usual, add it by yourself.
Even if the majority of us is "pro-shell" and "pro-keyboard", some are way more used to GUIS an mouse interactions. And beautiful things.
Don't worry guys, GitHub & Atlassian have heard our prayers :
<?php | |
/* | |
We want to display a lot of information to the screen = download a lot of HTML = lag. | |
LEt's go for a pagination ! | |
*/ | |
// Huge array with lot of dbig datas. | |
$my_huge_array = array(); | |
// Setting up pagination |
<block type="cms/block" name="block_name"> | |
<action method="setBlockId"><id>block_code</id></action> | |
</block> | |
{{block type="cms/block" block_id="block_code"}} | |
{{block type="catalog/product_list" category_id="79" template="catalog/product/list_random.phtml"}} |