Answers a string of slide class names for the HTML template.

@param boolean $isFirst Slide is first in the list.
@param boolean $isMiddle Slide is in the middle of the list.
@param boolean $isLast Slide is last in the list.

@return string
185146
public function getSlideClass($isFirst = false, $isMiddle = false, $isLast = false)
    {
        return ViewTools::singleton()->array2att($this->getSlideClassNames($isFirst, $isMiddle, $isLast));
    }
873524
public static function carouselIndicators($target, $numSlides, $htmlOptions = array())
    {
        self::addCssClass('carousel-indicators', $htmlOptions);
        $output = self::openTag('ol', $htmlOptions);
        for ($i = 0; $i < $numSlides; $i++) {
            $itemOptions = array('data-target' => $target, 'data-slide-to' => $i);
            if ($i === 0) {
                $itemOptions['class'] = 'active';
            }
            $output .= self::tag('li', $itemOptions, '', true);
        }
        $output .= '</ol>';
        return $output;
    }
639939
private function openFile( $isFirst = false )
    {
        // cleanup file pointer if needed
        if ( $this->fp != null )
        {
            fclose( $this->fp );
            $this->fp = null;
        }

        // open the new file
        $file = $isFirst ? current( $this->files ) : next( $this->files );

        // loop until we can open a file.
        while ( $this->fp == null && $file !== false )
        {
            if ( $file === 'php://stdin' || file_exists( $file ) )
            {
                $fp = fopen( $file, 'r' );
                if ( $fp !== false )
                {
                    $this->fp = $fp;
                    return true;
                }
            }
            $file = next( $this->files );
        }
        return false;
    }
951524
public function isFooterShown($isFirst = false, $isMiddle = false, $isLast = false)
    {
        return $this->isShown('Footer', $isFirst, $isMiddle, $isLast);
    }
688437
protected boolean buildGetParams(StringBuilder sb, boolean isFirst) {
        BuilderListener listener = mListener;
        if (listener != null) {
            return listener.onBuildGetParams(sb, isFirst);
        } else {
            return isFirst;
        }
    }
783634
protected function lastLink(string $ifIssetGet)
    {
        $html = '';

        if ($this->pagination->getCurrentPage() != $this->pagination->getPageEnd()) {
            $points = ($this->pagination->getCurrentPage() < $this->pagination->getNbPages()-($this->pagination->getNumberLinks() + 1))
                    ? '<li class="points"><span>...</span></li>' : '';

            if ($this->pagination->getCssClassP() !== self::CSS_CLASS_BOOTSRPAP) {
                $title = ' title="'.$this->langPagination['last'].'"';
            } else {
                $title = '';
            }

            $href = 'href="?'.self::PAGE_NAME.'='.$this->pagination->getNbPages().''.$ifIssetGet.'"';

            $html .= $points.'<li><a'.$title.' '.$href.'>';
            $html .= $this->pagination->getNbPages();
            $html .= '</a></li>';
        }

        return $html;
    }
261512
private function getFirstContentEndPointer($firstPointer, $openPointer)
    {
        $endPointer = $actualPointer = $firstPointer;

        do {
            /** @var int $actualPointer */
            $actualPointer = TokenHelper::findNextExcluding(
                $this->phpcsFile,
                [T_DOC_COMMENT_STAR, T_DOC_COMMENT_WHITESPACE],
                $actualPointer + 1,
                $this->tokens[$openPointer]['comment_closer'] + 1
            );

            if ($this->tokens[$actualPointer]['code'] !== T_DOC_COMMENT_STRING) {
                break;
            }

            $endPointer = $actualPointer;
        } while (true);

        return $endPointer;
    }
560636
private function checkLinesBetweenDescriptionAndFirstAnnotation(
        int $startPointer,
        int $endPointer,
        ?Annotation $firstAnnotation
    ) {
        if ($firstAnnotation === null || $startPointer === $firstAnnotation->getStartPointer()) {
            return;
        }

        \preg_match('~(\\s+)$~', $this->tokens[$endPointer]['content'], $matches);

        $lines = $matches[1] ?? '';
        $lines .= TokenHelper::getContent(
            $this->phpcsFile,
            $endPointer + 1,
            $firstAnnotation->getStartPointer() - 1
        );

        $linesCount = $this->countLines($lines);

        if ($linesCount === 1) {
            return;
        }

        $this->phpcsFile->addError(
            \sprintf('Expected 1 lines between description and annotations, found %d.', $linesCount),
            $firstAnnotation->getStartPointer(),
            'LinesBetweenDescriptionAndFirstAnnotation'
        );
    }
1002728
public function readInet($isCollectionElement = false) {
		if ($isCollectionElement) {
			$data = $this->read($this->readShort());
		} else {
			$data = $this->data;
		}
		return inet_ntop($data);
	}
988123
public function getName($ucfirst = false)
    {
        $value = $this->camelCase($this->name);
        if (true === $ucfirst) {
            return ucfirst($value);
        } else {
            return $value;
        }
    }
