/** * @return string|null */ public function getModule() { if (null === $this->module && \Nano\Util\Classes::isModuleClass($className = get_class($this))) { list(, $this->module, ) = explode(NS, $className, 3); $this->module = \Nano::app()->modules->nameToFolder($this->module); } return $this->module; }
public function testIsModuleClassShouldReturnFalseWhenNoTopModuleNamespace() { self::assertFalse(\Nano\Util\Classes::isModuleClass('Not\\AppClass')); }