Download the PHP package brianlaclair/eq without Composer

On this page you can find all versions of the php package brianlaclair/eq. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package eq

eq.php 🎯

eq is a function library developed to make outputting HTML a breeze in PHP

the basics

eq has buffered output, meaning that it doesn't actually dump what you've created until you tell it to.

All eq documents start with eq_start(); and end with eq_end();

With eq, we can generate HTML that looks like this ⏬

<!DOCTYPE html>
<html>
<head>
<title>eq.php</title>
<meta name="description" content="example eq page">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="prism.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</head>
<body>
</body>
</html>

from a script that looks like this ⏬

eq_start("eq_title=eq.php",["description", "example eq page"], "style.css", "prism.css", "https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js");
eq_end();

We can add HTML elements after we've called eq_start() by using a plethora of functions

head content

Head information can be added inside of eq_start(), or separately from individual function calls as-needed.

eq_start()

accepts a range of arguments - as seen in the example above, linked items (CSS files, JS files) will automatically import to the head section if listed in the arguments of this function.

meta tags can be included in an eq_start call by listing them as an array, ie, eq_start(["description", "example eq page"]) would give you <meta name="description" content="example eq page"> (it's worth noting that cases are registered not only for standard pattern-breaking meta tags, i.e. ["UTF-8"] as <meta charset=UTF-8>, but also for non-standard meta tags such as og:, fb:, and article: that return property rather than name)

Some items need to be better defined - specifically styles and scripts that are not linked (eg, eq_start("eq_style=.cssclass { background-color: #000; }") or eq_start("eq_script=alert('Hello World!');")) the title of the page can be defined in eq_start() by using "eq_title=This Is A Website!"

With all of the aforementioned cases, you can instead use one of the functions below and omit it from your eq_start arguments.

Reference

function usage
eq_start covered in detail above, accepts an infinite number of arguments
eq_title eq_title(string) can be used anywhere within an eq document to set the title of the page. It can only be called once on a document, whether it be with "eq_title=This Page" in eq_start or standalone below it.
eq_meta eq_meta(string, [string]) automatically generates a meta tag in the head

context-based head functions

these functions will act differently depending on if you've already added body content or not

function usage
eq_style eq_style(string, [head]) can accept either a URL to link, or CSS to output within tags. You can add an optional boolean argument to define if it's in the head or not (defaults based on context)
eq_script eq_script(string, [head])can accept either a URL to link, or script to output within tags. You can add an optional boolean argument to define if it's in the head or not (defaults based on context)

body content

Reference

function usage
eq_div eq_div([class], [id], [attributes]) inserts a <div> tag with optional classes, id, and extra attributes (styles can be accepted, etc)
eq_div_end eq_div_end([ittr]) inserts a </div> tag with optional repetitions. Alternatively, passing a string rather than a number of iterations (or nothing) will result in opening and closing an empty div, such as eq_div_end('class="test"'); would result in <div class="test"></div>
eq_text eq_text(string, [type], [class], [return]) output text matching the first argument. The [type] argument allows you to encompass the text in an element, for example eq_text("Hello World", "h1"); outputs <h1>Hello World</h1>. The class argument allows you to define classes for the element, and setting [return] to true results in the output being returned rather than outputted to the buffer
eq_link eq_link(urlstring, [text], [class], [return]) creates a link to the first argument. [text] defines the display text (if not set, defaults to the URL string).

note: the return argument for eq_link is different than other functions - it is intended to be used in conjunction with eq_text such as: eq_text("Hello world, check out this link: " . eq_link("https://google.com/"));
eq_image eq_image(urlstring, [class], [attr], [return]) inserts an image, with optional classes and HTML attributes (ie, width=200px)
eq_br eq_br([ittr], [return]) insert [ittr] of line breaks, defaults to 1
eq_button eq_button(string, [action], [class])
eq_table eq_table([class], [id]) opens a table
eq_caption eq_caption(string, [class]) add a caption to the table
eq_table_row eq_table_row(cell, cell...) inserts a new row into the open table, with an unlimited number of cell arguments
eq_table_end eq_table_end() closes the table

All versions of eq with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package brianlaclair/eq contains the following files

Loading the files please wait ....