2017 © Pedro Peláez
 

library html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

image

ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  • Thursday, July 12, 2018
  • by ivopetkov
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,057 Installations
  • PHP
  • 9 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 16 Versions
  • 14 % Grown

The README.md

HTML Server Components

Addon for Bear Framework, (*1)

This addon brings HTML Server Components to Bear Framework., (*2)

Build Status Latest Stable Version codecov.io License Codacy Badge, (*3)

Download and install

Install via Composer, (*4)

composer require ivopetkov/html-server-components-bearframework-addon

Download an archive, (*5)

Download the latest release from the GitHub page and include the autoload file., (*6)

include '/path/to/the/addon/autoload.php';

Enable the addon

Enable the addon for your Bear Framework application., (*7)

$app->addons->add('ivopetkov/html-server-components-bearframework-addon');

Documentation

A reference to the HTML Server Components object (IvoPetkov\BearFramework\Addons\HTMLServerComponents) is available at $app->components, (*8)

Examples

Let's create a demo component file at app/components/footer.php, (*9)

<html>
    <body>
        <footer>This is the footer</footer>
    </body>
</html>

Convert components code into HTML code, (*10)

echo $app->components->process('<component src="file:app/components/footer.php" />');
// Output:
// <!DOCTYPE html><html><head></head><body><footer>This is the footer</footer></body></html>

Create aliases, (*11)

$app->components->addAlias('footer', 'file:app/components/footer.php');
echo $app->components->process('<component src="footer" />');
// Output:
// <!DOCTYPE html><html><head></head><body><footer>This is the footer</footer></body></html>

Classes

IvoPetkov\BearFramework\Addons\HTMLServerComponents

HTML Server Components utilities, (*12)

Methods
public void addAlias ( string $alias , string $original )

Adds an alias, (*13)

Parameters, (*14)

      $alias, (*15)

            The alias, (*16)

      $original, (*17)

            The original source name, (*18)

Returns, (*19)

      No value is returned, (*20)

public string process ( string $content [, array $options = [] ] )

Converts components code (if any) into HTML code, (*21)

Parameters, (*22)

      $content, (*23)

            The content to be processed, (*24)

      $options, (*25)

            Compiler options, (*26)

Returns, (*27)

      The result HTML code, (*28)

public string processFile ( string $file [, array $attributes = [] ]  [, string $innerHTML = '' ]  [, array $variables = [] ]  [, array $options = [] ] )

Creates a component from the file specified and processes the content, (*29)

Parameters, (*30)

      $file, (*31)

            The file to be run as component, (*32)

      $attributes, (*33)

            Component object attributes, (*34)

      $innerHTML, (*35)

            Component object innerHTML, (*36)

      $variables, (*37)

            List of variables that will be passes to the file. They will be available in the file scope., (*38)

      $options, (*39)

            Compiler options, (*40)

Returns, (*41)

      The result HTML code, (*42)

License

HTML Server Components addon for Bear Framework is open-sourced software. It's free to use under the MIT license. See the license file for more information., (*43)

Author

This addon is created by Ivo Petkov. Feel free to contact me at @IvoPetkovCom or ivopetkov.com., (*44)

The Versions

12/07 2018

dev-master

9999999-dev https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

html bear framework addon html server components

11/07 2018

v0.5.1

0.5.1.0 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

html bear framework addon html server components

29/08 2017

v0.5.0

0.5.0.0 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

html bear framework addon html server components

25/07 2017

v0.5.0-beta.4

0.5.0.0-beta4 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

html bear framework addon html server components

25/05 2017

v0.5.0-beta.3

0.5.0.0-beta3 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

html bear framework addon html server components

21/05 2017

v0.5.0-beta.2

0.5.0.0-beta2 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

html bear framework addon html server components

19/05 2017

v0.5.0-beta.1

0.5.0.0-beta1 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

html bear framework addon html server components

21/10 2016

v0.4.0

0.4.0.0 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

html bear framework addon html server components

03/10 2016

v0.3.0

0.3.0.0 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

html bear framework addon html server components

09/09 2016

v0.2.5

0.2.5.0 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

The Development Requires

html bear framework addon html server components

02/09 2016

v0.2.4

0.2.4.0 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

html bear framework addon html server components

29/08 2016

v0.2.3

0.2.3.0 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

html bear framework addon html server components

06/06 2016

v0.2.2

0.2.2.0 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

html bear framework addon html server components

25/04 2016

v0.2.1

0.2.1.0 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

html bear framework addon html server components

13/04 2016

v0.2.0

0.2.0.0 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

html bear framework addon html server components

19/02 2016

v0.1.0

0.1.0.0 https://github.com/ivopetkov/html-server-components-bearframework-addon

HTML Server Components addon for Bear Framework

  Sources   Download

MIT

The Requires

 

html addon bear framework html server components