定制 alaa-hany/peplist 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

alaa-hany/peplist

最新稳定版本:1.0

Composer 安装命令:

composer require alaa-hany/peplist

包简介

Property List manipulation library with Php

README 文档

README

Property List manipulation library with Php

Usage

Install with Composer

    composer require alaa-hany/peplist
    use Alaa\PEPlist\Plist;
    use \Alaa\PEPlist\Types\PrimitiveType;
    //$plist = new Plist("<content> </content>" , "path to save (optional)");
    // or 
    //$plist =   Plist::fromFile("PATH/TO/File");
    // or
    $plist =   Plist::createNew();
    
    var_dump($plist->getRootDict()->getLength());
    var_dump($plist->getRootDict()->getChildren());
    /*
     * NV|Node
     * can be
     * 1 ) non object , but should set pType string , data , date if not default is string
     * 2) AbstractType object 
     * 3) DOMNode
     */
    $plist->getRootDict()
    ->insert(["key" => "keyExample" , "NV|Node" => PrimitiveType::createNewPrimitiveElement("string" , "i am string and this my value")])
    ->insert(["key" => "newKey2" , "NV|Node" => "value" , "pType" => "string" ])
    ->insert([
         "key" => "new Arr" ,
         "NV|Node" => \Alaa\PEPlist\Types\Arr::createEmptyArr()->insert(["NV|Node" => "test" ])]);
    $plist->savePretty("test.plist");

Output(test.plist)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
		<key>keyExample</key>
		<string>i am string and this my value</string>
		<key>newKey2</key>
		<string>value</string>
		<key>new Arr</key>
		<array>
			<string>test</string>
		</array>
	</dict>
</plist>

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-10-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固