function load($symbol) {

		if ($this->env->knownUnknown($symbol)) {
			return false;
		}

		if ($this->env->autoresolve($symbol)) {
			return true;
		}

		$ns_pos = \strripos($symbol, '\\');

		if ($ns_pos !== false && $ns_pos != 0) {
			$ns = \substr($symbol, 0, $ns_pos + 1);

			// Validate Main Segment
			// =====================

			$mainsegment = null;
			$firstslash = \strpos($ns, '\\');
			if ($firstslash !== false || $firstslash == 0) {
				$mainsegment = \substr($ns, 0, $firstslash);
			}
			else { // no \ in namespace
				// the namespace is the main segment itself
				$mainsegment = $ns;
			}

			if ( ! $this->env->knownSegment($mainsegment)) {
				$this->env->unknownSymbol($symbol);
				$this->env->save();
				return false;
			}


			// Continue Loading Process
			// ========================

			$name = \substr($symbol, $ns_pos + 1);
			$filename = \str_replace('_', '/', $name);
			$dirbreak = \strlen($name) - \strcspn(strrev($name), 'ABCDEFGHJIJKLMNOPQRSTUVWXYZ') - 1;

			if ($dirbreak > 0 && $dirbreak != \strlen($name) - 1) {
				$filename = \substr($name, $dirbreak).'/'.\substr($name, 0, $dirbreak);
			}
			else { // dirbreak == 0
				$filename = $name;
			}

			$nextPtr = \strrpos($ns, '\\next\\');

			$resolution = null;
			if ($nextPtr === false) {
				$resolution = $this->env->findFirstFileMatching($ns, $name, $filename);
			}
			else { // "\next\" is present in string
				$resolution = $this->env->findFirstFileMatchingAfterNext($ns, $name, $filename);
			}

			if ($resolution != null) {
				list($targetfile, $targetns, $target) = $resolution;

				if ( ! $this->env->isLoadedSymbol($target)) {
					$this->env->loadSymbol($target, $targetfile);
				}

				if ($targetns != $ns) {
					$this->env->aliasSymbol($target, $symbol);
				}

				$this->env->save();

				return true;
			}

		}
		# else: symbol belongs to global namespace

		$this->env->unknownSymbol($symbol);
		$this->env->save();

		return false; // failed to resolve symbol; pass to next autoloader
	}
function load($symbol) {

		if ($this->env->knownUnknown($symbol)) {
			return false;
		}

		if ($this->env->autoresolve($symbol)) {
			return true;
		}

		$ns_pos = \strripos($symbol, '\\');

		if ($ns_pos !== false && $ns_pos != 0) {
			$ns = \substr($symbol, 0, $ns_pos + 1);

			// Validate Main Segment
			// =====================

			$mainsegment = null;
			$firstslash = \strpos($ns, '\\');
			if ($firstslash !== false || $firstslash == 0) {
				$mainsegment = \substr($ns, 0, $firstslash);
			}
			else { // no \ in namespace
				// the namespace is the main segment itself
				$mainsegment = $ns;
			}

			if ( ! $this->env->knownSegment($mainsegment)) {
				$this->env->unknownSymbol($symbol);
				$this->env->save();
				return false;
			}


			// Continue Loading Process
			// ========================

			$name = \substr($symbol, $ns_pos + 1);
			$filename = \str_replace('_', '/', $name);
			$dirbreak = \strlen($name) - \strcspn(strrev($name), 'ABCDEFGHJIJKLMNOPQRSTUVWXYZ') - 1;

			if ($dirbreak > 0 && $dirbreak != \strlen($name) - 1) {
				$filename = \substr($name, $dirbreak).'/'.\substr($name, 0, $dirbreak);
			}
			else { // dirbreak == 0
				$filename = $name;
			}

			$nextPtr = \strrpos($ns, '\\next\\');

			$resolution = null;
			if ($nextPtr === false) {
				$resolution = $this->env->findFirstFileMatching($ns, $name, $filename);
			}
			else { // "\next\" is present in string
				$resolution = $this->env->findFirstFileMatchingAfterNext($ns, $name, $filename);
			}

			if ($resolution != null) {
				list($targetfile, $targetns, $target) = $resolution;

				if ( ! $this->env->isLoadedSymbol($target)) {
					$this->env->loadSymbol($target, $targetfile);
				}

				if ($targetns != $ns) {
					$this->env->aliasSymbol($target, $symbol);
				}

				$this->env->save();

				return true;
			}

		}
		# else: symbol belongs to global namespace

		$this->env->unknownSymbol($symbol);
		$this->env->save();

		return false; // failed to resolve symbol; pass to next autoloader
	}
function load ( $ symbol ) { if ( $ this -> env -> knownUnknown ( $ symbol ) ) { return false ; } if ( $ this -> env -> autoresolve ( $ symbol ) ) { return true ; } $ ns_pos = \ strripos ( $ symbol , '\\' ) ; if ( $ ns_pos !== false && $ ns_pos != 0 ) { $ ns = \ substr ( $ symbol , 0 , $ ns_pos + 1 ) ; // Validate Main Segment // ===================== $ mainsegment = null ; $ firstslash = \ strpos ( $ ns , '\\' ) ; if ( $ firstslash !== false || $ firstslash == 0 ) { $ mainsegment = \ substr ( $ ns , 0 , $ firstslash ) ; } else { // no \ in namespace // the namespace is the main segment itself $ mainsegment = $ ns ; } if ( ! $ this -> env -> knownSegment ( $ mainsegment ) ) { $ this -> env -> unknownSymbol ( $ symbol ) ; $ this -> env -> save ( ) ; return false ; } // Continue Loading Process // ======================== $ name = \ substr ( $ symbol , $ ns_pos + 1 ) ; $ filename = \ str_replace ( '_' , '/' , $ name ) ; $ dirbreak = \ strlen ( $ name ) - \ strcspn ( strrev ( $ name ) , 'ABCDEFGHJIJKLMNOPQRSTUVWXYZ' ) - 1 ; if ( $ dirbreak > 0 && $ dirbreak != \ strlen ( $ name ) - 1 ) { $ filename = \ substr ( $ name , $ dirbreak ) . '/' . \ substr ( $ name , 0 , $ dirbreak ) ; } else { // dirbreak == 0 $ filename = $ name ; } $ nextPtr = \ strrpos ( $ ns , '\\next\\' ) ; $ resolution = null ; if ( $ nextPtr === false ) { $ resolution = $ this -> env -> findFirstFileMatching ( $ ns , $ name , $ filename ) ; } else { // "\next\" is present in string $ resolution = $ this -> env -> findFirstFileMatchingAfterNext ( $ ns , $ name , $ filename ) ; } if ( $ resolution != null ) { list ( $ targetfile , $ targetns , $ target ) = $ resolution ; if ( ! $ this -> env -> isLoadedSymbol ( $ target ) ) { $ this -> env -> loadSymbol ( $ target , $ targetfile ) ; } if ( $ targetns != $ ns ) { $ this -> env -> aliasSymbol ( $ target , $ symbol ) ; } $ this -> env -> save ( ) ; return true ; } } # else: symbol belongs to global namespace $ this -> env -> unknownSymbol ( $ symbol ) ; $ this -> env -> save ( ) ; return false ; // failed to resolve symbol; pass to next autoloader }
Load given symbol

@return boolean
Load given symbol