1065564
public function get_coefstring($first=true) {
        if (!is_null($this->coefstring)) {
            return $this->coefstring;
        }

        $overriding_coefstring = null;

        // Stop recursing upwards if this category has no parent
        if (!$first) {

            if ($parent_category = $this->load_parent_category()) {
                return $parent_category->get_coefstring(false);

            } else {
                return null;
            }

        } else if ($first) {

            if ($parent_category = $this->load_parent_category()) {
                $overriding_coefstring = $parent_category->get_coefstring(false);
            }
        }

        // If an overriding coefstring has trickled down from one of the parent categories, return it. Otherwise, return self.
        if (!is_null($overriding_coefstring)) {
            return $overriding_coefstring;
        }

        // No parent category is overriding this category's aggregation, return its string
        if ($this->aggregation == GRADE_AGGREGATE_WEIGHTED_MEAN) {
            $this->coefstring = 'aggregationcoefweight';

        } else if ($this->aggregation == GRADE_AGGREGATE_WEIGHTED_MEAN2) {
            $this->coefstring = 'aggregationcoefextrasum';

        } else if ($this->aggregation == GRADE_AGGREGATE_EXTRACREDIT_MEAN) {
            $this->coefstring = 'aggregationcoefextraweight';

        } else if ($this->aggregation == GRADE_AGGREGATE_SUM) {
            $this->coefstring = 'aggregationcoefextraweightsum';

        } else {
            $this->coefstring = 'aggregationcoef';
        }
        return $this->coefstring;
    }
237980
public function getStyleguideObjectsFromFusionAst($fusionAst)
    {
        $styleguideObjects = [];
        if ($fusionAst && $fusionAst['__prototypes']) {
            foreach ($fusionAst['__prototypes'] as $prototypeFullName => $prototypeObject) {
                if (array_key_exists('__meta', $prototypeObject) && is_array($prototypeObject['__meta']) && array_key_exists('styleguide', $prototypeObject['__meta'])) {
                    list($prototypeVendor, $prototypeName) = explode(':', $prototypeFullName, 2);
                    $styleguideConfiguration = $prototypeObject['__meta']['styleguide'];
                    $styleguideObjects[$prototypeFullName] = [
                        'title' => (isset($styleguideConfiguration['title'])) ? $styleguideConfiguration['title'] : implode(' ', array_reverse(explode('.', $prototypeName))),
                        'path' => (isset($styleguideConfiguration['path'])) ? $styleguideConfiguration['path'] : $prototypeName,
                        'description' => (isset($styleguideConfiguration['description'])) ? $styleguideConfiguration['description'] :  '',
                        'options' => (isset($styleguideConfiguration['options'])) ? $styleguideConfiguration['options'] : null,
                    ];
                }
            }
        }
        return $styleguideObjects;
    }
1056276
protected function getEmbedTemplateName($resourceType, $isInline, $isDenied)
    {
        $configurationReference = $this->embedConfigurationNamespace;

        if ($resourceType === static::RESOURCE_TYPE_CONTENT) {
            $configurationReference .= '.content';
        } else {
            $configurationReference .= '.location';
        }

        if ($isInline) {
            $configurationReference .= '_inline';
        }

        if ($isDenied) {
            $configurationReference .= '_denied';
        }

        if ($this->configResolver->hasParameter($configurationReference)) {
            $configuration = $this->configResolver->getParameter($configurationReference);

            return $configuration['template'];
        }

        $this->logger->warning(
            "Embed tag configuration '{$configurationReference}' was not found"
        );

        $configurationReference = $this->embedConfigurationNamespace;

        $configurationReference .= '.default';

        if ($isInline) {
            $configurationReference .= '_inline';
        }

        if ($this->configResolver->hasParameter($configurationReference)) {
            $configuration = $this->configResolver->getParameter($configurationReference);

            return $configuration['template'];
        }

        $this->logger->warning(
            "Embed tag default configuration '{$configurationReference}' was not found"
        );

        return null;
    }
193442
public function isSummaryShown($isFirst = false, $isMiddle = false, $isLast = false)
    {
        return $this->isShown('Summary', $isFirst, $isMiddle, $isLast);
    }
346612
public function renderListItem($isFirst = false, $isMiddle = false, $isLast = false, $wtf = false)
    {
        return $this->owner->customise([
            'isFirst' => $isFirst,
            'isMiddle' => $isMiddle,
            'isLast' => $isLast
        ])->renderWith($this->owner->getListItemTemplate());
    }
835799
public function fullName($lastNameFirst = false)
    {
        if (!Wasabi::setting('Core.User.has_firstname_lastname')) {
            return $this->username;
        }
        if ($lastNameFirst) {
            return $this->lastname . ', ' . $this->firstname;
        }
        return $this->firstname . ' ' . $this->lastname;
    }
993201
protected function getLayoutPath($entityType, $isCustom = false)
    {
        $path = $this->paths['customPath'];

        if (!$isCustom) {
            $moduleName = $this->getMetadata()->getScopeModuleName($entityType);

            $path = $this->paths['corePath'];
            if ($moduleName !== false) {
                $path = str_replace('{*}', $moduleName, $this->paths['modulePath']);
            }
        }

        $path = Util::concatPath($path, $entityType);

        return $path;
    }