PHP code example of cjp2600 / hiwrapper

1. Go to this page and download the library: Download cjp2600/hiwrapper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cjp2600 / hiwrapper example snippets


$ob = HiWrapper::table("table_name");

$ob = HiWrapper::code("EntityName");

$ob = HiWrapper::id(5);

$ob = HiWrapper::table("table_name")->getList()

$ob = HiWrapper::table("table_name")->add()


$query = HiWrapper::code("EntityName")->query();
$query->registerRuntimeField("other", array(
            "data_type" => HiWrapper::code("OtherEntityName")->getDataType(),
            'reference' => array('=this.UF_OTHER_ID' => 'ref.ID'),
            'join_type' => "LEFT"
        )
    )
    ->setSelect(array("other_name" => "other.UF_NAME", "UF_NAME"))
    ->setFilter(array(
            "LOGIC" => "OR",
            array("other.UF_TYPE" => "old"),
            array("ID" => 3)
        )
    )
    ->setLimit(2);
$object = $query->exec();

 while ( $item = $object->fetch( new Local\Converters\CategoryImportConverter() ) )
 {
     echo "<pre>";
     print_r($item );
     echo "</pre>";
 }