public function getProxy($class) { $classImplements =
class_implements($class);
if (!\
is_array($classImplements) || !\
in_array(Enlight_Hook::
class,
$classImplements, true
)) { trigger_error(sprintf('The class "%s" does not implement the Enlight_Hook Interface. It will be thrown in 5.8.',
$class), E_USER_WARNING
);
// throw new Enlight_Hook_Exception('The class' . $class . ' does not implement Enlight_Hook interface.');
} $proxyFile =
$this->
getProxyFileName($class);
$proxy =
$this->
getProxyClassName($class);
if (!
is_readable($proxyFile)) { if (!
file_exists($this->proxyDir
)) { if (!
mkdir($concurrentDirectory =
$this->proxyDir
) && !
is_dir($concurrentDirectory)) { throw new \
RuntimeException(sprintf('Directory "%s" was not created',
$concurrentDirectory));
} } if (!
is_writable($this->proxyDir
)) { throw new \
RuntimeException(sprintf('The directory "%s" is not writable.',
$this->proxyDir
));
}