Giter VIP home page Giter VIP logo

yoclib-propertylist-php's Introduction

yocLib - Property List (PHP)

This yocLibrary enables your project to encode and decode Property List files in PHP.

Status

CI

Installation

composer require yocto/yoclib-propertylist

Use

Serialization

use YOCLIB\PropertyList\PropertyList;

$object = ['string_data',true,false];

$plist = new PropertyList;
$plist->setObject($object);

$xml = $plist->serialize(PropertyList::FORMAT_XML);

Deserialization

use YOCLIB\PropertyList\PropertyList;

$xml = '<plist xlmns="https://www.apple.com/DTDs/PropertyList-1.0.dtd" version="1.0"><array><string>string_data</string><true/><false/></array></plist>';

$plist = new PropertyList;
$plist->deserialize(PropertyList::FORMAT_XML,$xml);

$object = $plist->getObject();

Supported Formats

A Property List comes in one of the following formats:

Format Supported in this library Description
ASCII ⚠️ (No comments yet) (The original, legacy format developed by NeXT for NeXTStep and later OPENSTEP)
GNUstep ASCII ⚠️ (No comments yet) The NeXTStep/OPENSTEP ASCII format, but extended by GNU for GNUstep
GNUstep Binary A binary variant of the property list developed by GNU for GNUstep
XML Introduced in Apple's Mac OS X 10.0; currently version 1.0
Binary Introduced in Apple's MAC OS X 10.2; currently version 1.0
JSON Introduced in Apple's MAC OS X 10.7

Note: At the moment, the implementation of the ASCII formats in this library should not be trusted. It doesn't understand comments, and it has some white-space detection hardcoded, so it is possible that it fails on a valid ASCII Property List.

yoclib-propertylist-php's People

Contributors

ben221199 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.