Mark a profile point.

@param   string  $name  The profile point name.

@return  ProfilerInterface  This method is chainable.

@throws  InvalidArgumentException  If the point already exists.
168714
public function mark($name)
	{
		// If a point already exists with this name.
		if (isset($this->lookup[$name]))
		{
			throw new InvalidArgumentException(
				sprintf(
					'A point already exists with the name %s in the profiler %s.',
					$name,
					$this->name
				)
			);
		}

		// Update the memory peak (it cannot decrease).
		$this->memoryPeakBytes = memory_get_peak_usage($this->memoryRealUsage);

		// Get the current timestamp and allocated memory amount.
		$timeStamp = microtime(true);
		$memoryBytes = memory_get_usage($this->memoryRealUsage);

		// If this is the first point.
		if (empty($this->points))
		{
			$this->startTimeStamp = $timeStamp;
			$this->startMemoryBytes = $memoryBytes;
		}

		// Create the point.
		$point = new ProfilePoint(
			$name,
			$timeStamp - $this->startTimeStamp,
			$memoryBytes - $this->startMemoryBytes
		);

		// Store it.
		$this->points[] = $point;

		// Store the point name and its key in $points, in the lookup array.
		$this->lookup[$name] = count($this->points) - 1;

		return $this;
	}
336495
public function setName($name)
    {
        if ($this->isNameValid($name) !== true) {
            throw new InvalidArgumentException('The name is not valid.');
        }

        $this->name = $name;

        return $this;
    }
1223903
public function getColumnIndex($name)
    {
        if (!\is_array($this->mappingColumns)) {
            $this->mappingColumns = [];

            /* @var BlockInterface $column */
            foreach ($this->getColumns() as $i => $column) {
                $this->mappingColumns[$column->getName()] = $i;
            }
        }

        if (isset($this->mappingColumns[$name])) {
            $column = $this->columns[$this->mappingColumns[$name]];

            return $column->getOption('index');
        }

        throw new InvalidArgumentException(sprintf('The column name "%s" does not exist', $name));
    }
787802
public function getMember($name)
    {
        $members = $this->getMembers();

        if (!isset($members[$name])) {
            throw new \InvalidArgumentException('Unknown member ' . $name);
        }

        return $members[$name];
    }
1260823
private function setCurrentProfile(string $name): self
    {
        if (!$this->mapOfProfiles->hasKey($name)) {
            throw UndefinedProfileException::forProfile($name);
        }

        $this->resolver = null;
        $this->currentProfile = $name;

        return $this;
    }
689601
final public function getTable(string $name): Table
    {
        if (!array_key_exists($name, $this->tables)) {
            throw new InvalidArgumentException('Table '.$name.' not added');
        }

        return $this->tables[$name];
    }
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;
    }
610554
public function getNamer($name)
    {
        if (!isset($this->namers[$name])) {
            throw new \InvalidArgumentException(sprintf('Namer "%s" is not registered.', $name));
        }

        return $this->namers[$name];
    }
837436
public function setName($name)
    {
        if (!preg_match('/^' . self::REGEX_TAGNAME . '$/u', $name)) {
            throw new \InvalidArgumentException(
                'Invalid tag name supplied: ' . $name
            );
        }

        $this->tag = $name;

        return $this;
    }
1050161
public function getProfile($name){
        if(isset($this->profiles[$name])){
            return $this->profiles[$name];
        }
        return NULL;
    }
1123632
private function service($name)
    {
        if (!isset($this->registry[$name])) {
            if (isset(self::$services[$name])) {
                $this->registry[$name] = new self::$services[$name]($this);
            } else {
                throw new InvalidArgumentException(sprintf('Service %s does not implement', $name));
            }
        }

        return $this->registry[$name];
    }
1101466
public function hasAnnotation($name)
    {
        $name = str_replace('@', '', $name);
        foreach ($this as $annotation) {
            /** @var AnnotationInterface $annotation */
            if ($annotation->getName() == $name) {
                return true;
            }
        }
        return false;
    }
507512
public function referenceBegin($name): void
    {
        $this->client->sendBuffer .= $this->client->preparedToSendBuffer;
        $this->client->preparedToSendBuffer = null;
        $signature = sprintf('<H p="1" v="%s">', $name);
        $this->write($signature);
        $signature[6] = '2';
        $this->client->currentArgumentsFormat = $signature;
    }
278142
public function getOAuthParameter($name)
    {
        if (!$this->hasOAuthParameter($name)) {
            throw new \InvalidArgumentException(sprintf('The OAuth request parameter "%s" does not exist.', $name));
        }

        return $this->oauthParameters[rawurlencode($name)];
    }
311813
protected function ensureParameter($name)
    {
        if (!isset($this->$name)) {
            throw new \InvalidArgumentException(get_class($this) . ' is missing parameter: ' . $name);
        }

        return $this->$name;
    }
1201142
public function find($name)
    {
        if (Str::contains($name, '.')) {
            list($fieldset, $control) = explode('.', $name, 2);
        } else {
            $fieldset = 'fieldset-0';
            $control  = $name;
        }

        if (!array_key_exists($fieldset, $this->keyMap)) {
            throw new InvalidArgumentException("Name [{$name}] is not available.");
        }

        return $this->keyMap[$fieldset]->of($control);
    }
384861
protected function setUsername($name) {
        if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name));
        if (!strlen($name))    throw new InvalidArgumentException('Invalid parameter $name: "'.$name.'" (empty)');

        $this->username = $name;
        return $this;
    }