Created
May 22, 2013 09:58
-
-
Save ephrin/5626498 to your computer and use it in GitHub Desktop.
Test Quest OOP (php version > 5.3)
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 | |
*/ | |
function __construct($array); | |
/** | |
* Creates a new array with the results of calling a provided function on every element in the ArrayHelperInterface. | |
* @param $callback | |
* @return ArrayHelperInterface | |
*/ | |
public function map($callback); | |
/** | |
* Calls a function for each element in the ArrayHelperInterface. | |
* @param $callback | |
* @return void | |
*/ | |
public function each($callback); | |
/** | |
* Returns true if at least one element in the array satisfies the provided testing function. | |
* @dev must finish iteration after first matching | |
* @param Closure|string $callback | |
* @return boolean | |
*/ | |
public function some($callback); | |
/** | |
* Returns true if every element in the array satisfies the provided testing function. | |
* @param Closure|string $callback | |
* @return boolean | |
*/ | |
public function every($callback); | |
/** | |
* | |
* @param object|mixed $value | |
* @return mixed | |
*/ | |
public function indexOf($value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment