예제 #1
0
 function _validate_source($source)
 {
     $source_array = array();
     foreach ($source as $item) {
         if (is_object($item)) {
             $source_array[] = $item;
             continue;
         }
         if (is_numeric($item)) {
             $tag = new AMP_Content_Tag(AMP_Registry::getDbcon(), $item);
             if ($tag->hasData()) {
                 $source_array[] = $tag;
                 continue;
             }
         }
     }
     return $source_array;
 }
예제 #2
0
 /**
  * setTag 
  * 
  * @param   mixed     $tag    a string or integer denoting a tag 
  * @access public
  * @since  3.7.3
  * @return void
  */
 function setTag($tag)
 {
     require_once 'AMP/Content/Tag/Tag.php';
     $tag = new AMP_Content_Tag($this->dbcon, $tag);
     if (!$tag->hasData()) {
         return false;
     }
     $this->tag =& $tag;
 }