Set the classname to use when building objects.

@param string $class The classname to use.
@param string $fallback The classname to use when the preferred class does not exist.
@return void
180191
protected function _setClassName($class, $fallback)
    {
        if (!class_exists($class)) {
            $class = $fallback;
        }
        $this->_className = $class;
        $this->_datetimeInstance = new $this->_className;
    }
599026
public function setClassName($sClass)
    {
        $this->sPrefix = $this->getOption('core.prefix.function');

        $sClass = trim($sClass, '.\\ ');
        if(!$sClass)
        {
            return $this;
        }

        if(!($xCallable = $this->xRepository->getCallableObject($sClass)))
        {
            // Todo: decide which of these values to return
            // return null;
            return $this;
        }

        $this->sPrefix = $this->getOption('core.prefix.class') . $xCallable->getJsName() . '.';
        return $this;
    }
467135
public function removeClass(?string $class): void
  {
    // If class is empty or no classes are set return immediately.
    if ($class===null || $class==='' || !isset($this->attributes['class'])) return;

    // Remove the class from the list of classes.
    $this->attributes['class'] = implode(' ', array_diff(explode(' ', $this->attributes['class']), [$class]));
  }
502770
public function setClass($identifier, $class)
    {
        $class      = trim($class);
        $identifier = (string) $identifier;

        $this->_classes[$identifier] = $class;

        return $this;
    }
348754
public function setClass($identifier, $class)
    {
        $identifier = (string) $identifier;

        if(parent::offsetExists($identifier))
        {
            $data = array(
                'identifier' =>  parent::offsetGet($identifier),
                'class'      =>  $class
            );

            apc_store($this->getNamespace().'-object_'.$identifier, $data);
        }

        return  parent::setClass($identifier, $class);
    }
374038
public function setCacheClass($class)
  {
    $prev = $this->configuration['cache_class'];
    if (!isset($this->configuration['classes'][$class]) &&
        isset($this->configuration['classes'][$prev])) {
      $this->configuration['classes'][$class] =
          $this->configuration['classes'][$prev];
    }
    $this->configuration['cache_class'] = $class;
  }
878161
public function setFallbackMappedType($fallbackMappedType)
    {
        if (!Type::hasType($fallbackMappedType)) {
            throw TypeException::typeDoesNotExist($fallbackMappedType);
        }

        $this->fallbackMappedType = $fallbackMappedType;
    }
437005
protected function setClasses()
    {
        $classes = array();

        if (isset($this->current_route['pattern'])) {
            $pattern = $this->current_route['pattern'] ? $this->current_route['pattern'] : 'front';
            foreach (explode('/', $pattern) as $part) {
                if (ctype_alpha($part)) {
                    $classes[] = "gc-$part";
                }
            }
        }

        if ($this->is_maintenance) {
            $classes[] = "gc-maintenance";
        }

        $this->data['_classes'] = $classes;
    }
960105
public function addClass(PhpClass $class)
    {
        if ($this->classExists($class->getIdentifier())) {
            throw new Exception('A class of the name (' . $class->getIdentifier() . ') does already exist.');
        }

        $this->classes[$class->getIdentifier()] = $class;
    }
790404
public function setFallbackImage($fallbackImage)
    {
        $fallbackImagePath = realpath($fallbackImage);

        if(file_exists($fallbackImagePath) && is_readable($fallbackImagePath))
        {
            $this->fallbackImage = $fallbackImagePath;

            return;
        }

        throw new Exception("Default image missing or not readable, path: $fallbackImage");
    }
975946
protected function setClassesToRun()
    {
        foreach ($this->listOfFiles as $filename => $file) {
            // Exclude non-PHP files
            if (!Utils::isFilePhp($filename)) {
                continue;
            }

            // Exclude non-Controller classes
            if (!Utils::doesFileContain($filename, 'extends Controller')) {
                continue;
            }

            // Set the classes to run
            $this->classesToRun[] = $this->namespace . '\\' . pathinfo($filename, PATHINFO_FILENAME);
        }
    }
1210504
public function updateClassNames(&$classes)
    {
        // Update Class Names (via parent):
        
        parent::updateClassNames($classes);
        
        // Update Class Names:
        
        if ($this->owner->isEdgeToEdge()) {
            $classes[] = $this->style('column.edge-to-edge');
        }
    }
1087818
public function addClass($class)
    {
        if (isset($this->attr['class'])) {
            $classes = explode(' ', $this->attr['class']);
            if (!in_array($class, $classes)) {
                $classes[] = $class;
            }

            $this->attr['class'] = implode(' ', $classes);
        } else {
            $this->attr['class'] = $class;
        }
    }
269806
public function setParentClassNames(array $classNames)
    {
        $this->parentClassNames = $classNames;

        if (count($classNames) > 0) {
            $this->rootDocumentName = array_pop($classNames);
        }
    }
276625
protected function setInferredClassName()
	{
		$singularize = ($this instanceOf HasMany ? true : false);
		$this->setClassName(\ChickenTools\Str::classify($this->attributeName, $singularize));
	}
429328
public function updateClassNames(&$classes)
    {
        if (!$this->apply()) {
            return;
        }
        
        $classes[] = $this->style('button');
        
        if ($class = $this->owner->ButtonTypeClass) {
            $classes[] = $class;
        }
        
        if ($class = $this->owner->ButtonSizeClass) {
            $classes[] = $class;
        }
    }
936682
protected function defineEntity(ClassDefinition $class)
    {
        $class->property($this->driverName)->asString();

        $class->property($this->options)->asObject(FormObject::class);
    }