Completed
Push — master ( ec2c00...c3f83b )
by Markus
05:40
created

Default_SendWsdlAction::execute()   B

Complexity

Conditions 5
Paths 12

Size

Total Lines 17
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 5
eloc 11
nc 12
nop 1
dl 0
loc 17
rs 8.8571
c 0
b 0
f 0
1
<?php
2
use Agavi\Request\RequestDataHolder;
3
4
class Default_SendWsdlAction extends SampleAppDefaultBaseAction
5
{
6
	public function execute(RequestDataHolder $rd)
7
	{
8
		if(Config::get('core.debug')) {
9
			ini_set('soap.wsdl_cache_enabled', 0);
10
		}
11
		
12
		try {
13
			$sc = AgaviContext::getInstance('soap');
14
			$wsdl = $sc->getRouting()->getWsdlPath();
15
			if($wsdl && is_readable($wsdl)) {
16
				$this->setAttribute('wsdl', $wsdl);
17
				return 'Success';
18
			}
19
		} catch(Exception $e) {
20
		}
21
		return 'Error';
22
	}
23
}
24
25
?>