/** * The clone method is private, so it can't be call from outside of the class * * @return void * * $throws Exception if developer try to make a clone of WebOperationContext * class. */ public function __clone() { throw ODataException::notAcceptableError("Cloning of WebOperationContext is not allowed!!!"); }
/** * Sets the content length of the output stream * * @param string $value The content length * * @return void * * @throw Exception if $value is not numeric throws notAcceptableError */ public function setResponseContentLength($value) { if (preg_match('/[0-9]+/', $value)) { $this->_operationContext->outgoingResponse()->setContentLength($value); } else { \ODataProducer\Common\ODataException::notAcceptableError("ContentLength:{$value} is invalid"); } }