SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,053
    Mentioned
    66 Post(s)
    Tagged
    0 Thread(s)

    PHP docs custom tags.

    Is there a way to get the documentor to pick up a custom tag. One I've started using is @implements - which notes what interface implementation requirement is fulfilled by the function. Example of what I'm babbling about...

    Code php:
    /**
     * A function that is implementing a method for an interface in a concrete class
     *
     * @param string
     * @implements SomeInterface
     *
     * @return string
     * @throws FatalException
     */

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    I saw such a thing at a presentation once, PHPLondon 2006 I think, could have been someone from IBM talking about SOA IIRC. Marcus might remember better than I.

    The presenter seemed to get a lot of questions about scalability and the likely time this kind of operation would take, as I recall.

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe you are meant to use @package packagename to group the concrete class and its interface and phpdocs will automatically work out the inheritance.

    Code PHP:
    /**
     * @package Example
     */
    interface A {
        public function foobar() {}
     
    }
    Code PHP:
    /**
     * @package Example
     */
    class B implements A {
        public function foobar() { return 0; }
    }

    (going on memory, I hope it actually does work or I'll look stupid :P)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •