### .getSummaryOperationInstance()

Each type of 'extended' summary

@param string $name the name of the column
@param array $config the configuration of the column at the extendedSummary

@return mixed
@throws CException
516818
protected function getSummaryOperationInstance($name, $config)
	{
		if (!isset($config['class'])) {
			throw new CException(Yii::t(
				'zii',
				'Column summary configuration must be an array containing a "type" element.'
			));
		}

		if (!in_array($config['class'], $this->extendedSummaryOperations)) {
			throw new CException(Yii::t(
				'zii',
				'"{operation}" is an unsupported class operation.',
				array('{operation}' => $config['class'])
			));
		}

		// name of the column should be unique
		if (!isset($this->extendedSummaryTypes[$name])) {
			$this->extendedSummaryTypes[$name] = Yii::createComponent($config);
			$this->extendedSummaryTypes[$name]->init();
		}
		return $this->extendedSummaryTypes[$name];
	}
458563
private function getExtension($type, $name)
    {
        if (!$this->extensions[$type]) {
            $this->discoverExtension($type);
        }

        if (array_key_exists($name, $this->extensions[$type])) {
            return $this->extensions[$type][$name];
        }

        return null;
    }
559403
public function getDescription($name)
    {
        if (!$this->isParsed) {
            $this->parseDefinitions();
        } //if

        $longName = (strlen($name) == 1 ? ( isset($this->shortNames[$name]) ? $this->shortNames[$name] : '') : $name);

        if (isset($this->longNames[$longName])) {
            return $this->longNames[$longName]['description'];
        } else {
            return null;
        } //if
    }
498666
public function getConfigParam($name)
    {
        $result = null;
        $config = $this->getConfiguration();
        $parts  = explode('.', $name);
        foreach ($parts as $key) {
            if (isset($config[$key])) {
                $result = $config = $config[$key];
            } else {
                $result = null;
                break;
            }
        }
        return $result;
    }
344437
public function createAlias($name, $config){
        $handle = fopen(vibius_BASEPATH.$this->aliasCache.$name.'.php','w+');
        if(!$handle){
            throw new Exception('Unable to create alias, fopen not successful');
        }
        $template = $this->getAliasTemplate();
        $template = str_replace('{$className}', $name, $template);
        $template = str_replace('{$providerName}', $config['provider'], $template);
        
        fwrite($handle, $template);
        fclose($handle);
        $this->aliases[$name] = true;
        return true;
    }
982325
public function getCommand($name, $config = array())
    {
        if(!isset($this->__commands[$name]))
        {
            //Create the config object
            $command = new ControllerToolbarCommand($name, $config);

            //Attach the command to the toolbar
            $command->setToolbar($this);

            //Find the command function to call
            if (method_exists($this, '_command' . ucfirst($name)))
            {
                $function = '_command' . ucfirst($name);
                $this->$function($command);
            }
            else
            {
                //Don't set an action for GET commands
                if (!isset($command->href))
                {
                    $command->append(array(
                        'data' => array(
                            'action' => $command->getName()
                        )
                    ));
                }
            }
        }
        else $command = $this->__commands[$name];

        return $command;
    }
410150
private static function _object(&$data, $name)
    {
        $reflection = new ReflectionObject($data);
        $properties = $reflection->getProperties();

        $childCount = count($properties);
        $collapsed = static::_isCollapsed(static::$_level, $childCount);

        // Setup the CSS classes depending on how many children there are
        if ($childCount > 0 && $collapsed) {
            $elementClasses = ' krumo-expand';
        } elseif ($childCount > 0) {
            $elementClasses = ' krumo-expand krumo-opened';
        } else {
            $elementClasses = '';
        }

        print "<li class=\"krumo-child\"> <div class=\"krumo-element $elementClasses\"";
        print 'onMouseOver="krumo.over(this);" onMouseOut="krumo.out(this);">';

        $empty_str = '';
        if ($childCount == 0) {
            $empty_str = ' (empty)';
        }

        $class_name = get_class($data);
        print "<a class=\"krumo-name\">$name</a> <em class=\"krumo-type\">Object</em> ";
        print static::get_separator() . " <strong class=\"krumo-class\">$class_name</strong>$empty_str</div>";

        // If the object is an inherited exception, we want to print out the trace
        // so we add a bogus trace parameter that contains the trace array
        // Note: this is not required (will throw an error) for raw Exceptions
        if ($data instanceof Exception && $class_name !== "Exception") {
            $data->trace = $data->getTrace();
        }

        if ($properties) {
            static::_vars($data);
        }

        // Remove the trace we added
        if ($data instanceof Exception && $class_name !== "Exception") {
            unset($data->trace);
        }

        print "</li>";
    }
1130515
public function parseReflectedController($name, ClassReflection $reflection, ArrayObject $config)
    {
        $annotations = $reflection->getAnnotations($this->annotationManager);

        if ($annotations instanceof AnnotationCollection) {
            $this->processor->processController($name, $annotations);
        }

        foreach ($reflection->getMethods() as $method) {
            $annotations = $method->getAnnotations($this->annotationManager);

            if (!$annotations instanceof AnnotationCollection) {
                continue;
            }

            $this->processor->processMethod($method->getName(), $annotations, $config);
        }

        return $config;
    }
900526
protected function getConfigValue($name)
    {
        if (substr($name, 0, 1) != '/') {
            $name = '/' . $name;
        }
        $config = new JsonConfig(getcwd() . '/composer.json');
        $value  = $config->getConfigValue('/extra/contao' . $name);

        // Fallback to global config.
        if ($value === null) {
            /** @var JsonConfig $config */
            $config = $this->getApplication()->getConfig();
            if ($config !== null) {
                $value = $config->getConfigValue($name);
            }
        }

        return $value;
    }
