Over a million developers have joined DZone.

Get Access Via Annotatio

·
// Get access via annotation

Faça voce mesmo vosso framework


getDocComment());
	}else{
		$class = new ReflectionClass($className);
		$docblock = strtolower($class->getDocComment());
	}
    if (preg_match('/\@access:(.*$)/m', $docblock, $matches)) {
		$access = trim($matches[1]);
    }
    return $access;
}


$controller = 'MyController';

echo "only class:";
echo getAccess($controller);
 ?>



Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}