Download the PHP package bojaghi/template without Composer

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

Template

워드프레스 플러그인과 테마에서 사용할 수 있는 템플릿

사용법

Bojaghi\Template\Template 클래스를 객체화 합니다. 아래처럼 직접 배열을 넣는 방법이 있습니다.

또는 동일한 배열을 리턴하는 파일 경로를 입력할 수도 있습니다.

입력되는 인자는 하나의 연관배열이며 다음 값을 갖습니다.

템플릿 불러오기

template() 메소드로 템플릿을 불러옵니다.

my-template 템플릿을 찾아 HTML 코드를 그려냅니다. 이 때 'foo': 'bar' 가 문맥(context)로 주어집니다. my-template의 실제 파일은 scopes, extensions, infix를 고려한, 예를 들어, {scope}/my-template{infix}{extension} 처럼 경로를 추적하여 실제 파일이 있는지 검사합니다. 있으면 그 파일을 인클루드 합니다. 이 파일 안에 출력할 요소가 작성되어 있습니다.

$this->get('...') 메소드를 사용하여 문맥변수로 입력한 값을 활용할 수 있습니다.

탬플릿에서 요소 지정하기

start(), end() 메소드로 임의의 요소를 저장할 수 있습니다. 저장된 요소는 fetch() 메소드로 불러올 수 있습니다. 불러올 수 있는 횟수에는 제한이 없으며, 입력할 수 있는 값의 형태에도 제한이 없습니다.

assign() 메소드로 한 줄에 걸쳐 지정할 수도 있습니다.

템플릿 확장하기

한 템플릿이 유사한 구조로 여러번 반복하여 사용된다면, 일일이 템플릿을 만들어 반복하지 마세요. 기존이 되는 상위 템플릿을 생성한 후 하위 템플릿에서 적절히 확장하면 반복을 줄일 수 있습니다.

프래그먼트 불러오기

주로 고정된 코드 조각을 자주 반복할 셩우 fragment() 메소드를 사용해 반복을 줄입니다.


All versions of template with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
bojaghi/helper Version ^1.1
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 bojaghi/template contains the following files

Loading the files please wait ...