Download the PHP package xbao/think-addons without Composer

On this page you can find all versions of the php package xbao/think-addons. 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 think-addons

��# think-addons

The ThinkPHP 6 Addons Package

## �[ň

> composer require xbao/think-addons

## M�n

### ubM�n

�|�~�[ňTOꁨR(W config �vU_-Nub addons.php �vM�n�e�N �

�Y�g�|�~*gub�S(W}T�NL�gbL�

`php

php think addons:config

`

�_�ubM�n�e�N

### lQqQM�n

`php

'addons' => [

// /f&TꁨR���S�S�c�N��P[M�n�Oo`�؞��/f_/T �

'autoload' => true,

// S_sQ�ꁨR���SM�n�e���Kb�RM�nhooks�Oo`

'hooks' => [

// �S�N�[INY*N��P[

'testhook'=>'test' // .�:N��P[ T�y �(u�N(WN�R-Nꁚ[IN��P[Yt �<P:N�[�s勩�P[�v�c�N �

// Y*N�c�N�S�N(upe�~_N�S�N(u��SRrR

],

'route' => [],

'service' => [],

];

`

b�(W\config�vU_-N�e�^addons.php,�Q�[:N�

`php

<?php

return [

// /f&TꁨR���S�S�c�N��P[M�n�Oo`

'autoload' => false,

// S_sQ�ꁨR���SM�n�e���Kb�RM�nhooks�Oo`

'hooks' => [

// �S�N�[INY*N��P[

'testhook'=>'test' // .�:N��P[ T�y �(u�N(WN�R-Nꁚ[IN��P[Yt �<P:N�[�s勩�P[�v�c�N �

// Y*N�c�N�S�N(upe�~_N�S�N(u��SRrR

],

'service' => [],

];

`

## R�^�c�N

> R�^�v�c�N�S�N(WviewƉ�V-NO(u �_N�S�N(WphpN�R-NO(u

�[ň�[bT����|�~�eO(Wy��v9h�vU_ub T:Naddons�v�vU_ �(W��vU_-NR�^����v�c�N0

Nb��QN*N�OP[�

### R�^test�c�N

> (Waddons�vU_-NR�^test�vU_

### R�^��P[�[�s{|

> (Wtest�vU_-NR�^ Plugin.php {|�e�N0�la�{|�e�N��W[�k�'Y�Q

`php

<?php

namespace addons\test; // �la}T Tzz��ĉ�

use think\Addons;

/

* �c�NKmՋ

* @author byron sampson

*/

class Plugin extends Addons // ��~bthink\Addons{|

{

// ��c�N�v�W@x�Oo`

public $info = [

'name' => 'test', // �c�NhƋ

'title' => '�c�NKmՋ', // �c�N T�y

'description' => 'thinkph6�c�NKmՋ', // �c�N�{�N

'status' => 0, // �r`

'author' => 'byron sampson',

'version' => '0.1'

];

/

* �c�N�[ň�e�l

* @return bool

*/

public function install()

{

return true;

}

/

* �c�NxS}��e�l

* @return bool

*/

public function uninstall()

{

return true;

}

/

* �[�s�vtesthook��P[�e�l

* @return mixed

*/

public function testhook($param)

{

// �(u��P[�eP�v�Spe�Oo`

print_r($param);

// S_MR�c�N�vM�n�OoX[(WS_MR�vU_�vconfig.php�e�N-N ��� N�e

print_r($this->getConfig());

// �S�Nԏ�V!jg �!jg�e�N؞�����S�v:N�c�N�vU_-N�v�e�N0!jg T N��:Nzz�

return $this->fetch('info');

}

}

`

### R�^�c�NM�n�e�N

> (Wtest�vU_-NR�^config.php{|�e�N ��c�NM�n�e�N�S�Nweu0

`php

<?php

return [

'display' => [

'title' => '/f&T>f:y:',

'type' => 'radio',

'options' => [

'1' => '>f:y',

'0' => ' N>f:y'

],

'value' => '1'

]

];

`

### R�^��P[!jg�e�N

> (Wtest->view�vU_-NR�^info.html!jg�e�N ���P[(WO(ufetch�e�l�e�[�^�v!jg�e�N0

`html

<h1>hello tpl</h1>

�Y�g�c�N-N��� g���cb�c�Npenc�vN�R ��S�N(W�c�N-NR�^controllerN�R�e�N �

������c�N-N�vcontroller�eO(uaddon_urluburl���c0

�Y N�

<a href="{:addons_url('Action/link')}">link test</a>

b

<a href="{:addons_url('test://Action/link')}">link test</a>

<h_:N�

test:N�c�N T �Action:Ncontroller-N�v{| T[Y�~�c6RhV�S�N(u.RrR] �link:Ncontroller-N�v�e�l

`

### R�^�c�N�vcontroller�e�N

> (Wtest�vU_-NR�^controller�vU_ �(Wcontroller�vU_-NR�^Index.php�e�N

> controller{|�v(u�lNtp6-N�vcontrollerN�

`php

<?php

namespace addons\test\controller;

class Index

{

public function link()

{

echo 'hello link';

}

}

`

## O(u��P[

> R�^}Y�c�NT1\�S�N(Wck8^N�R-NO(u��c�N-N�v��P[�N

> O(u��P[�v�eP,{�N*N�Spe�S�Nweu

### !jg-NO(u��P[

`html

<div>{:hook('testhook', ['id'=>1])}</div>

`

### phpN�R-NO(u

> �S��/fthinkphp6ck8^Am z-N�v�NaMOnGW�S�NO(u

`php

hook('testhook', ['id'=>1])

`

### �c�NlQqQ�e�l

`php

/

* Yt�c�N��P[

* @param string $event ��P[ T�y

* @param array|null $params OeQ�Spe

@param bool $once /f&T�Sԏ�VNN�~�g

* @return mixed

*/

function hook($event, $params = null, bool $once = false);

/

* ���S�c�N�v�W@x�Oo`

* @param string $name �c�N T

* @return array

*/

function getaddonsinfo($name);

/

* ���S�c�NPlugin�vUS�O

* @param string $name �c�N T

* @return mixed|null

*/

function getaddonsinstance($name);

/

* �c�N>f:y�Q�[̑ub����c�N�vurl

* @param $url (W�c�N�c6RhV-N�S�_eu�c�N T �(W^��c�N-Nub�e�c�[�c�N T0�O��c�N T://�c6RhV/�e�l

* @param array $param

* @param bool|string $suffix ub�vURLT

* @param bool|string $domain �W T

* @return bool|string

*/

function addons_url($url = '', $param = [], $suffix = true, $domain = false);

`

## �c�N�vU_�~�g

### g�~ub�v�vU_�~�g:N

`html

www WEB�r�vU_�b�P[�vU_ �

%%addons �c�N�vU_

%%app �^(u�vU_

% %%controller �c6RhV�vU_

% %%model !j�W�vU_

% %% ... �fY{|�^�vU_

% %

% %%common.php lQqQ�Qpe�e�N

% %%event.php �N�N�[IN�e�N

%

%%config M�n�vU_

% %%app.php �^(uM�n

% %%cache.php X[M�n

% %%console.php �c6R�SM�n

% %%cookie.php CookieM�n

% %%database.php penc�^M�n

% %%filesystem.php �e�N�x�vM�n

% %%lang.php Y��M�n

% %%log.php �e�_M�n

% %%middleware.php -N���NM�n

% %%route.php URL�T�1uM�n

% %%session.php SessionM�n

% %%trace.php TraceM�n

% %%view.php Ɖ�VM�n

%

%%view Ɖ�V�vU_

%%route �1u�[IN�vU_

% %%route.php �1u�[IN�e�N

% %% ...

%

%%public WEB�vU_��[Y����vU_ �

% %%index.php eQ�S�e�N

% %%router.php �_�KmՋ�e�N

% %%.htaccess (u�Napache�v͑�Q

%

%%extend ibU{|�^�vU_

%%runtime �^(u�vЏL��e�vU_��S�Q ��S�[6R �

%%vendor Composer{|�^�vU_

%%.example.env �s�X�Sϑ:y�O�e�N

%%composer.json composer �[IN�e�N

%%LICENSE.txt �cCg�f�e�N

%%README.md README �e�N

%%think }T�NL�eQ�S�e�N

`


All versions of think-addons with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
topthink/framework Version ^6.0
topthink/think-view Version ^1.0
topthink/think-helper Version ^3.0.0
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 xbao/think-addons contains the following files

Loading the files please wait ...