atlastk-php
Java package to handle web frontends
Last updated 2 years ago by epeios .
AGPL-3.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install atlastk-php 
SYNC missed versions from official npm registry.

PHP binding of the Atlas toolkit

The Atlas toolkit is a library for web and desktop UI. This is the PHP binding of this toolkit.

Hello World!

Little demonstration

PHP source code

<?php
require( "Atlas.php");

Atlas::launch( "Connect", null );

$dom = new AtlasDOM();

while ( true ) {
  switch( $dom->getAction($id) ) {
  case "Connect":
    $dom->setLayout("", new AtlasTree(), "Main.xsl");
    break;
  case "Typing":
    $dom->setContent("name", $dom->getContent($id));
    break;
  case "Clear":
    if ( $dom->confirm("Are you sure?") ) $dom->setContents(["input" => "", "name" => ""]);
    break;
  }
}
?>

XSL file

This is the content of the Main.xsl file which name is given given as parameter to above $dom.setLayout(...) instruction.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" encoding="UTF-8"/>
  <xsl:template match="/">
    <label>Name:</label>
    <input id="input" maxlength="20" placeholder="Enter a name here" type="text" data-xdh-onevent="input|Typing"/>
    <button data-xdh-onevent="Clear">Clear</button>
    <hr/>
    <h1>
      <span>Hello </span>
      <span style="font-style: italic;" id="name"/>
      <span>!</span>
    </h1>
  </xsl:template>
</xsl:stylesheet>

What's next ?

For more information: http://atlastk.org/.

Current Tags

  • 0.1.0                                ...           latest (2 years ago)

2 Versions

  • 0.1.0                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (5)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |