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

Class: WindIniParser

Source Location: /parser/WindIniParser.php

Class WindIniParser

Class Overview

ini 格式文件解析

<note>注意:有些保留字不能作为 ini 文件中的键名,
包括:null,yes,no,true 和 false。值为 null,no 和 false 等效于 "",
值为 yes 和 true 等效于 "1"。
字符 {}|&~![()" 也不能用在键名的任何地方,而且这些字符在选项值中有着特殊的意义. </note> true,和false因为会被转义,所以如果希望在解析出的数组中false和true能转变成boolean类型的,则可以给该值加上引号

  1.  [filters]
  2.  filter1.isopen='true'
  3.  filter1.isadd=true
则会解析成:
  1.  array(
  2.      'filters' => array(
  3.          'isopen' => true,//boolean类型
  4.          'isadd' => '1'//string 类型
  5.      )
  6.  )

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



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

Methods

[ Top ]
Constant Summary
ARRAY_SEP   ini中分割数组的标识

[ Top ]
Method Summary
boolean   parse()   解析数据

[ Top ]
Methods
parse  [line 48]

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

解析数据

Parameters:
string   $filename:  ini格式文件
boolean   $build:  是否解析,默认为true

API Tags:
Access:  public


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

ini中分割数组的标识


[ Top ]

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