1296913
protected function parseExtend($name)
    {
        $this->setExtendedClass(null);

        $nameParts = explode('@extend', $name);
        $name = trim($nameParts[0]);
        if (count($nameParts) > 1) {
            $this->setExtendedClass($nameParts[1]);
        }

        return $name;
    }
1162152
public function searchByName( $name, $config = [] ) {

		$modelClass	= static::$modelClass;
		$modelTable	= $this->getModelTable();

		$config[ 'query' ]		= isset( $config[ 'query' ] ) ? $config[ 'query' ] : $modelClass::find();
		$config[ 'columns' ]	= isset( $config[ 'columns' ] ) ? $config[ 'columns' ] : [ "$modelTable.id", "$modelTable.name", "$modelTable.email" ];
		$config[ 'array' ]		= isset( $config[ 'array' ] ) ? $config[ 'array' ] : true;

		$config[ 'query' ]->andWhere( "$modelTable.name LIKE :name", [ ':name' => "$name%" ] );

		return static::searchModels( $config );
	}
455561
public static function getInstance($name, $config = array())
    {
        static $instance;

        if (!$instance) {
            $instance = new static();
        }

        $object = clone $instance;

        $config['name'] = $name;

        $object->append($config)
        ->append(array(
            'attribs' => array(
            'id' => null,
            ),
        ));

        return $object;
    }
218296
public function getBundleMapping($name, $config = [])
    {
        if (!is_string($name)) {
            throw new \LogicException('getBundleMapping() in the Metadata collector expects a string argument only!');
        }

        $cacheName =  'ongr.metadata.mapping.' . md5($name.serialize($config));

        $this->enableCache && $mappings = $this->cache->fetch($cacheName);

        if (isset($mappings) && false !== $mappings) {
            return $mappings;
        }

        $mappings = [];
        $documentDir = isset($config['document_dir']) ? $config['document_dir'] : $this->finder->getDocumentDir();

        // Handle the case when single document mapping requested
        // Usage od ":" in name is deprecated. This if is only for BC.
        if (strpos($name, ':') !== false) {
            list($bundle, $documentClass) = explode(':', $name);
            $documents = $this->finder->getBundleDocumentClasses($bundle);
            $documents = in_array($documentClass, $documents) ? [$documentClass] : [];
        } else {
            $documents = $this->finder->getBundleDocumentClasses($name, $documentDir);
            $bundle = $name;
        }

        $bundleNamespace = $this->finder->getBundleClass($bundle);
        $bundleNamespace = substr($bundleNamespace, 0, strrpos($bundleNamespace, '\\'));

        if (!count($documents)) {
            return [];
        }

        // Loop through documents found in bundle.
        foreach ($documents as $document) {
            $documentReflection = new \ReflectionClass(
                $bundleNamespace .
                '\\' . str_replace('/', '\\', $documentDir) .
                '\\' . $document
            );

            try {
                $documentMapping = $this->getDocumentReflectionMapping($documentReflection);
                if (!$documentMapping) {
                    continue;
                }
            } catch (MissingDocumentAnnotationException $exception) {
                // Not a document, just ignore
                continue;
            }

            if (!array_key_exists($documentMapping['type'], $mappings)) {
                $documentMapping['bundle'] = $bundle;
                $mappings = array_merge($mappings, [$documentMapping['type'] => $documentMapping]);
            } else {
                throw new \LogicException(
                    $bundle . ' has 2 same type names defined in the documents. ' .
                    'Type names must be unique!'
                );
            }
        }

        $this->enableCache && $this->cache->save($cacheName, $mappings);

        return $mappings;
    }
1164259
private static function getDescriptionFromConfig(array $config)
    {
        $data = isset($config['descriptionPath']) && is_readable($config['descriptionPath'])
            ? include $config['descriptionPath']
            : include __DIR__ . '/receiptful-api.php';

        return new Description($data);
    }
1343130
public function createGateway($name, array $config = array())
    {
        if (!isset($this->gateways[$name])) {
            throw new CException(sprintf('Failed to create payment gateway "%s".', $name));
        }
        $config = CMap::mergeArray($this->gateways[$name], $config);
        $gateway = Yii::createComponent($config);
        $gateway->manager = $this;
        $gateway->init();
        return $gateway;
    }
1231124
private function getProviders($name, array $config, ContainerBuilder $container)
    {
        $providers = array();

        foreach ($config['providers'] as $provider) {
            if (strpos($provider, 'doctrine_cache.providers.') === false) {
                $provider = sprintf('doctrine_cache.providers.%s', $provider);
            }

            $providers[] = new Reference($provider);
        }

        return $providers;
    }
1316120
public function getCommand($name, $config = array())
    {
        if(!isset($this->_commands[$name]))
        {
            //Create the config object
            $command = new KControllerToolbarCommand($name, $config);

            //Attach the command to the toolbar
            $command->setToolbar($this);

            //Find the command function to call
            if (method_exists($this, '_command' . ucfirst($name)))
            {
                $function = '_command' . ucfirst($name);
                $this->$function($command);
            }
            else
            {
                //Don't set an action for GET commands
                if (!isset($command->href))
                {
                    $command->append(array(
                        'attribs' => array(
                            'data-action' => $command->getName()
                        )
                    ));
                }
            }
        }
        else $command = $this->_commands[$name];

        return $command;
    }