| 
| static  | fromURL ($url) | 
|   | 
| static  | findOneByURL ($url) | 
|   | 
| static  | tableScheme ($db_table) | 
|   | 
| static  | expireTableScheme () | 
|   | 
| static  | find ($id) | 
|   | 
| static  | exists ($id) | 
|   | 
| static  | countBySql ($sql=1, $params=[]) | 
|   | 
| static  | create ($data) | 
|   | 
| static  | build ($data, $is_new=true) | 
|   | 
| static  | buildExisting ($data) | 
|   | 
| static  | import ($data) | 
|   | 
| static  | findBySQL ($sql, $params=[]) | 
|   | 
| static  | findOneBySQL ($where, $params=[]) | 
|   | 
| static  | findThru ($foreign_key_value, $options) | 
|   | 
| static  | findEachBySQL ($callable, $sql, $params=[]) | 
|   | 
| static  | findMany ($pks=[], $order='', $order_params=[]) | 
|   | 
| static  | findEachMany ($callable, $pks=[], $order='', $order_params=[]) | 
|   | 
| static  | findAndMapBySQL ($callable, $where, $params=[]) | 
|   | 
| static  | findAndMapMany ($callable, $pks=[], $order='', $order_params=[]) | 
|   | 
| static  | deleteBySQL ($where, $params=[]) | 
|   | 
| static  | toObject ($id_or_object) | 
|   | 
| static  | __callStatic ($name, $arguments) | 
|   | 
◆ __construct()
      
        
          | __construct  | 
          ( | 
            | 
          $id = null | ) | 
           | 
        
      
 
Constructor of the object. Provides a fallback if a url is passed instead of the usually expected numeric id in order to not break backward compatibility. But this constructor will fail miserably if a url is passed that is not in the database. This was chosen by design to encourage the correct use of an id.
- Parameters
 - 
  
    | mixed | $id | Numeric id, existing url or null  | 
  
   
Reimplemented from SimpleORMap.
 
 
◆ configure()
  
  
      
        
          | static configure  | 
          ( | 
            | 
          $config = [] | ) | 
           | 
         
       
   | 
  
staticprotected   | 
  
 
Configures this model.
- Parameters
 - 
  
    | Array | $config | Configuration array  | 
  
   
Reimplemented from SimpleORMap.
 
 
◆ fetch()
Fetches information from the url by getting the contents of the webpage, parse the webpage and extract the information from the opengraph meta-tags. If the site doesn't have any opengraph-metatags it is in fact no opengraph node and thus no data will be stored in the database. Only $url['is_opengraph'] === '0' indicates that the site is no opengraph node at all.
- Todo:
 - The combination of FileManager::fetchURLMetadata() and the following request leads to two requests for the open graph data. This should be fixed due to performance reasons. 
 
 
 
◆ findOneByURL()
  
  
      
        
          | static findOneByURL  | 
          ( | 
            | 
          $url | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Specialized findOneByURL function that uses the hash to find the appropriate record instead.
- Parameters
 - 
  
    | string | $url | URL to find record for  | 
  
   
- Returns
 - mixed instance of OpenGraphURL if available, null otherwise 
 
 
 
◆ fromURL()
Create an instance of this model given url. Differs from findOneByURL insofar that it will return a new object with the given url set instead of null.
- Parameters
 - 
  
  
 
- Returns
 - OpenGraphURL Either existing instance or a new instance for the given url 
 
 
 
◆ getAudioFiles()
Returns an array with all audiofiles that are provided by the opengraph-node. Each array-entry is an array itself with the url as first parameter and the content-type (important for <audio> tags) as the second.
- Returns
 - array(array($url, $content_type), ...) 
 
 
 
◆ getMediaFiles()
Returns an array with all mediafiles that are provided by the opengraph-node. Each array-entry is an array itself with the url as first parameter and the content-type (important for <audio> or <video> tags) as the second.
- Parameters
 - 
  
    | string | $type | "audio" or "video"  | 
  
   
- Returns
 - array(array($url, $content_type), ...) 
 
 
 
◆ getVideoFiles()
Returns an array with all videofiles that are provided by the opengraph-node. Each array-entry is an array itself with the url as first parameter and the content-type (important for <video> tags) as the second.
- Returns
 - array(array($url, $content_type), ...) 
 
 
 
◆ render()
Renders a small box with the information of the opengraph url. Used in blubber and in the forum.
- Returns
 - string html output of the box. 
 
 
 
◆ setValue()
      
        
          | setValue  | 
          ( | 
            | 
          $field,  | 
        
        
           | 
           | 
            | 
          $value  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Sets value of a column. Overwritten so that the hash is also set when the url is set.
- Parameters
 - 
  
    | string | $field |  | 
    | string | $value |  | 
  
   
- Returns
 - string 
 
- See also
 - SimpleORMap::setValue 
 
Reimplemented from SimpleORMap.
 
 
◆ store()
Stores the object and fetches the opengraph information when either the object is new or outdated.
- Returns
 - int Number of updated records 
 
Reimplemented from SimpleORMap.
 
 
◆ EXPIRES_DURATION
      
        
          | const EXPIRES_DURATION = 86400 | 
        
      
 
 
The documentation for this class was generated from the following file: