markuszeller/php-annotations 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

markuszeller/php-annotations

最新稳定版本:v1.0.0

Composer 安装命令:

composer require markuszeller/php-annotations

包简介

Simple tool for parsing annotations

README 文档

README

This class helps reading annotations.

PHP from Packagist Install with Composer)

Features

  • reads from a string
  • reads from a file
  • supports multiline annotation values
  • auto trims values

Note

Reads only annotations from DocComments included in /** [...] */.

Look into that double asterisk.

Usage

Initialise an Annotation object

require_once '../vendor/autoload.php';
use markuszeller\Annotations\Reader;

$reader = new Reader();

Put some data into the annotation reader instance

  • by a string

      $cssString = file_get_contents('./template.css');
      $reader->loadFromString($cssString);
    
  • by file

      if($reader->loadFromFile("./example.css") === false) {
          exit("Error loading file");
      }
    

Get all the annotations as an associative array

$annotationArray = $reader->getAnnotations();

Get a single annotation by name

$title = $reader->getAnnotation('title');

统计信息

  • 总下载量: 244
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-08-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固