private function CleanAllForeignKeys()
 {
     $tables = $this->connection->GetTables();
     foreach ($tables as $table) {
         if (String::StartsWith('pc_' . String::ToLower($this->manifest->BundleName() . '_'), $table)) {
             $this->CleanForeignKeys($table);
         }
     }
 }
Example #2
0
 /**
  * The url protocol string without versioning
  * @return string returns either http or https
  */
 static function Protocol()
 {
     $sp = Server::Variable('SERVER_PROTOCOL');
     $protocol = substr($sp, 0, strpos($sp, '/'));
     if (self::IsHttps() && !String::EndsWith('s', $protocol)) {
         $protocol .= 's';
     }
     return String::ToLower($protocol);
 }
 private function GetNiceName($name)
 {
     $reader = new System\StringReader($name);
     $result = '';
     $prevIsLower = false;
     $idx = 0;
     while (false !== ($ch = $reader->ReadChar())) {
         if ($idx == 0) {
             $result .= System\String::ToLower($ch);
         } else {
             if (ctype_upper($ch)) {
                 if ($prevIsLower) {
                     $result .= ' ' . System\String::ToLower($ch);
                 } else {
                     $result .= System\String::ToLower($ch);
                 }
             } else {
                 $result .= $ch;
             }
         }
         $prevIsLower = ctype_lower($ch);
         ++$idx;
     }
     return $result;
 }