Skip to content

Instantly share code, notes, and snippets.

@chanmix51
Last active December 27, 2015 22:29
Show Gist options
  • Save chanmix51/7399209 to your computer and use it in GitHub Desktop.
Save chanmix51/7399209 to your computer and use it in GitHub Desktop.
Example of extending fields definition.
<?php
namespace YourApp\Shop;
use YourApp\Shop\Base\CustomerMap as BaseCustomerMap;
use Pomm\Exception\Exception;
use Pomm\Query\Where;
class CustomerMap extends BaseCustomerMap
{
public function getSelectFields($alias = null)
{
$fields = parent::getSelectFields($alias);
unset($fields['password']);
$fields['age'] = sprintf("age(%s)", $this->aliasField('birthdate', $alias));
return $fields;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment