Download the PHP package xiaolin/ufa without Composer
On this page you can find all versions of the php package xiaolin/ufa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package ufa
UFA Introduction
UFA: Uniform Frontend Archiecture. A PHP composer plugin. 1
How to use?
-
To add it in your
composer.json
.If this step success, you can find the
vendor/angejia/ufa/
folder under your project. -
To add ufa as a service in your
config/app.php
.After this step, you can use it anywhere without error, such as
ufa()->extJs()
orufa()->extCss()
.etc.Note: although it has no error but it still do nothing in your html. In other words, it doesn't include any styles or scripts when your page loading. It won't work, unless you finish next step.
-
To add ufa views in your
config/view.php
and includeufa styles
&ufa scripts
in your HTML blade view.Add
ufa styles
andufa/scripts
, for example:And untill now, the
ufa()->extJs
andufa()->extCss
works as you expected.
API List
You can use all the following function as this: ufa()->asset('image/home.jpg')
.
-
extJs($data = [])
-
extCss($data = [])
-
asset($data = [])
-
addParam($value = [], $key = '')
getParam($key)
Get single parameter.
getParams()
Get all parameters.# ufa