public final function last() { if (0 === $this->count()) { throw new UserException('Failed to get the last item, because this bulk is empty.', $this); } return Kit::last($this->itemList); }
/** * Extracts handler name from path. * eg. 'Collection/Content/ResourceCollectionModel' => 'ResourceCollectionModel' * @param string $path * @param string $delimiter * @return string */ public static final function getHandlerFromPath($path, $delimiter = '/') { Kit::ensureString($path); Kit::ensureString($delimiter); return Kit::last(Kit::split($delimiter, $path)); }