Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Get Access Via Annotatio

DZone's Guide to

Get Access Via Annotatio

·
Free Resource
// 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:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}