Adds extra target to [[targets]].
@param Target $target the log target instance.
@param string|null $name array key to be used to store target, if `null` is given target will be append
to the end of the array by natural integer key.
172935
public function addTarget(Target $target, string $name = null)
    {
        if ($name === null) {
            $this->_targets[] = $target;
        } else {
            $this->_targets[$name] = $target;
        }
    }
348956
public static function get($name = null, $target = '')
    {
        if (!func_num_args()) {
            return static::$_matchers;
        }
        if ($target === true) {
            return isset(static::$_matchers[$name]) ? static::$_matchers[$name] : [];
        }
        if ($target === '') {
            if (isset(static::$_matchers[$name][''])) {
                return static::$_matchers[$name][''];
            }
            throw new Exception("Unexisting default matcher attached to `'{$name}'`.");
        }
        if (isset(static::$_matchers[$name][$target])) {
            return static::$_matchers[$name][$target];
        } elseif (isset(static::$_matchers[$name][''])) {
            return static::$_matchers[$name][''];
        }
        throw new Exception("Unexisting matcher attached to `'{$name}'` for `{$target}`.");
    }
1354613
public function add(InstallTarget $target)
    {
        $this->targets[$target->getName()] = $target;

        if (!$this->defaultTarget) {
            $this->defaultTarget = $target;
        }
    }
331744
public function target($target, $keyName = null)
    {
        $this->target = $target;
        $this->keyName = $keyName;

        return $this;
    }
37587
public static function mark($name)
    {
        $LOG = array('type' => 'BMARK',
            'message' => (!is_null($name) ? $name : ''),
            'logFile' => '',
            'logLine' => '',
            'context' => '',
            'runtime' => round(self::getRelativeTime(), 4),);

        self::$Logs[] = $LOG;
    }
1079629
public function clover(string $target)
    {
        $clover = new Clover();
        $clover->process($this->coverage, $target);
    }
1365753
public void addConfiguredTarget(final TargetDef target) {
    if (target == null) {
      throw new NullPointerException("target");
    }
    target.setProject(getProject());
    this.targetPlatforms.addElement(target);
  }
279039
public function copy($target) {
        if (!parent::copy($target))
            return false;
        return copy($this->fileSource, $target);
    }
982338
public void setTarget(String target)
    {
        ExtendedInfo info = getInfo(target);
        if (info != null)
            info._target = target;
    }
1341215
public static function trigger($name, $data = [], $target = null, $paramClass = EventParam::class)
    {
        static::getInstance()->__trigger($name, $data, $target, $paramClass);
    }
365409
public function updateTarget(Target $target): void
    {
        $query = $this->connection->createQueryBuilder();
        $query
            ->update('ngbm_rule_target')
            ->set('rule_id', ':rule_id')
            ->set('type', ':type')
            ->set('value', ':value')
            ->where(
                $query->expr()->eq('id', ':id')
            )
            ->setParameter('id', $target->id, Type::INTEGER)
            ->setParameter('rule_id', $target->ruleId, Type::INTEGER)
            ->setParameter('type', $target->type, Type::STRING)
            ->setParameter('value', $target->value, is_array($target->value) ? Type::JSON_ARRAY : Type::STRING);

        $this->applyStatusCondition($query, $target->status);

        $query->execute();
    }
861533
private function checkImageTarget($source, $target): void
    {
        $image_array = $this->image_array;
        if (!(\array_key_exists($source, $image_array))) {
            throw new TencentAIException(90703);
        }
        if (!(\in_array($target, $image_array[$source], true))) {
            throw new TencentAIException(90704);
        }
    }
812855
private function addExtension(
        array &$targets,
        string $target,
        string $extension,
        array $attributes
    ): void {
        if (!isset($targets[$target])) {
            $targets[$target] = new \SplPriorityQueue();
        }

        $priority = $attributes['priority'] ?? 0;
        $targets[$target]->insert(new Reference($extension), $priority);
    }
108645
public function write($source, string $target): void
    {
        $source->move(\dirname($target), basename($target));
    }
346953
public function addCrumb($name, $href = false, $target = false)
    {
        $this->links[] = new BreadCrumbItem($name, $href, $target);

        return $this;
    }
220177
public function copy($target) {
        if (!file_exists(dirname($target)))
            if (!mkdir(dirname($target), 0777, true))
                return false;
        return true;
    }
311853
public function setTarget($target)
    {
        if (!$target instanceof ModelInterface) {
            throw new Exception\InvalidArgumentException(sprintf(
                '"%s" works only with ModelInterface targets',
                __CLASS__
            ));
        }
        return parent::setTarget($target);
    }