Download the PHP package bojaghi/base-object without Composer

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

Base Object

포스트와 포스트 메타, 또는 워드프레스 오브젝트/메타 구조등 여러 데이터 소스를 단일 오브젝트로 추상화아여 보다 편리하게 읽고 쓰기를 구현할 수 있게 해주는 패키지 입니다.

설치

compser require bojaghi/base-object

기본개념

데이터 소스

원래 데이터를 가져오려는 근원지를 말합니다. 워드프레스의 포스트-메타-텀 테이블이 될 수 있고, 커스텀 테이블이 될 수도 있습니다.

어트리뷰트

BaseObject를 위한 어트리뷰트는 3종류가 있습니다.

  1. Primary
  2. Origin
  3. Field

Primary 어트리뷰트

'Primary' (프라이머리) 어트리뷰트는 단순합니다. 해당 프로퍼티가 오브젝트의 식별자임을 선언합니다. 식별자가 없으면 읽고 쓰기 동작을 정상적으로 할 수 없기 때문에 반드시 필요합니다. 단, 편의를 위해 만약 이 어트리뷰트를 사용하지 않아도 'id' 프로퍼티를 인식할 수 있으면 'id'가 프라이머라라고 간주합니다.

Origin 어트리뷰트

'Origin' (오리진) 어트리뷰트는 클래스 선언부 위에서 사용합니다. 사실 BaseObject 자체는 추상화되어 어떻게 읽고 쓰기를 해야 할지 알지 못합니다. 실제로 역할을 하는 것은 이 오리진입니다. 오리진에 명시된 데이터 소스 정보를 이용해 실제 읽고 쓰기는 여기에 구현되어 있습니다.

예를 들어, 커스텀 포스트의 일부 필드와 메타 필드중 일부를 엮어 하나의 오브젝트로 간주하려고 합니다. 그러면 이 오브텍트는 포스트로부터 유래한 것입니다. 그러므로 읽고 쓰기는 사실 포스트의 ID를 식별자로 하며, 워드프레스에서 읽고 쓰기를 위해 만든 API를 사용하는 것이 적절합니다. 실제로 PostOrigin 어트리뷰트는 읽고 쓰기를 위해 wp_insert_post, wp_update_post 등의 워드프레스의 함수를 사용하여 포스트/메타 테이블을 읽고 씁니다.

오리진 어트리뷰트는 읽고 쓰기를 위해 BaseObject와 값을 교환합니다. 이 때 내부적으로 키-값 연관배열을 사용하도록 약속되었습니다. 키는 오브젝트에서 정의한 프로퍼티 변수 이름을 사용합니다.

Field 어트리뷰트

읽고 쓰기가 일어날 때 각 프로퍼티가 데이터 소스의 어떤 필드와 대응되는지를 지정합니다. 또한 필드의 이름, 값을 추상화하는 역할도 합니다.

오리진 어트리뷰트가 객체와 값을 주고 받을 때, 데이터 소스에서 읽어온 원래의 키나 값이 그대로 매핑되라는 보장이 없습니다. 키-값을 주고 받을 때 값을 적절히 통제하는 역할을 합니다.

예시

이렇게 하면 BaseObject 상속을 통해 get(), delete() 메소드를 사용할 수 있습니다.


All versions of base-object with dependencies

PHP Build Version
Package Version
Requires php Version >=8.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 bojaghi/base-object contains the following files

Loading the files please wait ....