예제 #1
0
 /**
  * Given a .php file $filePath, parse the file and obtain
  * all the class names defined in it. Attempt to create
  * meta info for that class if it is a potential tag handler.
  * 
  * Returns true if a tag handler was found and it's meta info
  * was loaded, false otherwise.
  */
 public function loadTagHandlerMetaInfo($filePath, $force = false)
 {
     $c = Social_Dsl_TagMetaInfo::getClassnameFromFileName($filePath);
     if ($force || !in_array($c, $this->m_visitedClasses)) {
         $this->m_visitedClasses[] = $c;
         $tmi = Social_Dsl_TagMetaInfo::createMetaInfo($c, $filePath);
         if ($tmi != NULL) {
             $tn = $tmi->getTagName();
             $tns = $tmi->getTagNamespace();
             if ($tns == NULL) {
                 $tns = 'NULL';
             }
             if (!array_key_exists($tns, $this->m_tagMetaInfo)) {
                 $this->m_tagMetaInfo[$tns] = array();
             }
             $this->m_tagMetaInfo[$tns][$tn] = $tmi;
             return true;
         }
     }
     return false;
 }