class Call in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/src/Prophecy/Call/Call.php \Prophecy\Call\Call
Call object.
@author Konstantin Kudryashov <ever.zet@gmail.com>
Hierarchy
- class \Prophecy\Call\Call
Expanded class hierarchy of Call
7 files declare their use of Call
- CallbackPrediction.php in vendor/
phpspec/ prophecy/ src/ Prophecy/ Prediction/ CallbackPrediction.php - CallPrediction.php in vendor/
phpspec/ prophecy/ src/ Prophecy/ Prediction/ CallPrediction.php - CallTimesPrediction.php in vendor/
phpspec/ prophecy/ src/ Prophecy/ Prediction/ CallTimesPrediction.php - NoCallsPrediction.php in vendor/
phpspec/ prophecy/ src/ Prophecy/ Prediction/ NoCallsPrediction.php - ObjectProphecy.php in vendor/
phpspec/ prophecy/ src/ Prophecy/ Prophecy/ ObjectProphecy.php
File
- vendor/
phpspec/ prophecy/ src/ Prophecy/ Call/ Call.php, line 21
Namespace
Prophecy\CallView source
class Call {
private $methodName;
private $arguments;
private $returnValue;
private $exception;
private $file;
private $line;
/**
* Initializes call.
*
* @param string $methodName
* @param array $arguments
* @param mixed $returnValue
* @param Exception $exception
* @param null|string $file
* @param null|int $line
*/
public function __construct($methodName, array $arguments, $returnValue, Exception $exception = null, $file, $line) {
$this->methodName = $methodName;
$this->arguments = $arguments;
$this->returnValue = $returnValue;
$this->exception = $exception;
if ($file) {
$this->file = $file;
$this->line = intval($line);
}
}
/**
* Returns called method name.
*
* @return string
*/
public function getMethodName() {
return $this->methodName;
}
/**
* Returns called method arguments.
*
* @return array
*/
public function getArguments() {
return $this->arguments;
}
/**
* Returns called method return value.
*
* @return null|mixed
*/
public function getReturnValue() {
return $this->returnValue;
}
/**
* Returns exception that call thrown.
*
* @return null|Exception
*/
public function getException() {
return $this->exception;
}
/**
* Returns callee filename.
*
* @return string
*/
public function getFile() {
return $this->file;
}
/**
* Returns callee line number.
*
* @return int
*/
public function getLine() {
return $this->line;
}
/**
* Returns short notation for callee place.
*
* @return string
*/
public function getCallPlace() {
if (null === $this->file) {
return 'unknown';
}
return sprintf('%s:%d', $this->file, $this->line);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Call:: |
private | property | ||
Call:: |
private | property | ||
Call:: |
private | property | ||
Call:: |
private | property | ||
Call:: |
private | property | ||
Call:: |
private | property | ||
Call:: |
public | function | Returns called method arguments. | |
Call:: |
public | function | Returns short notation for callee place. | |
Call:: |
public | function | Returns exception that call thrown. | |
Call:: |
public | function | Returns callee filename. | |
Call:: |
public | function | Returns callee line number. | |
Call:: |
public | function | Returns called method name. | |
Call:: |
public | function | Returns called method return value. | |
Call:: |
public | function | Initializes call. |