1bfa9370f7
Props andizer. Fixes #46504. git-svn-id: https://develop.svn.wordpress.org/trunk@44903 602fd350-edb4-49c9-b593-d223f7449a82
30 lines
573 B
PHP
30 lines
573 B
PHP
<?php
|
|
|
|
class WP_UnitTest_Factory_Callback_After_Create {
|
|
|
|
/**
|
|
* @var callable
|
|
*/
|
|
public $callback;
|
|
|
|
/**
|
|
* WP_UnitTest_Factory_Callback_After_Create constructor.
|
|
*
|
|
* @param callable $callback A callback function.
|
|
*/
|
|
public function __construct( $callback ) {
|
|
$this->callback = $callback;
|
|
}
|
|
|
|
/**
|
|
* Calls the set callback on given object.
|
|
*
|
|
* @param mixed $object The object to apply the callback on.
|
|
*
|
|
* @return mixed The possibly altered object.
|
|
*/
|
|
public function call( $object ) {
|
|
return call_user_func( $this->callback, $object );
|
|
}
|
|
}
|