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
$reflect = new \ReflectionClass(get_class($this)); | |
return $reflect->getParentClass()->getMethod(__METHOD__)->invokeArgs($this, func_get_args()); |
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
$reflect = new \ReflectionClass(get_class($this)); | |
return $reflect->getParentClass()->getMethod(__FUNCTION__)->invokeArgs($this, func_get_args()); |
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
interface ArrayHelperInterface extends IteratorAggregate, | |
Traversable, | |
ArrayAccess, | |
Serializable, | |
Countable { | |
/** | |
* @param ArrayHelperInterface|ArrayObject|array $array | |
*/ |
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
interface ArrayHelperInterface extends | |
IteratorAggregate, | |
ArrayAccess, | |
Countable { | |
/** | |
* @param ArrayHelperInterface|ArrayObject|array $array | |
*/ | |
function __construct($array); |
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
$array = array('a'=>1,'b'=>2,'c'=>10,'d'=>false,'f'=>6); | |
$array = new ArrayHelper($array); | |
$array->some(function($key, $value, ArrayHelperInterface $array){ | |
return $value && is_string($key) && count($array)>$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
$array = array('_0' => 0); | |
$array = new ArrayHelper($array); | |
$func = function ($key, $value, ArrayHelperInterface $array) { | |
static $i; | |
$i++; | |
$c = count($array); | |
if (is_string($key) && $c < $value) { | |
unset($array[$key]); |
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
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208 | |
# Configuration name server-22 generated for [email protected] at 2013-02-26 08:48:03 | |
[mysql] | |
# CLIENT # | |
port = 3306 | |
socket = /var/run/mysqld/mysqld.sock | |
[mysqld] |
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
var current = db.getName(); | |
print('logged in from owner. Making auth.'); | |
var adm = db.getSiblingDB('admin'); | |
if(adm.auth('admin','admin')){ | |
print('ok'); | |
}else{ |
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
function cols(sort){ | |
var colNames = new String(db.getCollectionNames()).split(','); | |
var longest = 0; | |
colNames.forEach( | |
function(colname){ | |
if(colname.length > longest){ | |
longest = colname.length; |
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
search: @(return|param) (\w+[\\]) | |
replace: @$1 \\\\$2 |
OlderNewer