phpDocumentor parser
[ class tree: parser ] [ index: parser ] [ all elements ]

Class: WindPropertiesParser

Source Location: /parser/WindPropertiesParser.php

Class WindPropertiesParser

Class Overview

properties格式文件解析

properties文件中的注释为单行注释以#标记 同时该文件也允许配置节名称,比如:

  1.  [test]
  2.  path=index.php
  3.  address.zipcode=10000
  4.  address.show=true //true将会被解析为boolean类型的true,false也将被解析成boolean类型的false
则上述的格式会解析成如下数组:
  1.  array(
  2.  'test' => array(
  3.          'path' => 'index.php',
  4.          'address' => array(
  5.              'zipcode' => '10000',
  6.              'show' => true
  7.       )
  8.   )
  9. )

Located in /parser/WindPropertiesParser.php [line 32]



		
				Author(s):
		
		
		
Information Tags:
Version:  $Id: WindPropertiesParser.php 2973 2011-10-15 19:22:48Z yishuo $
Copyright:  ©2003-2103 phpwind.com
License:  http://www.windframework.com

Methods

[ Top ]
Constant Summary

[ Top ]
Method Summary
WindPropertiesParser   __construct()  
array   parse()   解析properties文件里的内容

[ Top ]
Methods
Constructor __construct  [line 42]

  WindPropertiesParser __construct( )


API Tags:
Access:  public


[ Top ]
parse  [line 51]

  array parse( string $filename, [boolean $build = true]  )

解析properties文件里的内容

Parameters:
string   $filename:  文件名
boolean   $build:  是否按格式解析数据默认为true

API Tags:
Access:  public


[ Top ]
Constants
ARRAY_SEP = '.' [line 40]

[ Top ]
COMMENT = '#' [line 34]

[ Top ]
LPROCESS = '[' [line 36]

[ Top ]
RPROCESS = ']' [line 38]

[ Top ]

Documentation generated on Fri, 30 Mar 2012 11:43:39 +0800 by phpDocumentor 1.4.4