View gist:c5b6511e93d663c137ab
<?php
class Myentity {
/* ... */
/**
* @ORM\Column(name="created_at", type="datetime")
*/
private $createdAt;
View foo.php
<?php
/**
* This is tested with PHP 5.3.10 (Ubuntu), 5.5.14 (OS X) 5.5.9 (Ubuntu).
* Instead of opendir-function you should use "DirectoryIterator" class.
*
* Save the file in /tmp/foo.php and create the following folders
*
* mkdir -p /tmp/1/2/3
* touch /tmp/1/2/3/first
View gist:6997630
<?php echo $this->getLayout()
->createBlock('cms/block')
->setBlockId('my_static_block_id')
->toHtml();
?>
View gist:1616491
$url = parse_url($_SERVER['REQUEST_URI']);
if (isset($url['query'])) {
parse_str($url['query'], $params);
if (isset($params['session'])) {
$_GET['session'] = $params['session'];
$_REQUEST['session'] = $params['session'];
}
foreach ($params as $key => $value) {
$_GET[$key] = $value;
$_REQUEST[$key] = $value;
View TranslateMagentoModule.php
<?php
/**
* Get translatable strings for Magento modules
*
* Tested on Mac & Linux
*
* Usage:
*
* 1. Change the $path variable to where your module is located
* 2. php TranslateMagentoModule.php