Source for file Common.php
Documentation is available at Common.php
1 <?php 2 /* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */ 3 // +----------------------------------------------------------------------+ 4 // | PHP version 4 | 5 // +----------------------------------------------------------------------+ 6 // | Copyright (c) 1997-2002 The PHP Group | 7 // +----------------------------------------------------------------------+ 8 // | This source file is subject to version 3.0 of the PHP license, | 9 // | that is bundled with this package in the file LICENSE, and is | 10 // | available at through the world-wide-web at | 11 // | http://www.php.net/license/3_0.txt | 12 // | If you did not receive a copy of the PHP license and are unable to | 13 // | obtain it through the world-wide-web, please send a note to | 14 // | license@php.net so we can mail you a copy immediately. | 15 // +----------------------------------------------------------------------+ 16 // | Authors: Davey Shafik <davey@php.net> | 17 // +----------------------------------------------------------------------+ 18 // 19 // $Id: fsource_XML_FOAF__FOAF_Common.php.html,v 1.2 2004/01/15 19:06:48 davey Exp $ 20 21 /** 22 * XML_FOAF Common Methods 23 * @package XML_FOAF 24 * @category XML 25 */ 26 27 /** 28 * XML_FOAF Common Methods 29 * 30 * @package XML_FOAF 31 * @author Davey <davey@php.net> 32 * @version 0.1 33 * @copyright Copyright 2003 Davey Shafik and Synaptic Media. All Rights Reserved. 34 */ 35 36 class XML_FOAF_Common { 37 38 /** 39 * Check if a property is allows for the current foaf:Agent 40 * 41 * @param string $property name of the Property to check. Without a namespace 42 * @access public 43 * @return boolean 44 */ 45 46 function isAllowedForAgent($property) 47 { 48 $property = strtolower($property); 49 $common = array ( 50 'name', 51 'maker', 52 'depiction', 53 'fundedby', 54 'logo', 55 'page', 56 'theme', 57 'dnachecksum', 58 'title', 59 'nick', 60 'givenname', 61 'phone', 62 'mbox', 63 'mbox_sha1sum', 64 'gender', 65 'jabberid', 66 'aimchatid', 67 'icqchatid', 68 'yahoochatid', 69 'msnchatid', 70 'homepage', 71 'weblog', 72 'made', 73 'holdsaccount'); 74 $person = array ( 75 'geekcode', 76 'interest', 77 'firstname', 78 'surname', 79 'family_name', 80 'plan', 81 'img', 82 'myersbriggs', 83 'workplacehomepage', 84 'workinfohomepage', 85 'schoolhomepage', 86 'knows', 87 'publications', 88 'currentproject', 89 'pastproject', 90 'based_near'); 91 $organization = array(); 92 $group = array( 93 'member', 94 'membershipclass'); 95 if (in_array($property,$common) || in_array($property, ${$this->agent})) { 96 return true; 97 } else { 98 return false; 99 } 100 } 101 102 }
|