@param string $name
@return int

@throws \Exception
352063
public function exec(): int
    {

        $output = [];
        $currentDir = getcwd();
        $returnValue = -1;

        $command = $currentDir . "/bin/box.phar compile";

        exec($command, $output, $returnValue);

        if ($returnValue != 0) {
            throw new \Exception("Error while generating phar: $returnValue");
        }

        return $returnValue;

    }
1156898
private function getAnnotationIndex($name)
    {
        for($i = 0; $i < count($this->annotations); $i++)
        {
            if($this->annotations[$i] instanceof $name)
            {
                return $i;
            }
        }

        return -1;
    }
478081
private function getStatValue($name)
    {
        if (isset($this->_extra[self::ENTRY_STATS][$name])) {
            return $this->_extra[self::ENTRY_STATS][$name];
        }

        return 0;
    }
190800
public function attrIndex($name)
    {
        if (!isset($this->attrs)) { return -1; }

        for ($i = 0, $len = count($this->attrs); $i < $len; $i++) {
            if ($this->attrs[$i][0] === $name) { return $i; }
        }
        return -1;
    }
301266
private function getProcessorClassName($name)
    {
        $className = ucfirst($name) . 'Processor';

        foreach($this->processorNamespaces as $namespace) {
            $fullyQualifiedClassName = $namespace . '\\' . $className;
            if(class_exists($fullyQualifiedClassName)) {
                return $fullyQualifiedClassName;
            }
        }

        throw new \Exception('Class ' . $fullyQualifiedClassName . ' not found');
    }
1047158
function getEvent(string $name) {
        if(isset($this->wsevents[$name])) {
            return $this->wsevents[$name];
        }
        
        throw new \Exception('Unable to find WS event');
    }
1343600
public function service($name)
    {
        if (!$this->services->offsetExists($name)) {
            throw new Exception(sprintf(Exception::SERVICE_NOT_EXISTS, $name));
        }

        return $this->services->offsetGet($name);
    }
514225
public function get($name)
    {
        if (isset($this->instances[$name])) {
            return $this->instances[$name];
        }
        if (! isset($this->registry[$name])) {
            $exceptionClass = static::NOT_FOUND_EXCEPTION;
            throw new $exceptionClass(
                sprintf(static::NOT_FOUND_MESSAGE, $name)
            );
        }
        try {
            $this->instances[$name] = $this->build($this->registry[$name], $name);
        } catch (Exception $e) {
            throw new RuntimeException(
                sprintf(static::BUILD_FAILURE_MESSAGE, $name),
                null,
                $e
            );
        }

        return $this->instances[$name];
    }
567909
public function getInt($name, $default = null)
    {
        $value = $this->get($name, $default);
        return null === $value ? null : intval($value);
    }
48752
public function getIndex(string $name)
    {
        if (!isset($this->indexes[$name])) {
            Throw new IndexException(sprintf('A field named "%s" does not exist in this table', $name));
        }

        return $this->indexes[$name];
    }
755697
public function __isset( $name )
    {
        if ( $this->fields == null )
        {
            if ( $this->activeLanguage === null )
            {
                throw new Exception( "You need to define ezpFieldSet::activeLanguage to query fields directly" );
                return false;
            }
            else
            {
                return isset( $this->childrenFieldSets[$this->activeLanguage]->{$name} );
            }
        }
        else
        {
            return isset( $this->fields[$name] );
        }
    }
1075763
public function getIntValue($name):?int
    {
        $value = $this->offsetGet($name);
        if (is_null($value)) {
            return null;
        }

        return (int)$value;
    }
1364551
public function getConfiguration($name)
    {
        if (!isset($this->config[$name]['configuration_class'])) {
            throw new \Exception(sprintf('Configuration for "%s" not found', $name));
        }
        $class = $this->config[$name]['configuration_class'];

        return new $class();
    }
1107091
public function getField($name)
    {
        $f = $this->hasField($name);

        if ($f === false) {
            throw new Exception(['Field is not defined in model', 'model' => get_class($this), 'field' => $name]);
        }

        return $f;
    }
1316873
public function staticPartLength($name)
    {
        $nestedTypes = $this->nestedTypes($name);

        if ($nestedTypes === false) {
            $nestedTypes = ['[1]'];
        }
        $count = 32;

        foreach ($nestedTypes as $type) {
            $num = mb_substr($type, 1, 1);

            if (!is_numeric($num)) {
                $num = 1;
            } else {
                $num = intval($num);
            }
            $count *= $num;
        }

        return $count;
    }
361111
public function getService($name)
    {
        try {
            if (!$this->isRegisteredService($name)) {
                $this->registerService($name);
            }
            return $this->di->get($name);
        } catch (\Phalcon\DI\Exception $ex) {
            throw new Exception($ex->getMessage().', using: '.$name);
        }
    }
598446
public function getGenerator($name): GeneratorInterface
    {
        if (isset($this->generators[$name])) {
            return $this->generators[$name];
        }

        throw new Exception(sprintf('Generator %s does not exist.', $name));
    }