Skip to content
This repository has been archived by the owner on Apr 5, 2020. It is now read-only.

Package::getComment() #139

Merged
merged 3 commits into from Apr 23, 2012
Merged

Package::getComment() #139

merged 3 commits into from Apr 23, 2012

Conversation

thekid
Copy link
Member

@thekid thekid commented Mar 24, 2012

This adds a new method lang.reflect.Package::getComment() which will parse the apidoc comment from a package-info.xp file if existant.

package/with/packageinfo/package-info.xp

<?php
/* This file is part of the XP framework
 *
 * $Id$
 */

/**
 * Demo package
 *
 */
package package.with.packageinfo {

}

Usage

<?php
  Package::forName('package.without.packageinfo')->getComment();   // NULL
  Package::forName('package.with.packageinfo')->getComment();      // "Demo package"
?>

@thekid
Copy link
Member Author

thekid commented Mar 24, 2012

💡 This could be used to make command line reflection include type and package comments - see https://gist.github.com/2183228

@kiesel
Copy link
Member

kiesel commented Apr 23, 2012

+1

thekid added a commit that referenced this pull request Apr 23, 2012
@thekid thekid merged commit b41632c into xp-framework:master Apr 23, 2012
@thekid
Copy link
Member Author

thekid commented Apr 23, 2012

Merged to both master and xp5_9 branches.

thekid added a commit that referenced this pull request Apr 23, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants