src/ParametricTree/RecursiveLeaf.php
public function setUniqueKey($uniqueKey)
    {
        if (! is_null($this->uniqueKey)) {
            throw new RuntimeException('The unique key was already set.');
        }
        if (! is_int($uniqueKey) && ! is_string($uniqueKey)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid type of specified unique key; must be an integer or '
                . 'an string, "%s" received.',
                gettype($uniqueKey)
            ));
        }
        $this->uniqueKey = $uniqueKey;
    }
public function setUniqueKey($uniqueKey)
    {
        if (! is_null($this->uniqueKey)) {
            throw new RuntimeException('The unique key was already set.');
        }
        if (! is_int($uniqueKey) && ! is_string($uniqueKey)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid type of specified unique key; must be an integer or '
                . 'an string, "%s" received.',
                gettype($uniqueKey)
            ));
        }
        $this->uniqueKey = $uniqueKey;
    }
public function setUniqueKey ( $ uniqueKey ) { if ( ! is_null ( $ this -> uniqueKey ) ) { throw new RuntimeException ( 'The unique key was already set.' ) ; } if ( ! is_int ( $ uniqueKey ) && ! is_string ( $ uniqueKey ) ) { throw new InvalidArgumentException ( sprintf ( 'Invalid type of specified unique key; must be an integer or ' . 'an string, "%s" received.' , gettype ( $ uniqueKey ) ) ) ; } $ this -> uniqueKey = $ uniqueKey ; }
Sets the unique key of leaf.

@param int|string $uniqueKey The unique key

@throws \RuntimeException         If the unique key was already set
@throws \InvalidArgumentException If type of specified key is invalid
Sets the unique key of leaf .