<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
factorenergia / yii2-tag-dependency-helper example snippets
/**
* Finds or creates new model using or not using cache(objectTag is applied, not commonTag!)
* @param string|int $id ID of model to find
* @param bool $createIfEmptyId Create new model instance(record) if id is empty
* @param bool $useCache Use cache
* @param int $cacheLifetime Cache lifetime in seconds
* @param bool|\Exception $throwException False or exception instance to throw if model not found or (empty id AND createIfEmptyId==false)
* @return \yii\db\ActiveRecord|null|self|TagDependencyTrait
* @throws \Exception
*/
public static function loadModel(
$id,
$createIfEmptyId = false,
$useCache = true,
$cacheLifetime = 86400,
$throwException = false
)
{
}