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
/** | |
* Retrieve a particular user's rank and details, considering descending sort order on that column | |
* @param $column The column name used for sorting | |
* @param $user_id The user ID whose rank we want to obtain | |
* @return array | |
* @throws \Exception | |
*/ | |
public function getUserRank( $column, $user_id ) | |
{ | |
if( !is_numeric( $user_id ) ) |
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
<?php | |
return [ | |
'controllers' => [ | |
\SilverStarMember\Controller\IndexController::class => [ | |
'@member_css', | |
'@member_js', | |
], | |
], |
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
<?php | |
namespace LDP\Form\Filter; | |
class MultibyteGuard implements \Zend\Filter\FilterInterface | |
{ | |
public function filter($value) | |
{ | |
if (!mb_check_encoding($value, 'utf-8')) { | |
$value = ''; |
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
<?php | |
namespace Spec\Application\Controller; | |
use Application\Controller\Plugin\JsonWrapper; | |
use Application\Entity\User; | |
use Application\Mapper\ConfigurationMapper; | |
use Application\Mapper\CouponMapper; | |
use Application\Mapper\UserServerPlanMapper; | |
use Application\Service\CartService; |
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
<?php | |
/* | |
* Typical database config | |
*/ | |
// .... | |
'doctrine' => [ |
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
Homebrew build logs for josegonzalez/php/php70 on macOS 10.11.6 | |
Build date: 2016-09-26 21:45:45 |
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
<?php | |
class LazyControllerFactory implements AbstractFactoryInterface | |
{ | |
/** | |
* Determine if we can create a service with name | |
* | |
* @param ServiceLocatorInterface $serviceLocator | |
* @param $name |
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
namespace Application\Factory\Controller; | |
use Zend\ServiceManager\AbstractFactoryInterface; | |
use Zend\ServiceManager\ServiceLocatorInterface; | |
class AbstractControllerFactory implements AbstractFactoryInterface | |
{ | |
/** | |
* Determine if we can create a service with name |
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
<?php | |
class Foo | |
{ | |
const COOKIE_KEY = '839914B48AE583605F004C784FEF155B39A2C142AD7A747582160E6C14E7EF16'; | |
const COOKIE_IV = '864C9BB8032792391B88C76CF73276F2'; | |
public function encrypt( $what ) | |
{ |
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 fetchAllWithVotes() | |
{ | |
$resultset = $this->select( function( Select $select ){ | |
$sub = new Select( 'votes' ); | |
$sub->columns( array( 'total' => new Expression('COUNT(*)') ) ) | |
->where( 'songs.id = votes.song_id' ); | |
$select->columns( | |
array( |