public function RelativeNamespace($tableName) { foreach ($this->prefixNamespaces as $prefix => $namespace) { if (System\String::StartsWith($prefix, $tableName, !$this->prefixesCaseSensitive)) { return $namespace; } } return ''; }
private function ParseProperty($tokenString, &$nextStop) { $trimString = trim(substr($tokenString, $nextStop)); if (!String::StartsWith(self::PropertySeparator, $trimString)) { return false; } $propStart = strpos($tokenString, self::PropertySeparator, $nextStop) + strlen(self::PropertySeparator); $nextStart = strpos($tokenString, self::ParamsStart, $propStart); if ($nextStart === false) { $nextStart = strpos($tokenString, self::FilterSeparator, $propStart); } $propEnd = $nextStart ?: false; $strProp = $propEnd !== false ? substr($tokenString, $propStart, $propEnd - $propStart) : substr($tokenString, $propStart); $prop = trim($strProp); $nextStop = $nextStart ?: false; $result = ctype_alnum($prop) ? $prop : ''; return $result; }
private function CleanAllForeignKeys() { $tables = $this->connection->GetTables(); foreach ($tables as $table) { if (String::StartsWith('pc_' . String::ToLower($this->manifest->BundleName() . '_'), $table)) { $this->CleanForeignKeys($table); } } }
protected function PostedGroupIDs() { $result = array(); $post = Request::PostArray(); foreach ($post as $name => $value) { if (!String::StartsWith('Usergroup_', $name)) { continue; } $result[] = $value; } return $result; }