Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use @hidden in method documentation instead of controller arrays #3

Closed
AyeAyeApi opened this issue Dec 9, 2014 · 3 comments
Closed

Comments

@AyeAyeApi
Copy link
Collaborator

Currently you can choose to hide child controllers and endpoints by using arrays in the controller. These aren't very friendly. As we're already using PHPDoc comments to show information to end users, we can also use it to hide it, by using something like an @hidden flag. Eg.

/**
 * This endpoint is hidden
 * @hidden
 */
public function getExampleAction() {...}

This can be extended to controllers once Issue #2 is completed.

@Gisleburt
Copy link
Member

This will be expanded to annotations, including:

AyeAye\hidden - Hides the controller / endpoint from auto documentation
AyeAye\param - Override the @param if necessary
AyeAye\description - Override the description. Can be more verbose too
AyeAye\summary - Override summary (note: PHPDoc already differentiates summary / description so this should be implemented too
AyeAye\returns - Override the return value (note: need to add return value. This wasn't appropriate before as it would reveal class names etc)

Maybe others too, can look through PHPDoc documentation and work out what else is necessary.

@Gisleburt
Copy link
Member

Prior to annotations (and in addition to them), we should use the @ignore phpDocumentor tag. It's not desirable to have this as the only way to have this effect as it prevents the method appearing in phpDocumentor too. However, if you're not documenting the method in phpDocumentor, then you probably don't want it to appear in the API documentation either.

Annotations should allow this to be overridden so it does show though.

@Gisleburt Gisleburt assigned Gisleburt and unassigned AyeAyeApi Feb 7, 2015
@Gisleburt
Copy link
Member

This methodology won't be compatible with the "manage it with arrays" method we currently have. We should leave fixing this until we add annotations and just wrap this into that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant